This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36760] Simple std::bind use causes warnings with -Wextra
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2008 09:59:17 -0000
- Subject: [Bug c++/36760] Simple std::bind use causes warnings with -Wextra
- References: <bug-36760-5473@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from paolo dot carlini at oracle dot com 2008-07-08 09:59 -------
Thanks Tom. In fact, yesterday I was writing without remembering my past
analyses of this type of issue, with system header warnings not suppressed:
TREE_NO_WARNING is *not* generically uses for that. Everything boils down to
DECL_IN_SYSTEM_HEADER on the decl instead.
Now, the warning at issue is the *only* one directly emitted from pt.c and the
following draft works for me.
What do you think, Mark?
Otherwise, elsewhere we are dealing with these issues by going through the
saved_in_system_header dance...
Index: pt.c
===================================================================
*** pt.c (revision 137591)
--- pt.c (working copy)
*************** tsubst_function_type (tree t,
*** 8768,8773 ****
--- 8768,8774 ----
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");
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|paolo dot carlini at oracle |mark at codesourcery dot com
|dot com |
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36760