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.
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>)
Right now all this is on my own github fork of the repo (user: taijusti).
Did you want this on the main repo? 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.
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.
Justin