------- 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