Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: test missing support f...
details: https://anonhg.NetBSD.org/src/rev/f0713865a21d
branches: trunk
changeset: 1023552:f0713865a21d
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Sep 14 19:02:15 2021 +0000
description:
tests/lint: test missing support for int[*][3]
diffstat:
tests/usr.bin/xlint/lint1/decl_direct_abstract.c | 19 ++++++++++++++++++-
tests/usr.bin/xlint/lint1/decl_direct_abstract.exp | 4 ++++
2 files changed, 22 insertions(+), 1 deletions(-)
diffs (41 lines):
diff -r 10fc5620ee7c -r f0713865a21d tests/usr.bin/xlint/lint1/decl_direct_abstract.c
--- a/tests/usr.bin/xlint/lint1/decl_direct_abstract.c Tue Sep 14 17:10:46 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl_direct_abstract.c Tue Sep 14 19:02:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl_direct_abstract.c,v 1.1 2021/09/13 22:09:06 rillig Exp $ */
+/* $NetBSD: decl_direct_abstract.c,v 1.2 2021/09/14 19:02:15 rillig Exp $ */
# 3 "decl_direct_abstract.c"
/*
@@ -61,3 +61,20 @@
double type_of_c99_6_7_6_example_g = c99_6_7_6_example_g;
/* expect+1: 'pointer to function(pointer to const pointer to function(unsigned int, ...) returning int) returning void' */
double type_of_c99_6_7_6_example_h = c99_6_7_6_example_h;
+
+void int_array(int[]);
+void int_array_3(int[3]);
+/* TODO: support this in direct_abstract_declarator */
+/* expect+1: syntax error ']' [249] */
+void int_array_ast(int[*]);
+/* expect+1: error: null dimension [17] */
+void int_array_7_array(int[7][]);
+void int_array_7_array_3(int[7][3]);
+/* expect+1: error: null dimension [17] */
+void int_array_7_array_ast(int[7][*]);
+
+void int_array_array(int[][7]);
+void int_array_3_array(int[3][7]);
+/* TODO: support this in direct_abstract_declarator */
+/* expect+1: syntax error ']' [249] */
+void int_array_ast_array(int[*][7]);
diff -r 10fc5620ee7c -r f0713865a21d tests/usr.bin/xlint/lint1/decl_direct_abstract.exp
--- a/tests/usr.bin/xlint/lint1/decl_direct_abstract.exp Tue Sep 14 17:10:46 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl_direct_abstract.exp Tue Sep 14 19:02:15 2021 +0000
@@ -8,3 +8,7 @@
decl_direct_abstract.c(59): error: cannot initialize 'double' from 'pointer to function(void) returning void' [185]
decl_direct_abstract.c(61): error: cannot initialize 'double' from 'pointer to function(pointer to function(void) returning int) returning void' [185]
decl_direct_abstract.c(63): error: cannot initialize 'double' from 'pointer to function(pointer to const pointer to function(unsigned int, ...) returning int) returning void' [185]
+decl_direct_abstract.c(69): error: syntax error ']' [249]
+decl_direct_abstract.c(71): error: null dimension [17]
+decl_direct_abstract.c(74): error: null dimension [17]
+decl_direct_abstract.c(80): error: syntax error ']' [249]
Home |
Main Index |
Thread Index |
Old Index