public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101488] New: Implement p1042r1 __VA_OPT__ placemarker changes
@ 2021-07-17 14:21 jakub at gcc dot gnu.org
  2021-07-17 14:29 ` [Bug c++/101488] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-07-17 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-01 19:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 14:21 [Bug c++/101488] New: Implement p1042r1 __VA_OPT__ placemarker changes jakub at gcc dot gnu.org
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

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).