]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/test12558.d
ipa-param-manip: Be careful about a reallocating hash_map
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test12558.d
CommitLineData
b4c522fa
IB
1// REQUIRED_ARGS:
2/*
3TEST_OUTPUT:
4---
5compilable/test12558.d(16): Deprecation: catch statement without an exception specification is deprecated; use catch(Throwable) for old behavior
6compilable/test12558.d(21): Deprecation: catch statement without an exception specification is deprecated; use catch(Throwable) for old behavior
7---
8*/
9
10void main()
11{
12 auto handler = () { };
13
14 try {
15 assert(0);
16 } catch
17 handler();
18
19 try {
20 assert(0);
21 } catch {
22 handler();
23 }
24
25 // ensure diagnostics are not emitted for verioned-out blocks
26 version (none)
27 {
28 try {
29 assert(0);
30 } catch // should not emit diagnostics
31 handler();
32
33 try {
34 assert(0);
35 } catch { // ditto
36 handler();
37 }
38 }
39}