http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49692
Summary: Constructor call mistaken for declaration
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
The compiler interprets
MyObject(variable_name)
as
MyObject variable_name
If variable_name exists as an int, this causes a 'redeclaration' error instead
of a call to the constructor MyObject::MyObject(int).
Am I missing some syntactic aspect here ? The root cause may very well be that
e.g.
int (variable_name)
is accepted by the compiler as a declaration. It doesn't look like one to me.