aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/lib
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-08-07 08:51:00 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-08-07 08:51:00 +0200
commit2c5bd8e9fb16584cdd1d090b9a5a63dd9140b61b (patch)
tree2be451690698a928f8ed895a966f53511b625827 /libjava/classpath/lib
parent64859dc6e2948616439b500b5d9ffb2635b45ae8 (diff)
downloadgcc-2c5bd8e9fb16584cdd1d090b9a5a63dd9140b61b.zip
gcc-2c5bd8e9fb16584cdd1d090b9a5a63dd9140b61b.tar.gz
gcc-2c5bd8e9fb16584cdd1d090b9a5a63dd9140b61b.tar.bz2
c++: Add testcase for CWG2576 [PR120778]
Another part of the C++26 P2843R3, this time in https://eel.is/c++draft/cpp.include#7 changing former (compile time) undefined behavior to IFNDR. With IFNDR we wouldn't have to test anything I guess, but this still adds the cases from the 3.4 section of the paper plus related tests. The paper wonders about implementation divergence between most compilers and gcc in the case of glueing tokens together with <> around from multiple macros, GCC doesn't add CPP_PADDING macros in that case (and even if it would, it would ignore them through get_token_no_padding). But I think this behavior is allowed by https://eel.is/c++draft/cpp.include#7.sentence-3 and changing it now after 25+ years of such behavior might break real-world stuff, especially making it really hard to construct the <> includes from some name and adding < and > from some other macro around that. We handle #define A <cstd def> #include A like clang++ and try to open 'cstd def' file. But not adding spaces for all the padding means handling even stuff where nothing else can help, while for cstd def coming from different macros one can use token pasting to combine them together, e.g. < and following identifier or identifier followed by . or . followed by identifier or identifier followed by > can't be pasted together. 2025-08-07 Jakub Jelinek <jakub@redhat.com> PR preprocessor/120778 * g++.dg/DRs/dr2576.C: New test.
Diffstat (limited to 'libjava/classpath/lib')
0 files changed, 0 insertions, 0 deletions