[LLVMbugs] [Bug 16354] New: Clang++ not complaint with Sec 9.4 in C++ standard

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 17 16:08:55 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: sgundapa at codeaurora.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    rafael.espindola at gmail.com
    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 <rafael.espindola at gmail.com>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130617/5eb04b4b/attachment.html>


More information about the llvm-bugs mailing list