Shifting question

Paul Jackson paul at hcr.UUCP
Fri Jul 29 00:35:52 AEST 1988


In article <11637 at steinmetz.ge.com> davidsen at crdos1.UUCP (bill davidsen) writes:
>[Much stuff on the legality of sizeof in the preprocessor

>Chris Tokek said that there was a obscure phrase which
>disallowed use of sizeof in the preprocessor, but 3.8.1 on the
>-- 
>	bill davidsen		(wedu at ge-crd.arpa)
>  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
>"Stupidity, like virtue, is its own reward" -me

	There is a footnote (number 74) on page 84 of the draft that explains
the reasoning of the committee

"Because the controlling constant expression is evaluated during translation
phase 4, all identifiers either are or are not macro names - there simply are
no keywords, enumeration constants, and so on."

	Because of the phases of translation, the whole question of whether
sizeof is legal just doesn't arise.  Admittedly one has to read the standard
very carefully to realize this, but that is why the footnote was added.

					Paul Jackson
					(utzoo|utcsri)!hcr!paul



More information about the Comp.std.c mailing list