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

--- Comment #4 from Fedor Chelnokov <fchelnokov at gmail dot com> ---
Ok.

At the same time we see that some false positives of this warning are fixed in
Trunk, e.g.

struct A {
    int i;
};

struct Getter {
    const A * a;
    const int & value() const { return a->i; }
};

int main() {
    A a { .i = 1 };
    const auto & i = Getter{ &a }.value();
    return i;
}

Online demo: https://godbolt.org/z/z9rPx831n

So we assume that this one can be fixed as well, why not?

Reply via email to