aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2018-08-24 20:24:42 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2018-08-24 18:24:42 +0000
commit6eac0600c4305074b28c96d17f75ed0de5016f5b (patch)
tree4fda07d6f3c8c85666c8aeb2ef5d5c964f86a8e4 /libstdc++-v3
parent1d29bb0408506480e13afeca2ec6b8611e6a0ce7 (diff)
downloadgcc-6eac0600c4305074b28c96d17f75ed0de5016f5b.zip
gcc-6eac0600c4305074b28c96d17f75ed0de5016f5b.tar.gz
gcc-6eac0600c4305074b28c96d17f75ed0de5016f5b.tar.bz2
new(nothrow) is malloc-like
2018-08-24 Marc Glisse <marc.glisse@inria.fr> PR libstdc++/86822 * libsupc++/new (operator new(size_t, nothrow_t), operator new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t), operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute. From-SVN: r263841
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/libsupc++/new8
2 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 48a6366..9f9be6c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-24 Marc Glisse <marc.glisse@inria.fr>
+
+ PR libstdc++/86822
+ * libsupc++/new (operator new(size_t, nothrow_t), operator
+ new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t),
+ operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute.
+
2018-08-24 Jonathan Wakely <jwakely@redhat.com>
* include/debug/deque (std::__debug::deque): Declare.
diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new
index 82d884d..19bc183 100644
--- a/libstdc++-v3/libsupc++/new
+++ b/libstdc++-v3/libsupc++/new
@@ -137,9 +137,9 @@ void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
#endif
void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
- __attribute__((__externally_visible__));
+ __attribute__((__externally_visible__, __malloc__));
void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
- __attribute__((__externally_visible__));
+ __attribute__((__externally_visible__, __malloc__));
void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
@@ -148,7 +148,7 @@ void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
void* operator new(std::size_t, std::align_val_t)
__attribute__((__externally_visible__));
void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
- _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
+ _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__));
void operator delete(void*, std::align_val_t)
_GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
void operator delete(void*, std::align_val_t, const std::nothrow_t&)
@@ -156,7 +156,7 @@ void operator delete(void*, std::align_val_t, const std::nothrow_t&)
void* operator new[](std::size_t, std::align_val_t)
__attribute__((__externally_visible__));
void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
- _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
+ _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__));
void operator delete[](void*, std::align_val_t)
_GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__));
void operator delete[](void*, std::align_val_t, const std::nothrow_t&)