/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
+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
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");
+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.
+
2008-07-09 Raksit Ashok <raksit@google.com>
* gcc.dg/wdisallowed-functions-1.c: New test.
--- /dev/null
+// PR c++/36760
+// { dg-options "-Wextra" }
+
+#include "pragma-system_header5.h"
+
+void f()
+{
+ g<const double>();
+ g<volatile void>();
+}
--- /dev/null
+#pragma GCC system_header
+
+template <typename T> T g();