Grammer discrepancies for external data definitions.
Henry Spencer
henry at utzoo.uucp
Sun Aug 14 06:49:08 AEST 1988
In article <8014 at cup.portal.com> bcase at cup.portal.com writes:
>"External declarations without any specifiers or qualifiers (just a naked
>declarator) are fobidden." Yet it seems that at least some claimed-ANSI C
>compilers accept this and do what you might expect (allocate room for an int).
>At least one C++ implementation disallows it. To those of you with the ANSI
>spec sitting in front of you, I ask "what is the correct behavior?"
The May draft (no, my copy *still* hasn't come, dammit, but I've borrowed
a friend's because time is running out) has the grammar set up in such a
way that at least one storage class specifier ("extern" etc.), type
specifier ("int" etc.), or type qualifier ("const" etc.) must appear.
Some compilers may well accept a more general syntax for the sake of
backwards compatibility.
Henry Spencer @ U of Toronto Zoology
uunet!attcan!utzoo!henry henry at zoo.toronto.edu
--
Intel CPUs are not defective, | Henry Spencer at U of Toronto Zoology
they just act that way. | uunet!attcan!utzoo!henry henry at zoo.toronto.edu
More information about the Comp.lang.c
mailing list