This is the mail archive of the gcc-help@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]

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


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