This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ISOize cp/typeck2.c
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Jun 2003 07:53:58 -0400
- Subject: ISOize cp/typeck2.c
If this passes bootstrap/make check, I'm committing it as a pre-approved
conversion.
(cp)
* typeck2.c: Convert to ISO C.
Index: typeck2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck2.c,v
retrieving revision 1.140
diff -u -r1.140 typeck2.c
--- typeck2.c 13 Apr 2003 01:45:33 -0000 1.140
+++ typeck2.c 13 Jun 2003 11:52:44 -0000
@@ -42,14 +42,13 @@
#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 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
/* 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 @@
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 @@
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 @@
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. */