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: document unreachable '...
details: https://anonhg.NetBSD.org/src/rev/60a442595dac
branches: trunk
changeset: 984833:60a442595dac
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 25 09:47:08 2021 +0000
description:
tests/lint: document unreachable 'abstract_declarator: T_TYPEOF'
diffstat:
tests/usr.bin/xlint/lint1/parse_type_name.c | 12 ++++++++++--
tests/usr.bin/xlint/lint1/parse_type_name.exp | 11 ++++++-----
2 files changed, 16 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r cbde50acbebe -r 60a442595dac tests/usr.bin/xlint/lint1/parse_type_name.c
--- a/tests/usr.bin/xlint/lint1/parse_type_name.c Sun Jul 25 09:29:20 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.c Sun Jul 25 09:47:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse_type_name.c,v 1.1 2021/07/25 08:42:28 rillig Exp $ */
+/* $NetBSD: parse_type_name.c,v 1.2 2021/07/25 09:47:08 rillig Exp $ */
# 3 "parse_type_name.c"
/*
@@ -48,7 +48,15 @@
sink(sizeof(int **[3]));
/* cover 'T_TYPEOF cast_expression' */
- /* TODO */
+ sink(sizeof(typeof(12345)));
+ /* expect+1: error: illegal type combination [4] */
+ sink(sizeof(typeof(12345) typeof(12345)));
+ /*
+ * TODO: Remove this grammar rule. No matter how often typeof occurs
+ * in the expression, it is already covered by abstract_declaration >
+ * begin_type_specifier_qualifier_list > begin_type_typespec >
+ * notype_type_specifier > T_TYPEOF. It can never reduce this rule.
+ */
}
void
diff -r cbde50acbebe -r 60a442595dac tests/usr.bin/xlint/lint1/parse_type_name.exp
--- a/tests/usr.bin/xlint/lint1/parse_type_name.exp Sun Jul 25 09:29:20 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/parse_type_name.exp Sun Jul 25 09:47:08 2021 +0000
@@ -1,6 +1,7 @@
-parse_type_name.c(71): error: null dimension [17]
-parse_type_name.c(75): error: null dimension [17]
-parse_type_name.c(141): error: syntax error 'goto' [249]
-parse_type_name.c(143): error: syntax error 'goto' [249]
+parse_type_name.c(53): error: illegal type combination [4]
+parse_type_name.c(79): error: null dimension [17]
+parse_type_name.c(83): error: null dimension [17]
parse_type_name.c(149): error: syntax error 'goto' [249]
-parse_type_name.c(163): warning: ANSI C requires formal parameter before '...' [84]
+parse_type_name.c(151): error: syntax error 'goto' [249]
+parse_type_name.c(157): error: syntax error 'goto' [249]
+parse_type_name.c(171): warning: ANSI C requires formal parameter before '...' [84]
Home |
Main Index |
Thread Index |
Old Index