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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to