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

            Bug ID: 64901
           Summary: Overriding final function defined out of line does not
                    lead to an error
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaballo86 at hotmail dot com

It was reported by talin over at ##C++ that the following snippet does not
result in a compilation error as expected:

    struct Plant {
      virtual void speak() final;
    };

    void Plant::speak(){}

    struct Flower :  Plant {
      void speak(){}
    };

    int main() {}

The issue can be reproduced with gcc-4.9.0 and upwards, and it only happens
when `Plant::speak` is defined out-of-line.

Reply via email to