You are right, the new version is in the diff. The diff for the test hasn't changed and is in the previous mail. In the previous version of the file, the registered_pragmas was not better freed. I don't know if it is really important (it would need a callback at the end of the front-end passes). Thanks. On 09/06/2011 08:16, Basile Starynkevitch wrote: > On Wed, 08 Jun 2011 23:26:39 +0200 > Pierre Vittet wrote: > > >> I have written a test for this patch and run it (it works correctly). I >> guess there is no reason why it should not be accepted now. >> To recap, this patch add a void * data field to the pragma handler, >> allowing to pass extra data. If we want to use this field, we need to >> use the function c_register_pragma_with_data or >> c_register_pragma_with_expansion_and_data. The old >> c_register_pragma(_with_expansion) is kept compatible. >> > > =================================================================== > --- gcc/c-family/c-pragma.c (revision 174521) > +++ gcc/c-family/c-pragma.c (working copy) > @@ -1148,12 +1148,12 @@ handle_pragma_float_const_decimal64 (cpp_reader > *A } > > /* A vector of registered pragma callbacks. */ > +/* This is never freed as we need it during the whole execution. */ > +DEF_VEC_O (internal_pragma_handler); > +DEF_VEC_ALLOC_O (internal_pragma_handler, heap); > > Sorry to be picky Pierre, but that comment is not correct. It should be > instead. > > /* A vector of registered pragma callbacks, which is never freed. */ > > What I mean is that you are right that the vector is never freed, but > it is not because it is needed during the entire execution, since > middle-end and back-end passes don't know about pragmas. > > I hope your patch will be ok-ed with that small change. > > Perhaps a future patch would free that registered_pragmas vector, but I > feel that is not necessary, since it is not a big vector in practice. > > Regards. > >