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++/35711] bad text in -Wcast-qual warning (forgets volatile)



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-29 03:08 -------
(In reply to comment #2)
>  It is almost  magic that we only warn for qualifiers.

You can get the same message with an error message too:
int* foo (volatile int *p)
{
    return static_cast<int*>p;
}

As static_cast cannot cast away qualifiers.  Also note we (Sony) changed our
GCC to just say qualifiers instead of constness.


-- 


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


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