Another sizeof question

Michael Meissner meissner at osf.org
Sat Nov 3 06:43:04 AEST 1990


In article <1990Nov2.034300.3065 at tkou02.enet.dec.com>
diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:

| In article <MEISSNER.90Oct30121525 at osf.osf.org> meissner at osf.org (Michael Meissner) writes:
| 
| >When I worked at Data General on the MV C compiler, I added sizeof
| >support to the preprocessor (which is called as a coroutine from
| >within the lexer).  Because the preprocessor was built into the
| >compiler, it involved no hand wringing.  In fact, it would have been
| >more work to disable sizeof, since the same parser was used to parse
| >#if/#elif expressions as the normal expressions.
| 
| "WOULD HAVE BEEN more work"?  Do you mean that this work was not done?
| As I understand the standard, a conforming processor is not allowed to
| support this extension, even with a warning, even with a #pragma, etc.
| A conforming processor is REQUIRED to substitute 0 for the identifier
| sizeof (in an #if expression) if sizeof doesn't have a #defined value.

Given that the feature in question was written BEFORE the first ANSI
standards meeting took place (I know I wrote the feature, and was at
the first meeting), I don't see how I should have been clarvoient to
predict the twisty little turns that a future standard would take.
Yes, to meet the standard nowadays the work would have to be done, to
recognize and flag the use of sizeof.
--
Michael Meissner	email: meissner at osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Do apple growers tell their kids money doesn't grow on bushes?



More information about the Comp.std.c mailing list