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

            Bug ID: 85468
           Summary: Wrong location for -Wignored-qualifiers diagnostic on
                    conversion operator
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

struct Test {
   operator int const() const; // { dg-error "type qualifiers ignored" }
};

ign.cc:2:25: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
    operator int const() const; // { dg-error "type qualifiers ignored" }
                         ^~~~~

The location should point to the first const.

This is the subject of PR 69733 but that fix didn't cover conversion operators.

Reply via email to