This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Annoying warning
- To: egcs at cygnus dot com (egcs at cygnus dot com)
- Subject: Annoying warning
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Sun, 11 Apr 1999 02:36:11 +0200 (CEST)
This code snippet, from the STL:
inline int __black_count(__rb_tree_node_base* node, __rb_tree_node_base* root)
{
if (node == 0)
return 0;
else {
int bc = node->color == __rb_tree_black ? 1 : 0;
if (node == root)
return bc;
else
return bc + __black_count(node->parent, root);
}
}
causes this warning when compiled with -g -O3 :
/usr/local/egcs/include/g++/stl_tree.h:1045: warning: can't inline call to `int __black_count(struct __rb_tree_node_base *, struct __rb_tree_node_base *)'
/usr/local/egcs/include/g++/stl_tree.h:1053: warning: called from here
Shouldn't this warning be suppressed for a recursive call?
Thanks,
--
Carlo Wood <carlo@runaway.xs4all.nl>