Commit 77dc0938 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * Makefile.in (parse.o): Depend on toplev.h.
        * class.c (typecode_p): Remove prototype and definition.
        * cp-tree.h (currently_open_class, is_empty_class, member_p):
        Add prototype.
        * decl.c (push_overloaded_decl_top_level): Remove prototype and
        definition.
        * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
        in call to `cp_thing'.
        (cp_warning): Likewise for function pointer `warning'.
        * except.c (do_function_call): Remove prototype and definition.
        (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
        * method.c (is_java_type): Add prototype and make it static.
        * parse.y: Include toplev.h.
        * pt.c (type_unification): Remove unused variable `arg'.
        (instantiate_decl): likewise for `save_ti'.
        * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.

From-SVN: r19866
parent 12c45d89
Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (parse.o): Depend on toplev.h.
* class.c (typecode_p): Remove prototype and definition.
* cp-tree.h (currently_open_class, is_empty_class, member_p):
Add prototype.
* decl.c (push_overloaded_decl_top_level): Remove prototype and
definition.
* errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
in call to `cp_thing'.
(cp_warning): Likewise for function pointer `warning'.
* except.c (do_function_call): Remove prototype and definition.
(call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
* method.c (is_java_type): Add prototype and make it static.
* parse.y: Include toplev.h.
* pt.c (type_unification): Remove unused variable `arg'.
(instantiate_decl): likewise for `save_ti'.
* tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_member_call): Handle template_ids.
......
......@@ -208,7 +208,8 @@ PARSE_H = $(srcdir)/parse.h
PARSE_C = $(srcdir)/parse.c
parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h
$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
`echo $(PARSE_C) | sed 's,^\./,,'`
......
......@@ -90,7 +90,6 @@ static tree get_vfield_name PROTO((tree));
static void finish_struct_anon PROTO((tree));
static tree build_vbase_pointer PROTO((tree, tree));
static int complete_type_p PROTO((tree));
static int typecode_p PROTO((tree, enum tree_code));
static tree build_vtable_entry PROTO((tree, tree));
static tree get_vtable_name PROTO((tree));
static tree get_derived_offset PROTO((tree, tree));
......@@ -1728,16 +1727,6 @@ finish_base_struct (t, b)
return first_vfn_base_index;
}
static int
typecode_p (type, code)
tree type;
enum tree_code code;
{
return (TREE_CODE (type) == code
|| (TREE_CODE (type) == REFERENCE_TYPE
&& TREE_CODE (TREE_TYPE (type)) == code));
}
/* Set memoizing fields and bits of T (and its variants) for later use.
MAX_HAS_VIRTUAL is the largest size of any T's virtual function tables. */
......
......@@ -2141,6 +2141,7 @@ extern tree build_vbase_path PROTO((enum tree_code, tree, tree, tree, int));
extern tree build_vtbl_ref PROTO((tree, tree));
extern tree build_vfn_ref PROTO((tree *, tree, tree));
extern void add_method PROTO((tree, tree *, tree));
extern int currently_open_class PROTO((tree));
extern tree get_vfield_offset PROTO((tree));
extern void duplicate_tag_error PROTO((tree));
extern tree finish_struct PROTO((tree, tree, tree, int));
......@@ -2148,6 +2149,7 @@ extern tree finish_struct_1 PROTO((tree, int));
extern tree finish_struct_methods PROTO((tree, tree, int));
extern int resolves_to_fixed_type_p PROTO((tree, int *));
extern void init_class_processing PROTO((void));
extern int is_empty_class PROTO((tree));
extern void pushclass PROTO((tree, int));
extern void popclass PROTO((int));
extern void push_nested_class PROTO((tree, int));
......@@ -2684,6 +2686,7 @@ extern int yylex PROTO((void));
extern tree arbitrate_lookup PROTO((tree, tree, tree));
/* in tree.c */
extern int member_p PROTO((tree));
extern int real_lvalue_p PROTO((tree));
extern tree build_min PVPROTO((enum tree_code, tree, ...));
extern tree build_min_nt PVPROTO((enum tree_code, ...));
......
......@@ -132,7 +132,6 @@ static tree grokparms PROTO((tree, int));
static tree lookup_nested_type PROTO((tree, tree));
static char *redeclaration_error_message PROTO((tree, tree));
static tree push_overloaded_decl PROTO((tree, int));
static void push_overloaded_decl_top_level PROTO((tree, int));
static struct stack_level *push_decl_level PROTO((struct stack_level *,
struct obstack *));
......@@ -3677,21 +3676,6 @@ pushdecl_top_level (x)
return x;
}
/* Like push_overloaded_decl, only it places X in GLOBAL_BINDING_LEVEL,
if appropriate. */
static void
push_overloaded_decl_top_level (x, forget)
tree x;
int forget;
{
struct binding_level *b = current_binding_level;
current_binding_level = global_binding_level;
push_overloaded_decl (x, forget);
current_binding_level = b;
}
/* Make the declaration of X appear in CLASS scope. */
tree
......
......@@ -200,7 +200,7 @@ DECLARE (cp_error)
va_list ap;
INIT;
if (! cp_silent)
cp_thing (error, 0, format, ap);
cp_thing ((errorfn *) error, 0, format, ap);
va_end (ap);
}
......@@ -209,7 +209,7 @@ DECLARE (cp_warning)
va_list ap;
INIT;
if (! cp_silent)
cp_thing (warning, 0, format, ap);
cp_thing ((errorfn *) warning, 0, format, ap);
va_end (ap);
}
......
......@@ -45,7 +45,6 @@ tree builtin_return_address_fndecl;
/* A couple of backend routines from m88k.c */
static void push_eh_cleanup PROTO((void));
static rtx do_function_call PROTO((tree, tree, tree));
static tree build_eh_type_type PROTO((tree));
static tree build_eh_type PROTO((tree));
static void expand_end_eh_spec PROTO((tree));
......@@ -182,22 +181,6 @@ extern tree const_ptr_type_node;
/* ========================================================================= */
/* Cheesyness to save some typing. Returns the return value rtx. */
static rtx
do_function_call (func, params, return_type)
tree func, params, return_type;
{
tree func_call;
func_call = build_function_call (func, params);
expand_call (func_call, NULL_RTX, 0);
if (return_type != NULL_TREE)
return hard_function_value (return_type, func_call);
return NULL_RTX;
}
/* ========================================================================= */
/* sets up all the global eh stuff that needs to be initialized at the
start of compilation.
......@@ -267,7 +250,10 @@ call_eh_info ()
fn = IDENTIFIER_GLOBAL_VALUE (fn);
else
{
tree t1,t, fields[7];
#ifdef NEW_EH_MODEL
tree t1;
#endif
tree t, fields[7];
int fo = 0;
/* Declare cp_eh_info * __cp_exception_info (void),
......
......@@ -83,6 +83,7 @@ static int issue_ktype PROTO((tree));
static void build_overload_scope_ref PROTO((tree));
static void build_mangled_template_parm_index PROTO((char *, tree));
static int check_btype PROTO((tree));
static int is_java_type PROTO((tree));
# define OB_INIT() (scratch_firstobj ? (obstack_free (&scratch_obstack, scratch_firstobj), 0) : 0)
# define OB_PUTC(C) (obstack_1grow (&scratch_obstack, (C)))
......@@ -1117,7 +1118,7 @@ process_modifiers (parmtype)
/* True iff TYPE was declared as a "Java" type (inside extern "Java"). */
int
static int
is_java_type (type)
tree type;
{
......
......@@ -107,6 +107,7 @@
#include "cp-tree.h"
#include "output.h"
#include "except.h"
#include "toplev.h"
/* Since parsers are distinct for each language, put the language string
definition here. (fnf) */
......
......@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA. */
#include "cp-tree.h"
#include "output.h"
#include "except.h"
#include "toplev.h"
/* Since parsers are distinct for each language, put the language string
definition here. (fnf) */
......
......@@ -5671,7 +5671,6 @@ type_unification (tparms, targs, parms, args, targs_in,
unification_kind_t strict;
int allow_incomplete;
{
tree arg;
int* explicit_mask;
int i;
......@@ -6965,7 +6964,6 @@ instantiate_decl (d)
tree args = TI_ARGS (ti);
tree td;
tree decl_pattern, code_pattern;
tree save_ti;
int nested = in_function_p ();
int d_defined;
int pattern_defined;
......
......@@ -570,7 +570,6 @@ propagate_binfo_offsets (binfo, offset)
else
{
int j;
tree base_binfos = BINFO_BASETYPES (base_binfo);
tree delta = NULL_TREE;
for (j = i+1; j < n_baselinks; j++)
......
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