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: parse error for unused...
details: https://anonhg.NetBSD.org/src/rev/3e19c4af5164
branches: trunk
changeset: 984540:3e19c4af5164
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 11 12:12:30 2021 +0000
description:
tests/lint: parse error for unused variable (since 2021-07-10)
Since cgram.y 1.294 from 2021-07-10.
diffstat:
tests/usr.bin/xlint/lint1/decl.c | 14 +++++++++++++-
tests/usr.bin/xlint/lint1/decl.exp | 3 +++
2 files changed, 16 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r cb9f0264dbc5 -r 3e19c4af5164 tests/usr.bin/xlint/lint1/decl.c
--- a/tests/usr.bin/xlint/lint1/decl.c Sun Jul 11 12:07:14 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl.c Sun Jul 11 12:12:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.2 2021/07/10 19:30:19 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.3 2021/07/11 12:12:30 rillig Exp $ */
# 3 "decl.c"
/*
@@ -86,3 +86,15 @@
return x == B;
}
+
+void
+unused_local_variable(void)
+{
+ /*FIXME*//* expect+1: syntax error '_Bool' [249] */
+ __attribute__((unused)) _Bool unused_var;
+
+ __attribute__((unused))
+ /*FIXME*//* expect+2: syntax error '__attribute__' [249] */
+ /*FIXME*//* expect+1: cannot recover from previous errors [224] */
+ __attribute__((unused)) _Bool unused_twice;
+}
diff -r cb9f0264dbc5 -r 3e19c4af5164 tests/usr.bin/xlint/lint1/decl.exp
--- a/tests/usr.bin/xlint/lint1/decl.exp Sun Jul 11 12:07:14 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl.exp Sun Jul 11 12:12:30 2021 +0000
@@ -9,3 +9,6 @@
decl.c(70): warning: illegal combination of pointer (pointer to double) and integer (char), arg #1 [154]
decl.c(72): warning: converting 'pointer to pointer to char' to incompatible 'pointer to double' for argument 1 [153]
decl.c(80): error: syntax error '"' [249]
+decl.c(94): error: syntax error '_Bool' [249]
+decl.c(99): error: syntax error '__attribute__' [249]
+decl.c(99): error: cannot recover from previous errors [224]
Home |
Main Index |
Thread Index |
Old Index