http://llvm.org/bugs/show_bug.cgi?id=17898

            Bug ID: 17898
           Summary: const qualifier accepted on ctor
                    declaration/definition
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

The question came up at StackOverflow.

http://stackoverflow.com/q/19935868/341970

According to the accepted answer, the following (simplified) code is illegal
but it compiler with clang++ -Wall -pedantic cleanly.

struct X {
  int i;
  const X() { i=0; }
};

int main() {
  const X x;
}

-- 
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

Reply via email to