This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC rejecting (I think) valid code


I compile this pair of declarations with GCC (which would 
probably be found in a stdint.h):

typedef short int16_t;
typedef unsigned int16_t uint16_t;

The first declaration is OK, but GCC gives me an error on 
the second one. That dosen't make sense, because part of 
the C89 grammar is

type-name:
(some types) typedef-name

typedef-declaration: something like
`typedef' type-name typedef-name

So it would be parsed as

typedef-declaration
    |
   type-name
     typedef-declaration (`int16_t')

I think this is a bug. Is it?

Samuel Lauber
-- 
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.

Powered by Outblaze


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]