aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-05-13 14:58:56 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-05-13 14:58:56 -0400
commit03307888f71f81829bc96f569b927a825e5ab2f4 (patch)
tree38e4eda90974c27801ffbbf2262cd0f625dedcde /gcc/tree.h
parentd660cefe65aba85a809c01e104b1480df13952d1 (diff)
downloadgcc-03307888f71f81829bc96f569b927a825e5ab2f4.zip
gcc-03307888f71f81829bc96f569b927a825e5ab2f4.tar.gz
gcc-03307888f71f81829bc96f569b927a825e5ab2f4.tar.bz2
tree.h (STRIP_MAIN_TYPE_NOPS): New macro.
* tree.h (STRIP_MAIN_TYPE_NOPS): New macro. * tree.c (iterative_hash_expr): New fn. * c-semantics.c (emit_local_var): Don't mess with temp slots if there's no initializer. From-SVN: r66775
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 8c01ca1..060ecd1 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -427,6 +427,17 @@ extern void tree_operand_check_failed PARAMS ((int, enum tree_code,
== TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
(EXP) = TREE_OPERAND (EXP, 0)
+/* Like STRIP_NOPS, but don't alter the TREE_TYPE main variant either. */
+
+#define STRIP_MAIN_TYPE_NOPS(EXP) \
+ while ((TREE_CODE (EXP) == NOP_EXPR \
+ || TREE_CODE (EXP) == CONVERT_EXPR \
+ || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
+ && TREE_OPERAND (EXP, 0) != error_mark_node \
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (EXP)) \
+ == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
+ (EXP) = TREE_OPERAND (EXP, 0)
+
/* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */
#define STRIP_TYPE_NOPS(EXP) \
@@ -2955,6 +2966,7 @@ extern bool variably_modified_type_p PARAMS ((tree));
extern int tree_log2 PARAMS ((tree));
extern int tree_floor_log2 PARAMS ((tree));
extern int simple_cst_equal PARAMS ((tree, tree));
+extern unsigned int iterative_hash_expr PARAMS ((tree, unsigned int));
extern int compare_tree_int PARAMS ((tree,
unsigned HOST_WIDE_INT));
extern int type_list_equal PARAMS ((tree, tree));