GCC rejecting (I think) valid code

Sam Lauber sam124@operamail.com
Sat Jan 22 23:09:00 GMT 2005


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



More information about the Gcc mailing list