[Bug other/43295] zlib: two C++ member functions could be marked const

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Mar 9 10:35:00 GMT 2010



------- Comment #2 from redi at gcc dot gnu dot org  2010-03-09 10:34 -------
besides which, making it const would allow:

void bork_the_stream(const izstream& i)
{
    ::gzclose(i.fp());
}

which doesn't help anyone.  cppcheck is a very simplistic pattern matcher, in
this case it's wrong IMHO, that it could be const does not mean _should_ be
const.


-- 


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



More information about the Gcc-bugs mailing list