diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 10:40:28 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 10:40:28 +0000 |
commit | 74b0726cf08f4eb28e3bf9a67f32a444e58ad416 (patch) | |
tree | 2a02e0c255a32712fe3a4acc240d7ac19d537f2e /gcc/gcc-plugin.h | |
parent | 9d135bb6fd95b12a9e1a076a48cc2b4c0a5a2c2e (diff) | |
download | gcc-74b0726cf08f4eb28e3bf9a67f32a444e58ad416.tar.gz |
gcc:
PR testsuite/42843
* gcc-plugin.h (int plugin_is_GPL_compatible): Declare as extern "C".
* doc/plugins.texi (Plugin license check): Update information
on type of plugin_is_GPL_compatible.
* Makefile.in (PLUGINCC): Define as $(COMPILER).
(PLUGINCFLAGS): Define as $(COMPILER_FLAGS).
gcc/testsuite:
PR testsuite/42843
* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Use enumerator
TV_NONE to initialize tv_id field.
* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
* gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise.
* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Likewise.
Include toplev.h .
* gcc.dg/plugin/finish_unit_plugin.c: Include cgraph.h.
* g++.dg/plugin/attribute_plugin.c: Include toplev.h and plugin.h .
* g++.dg/plugin/pragma_plugin.c: Include toplev.h .
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160461 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc-plugin.h')
-rw-r--r-- | gcc/gcc-plugin.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/gcc-plugin.h b/gcc/gcc-plugin.h index 5db2c710be5..7573fa28d7c 100644 --- a/gcc/gcc-plugin.h +++ b/gcc/gcc-plugin.h @@ -151,4 +151,15 @@ extern const char* default_plugin_dir_name (void); } #endif +/* In case the C++ compiler does name mangling for globals, declare + plugin_is_GPL_compatible extern "C" so that a later definition + in a plugin file will have this linkage. */ +#ifdef __cplusplus +extern "C" { +#endif +extern int plugin_is_GPL_compatible; +#ifdef __cplusplus +} +#endif + #endif /* GCC_PLUGIN_H */ |