diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2011-07-23 00:05:58 +0300 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-07-22 17:05:58 -0400 |
commit | eda42c4f3c1d39590277fb33309e95af8baf8062 (patch) | |
tree | 9dc1a2d57276c9fecb6b635972ef9461a7771bfc /gcc/cp/error.c | |
parent | 520cda8ca897131960a30a1943687ee97b60e0b1 (diff) | |
download | gcc-eda42c4f3c1d39590277fb33309e95af8baf8062.zip gcc-eda42c4f3c1d39590277fb33309e95af8baf8062.tar.gz gcc-eda42c4f3c1d39590277fb33309e95af8baf8062.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 2d7c0f1..d435bbe 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -3227,6 +3227,11 @@ maybe_warn_cpp0x (cpp0x_warn_str str) "inline namespaces " "only available with -std=c++0x or -std=gnu++0x"); break; + case CPP0X_OVERRIDE_CONTROLS: + pedwarn (input_location, 0, + "override controls (override/final) " + "only available with -std=c++0x or -std=gnu++0x"); + break; default: gcc_unreachable(); } |