Warning for constant functions

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Wed Feb 16 11:21:00 GMT 2000


On Wed, 16 Feb 2000, Jan Hubicka wrote:
> Also you don't need to emit warning always. When the static function
> is not called before defined, the gcc can detect this and there is no
> need to ask user to add the attribute.

Well, it may not make a difference as far as optimization is concerned,
yet such a warning certainly will be considered useful for people that
are interested in maximizing "const-correctness" of their code, for
example as a means of documentation.

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/



More information about the Gcc-patches mailing list