[Bug c++/58317] New: Calling a method while preparing to call the constructor should be illegal
oleg at smolsky dot net
gcc-bugzilla@gcc.gnu.org
Thu Sep 5 00:04:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58317
Bug ID: 58317
Summary: Calling a method while preparing to call the
constructor should be illegal
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: oleg at smolsky dot net
struct Thing {
Thing(int);
int f();
};
void test() {
Thing instance(instance.f());
}
The aforementioned code is idiotic and should not compile. Yet it does with gcc
4.8:
..../bin/x86_64-unknown-linux-g++ -Wall -c bug.cc
More information about the Gcc-bugs
mailing list