[Bug c++/80427] New: DR1658 is implemented in C++03 and C++14 mode, but not C++11

rs2740 at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Apr 14 12:32:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80427

            Bug ID: 80427
           Summary: DR1658 is implemented in C++03 and C++14 mode, but not
                    C++11
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Trunk GCC accepts this code given -std=c++03 or -std=c++14:

struct A {
    A(int) {};
};

struct B : public virtual A {
    virtual void foo() = 0;
};

struct C : public B {
    C() : A(1) {}
    virtual void foo()  {}
};

int main() {
    C c;
    return 0;
}

but rejects it with -std=c++11. 

This doesn't make much sense.


More information about the Gcc-bugs mailing list