[LLVMbugs] [Bug 24254] New: No diagnostic for mismatch between const and constexpr
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 24 13:15:09 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24254
Bug ID: 24254
Summary: No diagnostic for mismatch between const and constexpr
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: dnovillo at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Given these mismatched declarations:
extern const char kAbc[];
constexpr char kAbc[] = "abc";
Clang (trunk as of today) compiles this code with no errors:
$ clang++ -c foo.cc -std=c++11
But GCC 4.8 gives the following error:
$ g++ -std=c++11 -c foo.cc
foo.cc:2:21: error: redeclaration 'kAbc' differs in 'constexpr'
constexpr char kAbc[] = "abc";
^
foo.cc:1:19: error: from previous declaration 'kAbc'
extern const char kAbc[];
^
--
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/20150724/d07a2f13/attachment.html>
More information about the llvm-bugs
mailing list