OSDN Git Service

(TREE_OVERFLOW): New macro.
authoreggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Jul 1993 01:26:01 +0000 (01:26 +0000)
committereggert <eggert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Jul 1993 01:26:01 +0000 (01:26 +0000)
(pushcase, pushcase_range): Add a new converter
function argument that specifies how to convert case labels to the
nominal type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4826 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/tree.h

index 7142f49..bf90d11 100644 (file)
@@ -246,13 +246,20 @@ struct tree_common
    implicitly and should not lead to an "unused value" warning.  */
 #define TREE_NO_UNUSED_WARNING(NODE) ((NODE)->common.static_flag)
 
-/* In an INTEGER_CST, this means there was overflow in folding.  */
-#define TREE_CONSTANT_OVERFLOW(NODE) ((NODE)->common.static_flag)
-
 /* Nonzero for a TREE_LIST or TREE_VEC node means that the derivation
    chain is via a `virtual' declaration.  */
 #define TREE_VIA_VIRTUAL(NODE) ((NODE)->common.static_flag)
 
+/* In an INTEGER_CST, this means there was an overflow in folding.
+   This is distinct from TREE_OVERFLOW because ANSI C requires a diagnostic
+   when overflows occur in constant expressions.  */
+#define TREE_CONSTANT_OVERFLOW(NODE) ((NODE)->common.static_flag)
+
+/* In an INTEGER_CST, this means there was an overflow in folding,
+   and no warning has been issued for this subexpression.
+   TREE_OVERFLOW implies TREE_CONSTANT_OVERFLOW, but not vice versa.  */
+#define TREE_OVERFLOW(NODE) ((NODE)->common.public_flag)
+
 /* In a VAR_DECL or FUNCTION_DECL,
    nonzero means name is to be accessible from outside this module.
    In an identifier node, nonzero means an external declaration
@@ -1415,8 +1422,8 @@ extern void expand_end_bindings                   PROTO((tree, int, int));
 extern tree last_cleanup_this_contour          PROTO((void));
 extern void expand_start_case                  PROTO((int, tree, tree, char *));
 extern void expand_end_case                    PROTO((tree));
-extern int pushcase                            PROTO((tree, tree, tree *));
-extern int pushcase_range                      PROTO((tree, tree, tree, tree *));
+extern int pushcase                            PROTO((tree, tree (*) (tree, tree), tree, tree *));
+extern int pushcase_range                      PROTO((tree, tree, tree (*) (tree, tree), tree, tree *));
 
 /* In fold-const.c */