From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6231 invoked by alias); 10 Dec 2002 10:46: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 6209 invoked by uid 71); 10 Dec 2002 10:46:02 -0000 Date: Tue, 10 Dec 2002 02:46:00 -0000 Message-ID: <20021210104602.6207.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Christian Ehrhardt" Subject: Re: preprocessor/7263: __extension__ keyword doesn't suppress warning on LL or ULL constants Reply-To: "Christian Ehrhardt" X-SW-Source: 2002-12/txt/msg00537.txt.bz2 List-Id: The following reply was made to PR preprocessor/7263; it has been noted by GNATS. From: "Christian Ehrhardt" To: Neil Booth Cc: andrew@andypo.net, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: preprocessor/7263: __extension__ keyword doesn't suppress warning on LL or ULL constants Date: Tue, 10 Dec 2002 11:36:37 +0100 On Tue, Dec 10, 2002 at 12:22:56AM +0000, Neil Booth wrote: > ehrhardt@mathematik.uni-ulm.de wrote:- > > > I can confirm this on recent 3.3. The warning is from the preprocessor > > where we don't know about __extension__. Maybe the fix is to just > > document this. Anyway: Category changed to preprocessor and priority > > raised to medium because this is technically a regression. > > I think we just document __extension__ as only applying to non-CPP issues; > we can't reasonably expect CPP to interact with a parser in all situations > and under all future code changes. I imagine we could enhance existing > code so that we don't have this problem in cases where it is the C front > end requesting the number interpretation, since it could easily pass a > "don't warn about foo" flag to cpplib. However expecting cpplib to get > it right for #if is not reasonable, seeing as #if can occur between any > two tokens. The real problem seems to be that cpplib has its own copy of warning options in pfile->cpp_opts. The C parser disables the global pedantic flag while __extension__ is in effect. However, this change is not propagated into cpp_opts. If this was done we could just add the pedantic check in cppexp.c. However, neither do I see a clean way to propagate the global pedantic flag into cpp_opts nor to check the global flag from cpplib. regards Christian -- THAT'S ALL FOLKS!