re PR c++/36760 (Simple std::bind use causes warnings with -Wextra)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 9 Jul 2008 20:52:45 +0000 (20:52 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 9 Jul 2008 20:52:45 +0000 (20:52 +0000)
/cp
2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/36760
* pt.c (tsubst_function_type): Remove warning for type qualifiers
on function return type.

/testsuite
2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/36760
* g++.dg/warn/Wreturn-type-4.C: Adjust.

From-SVN: r137672

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wreturn-type-4.C

index b68a7951fd977d8f247bb9bbbf43551de7d332d0..2143fe22808e3551fcd72358e8711c8bf3462f37 100644 (file)
@@ -1,3 +1,9 @@
+2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/36760
+       * pt.c (tsubst_function_type): Remove warning for type qualifiers
+       on function return type.
+
 2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/36760
index 3fee994a368861e9b1d6d858bc3091756aecaaef..b54c9d13e94fcd66b76bcc805c8730cdb37837f6 100644 (file)
@@ -8765,14 +8765,6 @@ tsubst_function_type (tree t,
   if (arg_types == error_mark_node)
     return error_mark_node;
 
-  if (TYPE_QUALS (return_type) != TYPE_UNQUALIFIED
-      && in_decl != NULL_TREE
-      && !TREE_NO_WARNING (in_decl)
-      && !DECL_IN_SYSTEM_HEADER (in_decl)
-      && (SCALAR_TYPE_P (return_type) || VOID_TYPE_P (return_type)))
-    warning (OPT_Wignored_qualifiers,
-            "type qualifiers ignored on function return type");
-
   /* Construct a new type node and return it.  */
   if (TREE_CODE (t) == FUNCTION_TYPE)
     fntype = build_function_type (return_type, arg_types);
index a71c1ccf2c1334d959d1496a57879ebabcb73f0d..1ddae4ea8ce0c51ffe2bac9a163386581327e4f2 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/36760
+       * g++.dg/warn/Wreturn-type-4.C: Adjust.
+
 2008-07-09  Richard Sandiford  <rdsandiford@googlemail.com>
 
        PR target/35802
index 20c34a836a9e7821d22333f05f75010a3ce1ec28..4f02678e7f9081822bab7cda7edf2030fb77c45b 100644 (file)
@@ -16,7 +16,7 @@ template<typename T> const T getfoo(const T def) /* { dg-bogus "type qualifiers
 template<typename T> class Pair
 {
     public:
-        T getLeft() const { return T(); }   /* { dg-warning "type qualifiers ignored" } */
+        T getLeft() const { return T(); }   /* { dg-bogus "type qualifiers ignored" } */
         const T getRight() const { return T(); } /* { dg-bogus "type qualifiers ignored" } */
 };