[Bug c/31712] no warning on implicit cast from int to pointer
christoph dot wintersteiger at inf dot ethz dot ch
gcc-bugzilla@gcc.gnu.org
Thu Apr 26 11:32:00 GMT 2007
------- Comment #3 from christoph dot wintersteiger at inf dot ethz dot ch 2007-04-26 12:31 -------
(In reply to comment #2)
> There is no implicit cast here. a[b] is the same as (*((a)+(b))), and since
> addition is commutative, this is the same as (b)[a].
>
Thanks for clarifying. I still think it's completely confusing to have
a[b]==b[a] in general, but that's probably something that can't be changed
easily.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31712
More information about the Gcc-bugs
mailing list