public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics
@ 2022-07-24  4:39 Tom Honermann
  2022-07-24  4:39 ` [PATCH 1/1] " Tom Honermann
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Honermann @ 2022-07-24  4:39 UTC (permalink / raw)
  To: gcc-patches

This change addresses the following issue raised on the libc-alpha mailing list:
  https://sourceware.org/pipermail/libc-alpha/2022-July/140825.html
Glibc 2.36 adds a char8_t typedef in C++ modes that do not enable the char8_t
builtin type (C++17 and earlier by default; subject to _GNU_SOURCE and use of
the -f[no-]char8_t option).  When -Wc++20-compat diagnostics are enabled, the
following warning is issued from the glibc uchar.h header.
  warning: identifier ‘char8_t’ is a keyword in C++20 [-Wc++20-compat]
Such diagnostics are not desired from system headers, so glibc would like to
suppress the diagnostic using '#pragma GCC diagnostic ignored "-Wc++20-compat"',
but attempting to do so currently fails.  This patch corrects that.

Tom Honermann (1):
  c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

 gcc/c-family/c-opts.cc                 |  7 +++++++
 gcc/c-family/c.opt                     |  2 +-
 gcc/testsuite/g++.dg/cpp0x/keywords2.C | 16 ++++++++++++++++
 gcc/testsuite/g++.dg/cpp2a/keywords2.C | 13 +++++++++++++
 libcpp/include/cpplib.h                |  4 ++++
 libcpp/init.cc                         |  1 +
 6 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/keywords2.C
 create mode 100644 gcc/testsuite/g++.dg/cpp2a/keywords2.C

-- 
2.32.0


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

end of thread, other threads:[~2022-08-12  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24  4:39 [PATCH 0/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics Tom Honermann
2022-07-24  4:39 ` [PATCH 1/1] " Tom Honermann
2022-07-27 23:09   ` Joseph Myers
2022-07-30 23:05     ` Tom Honermann
2022-07-31 15:05       ` Lewis Hyatt
2022-07-31 21:41         ` Tom Honermann
2022-08-01 18:49   ` [PATCH 1/1 v2] " Tom Honermann
2022-08-04 16:42     ` Tom Honermann
2022-08-11 22:44       ` Tom Honermann
2022-08-11 23:59         ` Jason Merrill

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