<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clang++ not complaint with Sec 9.4 in C++ standard"
href="http://llvm.org/bugs/show_bug.cgi?id=16354">16354</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang++ not complaint with Sec 9.4 in C++ standard
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sgundapa@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu, rafael.espindola@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10694" name="attach_10694" title="Sample test case which breaks">attachment 10694</a> <a href="attachment.cgi?id=10694&action=edit" title="Sample test case which breaks">[details]</a></span>
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 <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>>
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: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@178795">https://llvm.org/svn/llvm-project/cfe/trunk@178795</a>
91177308-0d34-0410-b5e6-96231b3b80d8</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>