More C type errors by default for GCC 14
Florian Weimer
fweimer@redhat.com
Tue May 16 11:15:12 GMT 2023
* Jakub Jelinek:
> On Tue, May 16, 2023 at 01:39:26PM +0300, Alexander Monakov wrote:
>>
>> On Tue, 16 May 2023, Florian Weimer wrote:
>>
>> > > (FWIW: no, this should not be an error, a warning is fine, and I actually
>> > > think the current state of it not being in Wall is the right thing as
>> > > well)
>>
>> (this is mixed up, -Wpointer-sign is in fact enabled by -Wall)
>>
>> > I don't understand why we do not warn by default and warn with -Wall. I
>> > would expect this to be either a documented extension (no warning with
>> > -Wall), or a warning by default (because it's a conformance issue). Is
>> > there any conformance issue that is treated in the same way?
>>
>> Another one is -Wpointer-arith (pointer arithmetic on 'void *').
>
> That is a documented GNU extension, so we shouldn't increase severity of
> the diagnostics from the current state.
Right, it's also widely used, and harmless for void *. For function
pointers, it's much more dubious, and not meaningful at all for some
targets.
Thanks,
Florian
More information about the Gcc
mailing list