Re: [PATCH] Add ggc-tests.c

2016-06-14 Thread Ulrich Weigand
David Malcolm wrote: > On Mon, 2016-06-13 at 13:36 +0200, Ulrich Weigand wrote: > > Gerald Pfeifer wrote: > > > > > The source code of need_finalization_p in ggc.h reads > > > > > >template > > >static inline bool > > >need_finalization_p () > > >{ > > >#if GCC_VERSION >=

Re: [PATCH] Add ggc-tests.c

2016-06-13 Thread David Malcolm
On Mon, 2016-06-13 at 13:36 +0200, Ulrich Weigand wrote: > Gerald Pfeifer wrote: > > > The source code of need_finalization_p in ggc.h reads > > > >template > >static inline bool > >need_finalization_p () > >{ > >#if GCC_VERSION >= 4003 > > return

Re: [PATCH] Add ggc-tests.c

2016-06-13 Thread Ulrich Weigand
Gerald Pfeifer wrote: > The source code of need_finalization_p in ggc.h reads > >template >static inline bool >need_finalization_p () >{ >#if GCC_VERSION >= 4003 > return !__has_trivial_destructor (T); >#else > return true; >#endif >} > > which means

Re: [PATCH] Add ggc-tests.c

2016-06-12 Thread Gerald Pfeifer
On Mon, 6 Jun 2016, David Malcolm wrote: > OK for trunk? As committed on Friday 2016-06-10 David Malcolm * Makefile.in (OBJS): Add ggc-tests.o. (GTFILES): Add ggc-tests.c. * ggc-tests.c: New file. * selftest-run-tests.c

Re: [PATCH] Add ggc-tests.c

2016-06-09 Thread Jeff Law
On 06/06/2016 03:31 PM, David Malcolm wrote: Jeff approved an earlier version of this (as unittests/test-ggc.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03306.html Not terribly happy with that counter to used to create a big list to detect recursion. But I'm not offhand sure how to

[PATCH] Add ggc-tests.c

2016-06-06 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-ggc.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03306.html > Not terribly happy with that counter to used to create a big list > to detect recursion. But I'm not offhand sure how to avoid without > exposing more of the ggc system