-
- Downloads
preprocessor: Enable digit separators for C2X
C2X adds digit separators, as in C++. Enable them accordingly in libcpp and c-lex.c. Some basic tests are added that digit separators behave as expected for C2X and are properly disabled for C11; further test coverage is included in the existing g++.dg/cpp1y/digit-sep*.C tests. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c-family/ * c-lex.c (interpret_float): Handle digit separators for C2X. libcpp/ * init.c (lang_defaults): Enable digit separators for GNUC2X and STDC2X. gcc/testsuite/ * gcc.dg/c11-digit-separators-1.c, gcc.dg/c2x-digit-separators-1.c, gcc.dg/c2x-digit-separators-2.c: New tests.
Showing
- gcc/c-family/c-lex.c 1 addition, 1 deletiongcc/c-family/c-lex.c
- gcc/testsuite/gcc.dg/c11-digit-separators-1.c 7 additions, 0 deletionsgcc/testsuite/gcc.dg/c11-digit-separators-1.c
- gcc/testsuite/gcc.dg/c2x-digit-separators-1.c 39 additions, 0 deletionsgcc/testsuite/gcc.dg/c2x-digit-separators-1.c
- gcc/testsuite/gcc.dg/c2x-digit-separators-2.c 25 additions, 0 deletionsgcc/testsuite/gcc.dg/c2x-digit-separators-2.c
- libcpp/init.c 2 additions, 2 deletionslibcpp/init.c
Loading
Please register or sign in to comment