diff options
author | Chih-Hung Hsieh | 2014-08-25 14:08:19 -0500 |
---|---|---|
committer | Chih-hung Hsieh | 2014-08-25 16:16:14 -0500 |
commit | ae558d6b4bcee740f7e61434982eb5f2c999fb97 (patch) | |
tree | 443b26ce7513f9ee430e4f639c5436fd11dbc9a5 /libstdc++ | |
parent | a4a8c4feb8cf3cebf8aceace70e699e128095b5c (diff) | |
download | platform-bionic-ae558d6b4bcee740f7e61434982eb5f2c999fb97.tar.gz platform-bionic-ae558d6b4bcee740f7e61434982eb5f2c999fb97.tar.xz platform-bionic-ae558d6b4bcee740f7e61434982eb5f2c999fb97.zip |
Add standard throw() spec to delete operators.
Without these specs, clang will reports mismatch between standard definitions and these declarations/definitions. These specs are ignored when compiled with -fno-exceptions.
BUG: 17136236
Change-Id: I386c712a61dc4fc74dfde45f9ec2d3d037f2e9f1
Diffstat (limited to 'libstdc++')
-rw-r--r-- | libstdc++/include/new | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++/include/new b/libstdc++/include/new index 0253e8b6..c5a43de4 100644 --- a/libstdc++/include/new +++ b/libstdc++/include/new | |||
@@ -13,19 +13,19 @@ namespace std { | |||
13 | 13 | ||
14 | void* operator new(std::size_t); | 14 | void* operator new(std::size_t); |
15 | void* operator new[](std::size_t); | 15 | void* operator new[](std::size_t); |
16 | void operator delete(void*); | 16 | void operator delete(void*) throw(); |
17 | void operator delete[](void*); | 17 | void operator delete[](void*) throw(); |
18 | void* operator new(std::size_t, const std::nothrow_t&); | 18 | void* operator new(std::size_t, const std::nothrow_t&); |
19 | void* operator new[](std::size_t, const std::nothrow_t&); | 19 | void* operator new[](std::size_t, const std::nothrow_t&); |
20 | void operator delete(void*, const std::nothrow_t&); | 20 | void operator delete(void*, const std::nothrow_t&) throw(); |
21 | void operator delete[](void*, const std::nothrow_t&); | 21 | void operator delete[](void*, const std::nothrow_t&) throw(); |
22 | 22 | ||
23 | inline void* operator new(std::size_t, void* p) { return p; } | 23 | inline void* operator new(std::size_t, void* p) { return p; } |
24 | inline void* operator new[](std::size_t, void* p) { return p; } | 24 | inline void* operator new[](std::size_t, void* p) { return p; } |
25 | 25 | ||
26 | // these next two are not really required, since exceptions are off | 26 | // these next two are not really required, since exceptions are off |
27 | inline void operator delete(void*, void*) { } | 27 | inline void operator delete(void*, void*) throw() { } |
28 | inline void operator delete[](void*, void*) { } | 28 | inline void operator delete[](void*, void*) throw() { } |
29 | 29 | ||
30 | } // extern C++ | 30 | } // extern C++ |
31 | 31 | ||