From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27057 invoked by alias); 11 Dec 2002 21:16:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26994 invoked by uid 71); 11 Dec 2002 21:16:02 -0000 Date: Wed, 11 Dec 2002 13:16:00 -0000 Message-ID: <20021211211602.26993.qmail@sources.redhat.com> To: neil@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/8880: __WCHAR_TYPE__ macro incorrectly set to "long int" with -fshort-wchar Reply-To: Neil Booth X-SW-Source: 2002-12/txt/msg00660.txt.bz2 List-Id: The following reply was made to PR preprocessor/8880; it has been noted by GNATS. From: Neil Booth To: cheinan@primus.com Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: preprocessor/8880: __WCHAR_TYPE__ macro incorrectly set to "long int" with -fshort-wchar Date: Wed, 11 Dec 2002 21:13:15 +0000 Please confirm this patch fixes it (a kludge around the kludge that is predefined macros before 3.3). Neil. PR preprocessor/8880 * gcc.c (cpp_unique_options): Handle -fshort-wchar later so it overrides any target CPU specs. Index: gcc.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/gcc.c,v retrieving revision 1.296.2.12.4.4 diff -u -p -r1.296.2.12.4.4 gcc.c --- gcc.c 14 Oct 2002 21:55:26 -0000 1.296.2.12.4.4 +++ gcc.c 11 Dec 2002 21:11:52 -0000 @@ -688,10 +688,10 @@ static const char *cpp_unique_options = %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\ %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ %{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__}\ - %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ %{ffreestanding:-D__STDC_HOSTED__=0} %{fno-hosted:-D__STDC_HOSTED__=0}\ %{!ffreestanding:%{!fno-hosted:-D__STDC_HOSTED__=1}} %{remap}\ %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\ + %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\\ unsigned\\ int}\ %{E|M|MM:%W{o*}}"; /* This contains cpp options which are common with cc1_options and are passed