This is the mail archive of the gcc@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]

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




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