From: Jason Merrill Date: Tue, 8 Jun 2021 18:32:42 +0000 (-0400) Subject: c++: Test for whitespace and line splice X-Git-Tag: basepoints/gcc-13~7008 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5668b5d09ae8f942e79b6d4473ba285a496b9a57;p=thirdparty%2Fgcc.git c++: Test for whitespace and line splice From wg21.link/P2223R2 gcc/testsuite/ChangeLog: * g++.dg/cpp23/whitespace-splice1.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp23/whitespace-splice1.C b/gcc/testsuite/g++.dg/cpp23/whitespace-splice1.C new file mode 100644 index 000000000000..f115ce0de13a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp23/whitespace-splice1.C @@ -0,0 +1,15 @@ +// Tests from P2223R2 +// { dg-additional-options -w } +// { dg-do compile { target c++11 } } + +constexpr auto str = "\ +"; + +static_assert(__builtin_strlen(str) == 0, ""); + +constexpr int i = 1 + // \ + + 42 + ; + +static_assert(i == 1, "");