public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-101488-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101488 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 full 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
next reply other threads:[~2021-07-17 14:21 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-17 14:21 jakub at gcc dot gnu.org [this message] 2021-07-17 14:29 ` [Bug c++/101488] " jakub at gcc dot gnu.org 2021-07-19 12:51 ` jakub at gcc dot gnu.org 2021-07-19 14:38 ` jakub at gcc dot gnu.org 2021-09-01 19:34 ` cvs-commit at gcc dot gnu.org 2021-09-01 19:35 ` jakub at gcc dot gnu.org
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=bug-101488-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).