From 0a8cb79ede665d6903190b4d086bfe1fb592ec74 Mon Sep 17 00:00:00 2001 From: Nathanael Nerode Date: Fri, 13 Jun 2003 13:34:16 +0000 Subject: [PATCH] * typeck2.c: Convert to ISO C. From-SVN: r67895 --- gcc/cp/ChangeLog | 4 +++ gcc/cp/typeck2.c | 66 +++++++++++++++--------------------------------- 2 files changed, 24 insertions(+), 46 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 787643c9e11..f4b4f2e5bf8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2003-06-13 Nathanael Nerode + + * typeck2.c: Convert to ISO C. + 2003-06-12 Mark Mitchell PR c++/10635 diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 2df882a1db3..0587816f3ee 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -42,14 +42,13 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "diagnostic.h" -static tree process_init_constructor PARAMS ((tree, tree, tree *)); +static tree process_init_constructor (tree, tree, tree *); /* Print an error message stemming from an attempt to use BASETYPE as a base class for TYPE. */ tree -error_not_base_type (basetype, type) - tree basetype, type; +error_not_base_type (tree basetype, tree type) { if (TREE_CODE (basetype) == FUNCTION_DECL) basetype = DECL_CONTEXT (basetype); @@ -58,8 +57,7 @@ error_not_base_type (basetype, type) } tree -binfo_or_else (base, type) - tree base, type; +binfo_or_else (tree base, tree type) { tree binfo = lookup_base (type, base, ba_ignore, NULL); @@ -76,13 +74,10 @@ binfo_or_else (base, type) example, conversions to references.) */ void -readonly_error (arg, string, soft) - tree arg; - const char *string; - int soft; +readonly_error (tree arg, const char* string, int soft) { const char *fmt; - void (*fn) PARAMS ((const char *, ...)); + void (*fn) (const char *, ...); if (soft) fn = pedwarn; @@ -128,9 +123,7 @@ readonly_error (arg, string, soft) occurred; zero if all was well. */ int -abstract_virtuals_error (decl, type) - tree decl; - tree type; +abstract_virtuals_error (tree decl, tree type) { tree u; tree tu; @@ -194,14 +187,11 @@ abstract_virtuals_error (decl, type) pedwarn. */ void -cxx_incomplete_type_diagnostic (value, type, diag_type) - tree value; - tree type; - int diag_type; +cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type) { int decl = 0; - void (*p_msg) PARAMS ((const char *, ...)); - void (*p_msg_at) PARAMS ((const char *, ...)); + void (*p_msg) (const char *, ...); + void (*p_msg_at) (const char *, ...); if (diag_type == 1) { @@ -288,9 +278,7 @@ retry: required by ../tree.c. */ #undef cxx_incomplete_type_error void -cxx_incomplete_type_error (value, type) - tree value; - tree type; +cxx_incomplete_type_error (tree value, tree type) { cxx_incomplete_type_diagnostic (value, type, 0); } @@ -316,8 +304,7 @@ cxx_incomplete_type_error (value, type) the storing. */ tree -store_init_value (decl, init) - tree decl, init; +store_init_value (tree decl, tree init) { register tree value, type; @@ -409,8 +396,7 @@ store_init_value (decl, init) TYPE is an aggregate and INIT is not a constructor. */ tree -digest_init (type, init, tail) - tree type, init, *tail; +digest_init (tree type, tree init, tree* tail) { enum tree_code code = TREE_CODE (type); tree element = NULL_TREE; @@ -605,8 +591,7 @@ digest_init (type, init, tail) constants that the assembler and linker can compute them. */ static tree -process_init_constructor (type, init, elts) - tree type, init, *elts; +process_init_constructor (tree type, tree init, tree* elts) { register tree tail; /* List of the elements of the result constructor, @@ -964,10 +949,7 @@ process_init_constructor (type, init, elts) binfo for the specific base subobject we want to convert to. */ tree -build_scoped_ref (datum, basetype, binfo_p) - tree datum; - tree basetype; - tree *binfo_p; +build_scoped_ref (tree datum, tree basetype, tree* binfo_p) { tree binfo; @@ -998,8 +980,7 @@ build_scoped_ref (datum, basetype, binfo_p) delegation is detected. */ tree -build_x_arrow (datum) - tree datum; +build_x_arrow (tree datum) { tree types_memoized = NULL_TREE; register tree rval = datum; @@ -1080,8 +1061,7 @@ build_x_arrow (datum) routines will have to know how to deal with later. */ tree -build_m_component_ref (datum, component) - tree datum, component; +build_m_component_ref (tree datum, tree component) { tree type; tree objtype; @@ -1161,9 +1141,7 @@ build_m_component_ref (datum, component) /* Return a tree node for the expression TYPENAME '(' PARMS ')'. */ tree -build_functional_cast (exp, parms) - tree exp; - tree parms; +build_functional_cast (tree exp, tree parms) { /* This is either a call to a constructor, or a C cast in C++'s `functional' notation. */ @@ -1251,9 +1229,7 @@ build_functional_cast (exp, parms) know what we're doing. */ tree -add_exception_specifier (list, spec, complain) - tree list, spec; - int complain; +add_exception_specifier (tree list, tree spec, int complain) { int ok; tree core = spec; @@ -1313,8 +1289,7 @@ add_exception_specifier (list, spec, complain) their union. */ tree -merge_exception_specifiers (list, add) - tree list, add; +merge_exception_specifiers (tree list, tree add) { if (!list || !add) return NULL_TREE; @@ -1352,8 +1327,7 @@ merge_exception_specifiers (list, add) function is defined or called. See also add_exception_specifier. */ void -require_complete_eh_spec_types (fntype, decl) - tree fntype, decl; +require_complete_eh_spec_types (tree fntype, tree decl) { tree raises; /* Don't complain about calls to op new. */ -- 2.30.2