From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2122) id 2F0FF3984C1C; Tue, 8 Jun 2021 19:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F0FF3984C1C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jason Merrill To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1305] c++: Test for whitespace and line splice X-Act-Checkin: gcc X-Git-Author: Jason Merrill X-Git-Refname: refs/heads/master X-Git-Oldrev: 8483dd99268f4d2b68521fcefa78fbdad21f21e8 X-Git-Newrev: 5668b5d09ae8f942e79b6d4473ba285a496b9a57 Message-Id: <20210608193509.2F0FF3984C1C@sourceware.org> Date: Tue, 8 Jun 2021 19:35:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 19:35:09 -0000 https://gcc.gnu.org/g:5668b5d09ae8f942e79b6d4473ba285a496b9a57 commit r12-1305-g5668b5d09ae8f942e79b6d4473ba285a496b9a57 Author: Jason Merrill 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, "");