[LLVMbugs] [Bug 20162] New: reserved-user-defined-literal warning or error?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 30 08:41:36 PDT 2014


            Bug ID: 20162
           Summary: reserved-user-defined-literal warning or error?
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ruslan_baratov at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Since '-W' family options is for warnings expected that this code will be
compiled without errors:

> cat foo.cpp
#define N
const char* x = "abc"N;

But compilation failed with *error* (instead of just reporting warning note):
> clang++ -std=c++11 foo.cpp
foo.cpp:2:22: error: invalid suffix on literal; C++11 requires a space between
literal and identifier [-Wreserved-user-defined-literal]
const char* x = "abc"N;
1 error generated.

> echo $?

clang version:

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/20140630/414a37df/attachment.html>

More information about the llvm-bugs mailing list