diff options
author | Pedro Alves <palves@redhat.com> | 2016-10-14 15:24:58 +0000 |
---|---|---|
committer | Pedro Alves <palves@gcc.gnu.org> | 2016-10-14 15:24:58 +0000 |
commit | 2121e959e1f601542e8c1712336bbd9994593936 (patch) | |
tree | 874da203b18e4cdb9000c7d3e3fdd49744028ce3 /gcc | |
parent | df17106f1ed4982791025e4b84a46543b26771d0 (diff) | |
download | gcc-2121e959e1f601542e8c1712336bbd9994593936.zip gcc-2121e959e1f601542e8c1712336bbd9994593936.tar.gz gcc-2121e959e1f601542e8c1712336bbd9994593936.tar.bz2 |
Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h
So that GDB and other projects that share the top level can use them.
Bootstrapped with all default languages + jit on x86-64 Fedora 23.
gcc/ChangeLog:
2016-10-14 Pedro Alves <palves@redhat.com>
* coretypes.h (OVERRIDE, FINAL): Delete, moved to
include/ansidecl.h.
include/ChangeLog:
2016-10-14 Pedro Alves <palves@redhat.com>
* ansidecl.h (GCC_FINAL): Delete.
(OVERRIDE, FINAL): New, moved from gcc/coretypes.h.
From-SVN: r241166
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/coretypes.h | 25 |
2 files changed, 5 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efa78dd..6638830 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-14 Pedro Alves <palves@redhat.com> + + * coretypes.h (OVERRIDE, FINAL): Delete, moved to + include/ansidecl.h. + 2016-10-14 Catherine Moore <clm@codesourcery.com> * gcc/config/mips/mips.c (mips_prepare_pch_save): Initialize diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 70f909d..869f858 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -339,31 +339,6 @@ typedef void (*gt_pointer_operator) (void *, void *); typedef unsigned char uchar; #endif -/* C++11 adds the ability to add "override" after an implementation of a - virtual function in a subclass, to: - (A) document that this is an override of a virtual function - (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch - of the type signature). - - Similarly, it allows us to add a "final" to indicate that no subclass - may subsequently override the vfunc. - - Provide OVERRIDE and FINAL as macros, allowing us to get these benefits - when compiling with C++11 support, but without requiring C++11. - - For gcc, use "-std=c++11" to enable C++11 support; gcc 6 onwards enables - this by default (actually GNU++14). */ - -#if __cplusplus >= 201103 -/* C++11 claims to be available: use it: */ -#define OVERRIDE override -#define FINAL final -#else -/* No C++11 support; leave the macros empty: */ -#define OVERRIDE -#define FINAL -#endif - /* Most host source files will require the following headers. */ #if !defined (GENERATOR_FILE) && !defined (USED_FOR_TARGET) #include "machmode.h" |