c++: Fix build with clang
authorGerald Pfeifer <gerald@pfeifer.com>
Tue, 22 Dec 2020 12:37:56 +0000 (13:37 +0100)
committerGerald Pfeifer <gerald@pfeifer.com>
Tue, 22 Dec 2020 12:37:56 +0000 (13:37 +0100)
After the addition of libcody building with clang 10.0.1 would fail
as follows:

  In file included from .../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();
    ^~~~~~~

mapper-client.cc and mapper-resolver.cc have addressed this already
by getting <string> and <vector> included; do the same for module.cc.

gcc/cp:
2020-12-22  Gerald Pfeifer  <gerald@pfeifer.com>

* module.cc (INCLUDE_STRING): Define.
(INCLUDE_VECTOR): Ditto.

gcc/cp/module.cc

index 7e38293545fbf6b974b2ec77226cd298d4a55a5b..ed3dbe244a369bad3af67485e7409b9192e5c8f0 100644 (file)
@@ -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"