Stupid typedef question / g++

Ben Davis
Fri Jan 24 16:55:00 GMT 2003

(Sorry if you get too many copies of this, SA. I got the address wrong for 
the mailing list, and I didn't know if you'd got your copy :)

On Friday 24 January 2003 3:17 pm, you wrote:
> Should this work?
> // start
> #include <stdio.h>
> typedef int     TYPE1;
> typedef int TYPE2;

typedef simply gives you a name by which to refer to a (possibly more 
complex) type. I'm afraid it doesn't offer any segregation between the types. 
You could remove the casts and your code would still be completely valid.

I too would be interested to know of a way of doing this...


More information about the Gcc-help mailing list