* include/bits/atomic_base.h: Don't include <cstddef>, use nullptr.
* include/std/atomic: Likewise.
* include/tr2/dynamic_bitset: Likewise.
* libsupc++/vec.cc (compute_size(std::size_t, std::size_t,
std::size_t)): Fix for -fno-exceptions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193232
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-11-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/atomic_base.h: Don't include <cstddef>, use nullptr.
+ * include/std/atomic: Likewise.
+ * include/tr2/dynamic_bitset: Likewise.
+
+ * libsupc++/vec.cc (compute_size(std::size_t, std::size_t,
+ std::size_t)): Fix for -fno-exceptions.
+
2012-11-06 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/profile/map.h (map::emplace_hint): Add missing return.
// -*- C++ -*- header.
-// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2008-2012 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
#include <bits/c++config.h>
#include <stdbool.h>
#include <stdint.h>
-#include <cstddef>
#include <bits/atomic_lockfree_defines.h>
namespace std _GLIBCXX_VISIBILITY(default)
bool
is_lock_free() const noexcept
- { return __atomic_is_lock_free(sizeof(_M_i), NULL); }
+ { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
bool
is_lock_free() const volatile noexcept
- { return __atomic_is_lock_free(sizeof(_M_i), NULL); }
+ { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
void
store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept
bool
is_lock_free() const noexcept
- { return __atomic_is_lock_free(_M_type_size(1), NULL); }
+ { return __atomic_is_lock_free(_M_type_size(1), nullptr); }
bool
is_lock_free() const volatile noexcept
- { return __atomic_is_lock_free(_M_type_size(1), NULL); }
+ { return __atomic_is_lock_free(_M_type_size(1), nullptr); }
void
store(__pointer_type __p,
// -*- C++ -*- header.
-// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2008-2012 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
bool
is_lock_free() const noexcept
- { return __atomic_is_lock_free(sizeof(_M_i), NULL); }
+ { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
bool
is_lock_free() const volatile noexcept
- { return __atomic_is_lock_free(sizeof(_M_i), NULL); }
+ { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
void
store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept
#include <limits>
#include <vector>
-#include <cstddef> // For size_t
#include <string>
#include <memory> // For std::allocator
#include <bits/functexcept.h> // For invalid_argument, out_of_range,
#include <cxxabi.h>
#include <new>
#include <exception>
+#include <cstdlib>
#include <bits/exception_defines.h>
#include "unwind-cxx.h"
std::size_t padding_size)
{
if (element_size && element_count > std::size_t(-1) / element_size)
+#ifdef __EXCEPTIONS
throw std::bad_alloc();
+#else
+ std::abort();
+#endif
std::size_t size = element_count * element_size;
if (size + padding_size < size)
+#ifdef __EXCEPTIONS
throw std::bad_alloc();
+#else
+ std::abort();
+#endif
return size + padding_size;
}
}