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]

Re: GCC rejecting (I think) valid code


On Sat, Jan 22, 2005 at 10:58:21PM +0100, Sam Lauber wrote:

> typedef short int16_t;

This is equivalent to:

typedef signed short int16_t;

> typedef unsigned int16_t uint16_t;

so this is equivalent to:

typedef unsigned signed short int16_t;

which, as GCC says, does not name a type.

You seem to be expecting behaviour like this:

#define int16_t short;
typedef unsigned int16_t uint16_t;

But typedefs do not work like the preprocessor,

jon

-- 
Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
	- M.A. Jackson


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