diff options
author | Brendan Kehoe <brendan@cygnus.com> | 1998-02-24 08:37:13 +0000 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1998-02-24 03:37:13 -0500 |
commit | 373dae05168c8a0f084b3abffdcb8f47d02d5e59 (patch) | |
tree | 9331d22ccfd04531c8358f13912047f7361a9a52 /gcc | |
parent | 8adf5b5e7b6ee28371f5eedcf2aa8c9485cffa16 (diff) | |
download | gcc-373dae05168c8a0f084b3abffdcb8f47d02d5e59.zip gcc-373dae05168c8a0f084b3abffdcb8f47d02d5e59.tar.gz gcc-373dae05168c8a0f084b3abffdcb8f47d02d5e59.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 757a1fd..e10f4d7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index df260a3..f5f3397 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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. */ |