This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC rejecting (I think) valid code
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Sam Lauber <sam124 at operamail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 22 Jan 2005 22:43:46 +0000
- Subject: Re: GCC rejecting (I think) valid code
- References: <20050122215821.328913982EF@ws5-1.us4.outblaze.com>
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