public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-1305] c++: Test for whitespace and line splice
Date: Tue,  8 Jun 2021 19:35:09 +0000 (GMT)	[thread overview]
Message-ID: <20210608193509.2F0FF3984C1C@sourceware.org> (raw)

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, "");


                 reply	other threads:[~2021-06-08 19:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608193509.2F0FF3984C1C@sourceware.org \
    --to=jason@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).