This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

plugin_is_GPL_compatible mangling


I'm currently working on an update of the patch for PR42843, and I wonder
what best to do about the symbol plugin_is_GPL_compatible.

Although gcc doesn't currently mangle global variables, a future version of
gcc - or any other build compiler - might add mangling.

If I add:

#ifdef __cplusplus
extern "C" {
#endif
extern int plugin_is_GPL_compatible;
#ifdef __cplusplus
}
#endif

in gcc-plugin.h, then that potential problem is avoided.

However, it would mean that plugin_is_GPL_compatible would have to be declared
as type int - we currently say in the documentation that the type doesn't
matter.  So we'd have to change the documentation to reflect this, then.
Also, the type we suggest in the documentation is int, but some people
might have choosen a different type to be on the safe side not to use GFDL
code (pasted from the manual) together with GPL code, or to safe space -
should we worry about the backwards compatibility issue there?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]