This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PLUGINS] Add 'extern "C"' wrappers to several header files
Hi Gabriel,
(2) identify a well-defined interface to your plugin, e.g. the entry points
and declare them with the C calling convention; and code the internals
of your plugin in C++
the problem isn't the entry points into the plugin, the problem is the
entry points into gcc. The plugin is converting gimple to LLVM IR, and
as such it accesses many many gcc routines. While I could write my own
headers redeclaring all the gcc stuff with the C calling convention, I'd
rather not because it would be a lot of work and fragile.
Ciao,
Duncan.