Re: [APPROVED PATCH] c-pragma: adding a data field to pragma_handler

2011-06-20 Thread Basile Starynkevitch
On Fri, 17 Jun 2011 11:41:21 +0200 Pierre Vittet pier...@pvittet.com wrote: Thoses two patchs have already been approved (see http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01159.html). I haven't write permission currently, could someone commit them? ChangeLogs have to be applied on

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-10 Thread Pierre Vittet
thanks! I formatted as you requested. I cannot commit myself as I haven't a write after approval status, maye you can do it, or I can wait my GSOC mentor, Basile Starynkevitch to do this (He mights be busy for a few days). Pierre Vittet Index: gcc/c-family/c-pragma.c

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-10 Thread Joseph S. Myers
Please make sure that with each revision you include *both* the patch *and* the ChangeLog entries so they can be reviewed together. The last version of the ChangeLog entries that I saw still needed more work to follow the normal style for ChangeLog entries. -- Joseph S. Myers

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-10 Thread Pierre Vittet
I guess this is better now. Changelog (gcc/c-family): 2011-06-10 Pierre Vittet pier...@pvittet.com * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New handler. (gen_pragma_handler): New union. (internal_pragma_handler): New type. (c_register_pragma_with_data,

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-09 Thread Basile Starynkevitch
On Wed, 08 Jun 2011 23:26:39 +0200 Pierre Vittet pier...@pvittet.com 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

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-09 Thread Pierre Vittet
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

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-09 Thread Joseph S. Myers
Thanks for this patch. You need to adjust the formatting of the comments to match the existing style (in particular, indentation of second and subsequent lines of comments, and watch out for spelling errors (exemple, abstact). For a struct, the explanations of individual fields should be in

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-08 Thread Pierre Vittet
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

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-03 Thread Pierre Vittet
Thank you for your answer! I send you a new patch I have corrected the errors you raised. I have make my patch compatible with the old use of c_register_pragma and c_register_pragma_with_expansion. I don't know what is the best solution, maybe changing every call c_register_pragma allows to

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-03 Thread Basile Starynkevitch
On Fri, 03 Jun 2011 17:31:25 +0200 Pierre Vittet pier...@pvittet.com wrote: Thank you for your answer! I send you a new patch I have corrected the errors you raised. I have make my patch compatible with the old use of c_register_pragma and c_register_pragma_with_expansion. I find the

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-03 Thread Pierre Vittet
Hello, I am sorry, my editor (vim) was not correctly configure (I used http://gcc.gnu.org/ml/gcc/2011-03/msg00425.html to improve it). I guess it is ok now. If I still have issue, I will post on the mailing list if there is some tips for vim otherway I will use Emacs (I am not very

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-02 Thread Tom Tromey
Pierre == Pierre p.vit...@laposte.net writes: Pierre I have changed this handler in order to accept a second parameter Pierre which is a void *, allowing to give extra datas to the handler. I Pierre think this data field might be of general use: we can have condition Pierre or data at register

[PATCH] c-pragma: adding a data field to pragma_handler

2011-06-01 Thread Pierre
This patch is about the pragmas. In c-family/c-pragma.h, we declare a pragma_handler which is a function accepting cpp_reader as parameter. I have changed this handler in order to accept a second parameter which is a void *, allowing to give extra datas to the handler. I think this data

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-01 Thread Basile Starynkevitch
On Wed, 01 Jun 2011 18:54:38 +0200 Pierre p.vit...@laposte.net wrote: This patch is about the pragmas. In c-family/c-pragma.h, we declare a pragma_handler which is a function accepting cpp_reader as parameter. I have changed this handler in order to accept a second parameter which is a