]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h
authorPedro Alves <palves@redhat.com>
Fri, 14 Oct 2016 15:24:58 +0000 (15:24 +0000)
committerPedro Alves <palves@gcc.gnu.org>
Fri, 14 Oct 2016 15:24:58 +0000 (15:24 +0000)
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

gcc/ChangeLog
gcc/coretypes.h
include/ChangeLog
include/ansidecl.h

index efa78dd8e0a36ca00fbbe9081a98bcb4f53d6bb0..6638830bf8097a563691f7cccf9681040bb9b3b4 100644 (file)
@@ -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
index 70f909dbf7f847e46f5d43c55fb90f42702dc2d5..869f858d4a13b9f95f72b536ee0ee23b5a7d4522 100644 (file)
@@ -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"
index a37976855b5f5ca84ec0ad6a4cfa5a6c47fdc94d..18bc5ff8d96ea2e8cbc97e02ff08f0ccb912f342 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-14  Pedro Alves  <palves@redhat.com>
+
+       * ansidecl.h (GCC_FINAL): Delete.
+       (OVERRIDE, FINAL): New, moved from gcc/coretypes.h.
+
 2016-08-15  Jakub Jelinek  <jakub@redhat.com>
 
        * dwarf2.def (DW_AT_string_length_bit_size,
index 6e4bfc21f25fba689eeb896486328f45cdc537b4..ee934216f073b9551be068f95867a81c417d0c19 100644 (file)
@@ -313,13 +313,29 @@ 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
+/* 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
-#define GCC_FINAL
+/* No C++11 support; leave the macros empty: */
+#define OVERRIDE
+#define FINAL
 #endif
 
 #ifdef __cplusplus