From c264208e161830a5642ee3125871c23110508462 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 1 Dec 2021 10:21:20 +0100 Subject: libcpp: Enable P1949R7 for C++98 too [PR100977] On Mon, Nov 29, 2021 at 05:53:58PM -0500, Jason Merrill wrote: > I'm inclined to go ahead and change C++98 as well; I doubt anyone is relying > on the particular C++98 extended character set rules, and we already accept > the union of the different sets when not pedantic. Ok, here is an incremental patch to do that also for -std={c,gnu}++98. 2021-12-01 Jakub Jelinek PR c++/100977 * init.c (struct lang_flags): Remove cxx23_identifiers. (lang_defaults): Remove cxx23_identifiers initializers. (cpp_set_lang): Don't copy cxx23_identifiers. * include/cpplib.h (struct cpp_options): Adjust comment about c11_identifiers. Remove cxx23_identifiers field. * lex.c (warn_about_normalization): Use cplusplus instead of cxx23_identifiers. * charset.c (ucn_valid_in_identifier): Likewise. * g++.dg/cpp/ucnid-1.C: Adjust expected diagnostics. * g++.dg/cpp/ucnid-1-utf8.C: Likewise. --- libcpp/include/cpplib.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libcpp/include') diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 112b9c2..08c72e7 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -491,13 +491,9 @@ struct cpp_options unsigned char ext_numeric_literals; /* Nonzero means extended identifiers allow the characters specified - in C11 and C++11. */ + in C11. */ unsigned char c11_identifiers; - /* Nonzero means extended identifiers allow the characters specified - in C++23. */ - unsigned char cxx23_identifiers; - /* Nonzero for C++ 2014 Standard binary constants. */ unsigned char binary_constants; -- cgit v1.1