Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site proper.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!hpda!fortune!amd70!dual!proper!gam From: gam@proper.UUCP Newsgroups: net.lang.c Subject: adjectives for typedef'd names Message-ID: <1202@proper.UUCP> Date: Wed, 9-May-84 16:38:42 EDT Article-I.D.: proper.1202 Posted: Wed May 9 16:38:42 1984 Date-Received: Sat, 12-May-84 12:53:39 EDT Organization: Proper UNIX, Oakland, CA Lines: 14 Keywords: typedef grammar LR(1) 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.