[LLVMbugs] [Bug 20928] New: wrong whitespace when stringizing raw string literal

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 12 14:46:08 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20928

            Bug ID: 20928
           Summary: wrong whitespace when stringizing raw string literal
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Consider:

#define STR(x) STR2(x)
#define STR2(x) #x
const char *p = STR( R"("    blah     ")" );

Clang "normalizes" the whitespace around "blah" here, but that is not
permitted, because it occurs within a token not between tokens.

We also accept-invalid on:

const char *q = STR( R"("    
     ")" );

... because we remove the ill-formed newline before lexing a token from the
result. That's arguably a core issue, though.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140912/4ceddf70/attachment.html>


More information about the llvm-bugs mailing list