mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
802561b2cc
commit
b367de5dc3
|
|
@ -1,3 +1,11 @@
|
||||||
|
2017-10-23 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
2017-10-23 Sebastian Perta <sebastian.perta@renesas.com>
|
2017-10-23 Sebastian Perta <sebastian.perta@renesas.com>
|
||||||
|
|
||||||
* config/rl78/rl78.md: New define_expand "subdi3".
|
* config/rl78/rl78.md: New define_expand "subdi3".
|
||||||
|
|
|
||||||
10
gcc/system.h
10
gcc/system.h
|
|
@ -720,6 +720,16 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||||
#define __builtin_expect(a, b) (a)
|
#define __builtin_expect(a, b) (a)
|
||||||
#endif
|
#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
|
/* Redefine abort to report an internal error w/o coredump, and
|
||||||
reporting the location of the error in the source file. */
|
reporting the location of the error in the source file. */
|
||||||
extern void fancy_abort (const char *, int, const char *)
|
extern void fancy_abort (const char *, int, const char *)
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ along with GCC; see the file COPYING3. If not see
|
||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#define INCLUDE_UNIQUE_PTR
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "coretypes.h"
|
#include "coretypes.h"
|
||||||
#include "unique-ptr.h"
|
|
||||||
#include "selftest.h"
|
#include "selftest.h"
|
||||||
|
|
||||||
#if CHECKING_P
|
#if CHECKING_P
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-10-23 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
* unique-ptr.h: Make include of <memory> conditional on C++11 or
|
||||||
|
later.
|
||||||
|
|
||||||
2017-10-16 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
2017-10-16 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
||||||
David Malcolm <dmalcolm@redhat.com>
|
David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,9 @@
|
||||||
#ifndef GNU_UNIQUE_PTR_H
|
#ifndef GNU_UNIQUE_PTR_H
|
||||||
#define GNU_UNIQUE_PTR_H 1
|
#define GNU_UNIQUE_PTR_H 1
|
||||||
|
|
||||||
#include <memory>
|
#if __cplusplus >= 201103
|
||||||
|
# include <memory>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace gnu
|
namespace gnu
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue