const warning...
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Fri Jul 4 18:36:00 GMT 2003
As an exercise (and a way to learn some gcc internals), I
intend to implement a new warning I would have an usage for (as
compared to some other beginner's projects).
The idea would be to add a -W flag (yet unnamed) that will try to
help the user in identifying the places where a const qualifier
could be added (this can be for variables and also for methods in
C++). This might help a lot in constifying a code (even thought I'm
trying to constify from the beginning), or completing the
constification of a code.
The (very broad) idea would be to add a new flag similar to
tree_used, but that would track whether a variable is modified in a
function (or whether a method modifies a class member for C++).
Is this a bad idea or something that is already done and that I
missed ?? Any advice I can follow (which branch provides the best
environment to do what I'm proposing, any (similar?) piece of code
that it might be useful to study, general comment, ....).
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
More information about the Gcc
mailing list