This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2008 03:08:55 -0000
- Subject: [Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)
- References: <bug-35711-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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