Comma expressions are not allowed for the size in an array declarator. Add a testcase for this. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/abstract-array-declarator.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 validation/abstract-array-declarator.c diff --git a/validation/abstract-array-declarator.c b/validation/abstract-array-declarator.c new file mode 100644 index 000000000000..f230e5862ae9 --- /dev/null +++ b/validation/abstract-array-declarator.c @@ -0,0 +1,12 @@ +void f77(int a[1, 2]); +void c99(int a[(1, 2)]); + +/* + * check-name: abstract-array-declarator + * check-known-to-fail + * + * check-error-start +abstract-array-declarator.c:1:17: error: Expected ] in abstract_array_declarator +abstract-array-declarator.c:1:17: error: got , + * check-error-end + */ -- 2.27.0