On Tue, 16 May 2023 at 12:01, Jakub Jelinek wrote: > > 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.
I was about to say that this one really is a documented extension. It's caused a few bugs in libstdc++ over the years though. Arithmetic on void* makes sense, but pointer arithmetic on function pointers is just weird.