This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Include <memory> from system.h (PR bootstrap/82610)
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Gerald Pfeifer <gerald at pfeifer dot com>, Pedro Alves <palves at redhat dot com>, gcc-patches at gcc dot gnu dot org, Trevor Saunders <tbsaunde+gcc at tbsaunde dot org>, Jonathan Wakely <jwakely at redhat dot com>, David Malcolm <dmalcolm at redhat dot com>
- Date: Mon, 23 Oct 2017 08:58:18 -0400
- Subject: [PATCH] Include <memory> from system.h (PR bootstrap/82610)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dmalcolm at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 37B5F8048C
On Sun, 2017-10-22 at 09:28 +0200, Gerald Pfeifer wrote:
> On Thu, 19 Oct 2017, David Malcolm wrote:
> > > In file included from /scratch/tmp/gerald/gcc-HEAD/gcc/unique-
> > > ptr-tests.cc:23:
> > > In file included from /scratch/tmp/gerald/gcc-
> > > HEAD/gcc/../include/unique-ptr.h:77:
> > > In file included from /usr/include/c++/v1/memory:629:
> > > /usr/include/c++/v1/typeinfo:199:2: error: no member named
> > > 'fancy_abort' in namespace 'std::__1'; did you mean simply
> > > 'fancy_abort'?
> > > _VSTD::abort();
> > > ^~~~~~~
> > > /usr/include/c++/v1/__config:390:15: note: expanded from macro
> > > '_VSTD'
> > > #define _VSTD std::_LIBCPP_NAMESPACE
> >
> > There seem to have been similar problems on OS X:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82610
>
> Yes, I believe it's the same actually (unearthed by clang as system
> compiler).
>
> > The proposed fix there is to include <memory> in system.h, which
> > presumably would fix this also.
>
> That appears to work around the bootstrap failure on my tester as
> well.
>
> How can we go about fixing this in the tree?
>
> Gerald
Here's the patch by fxcoudert from the PR (plus a ChangeLog entry)
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu;
reported by fxcoudert as fixing the issue on darwin and by
Gerald as fixing the issue on "newer versions of FreeBSD that use
clang 4.0 as system compiler".
OK for trunk?
Sorry again about the breakage.
gcc/ChangeLog:
PR bootstrap/82610
* system.h [__cplusplus]: Include <memory>.
---
gcc/system.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/system.h b/gcc/system.h
index f0664e9..d6e1637 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -233,6 +233,7 @@ extern int errno;
# include <vector>
#endif
# include <cstring>
+# include <memory>
# include <new>
# include <utility>
#endif
--
1.8.5.3