This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: alias.c: find_base_decl: TREE_CODE_CLASS of '3'


On Sep 8, 2004, at 5:44 PM, Zack Weinberg wrote:

"Jeffrey D. Oldham" <oldham@codesourcery.com> writes:

In gcc/alias.c, find_base_decl, the switch on TREE_CODE_CLASS (TREE_CODE
(t)) has a case '3'. How can '3' be a valid tree code class? '1' and
'2' are valid tree code classes.

On first glance, this would be dead code. There is no tree code,
either language-independent or language-specific, with '3' for its
class in the source tree (checked with grep "DEFTREECODE.*'3'" *.def */*.def).


However, looking more closely at the code there, I wonder if this is
either something that ought to be using TREE_CODE_LENGTH, or something
that ought to be using get_inner_reference.  Or some other primitive I
don't know about.

With an Aug 13, 2001 cvs repo copy:


mrs bash[15] grep 3 *.def,v | grep DEFTREE
c-common.def,v:DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
c-common.def,v:DEFTREECODE (CASE_LABEL, "case_label", 'e', 3)
c-common.def,v:DEFTREECODE (CASE_LABEL, "case_label", 'e', 3)
tree.def,v:DEFTREECODE (REAL_CST, "real_cst", 'c', 3)
tree.def,v:DEFTREECODE (COMPLEX_CST, "complex_cst", 'c', 3)
tree.def,v:DEFTREECODE (STRING_CST, "string_cst", 'c', 3)
tree.def,v:DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", 'r', 3)
tree.def,v:DEFTREECODE (COND_EXPR, "cond_expr", 'e', 3)
tree.def,v:DEFTREECODE (BIND_EXPR, "bind_expr", 'e', 3)
tree.def,v:DEFTREECODE (WITH_CLEANUP_EXPR, "with_cleanup_expr", 'e', 3)
tree.def,v:DEFTREECODE (SAVE_EXPR, "save_expr", 'e', 3)
tree.def,v:DEFTREECODE (EXPR_WITH_FILE_LOCATION, "expr_with_file_location", 'e', 3)
tree.def,v:DEFTREECODE (CALL_EXPR, "call_expr", 'e', 3)
tree.def,v:DEFTREECODE (EXPR_WITH_FILE_LOCATION, "expr_with_file_location", 'e', 3)
tree.def,v:DEFTREECODE (REAL_CST, "real_cst", "c", 3)
tree.def,v:DEFTREECODE (COMPLEX_CST, "complex_cst", "c", 3)
tree.def,v:DEFTREECODE (STRING_CST, "string_cst", "c", 3)
tree.def,v:DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", "r", 3)
tree.def,v:DEFTREECODE (COND_EXPR, "cond_expr", "e", 3)
tree.def,v:DEFTREECODE (BIND_EXPR, "bind_expr", "e", 3)
tree.def,v:DEFTREECODE (CALL_EXPR, "call_expr", "e", 3)
tree.def,v:DEFTREECODE (WITH_CLEANUP_EXPR, "with_cleanup_expr", "e", 3)
tree.def,v:DEFTREECODE (SAVE_EXPR, "save_expr", "e", 3)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]