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

Reply via email to