Implement final on class.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Sat, 14 May 2011 18:13:23 +0000 (21:13 +0300)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 14 May 2011 18:13:23 +0000 (14:13 -0400)
commit486d481b392fae54d39413f3d1fc6851383fce47
tree6e71c4f8224656772ee33335e93d1fb8eb7d983e
parentade2e40389bd3c76031c486991005ffffa1493bf
Implement final on class.

* class.c (check_bases): Diagnose derivation from a final class.
* cp-tree.h (lang_type_class): Add is_final and adjust dummy.
(CLASSTYPE_FINAL): New.
* parser.c (cp_parser_class_head): Parse class-virt-specifier, set
CLASSTYPE_FINAL.
* pt.c (instantiate_class_template_1): Copy CLASSTYPE_FINAL.

From-SVN: r173761
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/override1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/override2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/inherit/virtual9.C [deleted file]