[LLVMbugs] [Bug 24277] New: Clang could emit a better diagnostic when an apostrophe is used as digit separator in -std=c++11

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 27 09:34:10 PDT 2015


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: unassignedclangbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvmbugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150727/a2176b7e/attachment.html>


More information about the llvm-bugs mailing list