This is the mail archive of the
mailing list for the GCC project.
Re: Patch to clean up build_array_ref
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 20 Nov 2004 15:41:49 -0500
- Subject: Re: Patch to clean up build_array_ref
- References: <Pine.LNX.email@example.com>
On Nov 20, 2004, at 3:32 PM, Joseph S. Myers wrote:
This patch cleans up build_array_ref in the C front end. This
improves diagnostics and their consistency in various cases, ensuring
that x[y] and y[x] are handled identically except that for some reason
-Wchar-subscripts is designed only to warn for the char in one place.
The dead code testing for index == 0 is removed, and I didn't feel the
need to replace it with an assert. This patch is more conservative
than previously discussed: there are no changes to the handling of
array dereferences involving incomplete types.
The Wchar-subscripts problem for pointers is PR 16307 which now
I am closing as fixed.