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++/24667] [4.0/4.1 Regression] -Wcast-qual fails to reject offending cast for a old style cast



------- Comment #3 from fang at csl dot cornell dot edu  2005-11-04 17:56 -------
Am I correct in expecting that const_cast<...> should pass -Wcast-qual without
warning?  That's the way I use it (in the few and rare cases that demand it)
and it's met my expectations thus far.  I'm kind of surprised I haven't tripped
this bug myself, but that's because I stopped using C-style casts long ago,
enforced by -Wold-style-cast -Werror.  Adding -Wold-style-cast does trip a
warning about old casts with the posted code, but nothing further about
discarding qualifiers (gcc4).  


-- 


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


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