This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
expr.h use of "tree"
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: expr.h use of "tree"
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Thu, 20 May 1999 14:18:25 -0400
- Cc: egcs-bugs at egcs dot cygnus dot com
The uses of type "tree" in gcc/expr.h need to be protected by
#ifdef TREE_CODE.
expr.h currently includes:
/* Hook called by expand_expr for language-specific tree codes.
It is up to the language front end to install a hook
if it has any such codes that expand_expr needs to know about. */
extern rtx (*lang_expand_expr) PROTO ((union tree_node *, rtx,
enum machine_mode,
enum expand_modifier modifier));
/* Hook called by output_constant for language-specific tree codes.
It is up to the language front-end to install a hook if it has any
such codes that output_constant needs to know about. Returns a
language-independent constant equivalent to its input. */
extern union tree_node * (*lang_expand_constant) PROTO((tree));
In the first declaration "union tree_node *" is a typedef "tree"
when tree.h is included. In the second declaration, type "tree" is used
in the prototype but not protected by #ifdef TREE_CODE. I think that all
uses of that type should be declared "tree" and should be protected by
#ifdef TREE_CODE. Building the current development sources displays a
number of warnings because of the undefined type used in the prototype.
Thanks, David