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

            Bug ID: 68391
           Summary: -Wsuggest-override does not work on Item 12 of
                    Effective Modern C++
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rhalbersma at gmail dot com
  Target Milestone: ---

Item 12 of Effective Modern C++ contains this example:

class Base {
public:
    virtual void mf1() const;
    virtual void mf2(int x);
    virtual void mf3() &;
    void mf4() const;
};

class Derived: public Base {
public:
    virtual void mf1();
    virtual void mf2(unsigned int x);
    virtual void mf3() &&;
    void mf4() const;
};

int main(){}

gcc -Wsuggest-override does not yield a single warning (-Wall -Wextra -pedantic
don't help either). In contrast, clang -Woverloaded-virtual warns about mf1
through mf3.

Reply via email to