summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-11 22:39:31 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-11 22:39:31 +0000
commit5a45f1493b439382038f66e2fa06dd8d17f37ee8 (patch)
treef6715225fdbd8cd459acbb999f377ecb2f45a6c1 /include
parentb7494a14ada3d5cf956f3d0c3f96e3450b4a95c2 (diff)
add GCC_FINAL to ansidecl.h
include/ChangeLog: 2015-08-11 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * ansidecl.h (GCC_FINAL): New macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/ansidecl.h9
2 files changed, 13 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 7e2e499187cd..46a4a2874a2f 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-11 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * ansidecl.h (GCC_FINAL): New macro.
+
2015-08-10 Thomas Schwinge <thomas@codesourcery.com>
* gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 224627df2d12..6e4bfc21f25f 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -313,6 +313,15 @@ So instead we use the macro below and test it against specific values. */
#define ENUM_BITFIELD(TYPE) unsigned int
#endif
+ /* This is used to mark a class or virtual function as final. */
+#if __cplusplus >= 201103L
+#define GCC_FINAL final
+#elif GCC_VERSION >= 4007
+#define GCC_FINAL __final
+#else
+#define GCC_FINAL
+#endif
+
#ifdef __cplusplus
}
#endif