diff options
author | Jason Merrill <jason@redhat.com> | 2024-10-08 18:26:40 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2024-10-14 18:42:18 -0400 |
commit | 2c08ddd3fdd4af794ce66dbabb81ba2e6aee0b7c (patch) | |
tree | 1d6737fe20e8a1c8b27c5cf22c729219696a8790 /libcpp/include/cpplib.h | |
parent | dde19c600c3c8a1d765c9b4961d2556e89edad14 (diff) | |
download | gcc-2c08ddd3fdd4af794ce66dbabb81ba2e6aee0b7c.zip gcc-2c08ddd3fdd4af794ce66dbabb81ba2e6aee0b7c.tar.gz gcc-2c08ddd3fdd4af794ce66dbabb81ba2e6aee0b7c.tar.bz2 |
libcpp: avoid extra spaces in module preprocessing
Within the compiler, module keywords "import", "module", and "export" that
are recognized as part of module directives gain an extra trailing space to
distinguish them from other non-keyword uses of those words in the code.
But when dumping preprocessed output, printing those spaces creates a
gratuitous inconsistency with non-modules preprocessing, as revealed by
several of the g++.dg/modules/cpp* tests if modules are enabled by default
in C++20 mode.
libcpp/ChangeLog:
* lex.cc (cpp_output_token): Omit terminal space from name.
gcc/testsuite/ChangeLog:
* g++.dg/modules/cpp-2_c.C: Expect only one space after import.
* g++.dg/modules/cpp-5_c.C
* g++.dg/modules/dep-2.C
* g++.dg/modules/dir-only-2_b.C
* g++.dg/modules/pr99050_b.C
* g++.dg/modules/inc-xlate-1_b.H
* g++.dg/modules/legacy-3_b.H
* g++.dg/modules/legacy-3_c.H: Likewise.
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions