libstdc++: [_Hashtable] Fix some implementation inconsistencies
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / Wattributes2.C
blobf37b1f010ca9d87c59071ffeefc8d799a063280a
1 // PR c++/60373
2 // { dg-do compile { target c++11 } }
3 // { dg-require-visibility "" }
5 #pragma GCC visibility push(default)
6 namespace std
8   using size_t = decltype(sizeof(0));
9   struct nothrow_t { };
12 void* operator new(std::size_t)
13   __attribute__((__externally_visible__));
14 void* operator new[](std::size_t)
15   __attribute__((__externally_visible__));
16 void* operator new(std::size_t, const std::nothrow_t&) noexcept
17   __attribute__((__externally_visible__, __malloc__));
18 void* operator new[](std::size_t, const std::nothrow_t&) noexcept
19   __attribute__((__externally_visible__, __malloc__));
20 void operator delete(void*) noexcept
21   __attribute__((__externally_visible__));
22 void operator delete[](void*) noexcept
23   __attribute__((__externally_visible__));
24 void operator delete(void*, const std::nothrow_t&) noexcept
25   __attribute__((__externally_visible__));
26 void operator delete[](void*, const std::nothrow_t&) noexcept
27   __attribute__((__externally_visible__));
28 #pragma GCC visibility pop
30 __attribute__((visibility("hidden")))void*operator new(std::size_t); // { dg-warning "visibility attribute ignored" }
32 // { dg-message "previous declaration" "" { target *-*-* } 12 }