ANSI grammar questions

T. William Wells bill at twwells.uucp
Sat Nov 19 22:48:56 AEST 1988


In article <467 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
: >: void static extern int auto volatile fn();
: >
: >Right. This is intentional. Believe it or not, there are situations
: >where this flexibility is useful.
:
: And those cases that are truly *illegal*, such as the one cited above,
: can still be caught by the compiler even though they pass the grammar.

Whoops! I didn't carefully read the examples, supposing that they were
all of the kind expressing reordering of the type-specifier and
storage-class. This last example has more than one storage class and
more than one type-specifier, so is illegal.

As an aside, catching this kind of error in the grammar can really
make the grammar *huge*. This is why one does it outside the grammar.

---
Bill
{uunet|novavax}!proxftl!twwells!bill



More information about the Comp.lang.c mailing list