* decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Sun, 4 Feb 2007 05:05:06 +0000 (05:05 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Sun, 4 Feb 2007 05:05:06 +0000 (05:05 +0000)
From-SVN: r121568

gcc/cp/ChangeLog
gcc/cp/decl.c

index 4e9db1770ee20f36bbeab56b81d31540e1e5eab5..c5e688036d23016c886d0dcf9a76abadc416dcdb 100644 (file)
@@ -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,
index 01398f2fa930edbdc50b4005f4eb248fe176c8cf..e6f066400372bfab2542ad6b9fa870769281f865 100644 (file)
@@ -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;
     }