Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.std.c Subject: A glitch for "register" Message-ID: <335@twwells.uucp> Date: 17 Jan 89 20:50:11 GMT Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 36 Expires: References: Sender: Followup-To: Keywords: I just noticed something. The dpANS (May 88) says that `&' can't be applied to a register variable. However, it does not say, except in a footnote, that register int a[4]; a[0] = 0; is illegal. And footnotes are not part of the standard. This is an obvious oversight, parhaps fixed in the latest? (Or perhaps I just miseed where they said it?) However, that is not the glitch I had in mind. Consider this: register struct { int foo; } bletch; int *ptr; ptr = &bletch.foo; It does not seem to violate the standard, though obviously it should. Here is what the May 88 standard says: (3.3.3.2) "The operand [of &] ... shall be ... an lvalue that designates an object that ... is not declared with the register storage-class specifier." It seems to need an additional clause saying something like "and is not contained within an object declared with the register storage-class specifier". --- Bill { uunet!proxftl | novavax } !twwells!bill