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

            Bug ID: 77323
           Summary: Bad "defaults to 'int'" warning for unsupported types
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

When declaring something using an unsupported type specifier, such as __int128
on 32-bit systems, or _Float128x, the error for the unsupported type is
followed by a warning about the type defaulting to int.  The warning isn't
useful in this case (where a type was specified, but was unsupported, and got
an error for being unsupported).  E.g., on x86_64-pc-linux-gnu with -m32:

__int128 a;
_Float128x b;

gets:

t.c:1:1: error: '__int128' is not supported on this target
 __int128 a;
 ^~~~~~~~
t.c:1:10: warning: type defaults to 'int' in declaration of 'a'
[-Wimplicit-int]
 __int128 a;
          ^
t.c:2:1: error: '_Float128x' is not supported on this target
 _Float128x b;
 ^~~~~~~~~~
t.c:2:12: warning: type defaults to 'int' in declaration of 'b'
[-Wimplicit-int]
 _Float128x b;
            ^

and it would be better just to give the two errors, without the following
warnings.

Reply via email to