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

--- Comment #3 from Nikolay Orliuk <virkony at gmail dot com> ---
Sure,

    struct Value {
        Value();
        Value(const Value&);
        Value(Value&&);
    };

    struct Frame {
        Value value; // previously mutable
    };

    Frame top;
    const Frame& x = top;
    Value y = std::move(x.value);

Thank you for looking into it. Yes, there should be better names than
-Wno-effect. Maybe -Wignored-move and -Wmove-const are slightly better.

Such warning will help to identify places which become ineffecient after
changing constness of something.

Reply via email to