]>
Commit | Line | Data |
---|---|---|
0dd50fc6 JW |
1 | // PR c++/60373 |
2 | // { dg-do compile { target c++11 } } | |
3 | // { dg-require-visibility "" } | |
4 | ||
5 | #pragma GCC visibility push(default) | |
6 | namespace std | |
7 | { | |
8 | using size_t = decltype(sizeof(0)); | |
9 | struct nothrow_t { }; | |
10 | } | |
11 | ||
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 | |
29 | ||
30 | __attribute__((visibility("hidden")))void*operator new(std::size_t); // { dg-warning "visibility attribute ignored" } | |
31 | ||
32 | // { dg-message "previous declaration" "" { target *-*-* } 12 } |