On Wed, 2015-07-08 at 15:19 +0000, Justin Tai wrote:
Thanks Dave for the support :-D. I've implemented the four calls
to
register pragma under one gcc method using parameters based on your
advice.
Excellent!
Here are the four GCC API used to register new pragma:
c_register_pragma()
c_register_pragma_with_data()
c_register_pragma_with_expansion()
c_register_pragma_with_expansion_and_data()
Here's the call signature that I've implemented.
gcc.c_register_pragma(<directive space>, <directive>, <callback>,
<pointer to user params>, <bool indicating with expansion or not>)
We might want to lose the "c_" prefix there (though I guess this is only
going to work from cc1/cc1plus).
Right now all this is on my own github fork of the repo (user:
taijusti). Did you want this on the main repo?
Yes please.
I'm willing to go through the necessary review process, however I
have
everything I need right now for my project, so this would be low
priority for me unfortunately :(. Right now it passes all tests except
for LTO. I'm able to register my own pragma in python via this plugin.
I would also want to do a little more cleanup to get it to production
quality if you would like this on the main repo.
Reviewing it is likely to be a low priority for me also :( (I'm v busy
with gcc 6 work these days).
It may be easiest for both of us if you do a Pull Request for this in
github.
BTW, with this is all implemented/tested at Fedora 21 4.0.6-200, GCC
4.9.2, Python 2.7.8. Upgrading the plugin to this platform only
required artificial changes--expected error messages for tests changed
a little bit.