This is the mail archive of the
mailing list for the GCC project.
Re: Further C front end tests
"Joseph S. Myers" <firstname.lastname@example.org> writes:
> I'd understood the arithmetic-on-void* extension as applying to the
> constraint on binary + and -, not to the constraint on array reference
> (and the existing practice has already been that the part of the extension
> permitting arithmetic on function pointers doesn't apply to array
> references). (Dereferencing void * in any case seems very dodgy, so
> having an extension providing an exception to the array reference
> constraints solely to allow such dereference looks of doubtful utility.
> But I'll change my next patch to condition diagnostics for array
> references to void types on pedantic || warn_pointer_arith.)
The thing I think we need to continue allowing, as long as the
arithmetic-on-void* extension remains, is &ptr[N].