Files
gcc/libcpp
Jakub Jelinek 365202625d preprocessor: Implement C++23 P2437R1 - Support for #warning [PR106646]
On Thu, Aug 18, 2022 at 11:02:44PM +0000, Joseph Myers wrote:
> ISO C2x standardizes the existing #warning extension.  Arrange
> accordingly for it not to be diagnosed with -std=c2x -pedantic, but to
> be diagnosed with -Wc11-c2x-compat.

And here is the corresponding C++ version.
Don't pedwarn about this for C++23/GNU++23 and tweak the diagnostics
for C++ otherwise, + testsuite coverage.
The diagnostic wording is similar e.g. to the #elifdef diagnostics.

2022-08-24  Jakub Jelinek  <jakub@redhat.com>

	PR c++/106646
	* init.cc: Implement C++23 P2437R1 - Support for #warning.
	(lang_defaults): Set warning_directive for GNUCXX23 and CXX23.
	* directives.cc (directive_diagnostics): Use different wording of
	#warning pedwarn for C++.

	* g++.dg/cpp/warning-1.C: New test.
	* g++.dg/cpp/warning-2.C: New test.
	* g++.dg/cpp/warning-3.C: New test.
2022-08-24 09:55:57 +02:00
..
2022-05-05 00:16:29 +00:00
2022-08-21 00:16:33 +00:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-17 22:12:04 +01:00
2022-01-03 10:42:10 +01:00
2022-06-28 17:33:37 -04:00
2022-01-03 10:42:10 +01:00