This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h
- From: Pedro Alves <palves at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org
- Date: Fri, 6 May 2016 19:10:33 +0100
- Subject: Re: [PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h
- Authentication-results: sourceware.org; auth=none
- References: <1462552846-17096-1-git-send-email-dmalcolm at redhat dot com> <f0e254d6-6cb0-713b-884c-20b7bf80e605 at redhat dot com>
On 05/06/2016 06:56 PM, Pedro Alves wrote:
> If building gcc as a C++11 program is supported, then it
> won't be possible to use these names as symbols for
> anything else anyway?
Just found out the above is not true. Apparently I've
been stuck in C++98 for too long... Sorry about the noise.
I was going to suggest to put this in include/ansidecl.h,
so that all C++ libraries / programs in binutils-gdb use the same
thing, instead of each reinventing the wheel, and I found
there's already something there:
/* 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
From:
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00455.html
Apparently the patch that actually uses that was reverted,
as I can't find any use.
I like your names without the GCC_ prefix better though,
for the same reason of standardizing binutils-gdb + gcc
on the same symbols.
--
Thanks,
Pedro Alves