gnu.gcc.help
[Top] [All Lists]

typedef

Subject: typedef
From: Stefano Chiappa
Date: Thu, 20 Jul 2006 14:32:17 +0200
Newsgroups: gnu.gcc.help
Hi all,
I'd like to know if there is a way to know if a type already exist in C.
Suppose I have

typedef unsigned char uchar;

and, due to a messy-include dependency, I'd like to know if the type uchar already exists.
I checked that:

#if defined(uchar)

... something to do if uchar has not already defined ...

#endif

I think that this does not work while typedef is a C keyword and not a pre-processor command as #if defined( is.
I'm using gcc4.1.1
Thank you.
Stefano

<Prev in Thread] Current Thread [Next in Thread>
  • typedef, Stefano Chiappa <=
Privacy Policy