This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to clean up build_array_ref
On Sun, 21 Nov 2004, Kai Henningsen wrote:
> joseph@codesourcery.com (Joseph S. Myers) wrote on 20.11.04 in <Pine.LNX.4.61.0411202031490.17088@digraph.polyomino.org.uk>:
>
> > 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.
>
> That looks like a bug to me - should that really be preserved? Why?
The old comment
- /* Do the same warning check as above, but only on the part that's
- syntactically the index and only if it is also semantically
- the index. */
makes clear it was deliberate (although not why).
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)