https://llvm.org/bugs/show_bug.cgi?id=23547
Bug ID: 23547
Summary: Clang frontend behaves differently from g++.
Constructor call
Product: clang
Version: 3.6
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
Code snippet:
"""""""""""""""""""""""
struct Widget {};
int main()
{
Widget x = Widget::Widget();
}
"""""""""""""""""""""""
Clang++ 3.6.0 compiles this cleanly, without a warning,
while g++ 4.7.3 produces an error:
error: cannot call constructor ‘Widget::Widget’ directly [-fpermissive]
I do not know, what the standard has to say about this,
but one of this behaviors doesn't seem right.
--
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