Commit 0a8cb79e by Nathanael Nerode

* typeck2.c: Convert to ISO C.

From-SVN: r67895
parent c873e11f
2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
* typeck2.c: Convert to ISO C.
2003-06-12 Mark Mitchell <mark@codesourcery.com> 2003-06-12 Mark Mitchell <mark@codesourcery.com>
PR c++/10635 PR c++/10635
......
...@@ -42,14 +42,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,14 +42,13 @@ Boston, MA 02111-1307, USA. */
#include "output.h" #include "output.h"
#include "diagnostic.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 /* Print an error message stemming from an attempt to use
BASETYPE as a base class for TYPE. */ BASETYPE as a base class for TYPE. */
tree tree
error_not_base_type (basetype, type) error_not_base_type (tree basetype, tree type)
tree basetype, type;
{ {
if (TREE_CODE (basetype) == FUNCTION_DECL) if (TREE_CODE (basetype) == FUNCTION_DECL)
basetype = DECL_CONTEXT (basetype); basetype = DECL_CONTEXT (basetype);
...@@ -58,8 +57,7 @@ error_not_base_type (basetype, type) ...@@ -58,8 +57,7 @@ error_not_base_type (basetype, type)
} }
tree tree
binfo_or_else (base, type) binfo_or_else (tree base, tree type)
tree base, type;
{ {
tree binfo = lookup_base (type, base, ba_ignore, NULL); tree binfo = lookup_base (type, base, ba_ignore, NULL);
...@@ -76,13 +74,10 @@ binfo_or_else (base, type) ...@@ -76,13 +74,10 @@ binfo_or_else (base, type)
example, conversions to references.) */ example, conversions to references.) */
void void
readonly_error (arg, string, soft) readonly_error (tree arg, const char* string, int soft)
tree arg;
const char *string;
int soft;
{ {
const char *fmt; const char *fmt;
void (*fn) PARAMS ((const char *, ...)); void (*fn) (const char *, ...);
if (soft) if (soft)
fn = pedwarn; fn = pedwarn;
...@@ -128,9 +123,7 @@ readonly_error (arg, string, soft) ...@@ -128,9 +123,7 @@ readonly_error (arg, string, soft)
occurred; zero if all was well. */ occurred; zero if all was well. */
int int
abstract_virtuals_error (decl, type) abstract_virtuals_error (tree decl, tree type)
tree decl;
tree type;
{ {
tree u; tree u;
tree tu; tree tu;
...@@ -194,14 +187,11 @@ abstract_virtuals_error (decl, type) ...@@ -194,14 +187,11 @@ abstract_virtuals_error (decl, type)
pedwarn. */ pedwarn. */
void void
cxx_incomplete_type_diagnostic (value, type, diag_type) cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
tree value;
tree type;
int diag_type;
{ {
int decl = 0; int decl = 0;
void (*p_msg) PARAMS ((const char *, ...)); void (*p_msg) (const char *, ...);
void (*p_msg_at) PARAMS ((const char *, ...)); void (*p_msg_at) (const char *, ...);
if (diag_type == 1) if (diag_type == 1)
{ {
...@@ -288,9 +278,7 @@ retry: ...@@ -288,9 +278,7 @@ retry:
required by ../tree.c. */ required by ../tree.c. */
#undef cxx_incomplete_type_error #undef cxx_incomplete_type_error
void void
cxx_incomplete_type_error (value, type) cxx_incomplete_type_error (tree value, tree type)
tree value;
tree type;
{ {
cxx_incomplete_type_diagnostic (value, type, 0); cxx_incomplete_type_diagnostic (value, type, 0);
} }
...@@ -316,8 +304,7 @@ cxx_incomplete_type_error (value, type) ...@@ -316,8 +304,7 @@ cxx_incomplete_type_error (value, type)
the storing. */ the storing. */
tree tree
store_init_value (decl, init) store_init_value (tree decl, tree init)
tree decl, init;
{ {
register tree value, type; register tree value, type;
...@@ -409,8 +396,7 @@ store_init_value (decl, init) ...@@ -409,8 +396,7 @@ store_init_value (decl, init)
TYPE is an aggregate and INIT is not a constructor. */ TYPE is an aggregate and INIT is not a constructor. */
tree tree
digest_init (type, init, tail) digest_init (tree type, tree init, tree* tail)
tree type, init, *tail;
{ {
enum tree_code code = TREE_CODE (type); enum tree_code code = TREE_CODE (type);
tree element = NULL_TREE; tree element = NULL_TREE;
...@@ -605,8 +591,7 @@ digest_init (type, init, tail) ...@@ -605,8 +591,7 @@ digest_init (type, init, tail)
constants that the assembler and linker can compute them. */ constants that the assembler and linker can compute them. */
static tree static tree
process_init_constructor (type, init, elts) process_init_constructor (tree type, tree init, tree* elts)
tree type, init, *elts;
{ {
register tree tail; register tree tail;
/* List of the elements of the result constructor, /* List of the elements of the result constructor,
...@@ -964,10 +949,7 @@ process_init_constructor (type, init, elts) ...@@ -964,10 +949,7 @@ process_init_constructor (type, init, elts)
binfo for the specific base subobject we want to convert to. */ binfo for the specific base subobject we want to convert to. */
tree tree
build_scoped_ref (datum, basetype, binfo_p) build_scoped_ref (tree datum, tree basetype, tree* binfo_p)
tree datum;
tree basetype;
tree *binfo_p;
{ {
tree binfo; tree binfo;
...@@ -998,8 +980,7 @@ build_scoped_ref (datum, basetype, binfo_p) ...@@ -998,8 +980,7 @@ build_scoped_ref (datum, basetype, binfo_p)
delegation is detected. */ delegation is detected. */
tree tree
build_x_arrow (datum) build_x_arrow (tree datum)
tree datum;
{ {
tree types_memoized = NULL_TREE; tree types_memoized = NULL_TREE;
register tree rval = datum; register tree rval = datum;
...@@ -1080,8 +1061,7 @@ build_x_arrow (datum) ...@@ -1080,8 +1061,7 @@ build_x_arrow (datum)
routines will have to know how to deal with later. */ routines will have to know how to deal with later. */
tree tree
build_m_component_ref (datum, component) build_m_component_ref (tree datum, tree component)
tree datum, component;
{ {
tree type; tree type;
tree objtype; tree objtype;
...@@ -1161,9 +1141,7 @@ build_m_component_ref (datum, component) ...@@ -1161,9 +1141,7 @@ build_m_component_ref (datum, component)
/* Return a tree node for the expression TYPENAME '(' PARMS ')'. */ /* Return a tree node for the expression TYPENAME '(' PARMS ')'. */
tree tree
build_functional_cast (exp, parms) build_functional_cast (tree exp, tree parms)
tree exp;
tree parms;
{ {
/* This is either a call to a constructor, /* This is either a call to a constructor,
or a C cast in C++'s `functional' notation. */ or a C cast in C++'s `functional' notation. */
...@@ -1251,9 +1229,7 @@ build_functional_cast (exp, parms) ...@@ -1251,9 +1229,7 @@ build_functional_cast (exp, parms)
know what we're doing. */ know what we're doing. */
tree tree
add_exception_specifier (list, spec, complain) add_exception_specifier (tree list, tree spec, int complain)
tree list, spec;
int complain;
{ {
int ok; int ok;
tree core = spec; tree core = spec;
...@@ -1313,8 +1289,7 @@ add_exception_specifier (list, spec, complain) ...@@ -1313,8 +1289,7 @@ add_exception_specifier (list, spec, complain)
their union. */ their union. */
tree tree
merge_exception_specifiers (list, add) merge_exception_specifiers (tree list, tree add)
tree list, add;
{ {
if (!list || !add) if (!list || !add)
return NULL_TREE; return NULL_TREE;
...@@ -1352,8 +1327,7 @@ merge_exception_specifiers (list, add) ...@@ -1352,8 +1327,7 @@ merge_exception_specifiers (list, add)
function is defined or called. See also add_exception_specifier. */ function is defined or called. See also add_exception_specifier. */
void void
require_complete_eh_spec_types (fntype, decl) require_complete_eh_spec_types (tree fntype, tree decl)
tree fntype, decl;
{ {
tree raises; tree raises;
/* Don't complain about calls to op new. */ /* Don't complain about calls to op new. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment