adjectives for typedef'd names

gam at proper.UUCP gam at proper.UUCP
Thu May 10 06:38:42 AEST 1984


Are type adjectives (unsigned, etc) allowed as adjectives
to typedef'd identifiers?  e.g. typedef int x; func() {
unsigned x y; }.
Section 18.2, appendix a of THE BOOK appears to allow it
syntactically.   However, since typedef'd names are also
allowed as structure member names and structure tags, the
structure declaration unsigned x; would appear to be 
bM4ambiguous, or at least non-LR(1)..
Section 11.1 of K&R says that typedef'd names can be
identifiers in inner blocks.  If adjectives are allowed
for typedef'd names, the example in 11.1 is more
interesting if "float' is changed to 'int' and 'int'
is changed to 'unsigned'.
I favor not allowing adjectives on typedef'd names.



More information about the Comp.lang.c mailing list