https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84892
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-03-16
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #0)
> Reddit user "evaned" reports that we fail to offer a fix-it hint code
> suggesting the "get_field" accessor on this code:
> https://godbolt.org/g/y2cbuv
>
>
> class S {
> private:
> bool field;
>
> public:
> bool get_field() const {
> return field;
> }
> };
>
> bool thingy(const S & s) {
> return s.field;
> }
>
>
> Removing the "const" from "thingy" seems to fix it.
Link to evaned's original comment is here:
https://www.reddit.com/r/programming/comments/84oizv/usability_improvements_in_gcc_8/dvrh7jf/
Thus, confirmed.