* [Bug preprocessor/69543] [8/9/10 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-21 19:16 ` law at redhat dot com
2021-04-27 11:37 ` [Bug preprocessor/69543] [8/9/10/11/12 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2020-04-21 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|8.5 |11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [8/9/10/11/12 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
2020-04-21 19:16 ` [Bug preprocessor/69543] [8/9/10 Regression] _Pragma does not apply within macro law at redhat dot com
@ 2021-04-27 11:37 ` jakub at gcc dot gnu.org
2021-07-28 7:04 ` [Bug preprocessor/69543] [9/10/11/12 " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 11:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |11.2
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [9/10/11/12 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
2020-04-21 19:16 ` [Bug preprocessor/69543] [8/9/10 Regression] _Pragma does not apply within macro 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 ` rguenth at gcc dot gnu.org
2022-04-21 7:47 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [9/10/11/12 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
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
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [10/11/12/13 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2022-04-21 7:47 ` rguenth at gcc dot gnu.org
@ 2022-07-07 14:05 ` lhyatt at gcc dot gnu.org
2022-09-30 18:10 ` cvs-commit at gcc dot gnu.org
2022-09-30 18:12 ` lhyatt at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: lhyatt at gcc dot gnu.org @ 2022-07-07 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Lewis Hyatt <lhyatt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=97498
CC| |lhyatt at gcc dot gnu.org
--- Comment #20 from Lewis Hyatt <lhyatt at gcc dot gnu.org> ---
See PR97498 which is closely related to this. It seems that the use of
input_location while handling diagnostic pragmas is problematic in other cases
besides the one discussed here (i.e. also when processing a diagnostic pop.)
Here is a test case from that PR, which breaks because of the input_location
workaround discussed here though:
======
static void f() {} _Pragma("GCC diagnostic error \"-Wunused-function\"")
======
The above errors for C but not C++, because in C, input_location points to the
start of the line and so it takes effect too early.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [10/11/12/13 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
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
2022-09-30 18:12 ` lhyatt at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-30 18:10 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug preprocessor/69543] [10/11/12/13 Regression] _Pragma does not apply within macro
[not found] <bug-69543-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2022-09-30 18:10 ` cvs-commit at gcc dot gnu.org
@ 2022-09-30 18:12 ` lhyatt at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: lhyatt at gcc dot gnu.org @ 2022-09-30 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69543
Lewis Hyatt <lhyatt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
^ permalink raw reply [flat|nested] 7+ messages in thread