This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Making legacy code const correct
- From: Mika Heiskanen <Mika dot Heiskanen at fmi dot fi>
- To: gcc at gcc dot gnu dot org
- Cc: Mika dot Heiskanen at fmi dot fi
- Date: Mon, 20 Oct 2003 18:00:09 +0300 (EEST)
- Subject: Making legacy code const correct
Hi,
Given that g++ is able to check that a const method uses a non-const
method or modifies the class variables directly, shouldn't it also
be able to detect when a non-const method really is const correct?
A compiler flag to enable such checks would be most useful when
converting large amounts of legacy code to be const correct. Unfortunately
I myself am not at all familiar with the gcc code base, anyone more
knowledgeable out there who'd be interested in implementing this
new feature?
--> Mika.Heiskanen@fmi.fi
Finnish Meteorological Institute