add GCC_FINAL to ansidecl.h
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>
Tue, 11 Aug 2015 22:39:31 +0000 (22:39 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Tue, 11 Aug 2015 22:39:31 +0000 (22:39 +0000)
include/ChangeLog:

2015-08-11  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* ansidecl.h (GCC_FINAL): New macro.

From-SVN: r226792

include/ChangeLog
include/ansidecl.h

index 7e2e499..46a4a28 100644 (file)
@@ -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.
index 224627d..6e4bfc2 100644 (file)
@@ -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