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


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