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
tree-flow-inline.h (get_addr_base_and_unit_offset_1): Handle BIT_FIELD_REF.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
p755.C
blob
ee6198dfb6cfe9c56f6ce59d2f4c2e6d9666158c
1
// { dg-do run }
2
// It checks to see if you can define your own global new operator.
3
// prms-id: 755
4
5
#include <new>
6
7
extern "C" void _exit(int);
8
9
void* operator new(std::size_t sz)
10
#if __cplusplus <= 199711L
11
throw (std::bad_alloc)
12
#endif
13
{
14
void* p = 0;
15
_exit(0);
16
return p;
17
}
18
19
int main () {
20
int* i = new int;
21
delete i;
22
return 1;
23
}