aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-05-19 17:02:03 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-05-19 17:02:03 -0400
commit93e1ddcf9c8f4b8b64d0e53bd4a4f306eb70bdd4 (patch)
tree73962fa75beb82263d63e1c7b90f861c66bc93df /gcc/cp/decl.c
parent2872152c39fbc1c91da3fc07e8701fadb6b87f98 (diff)
downloadgcc-93e1ddcf9c8f4b8b64d0e53bd4a4f306eb70bdd4.zip
gcc-93e1ddcf9c8f4b8b64d0e53bd4a4f306eb70bdd4.tar.gz
gcc-93e1ddcf9c8f4b8b64d0e53bd4a4f306eb70bdd4.tar.bz2
decl.c (grokdeclarator): Don't check quals on fn type.
* decl.c (grokdeclarator): Don't check quals on fn type. * typeck.c (cp_apply_type_quals_to_decl): Likewise. * tree.c (cp_build_qualified_type_real): Simplify qualifier checking. From-SVN: r159597
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e57a753..d3cc02b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8224,21 +8224,6 @@ grokdeclarator (const cp_declarator *declarator,
error ("qualifiers are not allowed on declaration of %<operator %T%>",
ctor_return_type);
- if (TREE_CODE (type) == FUNCTION_TYPE
- && type_quals != TYPE_UNQUALIFIED)
- {
- /* This was an error in C++98 (cv-qualifiers cannot be added to
- a function type), but DR 295 makes the code well-formed by
- dropping the extra qualifiers. */
- if (pedantic && cxx_dialect == cxx98)
- {
- tree bad_type = build_qualified_type (type, type_quals);
- pedwarn (input_location, OPT_pedantic,
- "ignoring %qV qualifiers added to function type %qT",
- bad_type, type);
- }
- type_quals = TYPE_UNQUALIFIED;
- }
type_quals |= cp_type_quals (type);
type = cp_build_qualified_type_real
(type, type_quals, ((typedef_decl && !DECL_ARTIFICIAL (typedef_decl)