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: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: 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 14:33:45 -0400
- 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> <8ce94f18-421f-9466-85cf-e17d9caee151 at redhat dot com>
On Fri, May 06, 2016 at 07:10:33PM +0100, Pedro Alves wrote:
> 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.
Yeah, I wanted to use it to work around gdb not dealing well with stuff
in the anon namespace, but somehow that broke aix, and some people
objected and I haven't gotten back to it.
> I like your names without the GCC_ prefix better though,
> for the same reason of standardizing binutils-gdb + gcc
> on the same symbols.
I agree, though I'm not really sure when gdb / binutils stuff will
support building as C++11.
Trev
>
>
> --
> Thanks,
> Pedro Alves