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++/55881] #pragma GCC diagnostic ignored ignored when inlining
Date: Tue, 08 Jan 2013 11:15:00 -0000	[thread overview]
Message-ID: <bug-55881-4-S3LQML8icd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55881-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-01-08 11:14:49 UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> 
> > Well - confirmed.  Unlikely to be fixed.
> 
> That's _very_ unfortunate.  It makes the pragma almost useless in practice.

The pragma can only work if it somehow knows that location 5:19 is "expanded"
(inlined) from the location of "return i.foo(n)" since the code checks that the
location included in the warning is within the range of the pragma and "5:19"
is clearly not.

This could be implement in the same way as we currently handle macro
expansions, however, it won't be a  trivial amount of work, and it is quite
unlikely that any current developer has the free time and the interest
necessary to do it themselves.

If you really want this feature, you have to either try to implement it
yourself or convince someone to do it for you. Or you may do "n = n" and
silence the warning.


  parent reply	other threads:[~2013-01-08 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05  0:18 [Bug c++/55881] New: " greened at obbligato dot org
2013-01-05 12:07 ` [Bug c++/55881] " manu at gcc dot gnu.org
2013-01-07 10:08 ` rguenth at gcc dot gnu.org
2013-01-07 21:50 ` greened at obbligato dot org
2013-01-07 21:51 ` greened at obbligato dot org
2013-01-08 11:15 ` manu at gcc dot gnu.org [this message]
2021-07-06 21:59 ` cvs-commit at gcc dot gnu.org
2021-07-06 22:02 ` [Bug middle-end/55881] " msebor at gcc dot gnu.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=bug-55881-4-S3LQML8icd@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).