From b34c06e332d1360bf0761d089533602965c858e3 Mon Sep 17 00:00:00 2001 From: Graham Stott Date: Mon, 7 Jan 2002 09:11:11 +0000 Subject: [PATCH] errors.c: Update copyright date. * errors.c: Update copyright date. (print_scope_operator): Add parenthesis. (print_left_paren): Likewise. (print_right_paren): Likewise. (print_left_bracket): Likewise. (print_right_bracket): Likewise. (print_template_argument_list_start): Likewise. (print_template_argument_list_end): Likewise. (print_non_consecutive_character): Likewise. (print_tree_identifier): Likewise. (print_identifier): Likewise. (NEXT_CODE): Uppercase macro parameter. (ident_fndecl): Delete unused. (GLOBAL_THING): Likewise. From-SVN: r48599 --- gcc/cp/ChangeLog | 23 ++++++++++++++++++++--- gcc/cp/error.c | 49 ++++++++++++------------------------------------ 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c3bfb4d69a3..d5a7c651451 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,20 @@ +2002-01-07 Graham Stott + + * error.c: Update copyright date. + (print_scope_operator): Add parenthesis. + (print_left_paren): Likewise. + (print_right_paren): Likewise. + (print_left_bracket): Likewise. + (print_right_bracket): Likewise. + (print_template_argument_list_start): Likewise. + (print_template_argument_list_end): Likewise. + (print_non_consecutive_character): Likewise. + (print_tree_identifier): Likewise. + (print_identifier): Likewise. + (NEXT_CODE): Uppercase macro parameter. + (ident_fndecl): Delete unused. + (GLOBAL_THING): Likewise. + 2002-01-06 Graham Stott * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. @@ -22,7 +39,7 @@ (same_type_ignoring_top_level_qualifiers_p): Likewise. (OVL_FUNCTION): Wrap long line. (OVL_CHAIN): Whitespace. - (OVL_CURRENT): Add paranthesis and whitespace. + (OVL_CURRENT): Add parenthesis and whitespace. (OVL_NEXT): Whitespace. (OVL_USED): Likewise. (IDENTIFIER_TYPE_VALUE): Likewise. @@ -170,10 +187,10 @@ (TYPE_PTRMEMFUNC_FLAG): Likewise. (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. - (TYPE_PTRMEM_CLASS_TYPE): Remove paranthesis. + (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. (DECL_ACCESS): Whitespace. - (DECL_GLOBAL_CTOR_P): Remove paranthesis. + (DECL_GLOBAL_CTOR_P): Remove parenthesis. (DECL_GLOBAL_DTOR_P): Likewise. (GLOBAL_INIT_PRIORITY): Likewise. (DECL_TEMPLATE_PARMS): Likewise. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 61d83033e6e..21a171f874d 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1,6 +1,6 @@ /* Call-backs for C++ error reporting. This code is non-reentrant. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GNU CC. @@ -35,24 +35,24 @@ enum pad { none, before, after }; sorry ("`%s' not supported by %s", tree_code_name[(int) TREE_CODE (T)], \ __FUNCTION__) -#define print_scope_operator(BUFFER) output_add_string (BUFFER, "::") -#define print_left_paren(BUFFER) output_add_character (BUFFER, '(') -#define print_right_paren(BUFFER) output_add_character (BUFFER, ')') -#define print_left_bracket(BUFFER) output_add_character (BUFFER, '[') -#define print_right_bracket(BUFFER) output_add_character (BUFFER, ']') +#define print_scope_operator(BUFFER) output_add_string ((BUFFER), "::") +#define print_left_paren(BUFFER) output_add_character ((BUFFER), '(') +#define print_right_paren(BUFFER) output_add_character ((BUFFER), ')') +#define print_left_bracket(BUFFER) output_add_character ((BUFFER), '[') +#define print_right_bracket(BUFFER) output_add_character ((BUFFER), ']') #define print_template_argument_list_start(BUFFER) \ - print_non_consecutive_character (BUFFER, '<') + print_non_consecutive_character ((BUFFER), '<') #define print_template_argument_list_end(BUFFER) \ - print_non_consecutive_character (BUFFER, '>') + print_non_consecutive_character ((BUFFER), '>') #define print_whitespace(BUFFER, TFI) \ do { \ output_add_space (BUFFER); \ put_whitespace (TFI) = none; \ } while (0) #define print_tree_identifier(BUFFER, TID) \ - output_add_string (BUFFER, IDENTIFIER_POINTER (TID)) -#define print_identifier(BUFFER, ID) output_add_string (BUFFER, ID) -#define separate_with_comma(BUFFER) output_add_string (BUFFER, ", ") + output_add_string ((BUFFER), IDENTIFIER_POINTER (TID)) +#define print_identifier(BUFFER, ID) output_add_string ((BUFFER), (ID)) +#define separate_with_comma(BUFFER) output_add_string ((BUFFER), ", ") /* The global buffer where we dump everything. It is there only for transitional purpose. It is expected, in the near future, to be @@ -60,7 +60,7 @@ enum pad { none, before, after }; static output_buffer scratch_buffer_rec; static output_buffer *scratch_buffer = &scratch_buffer_rec; -# define NEXT_CODE(t) (TREE_CODE (TREE_TYPE (t))) +# define NEXT_CODE(T) (TREE_CODE (TREE_TYPE (T))) #define reinit_global_formatting_buffer() \ output_clear_message_text (scratch_buffer) @@ -96,7 +96,6 @@ static void dump_char PARAMS ((int)); static void dump_parameters PARAMS ((tree, int)); static void dump_exception_spec PARAMS ((tree, int)); static const char *class_key_or_enum PARAMS ((tree)); -static tree ident_fndecl PARAMS ((tree)); static void dump_template_argument PARAMS ((tree, int)); static void dump_template_argument_list PARAMS ((tree, int)); static void dump_template_parameter PARAMS ((tree, int)); @@ -793,30 +792,6 @@ dump_type_suffix (t, flags) } } -/* Return a function declaration which corresponds to the IDENTIFIER_NODE - argument. */ - -static tree -ident_fndecl (t) - tree t; -{ - tree n = lookup_name (t, 0); - - if (n == NULL_TREE) - return NULL_TREE; - - if (TREE_CODE (n) == FUNCTION_DECL) - return n; - else if (TREE_CODE (n) == TREE_LIST - && TREE_CODE (TREE_VALUE (n)) == FUNCTION_DECL) - return TREE_VALUE (n); - - my_friendly_abort (66); - return NULL_TREE; -} - -#define GLOBAL_THING "_GLOBAL__" - static void dump_global_iord (t) tree t;