https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83708

            Bug ID: 83708
           Summary: Token-based policy broken by __VA_OPT__
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: woong.jun at gmail dot com
  Target Milestone: ---

Use of __VA_OPT__ can break the token-based policy when those optional tokens
do not come from arguments.

$ cat > foo.c
__VERSION__

#define foo(...) __VA_OPT__(foo)__VA_OPT__(bar)
foo(dummy)

$ gcc -E foo.c
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "foo.c"
"8.0.0 20180105 (experimental)"


foobar

Reply via email to