This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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 +0000, pinskia at gcc dot gnu dot org wrote:
> 
> ------- 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 defined.  C++ on the other
> hand, is different.
> 
> 

Yep, you're right, the standard says that. The C++ standard says the
same for standard-[] (c-type arrays, I guess not for custom operator[]s
in classes). 

Christoph


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]