On Wed, Jan 15, 2025 at 09:36:51PM +0100, Georg-Johann Lay via Gcc wrote:
> > This pedwarn is correct, so I'm not sure why it's a problem. If you
> > don't want warnings about non-standard extensions, don't use
> > -pedantic-errors.
> 
> The point is that I don't pedwarn explicitly, that's how the
> testsuite works.  What I am seeing is that with INT_N, many
> tests in, say, avr.exp are failing which didn't fail with the
> old definition of __int24.  Similar will happen in user land,
> which I'd like to avoid.

__int128 a;
emits such warning as well, there is nothing wrong with that and it is
better when it is consistent.
The tests can just stop using -pedantic-errors when they use the type
(in some test subdirectories that is the default, so one needs to
e.g. specify { dg-options "" } or some actual options to override it),
or use
__extension__ __int128 a;
(then the pedantic warning and error are not emitted).
The reason for the pedwarn is that these are extensions to the standard,
and the purpose of -pedantic or -pedantic-errors is diagnose extensions
used in the program (and __extension__ a way to override that pedanticity).
We pedwarn even about long long with -std=c89...

        Jakub

Reply via email to