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
* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
bad_array_new2.C
blob
bcc9b9ad5f7be54690c0575d2902a80c766da0d1
1
// Test for throwing bad_array_new_length on invalid array length
2
// { dg-do run { target c++11 } }
3
4
#include <new>
5
6
void * f(int i)
7
{
8
return new int[i]{1,2,3,4};
9
}
10
11
int main()
12
{
13
f(4); // OK
14
try
15
{
16
f(3);
17
}
18
catch (std::bad_array_new_length) { return 0; }
19
__builtin_abort ();
20
}