[LLVMbugs] [Bug 20257] New: invalid 'const' not rejected on constructor definition

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 9 04:11:16 PDT 2014


            Bug ID: 20257
           Summary: invalid 'const' not rejected on constructor definition
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang compiles this without complaint:

struct X { X(); };

const X::X() { }

G++ rejects it with a confusing diagnostic about the definition not matching
the declaration and EDG says:
"test.cc", line 3: error: return type may not be specified on a constructor

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/20140709/2a2fc937/attachment.html>

More information about the llvm-bugs mailing list