This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to avoid typedef's "redefinition of" error
- From: "Li, Wei" <Wei dot Li at ca dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 2 May 2003 12:58:56 -0400
- Subject: How to avoid typedef's "redefinition of" error
Hi,
I used gcc (not g++) (with Red Hat Linux 8.0) to compile a C file. I got
a "redefinition of UCHAR" error when two different 3rd party headers
typedef it with identical definition:
typedef unsigned char UCHAR;
If I use g++, I only got a warning. If I cannot use g++ for other
reasons (other code segment will not compile) and I do not want to
modify the 3rd party headers, how can I avoid this error using gcc? Is
there any compiler option to do so?
Thank you very much!
Wei