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: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jan 2009 02:41:05 -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 #7 from ian at airs dot com 2009-01-07 02:41 -------
Probably related to this, we get a bad warning for
extern void** foo();
const void** bar() { return (const void **) foo(); }
foo.cc:2: warning: cast from type ?void**? to type ?const void**? casts away
constness
I don't see any way that this cast can be described as casting away constness.
I don't see why we should warn about adding a const qualifier.
--
ian at airs dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711