This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Further C front end tests


"Joseph S. Myers" <joseph@codesourcery.com> 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].

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]