+Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
+ Replace extern decls with casts.
+
+ * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
+ Update last_parm_cleanup_insn.
+ (store_after_parms): Remove.
+ * cp-tree.h: Adjust.
+
Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (comdat_linkage): Also set DECL_COMDAT.
extern tree build_enumerator PROTO((tree, tree));
extern tree grok_enum_decls PROTO((tree, tree));
extern int start_function PROTO((tree, tree, tree, int));
-extern void store_after_parms PROTO((struct rtx_def *));
extern void expand_start_early_try_stmts PROTO((void));
extern void store_parm_decls PROTO((void));
extern void store_return_init PROTO((tree, tree));
static rtx last_dtor_insn;
/* In a constructor, the last insn emitted after the start of the
- function and the parms, but before the start of the exception
- specification. */
+ function and the parms, the exception specification and any
+ function-try-block. The constructor initializers are emitted after
+ this insn. */
static rtx last_parm_cleanup_insn;
return 1;
}
\f
-void
-store_after_parms (insns)
- rtx insns;
-{
- rtx x;
-
- for (x = get_insns (); x; x = next_insn (x))
- {
- if (GET_CODE (x) == NOTE && NOTE_LINE_NUMBER (x) == NOTE_INSN_FUNCTION_BEG)
- {
- emit_insns_after (insns, x);
- return;
- }
- }
-#if 0
- /* This doesn't work, because the inline output routine doesn't reset
- last_parm_insn correctly for get_first_nonparm_insn () to work. */
-
- last_parm_insn = get_first_nonparm_insn ();
- if (last_parm_insn == NULL_RTX)
- emit_insns (insns);
- else
- emit_insns_before (insns, last_parm_insn);
-#endif
-}
+/* Called after store_parm_decls for a function-try-block. We need to update
+ last_parm_cleanup_insn so that the base initializers for a constructor
+ are run within this block, not before it. */
void
expand_start_early_try_stmts ()
{
- rtx insns;
- start_sequence ();
expand_start_try_stmts ();
- insns = get_insns ();
- end_sequence ();
-#if 1
- emit_insns_after (insns, get_insns ());
-#else
- store_after_parms (insns);
-#endif
+ last_parm_cleanup_insn = get_last_insn ();
}
/* Store the parameter declarations into the current function declaration.
char *format;
arglist_dcl
{
- extern errorfn pedwarn;
if (! cp_silent)
- cp_thing (pedwarn, 0, format, arglist);
+ cp_thing ((errorfn *) pedwarn, 0, format, arglist);
}
void
char *format;
arglist_dcl
{
- extern errorfn error_with_file_and_line;
if (! cp_silent)
- cp_thing (error_with_file_and_line, 1, format, arglist);
+ cp_thing ((errorfn *) error_with_file_and_line, 1, format, arglist);
}
void
char *format;
arglist_dcl
{
- extern errorfn warning_with_file_and_line;
if (! cp_silent)
- cp_thing (warning_with_file_and_line, 1, format, arglist);
+ cp_thing ((errorfn *) warning_with_file_and_line, 1, format, arglist);
}
void
char *format;
arglist_dcl
{
- extern errorfn pedwarn_with_file_and_line;
if (! cp_silent)
- cp_thing (pedwarn_with_file_and_line, 1, format, arglist);
+ cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, format, arglist);
}