This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.7.0RC: Mangled names in cc1

Hi, (Ludovic CourtÃs) skribis:

> Andrew Pinski <> skribis:
>> 2012/3/9 Ludovic CourtÃs <>:
>>> 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" {
 #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  /* 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]