From: gdr Date: Sun, 4 Feb 2007 05:05:06 +0000 (+0000) Subject: * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bc0f76b068e42d3230fa42d20c1c84c8d8a1213;p=thirdparty%2Fgcc.git * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121568 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4e9db1770ee2..c5e688036d23 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2007-02-03 Gabriel Dos Reis + + * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0. + 2007-02-04 Kazu Hirata * 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 01398f2fa930..e6f066400372 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; }