Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!munnari.oz.au!csc.anu.oz.au!csc3.anu.oz.au!csc.canberra.edu.au!news From: eyal@echo.canberra.edu.au (Eyal Lebedinsky) Newsgroups: comp.lang.c Subject: Re: Modifying Typedefs (And Implementing Them) Message-ID: <1990Sep16.005845.28814@csc.canberra.edu.au> Date: 16 Sep 90 00:58:45 GMT References: <1990Sep14.213822.4828@uunet!unhd> Sender: news@csc.canberra.edu.au Distribution: na Organization: none Lines: 33 In article <1990Sep14.213822.4828@uunet!unhd> al@uunet!unhd (Anthony Lapadula) writes: >While implementing a (hopefully soon-to-be-) ANSI-compliant compiler, >we came across the following problem. Given [...] > unsigned INT foo1; 3.5.2 clearly states which type-specifier lists are allowed, and this is not one of those. > extern INT foo2; This is a storage-class-specifier followed by a type-specifier which is ok for 3.5. > extern INT (CHAR); typedefs and variables share a common namespace to CHAR will hide the external one. [...] >Doesn't the lexer have to know more? In my third example, the >lexer needs to know that CHAR is a candidate variable, even though it >is currently a typedef-name. How is this implemented? I found it necessary NOT to have the lexer make the decision for the same reason. > >-- Anthony (uunet!unhd!al, al@unh.edu) Lapadula I am using the May/88 Draft. Regards Eyal -- Regards Eyal