[cfe-commits] [libcxx] r135125 - /libcxx/trunk/src/new.cpp
Howard Hinnant
hhinnant at apple.com
Wed Jul 13 18:34:46 PDT 2011
Author: hhinnant
Date: Wed Jul 13 20:34:46 2011
New Revision: 135125
URL: http://llvm.org/viewvc/llvm-project?rev=135125&view=rev
Log:
http://llvm.org/bugs/show_bug.cgi?id=10353
Modified:
libcxx/trunk/src/new.cpp
Modified: libcxx/trunk/src/new.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=135125&r1=135124&r2=135125&view=diff
==============================================================================
--- libcxx/trunk/src/new.cpp (original)
+++ libcxx/trunk/src/new.cpp Wed Jul 13 20:34:46 2011
@@ -28,6 +28,9 @@
__attribute__((__weak__, __visibility__("default")))
void *
operator new(std::size_t size)
+#if !__has_feature(cxx_noexcept)
+ throw(std::bad_alloc)
+#endif
{
if (size == 0)
size = 1;
@@ -71,6 +74,9 @@
__attribute__((__weak__, __visibility__("default")))
void*
operator new[](size_t size)
+#if !__has_feature(cxx_noexcept)
+ throw(std::bad_alloc)
+#endif
{
return ::operator new(size);
}
More information about the cfe-commits
mailing list