------- 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