aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2008-01-13 00:22:38 +0000
committerDoug Kwan <dougkwan@gcc.gnu.org>2008-01-13 00:22:38 +0000
commit5db2e9ca7dc5ab9bac4baad91c224ba7d8fc0c45 (patch)
treee1ab0d8cbc735be34bf3b43df3a196670e70025b /gcc/cp
parent7219c2c7d309f8a8f3695d82462351bb06bce542 (diff)
downloadgcc-5db2e9ca7dc5ab9bac4baad91c224ba7d8fc0c45.zip
gcc-5db2e9ca7dc5ab9bac4baad91c224ba7d8fc0c45.tar.gz
gcc-5db2e9ca7dc5ab9bac4baad91c224ba7d8fc0c45.tar.bz2
c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in...
ChangeLog: 2008-01-12 Doug Kwan <dougkwan@google.com> * c-decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in warning due to ignored return type qualifiers. * c-opt.c (c_common_post_option): Add -Wignored-qualifiers to options included in -Wextra. * c.opt: New option -Wignored_qualifiers. * doc/invoke.texi (Warning Options, -Wextra): Add new option -Wignore_qualifiers. (-Wignored-qualifiers): Document. (-Wreturn-type): Remove description of functionality now handled by -Wignored-qualifiers. cp/ChangeLog: 2008-01-12 Doug Kwan <dougkwan@google.com> * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in warning due to ignored return type qualifiers. * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers instead of OPT_Wreturn_type in warning due to ignored return type qualifiers. testsuite/ChangeLog: 2008-01-12 Doug Kwan <dougkwan@google.com> * gcc.dg/qual-return-1.c: Add -Wignored-qualifiers. * g++.dg/warn/Wreturn-type-4.C: Replace -Wreturn-type by -Wignored-qualifiers. From-SVN: r131499
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/pt.c2
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8a6c341..c46c072 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2008-01-12 Doug Kwan <dougkwan@google.com>
+
+ * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
+ instead of OPT_Wreturn_type in warning due to ignored return type
+ qualifiers.
+ * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
+ instead of OPT_Wreturn_type in warning due to ignored return type
+ qualifiers.
+
2008-01-08 Jakub Jelinek <jakub@redhat.com>
PR c++/33890
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f968e88..11a5c47 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8018,7 +8018,7 @@ grokdeclarator (const cp_declarator *declarator,
if (type_quals != TYPE_UNQUALIFIED)
{
if (SCALAR_TYPE_P (type) || VOID_TYPE_P (type))
- warning (OPT_Wreturn_type,
+ warning (OPT_Wignored_qualifiers,
"type qualifiers ignored on function return type");
/* We now know that the TYPE_QUALS don't apply to the
decl, but to its return type. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9f87778..f25f2c4 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8663,7 +8663,7 @@ tsubst_function_type (tree t,
&& in_decl != NULL_TREE
&& !TREE_NO_WARNING (in_decl)
&& (SCALAR_TYPE_P (return_type) || VOID_TYPE_P (return_type)))
- warning (OPT_Wreturn_type,
+ warning (OPT_Wignored_qualifiers,
"type qualifiers ignored on function return type");
/* Construct a new type node and return it. */