public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106423] New: -Wc++20-compat diagnostics not suppressed by #pragma GCC diagnostic ignored
@ 2022-07-24  3:32 tom at honermann dot net
  2022-07-24  4:41 ` [Bug c++/106423] " tom at honermann dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tom at honermann dot net @ 2022-07-24  3:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106423
           Summary: -Wc++20-compat diagnostics not suppressed by #pragma
                    GCC diagnostic ignored
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tom at honermann dot net
  Target Milestone: ---

As demonstrated at https://godbolt.org/z/GoTqPTcM3, use of gcc's '#pragma GCC
diagnostic ignored "-Wc++20-compat"' directive fails to suppress -Wc++20-compat
enabled diagnostics. gcc versions 10 and up are affected.

$ cat t.cpp
#pragma GCC diagnostic ignored "-Wc++20-compat"
int constinit;

$ gcc -c -std=c++17 -Wc++20-compat t.cpp
t.cpp:2:5: warning: identifier ‘constinit’ is a keyword in C++20
[-Wc++20-compat]
    2 | int constinit;
      |     ^~~~~~~~~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-16 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24  3:32 [Bug c++/106423] New: -Wc++20-compat diagnostics not suppressed by #pragma GCC diagnostic ignored tom at honermann dot net
2022-07-24  4:41 ` [Bug c++/106423] " tom at honermann dot net
2022-08-09  7:05 ` ville.voutilainen at gmail dot com
2022-08-16 19:15 ` cvs-commit at gcc dot gnu.org

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).