diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-07-09 15:45:50 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-07-09 15:45:50 +0000 |
commit | af5216d3e1434791092452c3de983dd52ca131cd (patch) | |
tree | 98a09d1bcf6bafdf1d157cc33d04782be90ba063 /gcc/cp | |
parent | 361eefe75db3b115f4a33d8b5bdd04996df4c4d9 (diff) | |
download | gcc-af5216d3e1434791092452c3de983dd52ca131cd.zip gcc-af5216d3e1434791092452c3de983dd52ca131cd.tar.gz gcc-af5216d3e1434791092452c3de983dd52ca131cd.tar.bz2 |
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): Don't warn for type qualifiers
on function return type in case of system header.
/testsuite
2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/36760
* g++.dg/warn/pragma-system_header5.C: New.
* g++.dg/warn/pragma-system_header5.h: Likewise.
From-SVN: r137660
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fa4419e..b68a795 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-07-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/36760 + * pt.c (tsubst_function_type): Don't warn for type qualifiers + on function return type in case of system header. + 2008-07-09 Raksit Ashok <raksit@google.com> * parser.c (cp_parser_postfix_expression): New warning based on flag diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cce706f..3fee994 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8768,6 +8768,7 @@ tsubst_function_type (tree t, 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"); |