Index: tree.h
===================================================================
--- tree.h	(revision 160389)
+++ tree.h	(working copy)
@@ -871,6 +871,10 @@ enum tree_node_structure_enum {
 (*({__typeof (NODE) const __t = (NODE);					\
     &__t->common.type; }))
 
+/* Make accessor macros usable in plugins compiled as C.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void tree_contains_struct_check_failed (const_tree,
 					       const enum tree_node_structure_enum,
 					       const char *, int, const char *)
@@ -910,6 +914,9 @@ extern void omp_clause_range_check_faile
 			       const char *, enum omp_clause_code,
 			       enum omp_clause_code)
     ATTRIBUTE_NORETURN;
+#ifdef __cplusplus
+}
+#endif
 
 #else /* not ENABLE_TREE_CHECKING, or not gcc */
 
Index: diagnostic-core.h
===================================================================
--- diagnostic-core.h	(revision 160389)
+++ diagnostic-core.h	(working copy)
@@ -55,7 +55,14 @@ extern const char *trim_filename (const 
 extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2)
      ATTRIBUTE_NORETURN;
 /* Pass one of the OPT_W* from options.h as the first parameter.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* C linkage so that plugins can use it more easyly.  */
 extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+#ifdef __cplusplus
+}
+#endif
 extern bool warning_at (location_t, int, const char *, ...)
     ATTRIBUTE_GCC_DIAG(3,4);
 extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
Index: system.h
===================================================================
--- system.h	(revision 160389)
+++ system.h	(working copy)
@@ -586,7 +586,14 @@ extern int vsnprintf(char *, size_t, con
 
 /* Redefine abort to report an internal error w/o coredump, and
    reporting the location of the error in the source file.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* C linkage so that it can be used more easily by plugins.  */
 extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
+#ifdef __cplusplus
+}
+#endif
 #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
 
 /* Use gcc_assert(EXPR) to test invariants.  */
