Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,813 of 2,753    |
|    glen herrmannsfeldt to Stephen Horne    |
|    Re: Infinite look ahead required by C++?    |
|    10 Feb 10 17:02:18    |
   
   From: gah@ugcs.caltech.edu   
      
   Stephen Horne wrote:   
   (snip)   
      
   > No problem there. But now, let's assume that we want a variable of   
   > some struct type.   
      
   > mystruct x;   
      
   > The fact that "mystruct" identifies a type is significant - it is how   
   > this is recognised as a variable declaration. But how does the parser   
   > *know* that "mystruct" is a type at all?   
      
   (snip)   
      
   > C used to require that you write something like...   
      
   > struct mystruct x;   
      
   I would say that C still does. It is typedef that causes the problem   
   that you mention, and typedef is commonly used with structure   
   declarations. You can typedef int just as easily as struct.   
      
   -- glen   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca