tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Re: sizeof parsing


From: Daniel Glöckner
Subject: [Tinycc-devel] Re: sizeof parsing
Date: Tue, 19 Sep 2006 12:46:11 +0200
User-agent: Mutt/1.4.2.1i

On Tue, Sep 19, 2006 at 12:36:10AM -0400, Dave Dodge wrote:
> > >But then we can go further and ask if "sizeof (char)7" is a legal C
> > >expression...
> 
> No, that's always an error.  For example:
> 
>           char      type-name
>          (^^^^)7    cast-expression
>   sizeof ^^^^^^^    error: sizeof can't be applied to a cast-expression

Ok, bad example. But this one is valid according to the grammar:

          char      type-name
                7   initializer-list
         (^^^^){^}  postfix-expression
  sizeof ^^^^^^^^^  unary-expression


  Daniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]