decl.c (finish_function): Give a pedwarn for reaching end of non-void function, not just a warning.

* decl.c (finish_function): Give a pedwarn for reaching end of
        non-void function, not just a warning.

From-SVN: r18217
This commit is contained in:
Brendan Kehoe 1998-02-24 08:37:13 +00:00 committed by Brendan Kehoe
parent 8adf5b5e7b
commit 373dae0516
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
1998-02-24 Brendan Kehoe <brendan@cygnus.com>
* decl.c (finish_function): Give a pedwarn for reaching end of
non-void function, not just a warning.
Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (instantiate_class_template): Don't instantiate if pedantic

View File

@ -12552,7 +12552,7 @@ finish_function (lineno, call_poplevel, nested)
{
/* If this function returns non-void and control can drop through,
complain. */
cp_warning ("control reaches end of non-void function `%D'", fndecl);
cp_pedwarn ("control reaches end of non-void function `%D'", fndecl);
}
/* With just -W, complain only if function returns both with
and without a value. */