diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-10-23 20:25:58 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-10-23 20:25:58 +0000 |
commit | b367de5dc31371f88b59e165aa6b8be4ed9ee070 (patch) | |
tree | 8517bc2e3717c7759be570e3b44b39e5d294aeaa /gcc/system.h | |
parent | 802561b2cc6cd4e4f59815f7de199026de62a650 (diff) | |
download | gcc-b367de5dc31371f88b59e165aa6b8be4ed9ee070.zip gcc-b367de5dc31371f88b59e165aa6b8be4ed9ee070.tar.gz gcc-b367de5dc31371f88b59e165aa6b8be4ed9ee070.tar.bz2 |
Add INCLUDE_UNIQUE_PTR and use it (PR bootstrap/82610)
gcc/ChangeLog:
PR bootstrap/82610
* system.h: Conditionally include "unique-ptr.h" if
INCLUDE_UNIQUE_PTR is defined.
* unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
of defining INCLUDE_UNIQUE_PTR before including "system.h".
include/ChangeLog:
* unique-ptr.h: Make include of <memory> conditional on C++11 or
later.
From-SVN: r254024
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index 01bc134..cd46454 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -720,6 +720,16 @@ extern int vsnprintf (char *, size_t, const char *, va_list); #define __builtin_expect(a, b) (a) #endif +/* Some of the headers included by <memory> can use "abort" within a + namespace, e.g. "_VSTD::abort();", which fails after we use the + preprocessor to redefine "abort" as "fancy_abort" below. + Given that unique-ptr.h can use "free", we need to do this after "free" + is declared but before "abort" is overridden. */ + +#ifdef INCLUDE_UNIQUE_PTR +# include "unique-ptr.h" +#endif + /* Redefine abort to report an internal error w/o coredump, and reporting the location of the error in the source file. */ extern void fancy_abort (const char *, int, const char *) |