[Bug c/31712] no warning on implicit cast from int to pointer

schwab at suse dot de gcc-bugzilla@gcc.gnu.org
Thu Apr 26 11:18:00 GMT 2007



------- Comment #2 from schwab at suse dot de  2007-04-26 12:18 -------
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].


-- 

schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31712



More information about the Gcc-bugs mailing list