From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 598133857C53; Sat, 17 Jul 2021 14:21:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 598133857C53 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101488] New: Implement p1042r1 __VA_OPT__ placemarker changes Date: Sat, 17 Jul 2021 14:21:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2021 14:21:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101488 Bug ID: 101488 Summary: Implement p1042r1 __VA_OPT__ placemarker changes Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- With the https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575355.html there are still some pending placemarker changes that need to be done for f= ull C++20 __VA_OPT__ support. Testcases include besides c-c++-common/cpp/va-opt* also e.g. #define A(x,...) a ## __VA_OPT__ (a) ## a #define B(x,...) a ## __VA_OPT__ () ## a #define C(x,...) a ## __VA_OPT__ (x) ## a #define D(x,...) a ## __VA_OPT__ (x##x) ## a #define E(x,...) a ## __VA_OPT__ (x##x 1) ## a #define F(x,...) a ## __VA_OPT__ (1 x##x) ## a v1: A(,) v2: A(,1) v3: A(2,1) v4: B(,) v5: B(,1) v6: B(2,1) v7: C(,) v8: C(,1) v9: C(2,1) v10: D(,) v11: D(,1) v12: D(2,1) v13: E(,) v14: E(,1) v15: E(2,1) v16: F(,) v17: F(,1) v18: F(2,1) or clang/test/Preprocessor/macro_vaopt_expand.cpp and clang/test/Preprocessor/macro_vaopt_p1042r1.cpp On the above testcase, trunk with the #__VA_OPT__ patch to clang difference= is: -v14: a1a +v14: a 1a -v17: a1a +v17: a1 a On the macro_vaopt_expand.cpp testcase, the difference between patched trunk and clang is -26: B1 -26_1: B1 +26: B 1 +26_1: B 1 -27: B11 +27: B 11 -28: B11 +28: B 11 and on the macro_vaopt_p1042r1.cpp testcase the difference is: -4: ab +4: a b -4B: ab +4B: a b=