gcc/libcpp
Joseph Myers d7c3000147 preprocessor: Support #warning for standard C2x
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.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/testsuite/
	* gcc.dg/cpp/c11-warning-1.c, gcc.dg/cpp/c11-warning-2.c,
	gcc.dg/cpp/c11-warning-3.c, gcc.dg/cpp/c11-warning-4.c,
	gcc.dg/cpp/c2x-warning-1.c, gcc.dg/cpp/c2x-warning-2.c,
	gcc.dg/cpp/gnu11-warning-1.c, gcc.dg/cpp/gnu11-warning-2.c,
	gcc.dg/cpp/gnu11-warning-3.c, gcc.dg/cpp/gnu11-warning-4.c,
	gcc.dg/cpp/gnu2x-warning-1.c, gcc.dg/cpp/gnu2x-warning-2.c: New
	tests.

libcpp/
	* include/cpplib.h (struct cpp_options): Add warning_directive.
	* init.cc (struct lang_flags, lang_defaults): Add
	warning_directive.
	* directives.cc (DIRECTIVE_TABLE): Mark #warning as STDC2X not
	EXTENSION.
	(directive_diagnostics): Diagnose #warning with -Wc11-c2x-compat,
	or with -pedantic for a standard not supporting #warning.
2022-08-18 23:01:01 +00:00
..
include preprocessor: Support #warning for standard C2x 2022-08-18 23:01:01 +00:00
po Daily bump. 2022-05-05 00:16:29 +00:00
aclocal.m4 libcpp: Enable Intel CET on Intel CET enabled host for jit 2020-05-12 09:17:45 -07:00
ChangeLog Daily bump. 2022-08-17 00:17:17 +00:00
ChangeLog.jit
charset.cc preprocessor/106426: Treat u8 character literals as unsigned in char8_t modes. 2022-08-08 19:50:40 +00:00
config.in aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
configure aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
configure.ac aix: handle 64bit inodes for include directories 2022-01-12 16:59:47 +01:00
directives.cc preprocessor: Support #warning for standard C2x 2022-08-18 23:01:01 +00:00
errors.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
expr.cc libcpp: Ignore CPP_PADDING tokens in _cpp_parse_expr [PR105732] 2022-05-29 21:57:51 +02:00
files.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
generated_cpp_wcwidth.h libcpp: Update cpp_wcwidth() to Unicode 14.0.0 2022-06-26 14:13:26 -04:00
identifiers.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
init.cc preprocessor: Support #warning for standard C2x 2022-08-18 23:01:01 +00:00
internal.h preprocessor: -Wbidi-chars and UCNs [PR104030] 2022-01-24 17:48:23 -05:00
lex.cc Use "final" and "override" directly, rather than via macros 2022-05-20 10:05:54 -04:00
line-map.cc pack fields in line-map data structures 2022-01-18 14:33:01 +01:00
location-example.txt PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
macro.cc libcpp: Fix up padding handling in funlike_invocation_p [PR104147] 2022-02-01 20:48:03 +01:00
Makefile.in preprocessor: Extract messages from cpp_*_at calls for translation 2022-02-11 23:22:07 +00:00
makeucnid.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
mkdeps.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
pch.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
symtab.cc Rename .c files to .cc files. 2022-01-17 22:12:04 +01:00
system.h Update copyright years. 2022-01-03 10:42:10 +01:00
traditional.cc Change references of .c files to .cc files 2022-01-17 22:12:07 +01:00
ucnid.h libcpp: Update ucnid.h to Unicode 14 2022-06-28 17:33:37 -04:00
ucnid.tab Update copyright years. 2022-01-03 10:42:10 +01:00