Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/vla4.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
rev | line source |
---|---|
111 | 1 // PR c++/29318 |
2 // { dg-options "" } | |
3 | |
4 #include <typeinfo> | |
5 | |
6 void f(int i) { | |
7 try { | |
8 int a[i]; | |
9 throw &a; // { dg-error "int \\(\\*\\)\\\[i\\\]" } | |
10 } catch (int (*)[i]) { // { dg-error "variable size" } | |
11 } | |
12 } | |
13 | |
14 int main() | |
15 { | |
16 int i = 5; | |
17 int va[i]; | |
18 const std::type_info& info(typeid(&va)); // { dg-error "variable size" } | |
19 | |
20 return 0; | |
21 } |