https://llvm.org/bugs/show_bug.cgi?id=24361

            Bug ID: 24361
           Summary: Marcos are treated as user-defined literals and are
                    not expanded
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

If you try to compile this code with -std=c++11, __DATE__ and __TIME__ macros
will be treated as user-defined literals. These macros are expanded correctly
for older standard.

const char* s = "Build "__DATE__" at "__TIME__" ";

Also note this comment in clang/lib/Lex/Lexer.cpp, line 1657. Why ud-suffix
takes precedence over macro? Macro should be expanded first.

// them. We assume a suffix beginning with a UCN or UTF-8 character is more
// likely to be a ud-suffix than a macro, however, and accept that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to