Fix compile time error when using ansidecl.h with an old version of GCC.
include/ 2017-07-31 Nick Clifton <nickc@redhat.com> Binutils PR 21850 * ansidecl.h (OVERRIDE): Protect check of __cplusplus value with #idef __cplusplus. From-SVN: r252822
This commit is contained in:
parent
870118b7f1
commit
efae2b2f9b
@ -8,6 +8,12 @@
|
|||||||
* simple-object.h (simple_object_copy_lto_debug_sections): New
|
* simple-object.h (simple_object_copy_lto_debug_sections): New
|
||||||
function.
|
function.
|
||||||
|
|
||||||
|
2017-07-31 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
Binutils PR 21850
|
||||||
|
* ansidecl.h (OVERRIDE): Protect check of __cplusplus value with
|
||||||
|
#idef __cplusplus.
|
||||||
|
|
||||||
2017-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2017-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset)
|
* dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset)
|
||||||
|
@ -334,22 +334,28 @@ So instead we use the macro below and test it against specific values. */
|
|||||||
For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
|
For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables
|
||||||
this by default (actually GNU++14). */
|
this by default (actually GNU++14). */
|
||||||
|
|
||||||
#if __cplusplus >= 201103
|
#if defined __cplusplus
|
||||||
/* C++11 claims to be available: use it. final/override were only
|
# if __cplusplus >= 201103
|
||||||
implemented in 4.7, though. */
|
/* C++11 claims to be available: use it. Final/override were only
|
||||||
# if GCC_VERSION < 4007
|
implemented in 4.7, though. */
|
||||||
|
# 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
|
||||||
|
/* No C++11 support; leave the macros empty. */
|
||||||
# define OVERRIDE
|
# define OVERRIDE
|
||||||
# define FINAL
|
# define FINAL
|
||||||
# else
|
|
||||||
# define OVERRIDE override
|
|
||||||
# define FINAL final
|
|
||||||
# endif
|
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user