C++ 20 modules

Gerald Pfeifer gerald@pfeifer.com
Mon Dec 21 17:38:46 GMT 2020


O Mon, 21 Dec 2020, Nathan Sidwell wrote:
>> /scratch/tmp/gerald/GCC-HEAD/gcc/cp/mapper-client.cc:31:
>> In file included from
>> /scratch/tmp/gerald/GCC-HEAD/gcc/cp/mapper-client.h:26:
>> In file included from
>> /scratch/tmp/gerald/GCC-HEAD/gcc/../libcody/cody.hh:24:
>> In file included from /usr/include/c++/v1/memory:653:
>> /usr/include/c++/v1/typeinfo:346:5: error: no member named 'fancy_abort'
>> in namespace 'std::__1'; did you mean simply 'fancy_abort'?
>>      _VSTD::abort();
>>      ^~~~~~~
>> /usr/include/c++/v1/__config:782:15: note: expanded from macro '_VSTD'
>> #define _VSTD std::_LIBCPP_ABI_NAMESPACE
> Care to try this?

Thank you, Nathan!

This made a difference, though it appears a similar change is needed 
for gcc/cp/module.cc as well, which also includes mapper-client.h. 

Please find an extended patch attached.

(Bootstrap is still running, but has progressed farther than 
without your patch or your original patch alone, and already 
is in libstdc++ now.)

Gerald
-------------- next part --------------
diff --git a/gcc/cp/mapper-client.cc b/gcc/cp/mapper-client.cc
index 2ad770b3d78..40e9283a794 100644
--- a/gcc/cp/mapper-client.cc
+++ b/gcc/cp/mapper-client.cc
@@ -24,6 +24,8 @@ along with GCC; see the file COPYING3.  If not see
 // will include it later under the above check
 #include <sys/socket.h>
 #endif
+#define INCLUDE_STRING
+#define INCLUDE_VECTOR
 #include "system.h"
 
 #include "line-map.h"
diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc
index 53c482441b4..e348757d99c 100644
--- a/gcc/cp/mapper-resolver.cc
+++ b/gcc/cp/mapper-resolver.cc
@@ -21,6 +21,8 @@ along with GCC; see the file COPYING3.  If not see
 /* Forward to the resolver in c++tools.  */
 
 #include "config.h"
+#define INCLUDE_STRING
+#define INCLUDE_VECTOR
 #define INCLUDE_ALGORITHM
 #include "system.h"
 
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index fc918d296a2..7db312d3c44 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -207,6 +207,8 @@ Classes used:
 
 #define _DEFAULT_SOURCE 1 /* To get TZ field of struct tm, if available.  */
 #include "config.h"
+#define INCLUDE_STRING
+#define INCLUDE_VECTOR
 #include "system.h"
 #include "coretypes.h"
 #include "cp-tree.h"


More information about the Gcc-patches mailing list