mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 05:20:25 +08:00
re PR c++/36760 (Simple std::bind use causes warnings with -Wextra)
/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
This commit is contained in:
parent
256f27f13c
commit
3d7c63cf96
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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" } */
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user