* 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
+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.
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,^\./,,'`
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));
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));
-}
\f
/* 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. */
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));
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));
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, ...));
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 *));
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
va_list ap;
INIT;
if (! cp_silent)
- cp_thing (error, 0, format, ap);
+ cp_thing ((errorfn *) error, 0, format, ap);
va_end (ap);
}
va_list ap;
INIT;
if (! cp_silent)
- cp_thing (warning, 0, format, ap);
+ cp_thing ((errorfn *) warning, 0, format, ap);
va_end (ap);
}
/* 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));
/* ========================================================================= */
-/* 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.
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),
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)))
/* True iff TYPE was declared as a "Java" type (inside extern "Java"). */
-int
+static int
is_java_type (type)
tree type;
{
#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) */
#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) */
unification_kind_t strict;
int allow_incomplete;
{
- tree arg;
int* explicit_mask;
int i;
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;
else
{
int j;
- tree base_binfos = BINFO_BASETYPES (base_binfo);
tree delta = NULL_TREE;
for (j = i+1; j < n_baselinks; j++)