aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2014-07-07 15:29:01 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-07-07 15:29:01 +0000
commit8895d9a1d2c0a0c0a18426a959081b481d9c881c (patch)
treec1adb4f486358be59c85ae5bb66895f8894c752a /gcc/cp
parent0f05a19962a367aaac5b6ae8f7638a2bd77e4b29 (diff)
downloadgcc-8895d9a1d2c0a0c0a18426a959081b481d9c881c.zip
gcc-8895d9a1d2c0a0c0a18426a959081b481d9c881c.tar.gz
gcc-8895d9a1d2c0a0c0a18426a959081b481d9c881c.tar.bz2
class.c (check_for_override): Wrap the 'final' and 'override' keywords in %< and %>.
/cp 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com> * class.c (check_for_override): Wrap the 'final' and 'override' keywords in %< and %>. /testsuite 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/override1.C: Tweak expected error messages. From-SVN: r212333
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/class.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 93b05fa..dc56de6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * class.c (check_for_override): Wrap the 'final' and 'override'
+ keywords in %< and %>.
+
2014-07-06 Marek Polacek <polacek@redhat.com>
PR c/6940
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 1c28dd6..3a44dba 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2771,9 +2771,9 @@ check_for_override (tree decl, tree ctype)
TYPE_HAS_NONTRIVIAL_DESTRUCTOR (ctype) = true;
}
else if (DECL_FINAL_P (decl))
- error ("%q+#D marked final, but is not virtual", decl);
+ error ("%q+#D marked %<final%>, but is not virtual", decl);
if (DECL_OVERRIDE_P (decl) && !overrides_found)
- error ("%q+#D marked override, but does not override", decl);
+ error ("%q+#D marked %<override%>, but does not override", decl);
}
/* Warn about hidden virtual functions that are not overridden in t.