public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1305] c++: Test for whitespace and line splice
@ 2021-06-08 19:35 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2021-06-08 19:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5668b5d09ae8f942e79b6d4473ba285a496b9a57
commit r12-1305-g5668b5d09ae8f942e79b6d4473ba285a496b9a57
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jun 8 14:32:42 2021 -0400
c++: Test for whitespace and line splice
From wg21.link/P2223R2
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/whitespace-splice1.C: New test.
Diff:
---
gcc/testsuite/g++.dg/cpp23/whitespace-splice1.C | 15 +++++++++++++++
1 file changed, 15 insertions(+)
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 00000000000..f115ce0de13
--- /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, "");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-08 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 19:35 [gcc r12-1305] c++: Test for whitespace and line splice Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).