diff options
author | Joseph Myers <joseph@codesourcery.com> | 2022-09-05 22:05:06 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2022-09-05 22:05:06 +0000 |
commit | 5f38bf14bcb3ffe9fcd482b87cbf381df24a31df (patch) | |
tree | 931967ebf968b3fb3fd6cbe927500a878bc88144 /libcpp | |
parent | 5f895f22173d78c1995a001d721d2ae1d075797b (diff) | |
download | gcc-5f38bf14bcb3ffe9fcd482b87cbf381df24a31df.zip gcc-5f38bf14bcb3ffe9fcd482b87cbf381df24a31df.tar.gz gcc-5f38bf14bcb3ffe9fcd482b87cbf381df24a31df.tar.bz2 |
preprocessor: Disable trigraphs for C2x
ISO C2x removes trigraphs, so disable them accordingly for -std=c2x
(they can still be enabled using -trigraphs).
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
libcpp/
* init.cc (lang_defaults): Disable trigraphs for C2x.
gcc/testsuite/
* gcc.dg/cpp/c11-trigraphs-1.c, gcc.dg/cpp/c2x-trigraphs-1.c,
gcc.dg/cpp/c2x-trigraphs-2.c: New tests.
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/init.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/init.cc b/libcpp/init.cc index 41b10b3..3e5601a 100644 --- a/libcpp/init.cc +++ b/libcpp/init.cc @@ -112,7 +112,7 @@ static const struct lang_flags lang_defaults[] = /* STDC99 */ { 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, /* STDC11 */ { 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, /* STDC17 */ { 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, - /* STDC2X */ { 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, + /* STDC2X */ { 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0 }, /* GNUCXX */ { 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, /* CXX98 */ { 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 }, /* GNUCXX11 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, |