From b9daac31920bd6c26751068a1c40164f49d48224 Mon Sep 17 00:00:00 2001 From: Graham Stott Date: Thu, 3 Jan 2002 05:18:25 +0000 Subject: [PATCH] tree.h: Update copyright date. * tree.h: Update copyright date. (IS_EXPR_CODE_CLASS): Add parenthesis. (TREE_SET_CODE): Add whitespace. (TREE_CHECK): Add parenthesis. (TREE_CLASS_CODE): Add parenthesis and wrap long line. (CST_OR_CONSTRUCTOR_CHECK): (EXPR_CHECK): Add parenthis, whitespace and wrap line. (TREE_SYMBOL_REFERENCED): Whitespace. (INT_CST_LT): Likewise. (INT_CST_LT_UNSIGNED): Likewise. (tree_real_cst): Unwrap comment. (tree_string): Likewise. (tree_complex): Likewise. (IDENTIFIER_POINTER): correct cast. (SAVE_EXPR_CONTEXT): Whitespace. (EXPR_WFL_FILENAME_NODE): Likewise. (EXPR_WFL_FILENAME): Remove parenthesis. (DECL_ORIGIN): Add parenthesis. (DECL_FROM_INLINE): Use NULL_TREE. (build_int_2): Whitespace. (build_type_variant): Add parenthesis. * gcc/jcf-parse.c: Update copyright date. (yyparse): Constify resource_filename. From-SVN: r48498 --- gcc/ChangeLog | 27 ++++++++++++++++++ gcc/java/jcf-parse.c | 5 ++-- gcc/tree.h | 68 ++++++++++++++++++++++---------------------- 3 files changed, 64 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e9597f4aed..5d0eafbe426 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,30 @@ +2000-01-03 Graham Stott + + * tree.h: Update copyright date. + (IS_EXPR_CODE_CLASS): Add parenthesis. + (TREE_SET_CODE): Add whitespace. + (TREE_CHECK): Add parenthesis. + (TREE_CLASS_CODE): Add parenthesis and wrap long line. + (CST_OR_CONSTRUCTOR_CHECK): + (EXPR_CHECK): Add parenthis, whitespace and wrap line. + (TREE_SYMBOL_REFERENCED): Whitespace. + (INT_CST_LT): Likewise. + (INT_CST_LT_UNSIGNED): Likewise. + (tree_real_cst): Unwrap comment. + (tree_string): Likewise. + (tree_complex): Likewise. + (IDENTIFIER_POINTER): correct cast. + (SAVE_EXPR_CONTEXT): Whitespace. + (EXPR_WFL_FILENAME_NODE): Likewise. + (EXPR_WFL_FILENAME): Remove parenthesis. + (DECL_ORIGIN): Add parenthesis. + (DECL_FROM_INLINE): Use NULL_TREE. + (build_int_2): Whitespace. + (build_type_variant): Add parenthesis. + + * gcc/jcf-parse.c: Update copyright date. + (yyparse): Constify resource_filename. + 2002-01-03 Graham Stott * rtl.h: Update copyright date. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 52de111b0dc..2841d5f5f84 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1,5 +1,6 @@ /* Parser for Java(TM) .class files. - Copyright (C) 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. This file is part of GNU CC. @@ -1080,7 +1081,7 @@ yyparse () if (resource_name) { - char *resource_filename; + const char *resource_filename; /* Only one resource file may be compiled at a time. */ assert (TREE_CHAIN (current_file_list) == NULL); diff --git a/gcc/tree.h b/gcc/tree.h index 051aa2c5bf3..208e6d0a78b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -53,7 +53,7 @@ extern char tree_code_type[MAX_TREE_CODES]; expression. */ #define IS_EXPR_CODE_CLASS(CLASS) \ - (CLASS == '<' || CLASS == '1' || CLASS == '2' || CLASS == 'e') + ((CLASS) == '<' || (CLASS) == '1' || (CLASS) == '2' || (CLASS) == 'e') /* Number of argument-words in each kind of tree-node. */ @@ -269,36 +269,39 @@ struct tree_common Codes are defined in tree.def. */ #define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code) #define TREE_SET_CODE(NODE, VALUE) \ -((NODE)->common.code = (ENUM_BITFIELD(tree_code)) (VALUE)) +((NODE)->common.code = (ENUM_BITFIELD (tree_code)) (VALUE)) /* When checking is enabled, errors will be generated if a tree node is accessed incorrectly. The macros abort with a fatal error. */ #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007) #define TREE_CHECK(t, code) __extension__ \ -({ const tree __t = t; \ +({ const tree __t = (t); \ if (TREE_CODE(__t) != (code)) \ tree_check_failed (__t, code, __FILE__, __LINE__, __FUNCTION__); \ __t; }) #define TREE_CLASS_CHECK(t, class) __extension__ \ -({ const tree __t = t; \ +({ const tree __t = (t); \ if (TREE_CODE_CLASS(TREE_CODE(__t)) != (class)) \ - tree_class_check_failed (__t, class, __FILE__, __LINE__, __FUNCTION__); \ + tree_class_check_failed (__t, class, __FILE__, __LINE__, \ + __FUNCTION__); \ __t; }) /* These checks have to be special cased. */ #define CST_OR_CONSTRUCTOR_CHECK(t) __extension__ \ -({ const tree __t = t; \ - enum tree_code __c = TREE_CODE(__t); \ +({ const tree __t = (t); \ + enum tree_code const __c = TREE_CODE(__t); \ if (__c != CONSTRUCTOR && TREE_CODE_CLASS(__c) != 'c') \ - tree_check_failed (__t, CONSTRUCTOR, __FILE__, __LINE__, __FUNCTION__); \ + tree_check_failed (__t, CONSTRUCTOR, __FILE__, __LINE__, \ + __FUNCTION__); \ __t; }) #define EXPR_CHECK(t) __extension__ \ -({ const tree __t = t; \ - char __c = TREE_CODE_CLASS(TREE_CODE(__t)); \ +({ const tree __t = (t); \ + char const __c = TREE_CODE_CLASS(TREE_CODE(__t)); \ if (__c != 'r' && __c != 's' && __c != '<' \ && __c != '1' && __c != '2' && __c != 'e') \ - tree_class_check_failed(__t, 'e', __FILE__, __LINE__, __FUNCTION__); \ + tree_class_check_failed (__t, 'e', __FILE__, __LINE__, \ + __FUNCTION__); \ __t; }) extern void tree_check_failed PARAMS ((const tree, enum tree_code, @@ -510,7 +513,7 @@ extern void tree_class_check_failed PARAMS ((const tree, int, /* In an IDENTIFIER_NODE, this means that assemble_name was called with this string as an argument. */ #define TREE_SYMBOL_REFERENCED(NODE) \ - (IDENTIFIER_NODE_CHECK (NODE)->common.static_flag) + (IDENTIFIER_NODE_CHECK (NODE)->common.static_flag) /* In an INTEGER_CST, REAL_CST, of COMPLEX_CST, this means there was an overflow in folding, and no warning has been issued for this subexpression. @@ -667,16 +670,16 @@ extern void tree_class_check_failed PARAMS ((const tree, int, #define TREE_INT_CST_LOW(NODE) (TREE_INT_CST (NODE).low) #define TREE_INT_CST_HIGH(NODE) (TREE_INT_CST (NODE).high) -#define INT_CST_LT(A, B) \ - (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \ - || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \ +#define INT_CST_LT(A, B) \ + (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \ + || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \ && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) -#define INT_CST_LT_UNSIGNED(A, B) \ - (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ - < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ - || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ - == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ +#define INT_CST_LT_UNSIGNED(A, B) \ + (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ + < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ + || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ + == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) struct tree_int_cst @@ -711,8 +714,7 @@ struct tree_int_cst struct tree_real_cst { struct tree_common common; - rtx rtl; /* acts as link to register transfer language - (rtl) info */ + rtx rtl; /* acts as link to register transfer language (rtl) info */ REAL_VALUE_TYPE real_cst; }; @@ -723,8 +725,7 @@ struct tree_real_cst struct tree_string { struct tree_common common; - rtx rtl; /* acts as link to register transfer language - (rtl) info */ + rtx rtl; /* acts as link to register transfer language (rtl) info */ int length; const char *pointer; }; @@ -736,8 +737,7 @@ struct tree_string struct tree_complex { struct tree_common common; - rtx rtl; /* acts as link to register transfer language - (rtl) info */ + rtx rtl; /* acts as link to register transfer language (rtl) info */ tree real; tree imag; }; @@ -749,7 +749,7 @@ struct tree_complex #define IDENTIFIER_LENGTH(NODE) \ (IDENTIFIER_NODE_CHECK (NODE)->identifier.id.len) #define IDENTIFIER_POINTER(NODE) \ - ((char *) IDENTIFIER_NODE_CHECK (NODE)->identifier.id.str) + ((const char *) IDENTIFIER_NODE_CHECK (NODE)->identifier.id.str) /* Translate a hash table identifier pointer to a tree_identifier pointer, and vice versa. */ @@ -791,7 +791,7 @@ struct tree_vec /* Define fields and accessors for some nodes that represent expressions. */ /* In a SAVE_EXPR node. */ -#define SAVE_EXPR_CONTEXT(NODE) TREE_OPERAND(SAVE_EXPR_CHECK (NODE), 1) +#define SAVE_EXPR_CONTEXT(NODE) TREE_OPERAND (SAVE_EXPR_CHECK (NODE), 1) #define SAVE_EXPR_RTL(NODE) (*(rtx *) &SAVE_EXPR_CHECK (NODE)->exp.operands[2]) #define SAVE_EXPR_NOPLACEHOLDER(NODE) TREE_UNSIGNED (SAVE_EXPR_CHECK (NODE)) /* Nonzero if the SAVE_EXPRs value should be kept, even if it occurs @@ -836,9 +836,9 @@ struct tree_vec #define EXPR_WFL_NODE(NODE) \ TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 0) #define EXPR_WFL_FILENAME_NODE(NODE) \ - TREE_OPERAND(EXPR_WITH_FILE_LOCATION_CHECK (NODE), 1) + TREE_OPERAND (EXPR_WITH_FILE_LOCATION_CHECK (NODE), 1) #define EXPR_WFL_FILENAME(NODE) \ - IDENTIFIER_POINTER (EXPR_WFL_FILENAME_NODE ((NODE))) + IDENTIFIER_POINTER (EXPR_WFL_FILENAME_NODE (NODE)) /* ??? Java uses this in all expressions. */ #define EXPR_WFL_LINECOL(NODE) (EXPR_CHECK (NODE)->exp.complexity) #define EXPR_WFL_LINENO(NODE) (EXPR_WFL_LINECOL (NODE) >> 12) @@ -1501,13 +1501,13 @@ struct tree_type /* Like DECL_ABSTRACT_ORIGIN, but returns NODE if there's no abstract origin. This is useful when setting the DECL_ABSTRACT_ORIGIN. */ #define DECL_ORIGIN(NODE) \ - (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : NODE) + (DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : (NODE)) /* Nonzero for any sort of ..._DECL node means this decl node represents an inline instance of some original (abstract) decl from an inline function; suppress any warnings about shadowing some other variable. FUNCTION_DECL nodes can also have their abstract origin set to themselves. */ -#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != (tree) 0 \ +#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \ && DECL_ABSTRACT_ORIGIN (NODE) != (NODE)) /* Nonzero if a _DECL means that the name of this decl should be ignored @@ -2073,7 +2073,7 @@ extern tree maybe_get_identifier PARAMS ((const char *)); /* Construct various types of nodes. */ -#define build_int_2(LO,HI) \ +#define build_int_2(LO, HI) \ build_int_2_wide ((unsigned HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI)) extern tree build PARAMS ((enum tree_code, tree, ...)); @@ -2273,7 +2273,7 @@ extern tree build_qualified_type PARAMS ((tree, int)); build_qualified_type instead. */ #define build_type_variant(TYPE, CONST_P, VOLATILE_P) \ - build_qualified_type (TYPE, \ + build_qualified_type ((TYPE), \ ((CONST_P) ? TYPE_QUAL_CONST : 0) \ | ((VOLATILE_P) ? TYPE_QUAL_VOLATILE : 0)) -- 2.30.2