http://llvm.org/bugs/show_bug.cgi?id=10606
Summary: C++ operator cannot be used as a macro name
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Clang is unable to preprocess a file in the Boost library containing macro with
the name 'and'.
Example:
#include <stdio.h>
#define and "test"
#if defined (and)
#endif
int main()
{
printf(and);
return 0;
}
clang output:
clang.exe and-test.cpp -E -o and-test.i
and-test.cpp:2:9: error: C++ operator 'and' cannot be used as a macro name
#define and "test"
^
and-test.cpp:4:14: error: operator 'defined' requires an identifier
#if defined (and)
^
2 errors generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs