This is the mail archive of the gcc@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]

Re: -Wcast-qual and casting away


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Wed, 20 May 2009, Ian Lance Taylor wrote:
>
>> All that aside, I can't think of any reason that the C and C++ frontends
>> should be different in this regard.  Does anybody want to make an
>
> There's the fairly obvious reason that C and C++ have different rules on 
> implicit conversions involving const, so const at higher levels of 
> indirection is irrelevant in C in a way that it is not in C++.  (Adoption 
> of the C++ rules was considered and rejected for C99.)

Fair enough, but I don't see any particular reason these rather esoteric
rules should affect the -Wcast-qual option.

Ian


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