This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
throw(), pure and const flags on functions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 13 Apr 2009 20:16:30 +0200
- Subject: throw(), pure and const flags on functions
Hi,
I am trying to improve quality of IPA analysis of C++ code and I tend to
run into issues with amount of code we generate for EH and also amount
of calls to library.
It seems that PURE and CONST attributes in general are not used in
libstdc++ headers and there are also some cases where I think throw ()
marker is missing, like in _Rb_tree_increment.
Fixing those would probably lead to a lot smaller code in our C++
benchmark suite and thus also better inlining/faster compilation. Can
this be improved?
I used to have -Wconst flag that made GCC to warn on functions that was
proved to be const, but they was not marked as such. If this would
help, I can definitly rewrite it for current tree and add the other two
cases too, with someting like -Wfunction-attribtues
Honza