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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
P.S. it helps to provide a testcase that doesn't have lots of spurious warnings
when compiled with -Wall -Wextra, because one of the first things I'm going to
do when triaging bug reports is compile with those warnings on.

Uninitialized variables and unused parameters that are not relevant to the bug
are just noise.

Reduced testcase:

struct Base {
    virtual int operator==(const Base&) const {
        return 1;
    }
};

struct Derived : public Base {
    virtual int operator==(const Base&) const {
        return 1;
    }
};

int main()
{
    Base* b = nullptr;
    Derived* d = nullptr;
    if (*b == *d) {
        return 1;
    }
}

Reply via email to