public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/69543] [10/11/12/13 Regression] _Pragma does not apply within macro
Date: Fri, 30 Sep 2022 18:10:28 +0000	[thread overview]
Message-ID: <bug-69543-4-SDNPUbjKgn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-69543-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543

--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Lewis Hyatt <lhyatt@gcc.gnu.org>:

https://gcc.gnu.org/g:b52b99b62df8fc9b3a3010cb0a8cf49bc35037f0

commit r13-2994-gb52b99b62df8fc9b3a3010cb0a8cf49bc35037f0
Author: Lewis Hyatt <lhyatt@gmail.com>
Date:   Fri Sep 30 14:10:00 2022 -0400

    diagnostics: Fix virtual location for -Wuninitialized [PR69543]

    Warnings issued for -Wuninitialized have been using the spelling location
of
    the problematic usage, discarding any information on the location of the
macro
    expansion point if such usage was in a macro. This makes the warnings
    impossible to control reliably with #pragma GCC diagnostic, and also
discards
    useful context in the diagnostic output. There seems to be no need to
discard
    the virtual location information, so this patch fixes that.

    PR69543 was mostly about _Pragma issues which have been fixed for many
years
    now. The PR remains open because two of the testcases added in response to
it
    still have xfails, but those xfails have nothing to do with _Pragma and
rather
    just with the issue fixed by this patch, so the PR can be closed now as
well.

    The other testcase modified here, pragma-diagnostic-2.c, was explicitly
    testing for the undesirable behavior that was xfailed in pr69543-3.c. I
have
    adjusted that and also added a new testcase verifying all 3 types of
warning
    that come from tree-ssa-uninit.cc get the proper location information now.

    gcc/ChangeLog:

            PR preprocessor/69543
            * tree-ssa-uninit.cc (warn_uninit): Stop stripping macro tracking
            information away from the diagnostic location.
            (maybe_warn_read_write_only): Likewise.
            (maybe_warn_operand): Likewise.

    gcc/testsuite/ChangeLog:

            PR preprocessor/69543
            * c-c++-common/pr69543-3.c: Remove xfail.
            * c-c++-common/pr69543-4.c: Likewise.
            * gcc.dg/cpp/pragma-diagnostic-2.c: Adjust test for new behavior.
            * c-c++-common/pragma-diag-16.c: New test.

  parent reply	other threads:[~2022-09-30 18:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
2020-04-21 19:16 ` [Bug preprocessor/69543] [8/9/10 " law at redhat dot com
2021-04-27 11:37 ` [Bug preprocessor/69543] [8/9/10/11/12 " jakub at gcc dot gnu.org
2021-07-28  7:04 ` [Bug preprocessor/69543] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-04-21  7:47 ` rguenth at gcc dot gnu.org
2022-07-07 14:05 ` [Bug preprocessor/69543] [10/11/12/13 " lhyatt at gcc dot gnu.org
2022-09-30 18:10 ` cvs-commit at gcc dot gnu.org [this message]
2022-09-30 18:12 ` lhyatt 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-69543-4-SDNPUbjKgn@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).