+2010-06-09 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR plugins/44459:
+ * gcc-plugin.h: Encapsulate all declarations in extern "C".
+
2010-06-08 Jan Hubicka <jh@suse.cz>
* basic-block.h (single_succ_edge, single_pred_edge, ei_container,
PLUGIN_EVENT_FIRST_DYNAMIC
};
+/* All globals declared here have C linkage to reduce link compatibility
+ issues with implementation language choice and mangling. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const char **plugin_event_name;
struct plugin_argument
typedef int (*plugin_init_func) (struct plugin_name_args *plugin_info,
struct plugin_gcc_version *version);
-#ifdef __cplusplus
-extern "C" {
-#endif
/* Declaration for "plugin_init" function so that it doesn't need to be
duplicated in every plugin. */
extern int plugin_init (struct plugin_name_args *plugin_info,
struct plugin_gcc_version *version);
-#ifdef __cplusplus
-}
-#endif
/* Function type for a plugin callback routine.
-iplugindir program argument to cc1. */
extern const char* default_plugin_dir_name (void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GCC_PLUGIN_H */