preprocessor/8880: __WCHAR_TYPE__ macro incorrectly set to "long int" with -fshort-wchar

Neil Booth neil@daikokuya.co.uk
Mon Dec 9 16:26:00 GMT 2002


The following reply was made to PR preprocessor/8880; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: cheinan@primus.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/8880: __WCHAR_TYPE__ macro incorrectly set to "long int" with -fshort-wchar
Date: Tue, 10 Dec 2002 00:19:37 +0000

 cheinan@primus.com wrote:-
 
 > The __WCHAR_TYPE__ macro is not set correctly when the -fshort-wchar command line option is specified.  In gcc 3.0.3 the macro would be defined to "unsigned short," but in 3.2.1 it remains set to "long int."  The wchar_t type itself is correct.
 > 
 > The compiler also emits the diagnostic:
 > <command line>:1:1: warning: "__WCHAR_TYPE__" redefined
 > <command line>:1:1: warning: this is the location of the previous definition
 > >How-To-Repeat:
 > liza:~/test> cat empty.cpp
 > int main()
 > {
 >         return 0;
 > }
 
 Would you please confirm this issue does not arise in CVS gcc (pre-3.3)?
 
 Neil.



More information about the Gcc-prs mailing list