[PATCH 1/2] Add OVERRIDE and FINAL macros to coretypes.h
Trevor Saunders
tbsaunde@tbsaunde.org
Fri Jan 1 00:00:00 GMT 2016
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
More information about the Jit
mailing list