From 8378eafa0da426059638f1d2f7cf7cd429a8c1ae Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Tue, 11 Aug 2015 22:39:31 +0000 Subject: add GCC_FINAL to ansidecl.h include/ChangeLog: 2015-08-11 Trevor Saunders * ansidecl.h (GCC_FINAL): New macro. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@226792 138bc75d-0d04-0410-961f-82ee72b054a4 --- include/ChangeLog | 4 ++++ include/ansidecl.h | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 7e2e499187c..46a4a2874a2 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2015-08-11 Trevor Saunders + + * ansidecl.h (GCC_FINAL): New macro. + 2015-08-10 Thomas Schwinge * gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove. diff --git a/include/ansidecl.h b/include/ansidecl.h index 224627df2d1..6e4bfc21f25 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -311,6 +311,15 @@ So instead we use the macro below and test it against specific values. */ #define ENUM_BITFIELD(TYPE) __extension__ enum TYPE #else #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 -- cgit v1.2.3