[LLVMbugs] [Bug 9981] New: crash with ## token
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat May 21 03:09:11 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9981
Summary: crash with ## token
Product: clang
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jens.gustedt at loria.fr
CC: llvmbugs at cs.uiuc.edu
The following code can be used to crash clang for me.
The issue is that the ## token is a valid preprocessing token, even
outside macro declarations. We should be able to use it whenever other
treatment ensures that it doesn't land as such in the preprocessed C code.
Admittedly this is just a bizarre corner case, but still...
It is one of the points why clang is not completely C99 conforming, see
http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-2.9.html
Jens
#define STRINGIFY_(A) #A
#define STRINGIFY(A) STRINGIFY_(A)
#define DONT_CONCAT_(X) A X B
#define DONT_CONCAT(X) DONT_CONCAT_(X)
char const has_hash_hash_as_argument[] = STRINGIFY(DONT_CONCAT(##));
--
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.
More information about the llvm-bugs
mailing list