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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The warning has changed slightly since GCC 9:

80516.cc:6:3: warning: ‘signed’ specified with ‘u’ {aka ‘unsigned int’}
[-Wpedantic]
    6 | S<signed u> s;
      |   ^~~~~~

This is emitted by grokdeclarator in gcc/cp/decl.c:

      else if (!explicit_int && !defaulted_int
               && !explicit_char && !explicit_intN)
        {
          if (typedef_decl)
            {
              pedwarn (loc, OPT_Wpedantic, "%qs specified with %qT",
                       key, type);
              ok = !flag_pedantic_errors;
            }
          else if (declspecs->decltype_p)
            error_at (loc, "%qs specified with %<decltype%>", key);
          else
            error_at (loc, "%qs specified with %<typeof%>", key);
        }

Maybe we can change it to an error by default, but allow it with -fpermissive.

Reply via email to