public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: simonb@google.com (Simon Baldwin)
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][RFC] -Wno-... option to suppress builtin macro redefined warnings
Date: Fri, 08 Aug 2008 16:01:00 -0000	[thread overview]
Message-ID: <m3wsirec2f.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20080730140920.0F9CF3FE1B9@localhost> (Simon Baldwin's message of "Wed\, 30 Jul 2008 15\:09\:20 +0100 \(BST\)")

>>>>> "Simon" == Simon Baldwin <simonb@google.com> writes:

Simon> This patch adds a warning suppression flag,
Simon> -Wno-builtin-macro-redefined, to silence gcc warnings where
Simon> builtin macros such as __TIME__ are undefined or redefined,
Simon> either on the command line or by directives.

This seems like a reasonable thing to want to do.

Simon> Thoughts, comments, suggestions?  Aimed at trunk.  Thanks.

The libcpp bits look generally ok.

However, it seems to me that we would want to allow redefinition of
some macros (__TIME__ et al) but not others (e.g., __LINE__).

So, how about splitting builtin_array into two pieces (and just FYI,
there's a comment above referring to "two tables" that should be
changed) and then unconditionally setting NODE_WARN for one table but
not the other?  Or, just adding a special case in the builtin
definition loop for the BT_* constants we care to allow?

Tom

  parent reply	other threads:[~2008-08-08 15:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 15:12 Simon Baldwin
2008-07-30 15:27 ` Joseph S. Myers
2008-08-08 16:01 ` Tom Tromey [this message]
2008-08-08 16:09   ` Manuel López-Ibáñez
2008-08-08 16:21     ` Tom Tromey
2008-08-08 16:23   ` Simon Baldwin
2008-08-15 17:28     ` Simon Baldwin
     [not found]       ` <48AEE7A7.9000509@google.com>
2008-08-22 17:17         ` Tom Tromey
2008-08-26 18:38           ` Simon Baldwin
2008-09-02 11:29             ` Simon Baldwin
2008-09-13  7:42             ` Tom Tromey
2008-09-16 16:11               ` Simon Baldwin
2008-09-17 14:19               ` Ian Lance Taylor
2008-09-18 16:04                 ` Simon Baldwin
2008-09-17 14:24             ` Ian Lance Taylor
2008-08-22 16:53 Simon Baldwin

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=m3wsirec2f.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=simonb@google.com \
    /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).