annotate gcc/testsuite/g++.dg/overload/VLA.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 //Origin: kengole@us.ibm.com
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 //PR c++/2478
kono
parents:
diff changeset
4 // G++ was rejecting this as it could not convert `int (*)[]' to `int (*)[0]'.
kono
parents:
diff changeset
5 // Using the C99 VLA style arrays in a struct.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 // { dg-do compile }
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 struct S {
kono
parents:
diff changeset
10 int (*p)[];
kono
parents:
diff changeset
11 } B;
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 void foo() {
kono
parents:
diff changeset
14 int (*p)[];
kono
parents:
diff changeset
15 B.p=p; // { dg-bogus "cannot convert" }
kono
parents:
diff changeset
16 }