ANSI grammar questions
Karl Heuer
karl at haddock.ima.isc.com
Fri Nov 18 04:27:40 AEST 1988
In article <179 at twwells.uucp> bill at twwells.uucp (T. William Wells) writes:
>In article <7938 at bloom-beacon.MIT.EDU> chekmate at athena.mit.edu (Adam Kao) writes:
>>So you can stack any number of storage_class_spec, type_spec, and type_qual
>>in front of your declaration, in any order? Things like:
>> void static fn();
>> void static extern int auto volatile fn();
>
>Right. This is intentional. Believe it or not, there are situations
>where this flexibility is useful.
As I'm sure we all realize, the second is *not* legal C (it names two
conflicting types, and three conflicting storage classes). More precisely,
although it satisfies the syntax rules, it violates the constraint rules.
Less well known, but perhaps of interest to y'all, is that the first
construct, though still legal, is obsolescent. Don't use it in new programs.
Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
Followups to comp.std.c.
More information about the Comp.std.c
mailing list