diff options
author | Joern Rennecke <amylaar@gcc.gnu.org> | 2010-06-09 11:40:28 +0100 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2010-06-09 11:40:28 +0100 |
commit | 2d7f5f9b5f54aae8eaaaa6e430422ecbbfe91f4d (patch) | |
tree | 2a02e0c255a32712fe3a4acc240d7ac19d537f2e /gcc/gcc-plugin.h | |
parent | ff5dfc4869aad7bedad9e749e6eed7d5f783b970 (diff) | |
download | gcc-2d7f5f9b5f54aae8eaaaa6e430422ecbbfe91f4d.zip gcc-2d7f5f9b5f54aae8eaaaa6e430422ecbbfe91f4d.tar.gz gcc-2d7f5f9b5f54aae8eaaaa6e430422ecbbfe91f4d.tar.bz2 |
re PR testsuite/42843 (--enable-build-with-cxx plugin tests fail)
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 .
From-SVN: r160461
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 5db2c71..7573fa2 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 */ |