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

            Bug ID: 24277
           Summary: Clang could emit a better diagnostic when an
                    apostrophe is used as digit separator in -std=c++11
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangb...@nondot.org
          Reporter: dav...@freebsd.org
                CC: llvmbugs@cs.uiuc.edu
    Classification: Unclassified

The following is completely fine in C++14:
constexpr auto blah = 10'000'000;

but it's not in C++11/03/98:

% ./clang++ constexpr.cpp -std=c++11
constexpr.cpp:1:25: error: expected ';' after top level declarator
constexpr auto blah = 10'000'000;
                        ^
                        ;
1 error generated.

Clang could probably emit (if possible) a slightly better diagnostic, e.g.
"using apostrophe as digit separator is only allowed in C++14" or "apostrophe
as digit separator is a C++14 feature".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to