public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/51391] Differences between setting Winline in command-line and through pragma GCC diagnostic
Date: Sat, 03 Dec 2011 11:00:00 -0000	[thread overview]
Message-ID: <bug-51391-4-ssWmJyX7la@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51391-4@http.gcc.gnu.org/bugzilla/>

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-03
                 CC|                            |manu at gcc dot gnu.org
          Component|preprocessor                |c
            Summary|pragma GCC diag ignored     |Differences between setting
                   |then warning of Winline     |Winline in command-line and
                   |activates -fno-inline       |through pragma GCC
                   |                            |diagnostic
     Ever Confirmed|0                           |1

--- Comment #13 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-12-03 10:59:21 UTC ---
As Andrew explained, this is because the pragma uses handle_option, but
command-line options go through a different code path that sets those defaults. 

I am pretty sure there are many more cases of this. The short-term fix is to
duplicate that logic also in common_handle_option in a new case for
OPT_Winline. The long term fix is to encode the dependencies in .opt files and
let the awk scripts to generate the necessary code to handle all cases. But my
awk skills are not so good.

The fix is probably a one-line change, plus testcase and changelog (but of
course, one needs to build gcc and regression test the patches, so don't expect
anyone else to fix this anytime soon).


  parent reply	other threads:[~2011-12-03 11:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-03  3:09 [Bug preprocessor/51391] New: pragma GCC diag ignored then warning of Winline activates -fno-inline pnewell at cs dot cmu.edu
2011-12-03  3:10 ` [Bug preprocessor/51391] " pnewell at cs dot cmu.edu
2011-12-03  3:10 ` pnewell at cs dot cmu.edu
2011-12-03  3:11 ` pnewell at cs dot cmu.edu
2011-12-03  3:14 ` pnewell at cs dot cmu.edu
2011-12-03  3:14 ` pinskia at gcc dot gnu.org
2011-12-03  3:16 ` pinskia at gcc dot gnu.org
2011-12-03  3:19 ` pnewell at cs dot cmu.edu
2011-12-03  3:24 ` pinskia at gcc dot gnu.org
2011-12-03  3:29 ` pnewell at cs dot cmu.edu
2011-12-03  3:31 ` pnewell at cs dot cmu.edu
2011-12-03  3:33 ` pinskia at gcc dot gnu.org
2011-12-03  3:37 ` pnewell at cs dot cmu.edu
2011-12-03 11:00 ` manu at gcc dot gnu.org [this message]
2011-12-03 11:05 ` [Bug c/51391] Differences between setting Winline in command-line and through pragma GCC diagnostic manu at gcc dot gnu.org
2011-12-03 19:11 ` pnewell at cs dot cmu.edu
2011-12-05  9:50 ` rguenth at gcc dot gnu.org
2011-12-06  8:00 ` pnewell at cs dot cmu.edu
2021-09-17  7:56 ` [Bug middle-end/51391] " pnewell0705 at gmail dot com
2021-09-17  7:57 ` pnewell0705 at gmail dot com
2021-09-17  8:05 ` pinskia at gcc dot gnu.org
2021-09-17  8:08 ` pnewell0705 at gmail dot com
2021-09-17  8:27 ` pinskia at gcc dot gnu.org
2021-09-17  8:56 ` pnewell0705 at gmail dot com

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=bug-51391-4-ssWmJyX7la@http.gcc.gnu.org/bugzilla/ \
    --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).