gcc 3.0 - wchar_t redeclared?
Phil Edwards
pedwards@disaster.jaj.com
Tue Sep 4 09:18:00 GMT 2001
On Tue, Sep 04, 2001 at 12:56:11PM +0200, Pavel Novy wrote:
> Phil Edwards wrote:
> >That's never a good sign. Try not using -B.
> >
> Basically, I don't want to use no built-ins and I really don't know why
> it's there and how to omit those specs. However, the problem is in
> cc1plus and I don't see nothing wrong on parameters passed (generated
> automatically from gcc parameters):
>
> ../../bin/cc1plus.exe -fpreprocessed cpp.ii -quiet -dumpbase cpp.cpp
> -O2 -Wall -version -fno-builtin -fshort-enums -fpack-struct
> -fpcc-struct-return -fno-implicit-templates -fno-exceptions -fno-rtti -o
> cpp.s
> GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF)
> GNU C++ version 3.0.1 (i386-pc-linux-gnu)
> compiled by GNU C version 2.95.3-5 (cygwin special).
> In file included from cpp.cpp:1:
> u:/ndk/nwsdk/include/nlm/stdio.h:34: redeclaration of C++ built-in type
> `wchar_t'
> MAKE: *** [cpp.o] Error 1
In C, wchar_t is required to be a typedef. In C++, it's a builtin type.
Your headers files must not redeclare those builtin types.
Good luck with the -B option and your own setup.
> I have had no problems with earlier versions (2.95.2, 2.95.3-x) of gcc
> compiled and used that way. The same (changed) behaviour on Linux with
> gcc 3.0+.
Yes, 3.0 is far more complient to the C++ standard than 2.x was.
Phil
--
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
- anonymous Egyptian scribe, c.1700 BC
More information about the Gcc-bugs
mailing list