aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@gmail.com>2011-05-09 20:34:35 +0300
committerJason Merrill <jason@gcc.gnu.org>2011-05-09 13:34:35 -0400
commitb5da71d41644c40db95aabac8f67c28294f4c85f (patch)
tree704c11fb901ce576ac515237bef43408fce32e9c /gcc/tree.h
parent51e7f3770c99afc09afc9e9837aad4c8505fbbf8 (diff)
downloadgcc-b5da71d41644c40db95aabac8f67c28294f4c85f.zip
gcc-b5da71d41644c40db95aabac8f67c28294f4c85f.tar.gz
gcc-b5da71d41644c40db95aabac8f67c28294f4c85f.tar.bz2
Implement final/override for member functions.
gcc/ * tree.h (TYPE_UNQUALIFIED, TYPE_QUAL_CONST): Convert to enum. (TYPE_QUAL_VOLATILE, TYPE_QUAL_RESTRICT): Likewise. gcc/cp/ * class.c (check_for_override): Check for DECL_OVERRIDE_P. * cp-tree.h (DECL_OVERRIDE_P, DECL_FINAL_P): New. (cp_virt_specifiers, enum virt_specifier): New. * decl.c (set_virt_specifiers): New. (grokdeclarator): Use them. Diagnose virt-specifiers on non-fields. * parser.c (make_call_declarator): add virt-specifiers parameter. (cp_parser_lambda_declarator_opt): Adjust. (cp_parser_direct_declarator): Likewise. (cp_parser_virt_specifier_seq_opt): New. * search.c (check_final_overrider): Diagnose attempts to override a final member function. From-SVN: r173581
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index d0cd3e0..4cf1730 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2253,11 +2253,13 @@ extern enum machine_mode vector_type_mode (const_tree);
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
type. */
-
-#define TYPE_UNQUALIFIED 0x0
-#define TYPE_QUAL_CONST 0x1
-#define TYPE_QUAL_VOLATILE 0x2
-#define TYPE_QUAL_RESTRICT 0x4
+enum cv_qualifier
+ {
+ TYPE_UNQUALIFIED = 0x0,
+ TYPE_QUAL_CONST = 0x1,
+ TYPE_QUAL_VOLATILE = 0x2,
+ TYPE_QUAL_RESTRICT = 0x4
+ };
/* Encode/decode the named memory support as part of the qualifier. If more
than 8 qualifiers are added, these macros need to be adjusted. */