errfn.c (cp_pedwarn, [...]): Replace extern decls with casts.
* 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. Fixes eh{39,40}.C From-SVN: r17083
This commit is contained in:
parent
62189d7d8f
commit
9664b89edd
4 changed files with 21 additions and 45 deletions
|
@ -1,3 +1,13 @@
|
|||
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.
|
||||
|
|
|
@ -2085,7 +2085,6 @@ extern tree finish_enum PROTO((tree, tree));
|
|||
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));
|
||||
|
|
|
@ -324,8 +324,9 @@ tree dtor_label;
|
|||
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;
|
||||
|
||||
|
@ -11658,45 +11659,15 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
|
|||
return 1;
|
||||
}
|
||||
|
||||
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.
|
||||
|
|
|
@ -177,9 +177,8 @@ cp_pedwarn (format, arglist)
|
|||
char *format;
|
||||
arglist_dcl
|
||||
{
|
||||
extern errorfn pedwarn;
|
||||
if (! cp_silent)
|
||||
cp_thing (pedwarn, 0, format, arglist);
|
||||
cp_thing ((errorfn *) pedwarn, 0, format, arglist);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -205,9 +204,8 @@ cp_error_at (format, arglist)
|
|||
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
|
||||
|
@ -215,9 +213,8 @@ cp_warning_at (format, arglist)
|
|||
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
|
||||
|
@ -225,7 +222,6 @@ cp_pedwarn_at (format, arglist)
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue