mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
FINAL/OVERRIDE: Define to empty on g++ < 4.7
final/override were only implemented in g++ 4.7. include/ChangeLog 2016-10-14 Pedro Alves <palves@redhat.com> * ansidecl.h [__cplusplus >= 201103 && GCC_VERSION < 4007] (FINAL, OVERRIDE): Define as empty. [__cplusplus < 201103 && GCC_VERSION < 4007] (FINAL): Define as __final. [__cplusplus < 201103 && GCC_VERSION >= 4007] (OVERRIDE): Define as empty.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2016-10-14 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* ansidecl.h [__cplusplus >= 201103 && GCC_VERSION < 4007] (FINAL,
|
||||||
|
OVERRIDE): Define as empty.
|
||||||
|
[__cplusplus < 201103 && GCC_VERSION < 4007] (FINAL): Define as
|
||||||
|
__final.
|
||||||
|
[__cplusplus < 201103 && GCC_VERSION >= 4007] (OVERRIDE): Define as
|
||||||
|
empty.
|
||||||
|
|
||||||
2016-10-14 Pedro Alves <palves@redhat.com>
|
2016-10-14 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* ansidecl.h (GCC_FINAL): Delete.
|
* ansidecl.h (GCC_FINAL): Delete.
|
||||||
|
|||||||
@@ -329,13 +329,23 @@ So instead we use the macro below and test it against specific values. */
|
|||||||
this by default (actually GNU++14). */
|
this by default (actually GNU++14). */
|
||||||
|
|
||||||
#if __cplusplus >= 201103
|
#if __cplusplus >= 201103
|
||||||
/* C++11 claims to be available: use it: */
|
/* C++11 claims to be available: use it. final/override were only
|
||||||
#define OVERRIDE override
|
implemented in 4.7, though. */
|
||||||
#define FINAL final
|
# if GCC_VERSION < 4007
|
||||||
|
# define OVERRIDE
|
||||||
|
# define FINAL
|
||||||
|
# else
|
||||||
|
# define OVERRIDE override
|
||||||
|
# define FINAL final
|
||||||
|
# endif
|
||||||
|
#elif GCC_VERSION >= 4007
|
||||||
|
/* G++ 4.7 supports __final in C++98. */
|
||||||
|
# define OVERRIDE
|
||||||
|
# define FINAL __final
|
||||||
#else
|
#else
|
||||||
/* No C++11 support; leave the macros empty: */
|
/* No C++11 support; leave the macros empty: */
|
||||||
#define OVERRIDE
|
# define OVERRIDE
|
||||||
#define FINAL
|
# define FINAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user