Re: typedef name question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, John,

Thanks for replying.
To clarify myself a bit, is my following understanding correct ?

For this case:
   int main() {
       int foo;
       foo abc;
   }
The Gcc's grammar does parse it, ie. an "identifier" can follow another "identifier". Then in the semantic analysis, gcc checks to make sure the first identifier "foo" must represent a type. In this case, it is not. So an error is reported.

Thanks.

Mike





----- Original Message ----- From: "John Love-Jensen" <eljay@xxxxxxxxx> To: "Michael Gong" <mwgong@xxxxxxxxxxxxxx>; "MSX to GCC" <gcc-help@xxxxxxxxxxx>
Sent: Tuesday, January 23, 2007 9:18 AM
Subject: Re: typedef name question


Hi Michael,

GCC distinguishes between them by context and visibility during semantic
analysis.

They cannot be distinguished during syntactic analysis.

HTH,
--Eljay




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux