Warn about the use of final/override in non-c++0x mode, and add __final for non-c...
authorVille Voutilainen <ville.voutilainen@gmail.com>
Fri, 22 Jul 2011 21:05:58 +0000 (00:05 +0300)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 22 Jul 2011 21:05:58 +0000 (17:05 -0400)
commiteda42c4f3c1d39590277fb33309e95af8baf8062
tree9dc1a2d57276c9fecb6b635972ef9461a7771bfc
parent520cda8ca897131960a30a1943687ee97b60e0b1
Warn about the use of final/override in non-c++0x mode, and add __final for non-c++0x mode.

Warn about the use of final/override in non-c++0x mode, and
add __final for non-c++0x mode.
* cp-tree.h (cpp0x_warn_str): Add CPP0X_OVERRIDE_CONTROLS.
* error.c (maybe_warn_cpp0x): Adjust.
* parser.c (cp_parser_virt_specifier_seq_opt): Use it. Add
'__final' as a non-c++0x alternative for 'final'.

From-SVN: r176655
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/error.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/override1.C
gcc/testsuite/g++.dg/cpp0x/override3.C [new file with mode: 0644]