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: unassignedclangb...@nondot.org Reporter: dnovi...@google.com CC: llvmbugs@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.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs