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

2007-04-26 Thread christoph dot wintersteiger at inf dot ethz dot ch
--- Comment #5 from christoph dot wintersteiger at inf dot ethz dot ch 2007-04-26 16:03 --- Subject: Re: no warning on implicit cast from int to pointer On Thu, 2007-04-26 at 14:56 +, pinskia at gcc dot gnu dot org wrote: > > --- Comment #4 from pinskia at gcc dot gnu dot org

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

2007-04-26 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-04-26 15:56 --- >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. Well, this is what the C standard says how this is defin

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

2007-04-26 Thread christoph dot wintersteiger at inf dot ethz dot ch
--- 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 t

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

2007-04-26 Thread schwab at suse dot de
--- 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 -

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

2007-04-26 Thread christoph dot wintersteiger at inf dot ethz dot ch
--- Comment #1 from christoph dot wintersteiger at inf dot ethz dot ch 2007-04-26 12:12 --- Created an attachment (id=13448) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13448&action=view) Testcase, should produce a warning but doesn't. -- http://gcc.gnu.org/bugzilla/show_bu