http://llvm.org/bugs/show_bug.cgi?id=16354
Bug ID: 16354
Summary: Clang++ not complaint with Sec 9.4 in C++ standard
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Created attachment 10694
--> http://llvm.org/bugs/attachment.cgi?id=10694&action=edit
Sample test case which breaks
I have attached a sample test case which clang++ compiles with out error. As
per Section 9.4 in C++ standard this should fail which I observed the same on
newer versions of g++ too.
Clang++ used to work fine earlier with error message
test.cpp:22:20: error: non-static declaration of 'd' follows static declaration
register double A::d = 23.45;
^
test.cpp:17:23: note: previous definition is here
static double d;
^
1 error generated.
But the below mentioned commit breaks the behavior and compiles the test case
with out any error.
commit ea4b1113cea2190e4ac1d07f99102a1c0fd3eddd
Author: Rafael Espindola <[email protected]>
Date: Thu Apr 4 21:21:25 2013 +0000
Don't patch the storage class of static data members.
This removes a bit of patching that survived r178663. Without it we can
produce
better a better error message for
const int a = 5;
static const int a;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178795
91177308-0d34-0410-b5e6-96231b3b80d8
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs