https://bugs.llvm.org/show_bug.cgi?id=35617
Bug ID: 35617
Summary: Preprocessor bug (variadic macros)
Product: clang
Version: 5.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: jkl9...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
#define xcombine(A,B,...) A ## B ## __VA_ARGS__
#define m(x,...) xcombine(x,__VA_ARGS__)
m(1) //CLANG should NOT bark "too few arguments".
m(1,2) //GCC/MSC/CLANG works fine.
#define ycombine(A,B) A ## B
#define n(x,...) ycombine(x,##__VA_ARGS__)
n(1) //MSC/CLANG fail to detect error: macro "ycombine" requires 2 arguments,
but only 1 given.
n(1,2) //no problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs