public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/23139] [3.4/4.0/4.1 Regression] -pedantic -ffast-math breaks working code
Date: Tue, 06 Sep 2005 22:03:00 -0000	[thread overview]
Message-ID: <20050906220328.4167.qmail@sourceware.org> (raw)
In-Reply-To: <20050729205340.23139.thor@math.tu-berlin.de>


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-09-06 22:03 -------
The "floating constant exceeds range" message comes from interpret_float in
c-lex.c, which does test just "pedantic", rather than CPP_PEDANTIC(pfile).  So,
while the preprocessor warning about use of a hexadecimal floating constant does
seem to be like the other PRs, the actual pedwarn/error is coming from the fact
the C++ front end is pre-lexing tokens.

I agree that disabling warnings in expansions of macros from system headers is a
good idea, independently of whether or not any other changes might be
appropriate to deal with other uses of __extension__.  There are certain to be
system headers not using __extension__ in macro definitions, on some systems.  I
guess we could have the preprocessor insert a special token to mark the
start/stop of a macro expansion, with an indicator of the location of the macro
definition, including its system-headerness.  Then, the front end could
clear/reset pedantic when seeing these tokens.  This would also allow us to
issue diagnostics based on the location of the macro, rather than its user, if
we wanted.  A more brutal approach would be to have the preprocessor simulate
#include'ing the file from which the macro came when doing the expansion.  That
would not require updating the front-ends, but would be more confusing to users.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot
                   |                            |com, joseph at codesourcery
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23139


  parent reply	other threads:[~2005-09-06 22:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-29 21:01 [Bug c++/23139] New: " thor at math dot tu-berlin dot de
2005-07-29 21:14 ` [Bug c++/23139] " pinskia at gcc dot gnu dot org
2005-07-29 21:18 ` thor at math dot tu-berlin dot de
2005-07-29 21:19 ` pinskia at gcc dot gnu dot org
2005-07-29 21:59 ` thor at math dot tu-berlin dot de
2005-07-30 15:39 ` [Bug c++/23139] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-06 15:29 ` mmitchel at gcc dot gnu dot org
2005-09-06 16:12   ` Gabriel Dos Reis
2005-09-06 15:43 ` joseph at codesourcery dot com
2005-09-06 16:12 ` gdr at integrable-solutions dot net
2005-09-06 22:03 ` mmitchel at gcc dot gnu dot org [this message]
2005-09-15 19:11 ` cvs-commit at gcc dot gnu dot org
2005-09-15 19:13 ` cvs-commit at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050906220328.4167.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).