diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2007-02-04 05:05:06 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2007-02-04 05:05:06 +0000 |
commit | b10fc6f54a06abc88d4910128602e3d88aa31bff (patch) | |
tree | 2f752d979cc867f2a1a11a79d8451af6f170a915 /gcc | |
parent | 22f23985630f6664945bfb26fa996cd5ec19652a (diff) | |
download | gcc-b10fc6f54a06abc88d4910128602e3d88aa31bff.zip gcc-b10fc6f54a06abc88d4910128602e3d88aa31bff.tar.gz gcc-b10fc6f54a06abc88d4910128602e3d88aa31bff.tar.bz2 |
* decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
From-SVN: r121568
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4e9db17..c5e6880 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0. + 2007-02-04 Kazu Hirata <kazu@codesourcery.com> * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c, diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 01398f2..e6f0664 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7254,8 +7254,9 @@ grokdeclarator (const cp_declarator *declarator, /* Allow it, sigh. */; else if (pedantic || ! is_main) pedwarn ("ISO C++ forbids declaration of %qs with no type", name); - else if (warn_return_type) - warning (0, "ISO C++ forbids declaration of %qs with no type", name); + else + warning (OPT_Wreturn_type, + "ISO C++ forbids declaration of %qs with no type", name); type = integer_type_node; } |