repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[RISC-V] add implied extension repeatly until stable
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
compat
/
eh
/
new1_y.C
blob
1dd373dd382c2e612fc55041de5996b2c760692a
1
#include <new>
2
#include <cstddef>
3
4
extern int ret;
5
6
void *ptr;
7
void * operator new[] (std::size_t s)
8
#if __cplusplus < 201103L
9
throw (std::bad_alloc)
10
#endif
11
{
12
ptr = operator new (s);
13
return ptr;
14
}
15
16
void operator delete[] (void *p) throw ()
17
{
18
if (p == ptr)
19
ret = 0;
20
operator delete (p);
21
}
22