[Bug c++/85468] Wrong location for -Wignored-qualifiers diagnostic on conversion operator

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 19 09:06:24 GMT 2021


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2020-11-10 00:00:00         |2021-05-19

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
>From Bug 100668:

const char* const f() {
    return nullptr;
}

char const* const f2() {
    return nullptr;
}

char* const f3() {
    return nullptr;
}



c.C:1:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
    1 | const char* const f() {
      | ^~~~~
c.C:6:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
    6 | char const* const f2() {
      | ^~~~
c.C:10:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
   10 | char* const f3() {
      | ^~~~


More information about the Gcc-bugs mailing list