Hi,
[email protected] (Ludovic Courtès) skribis:
> Andrew Pinski <[email protected]> skribis:
>
>> 2012/3/9 Ludovic Courtès <[email protected]>:
>>
>>> I believe this is not intentional, right?
>>
>> No, this is intentional. We bootstrap the compiler using the C++
>> front-end now. We build stage1 with the C compiler and then build
>> stages 2 and 3 with the C++ compiler.
>
> OK.
>
> However, this means that plug-ins must now be built with g++, except
> when GCC was configured with --disable-build-poststage1-with-cxx. This
> seems difficult to deal with, for plug-in writers.
I’m really concerned about the maintenance difficulties that this change
entails for external plug-ins.
Would something along these lines be acceptable at this stage?
diff --git a/gcc/tree.h b/gcc/tree.h
index 0a2d619..ce7acf2 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -22,6 +22,10 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_H
#define GCC_TREE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "hashtab.h"
#include "machmode.h"
#include "input.h"
@@ -6102,4 +6106,8 @@ builtin_decl_implicit_p (enum built_in_function fncode)
&& builtin_info.implicit_p[uns_fncode]);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GCC_TREE_H */
(The same should be applied to all the headers listed in
‘PLUGIN_HEADERS’, at least.)
Or was it already considered and rejected?
Thanks,
Ludo’.