[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


           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


#define STRINGIFY_(A) #A
#define DONT_CONCAT_(X) A X B
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