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 lexer for the GCC...



details:   https://anonhg.NetBSD.org/src/rev/261f630edf4f
branches:  trunk
changeset: 1022512:261f630edf4f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 23 15:21:47 2021 +0000

description:
tests/lint: test lexer for the GCC extension __thread

diffstat:

 tests/usr.bin/xlint/lint1/decl.c   |  8 +++++++-
 tests/usr.bin/xlint/lint1/decl.exp |  2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 7928cb22eaf8 -r 261f630edf4f tests/usr.bin/xlint/lint1/decl.c
--- a/tests/usr.bin/xlint/lint1/decl.c  Fri Jul 23 15:14:49 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl.c  Fri Jul 23 15:21:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: decl.c,v 1.9 2021/07/15 23:07:05 rillig Exp $  */
+/*     $NetBSD: decl.c,v 1.10 2021/07/23 15:21:47 rillig Exp $ */
 # 3 "decl.c"
 
 /*
@@ -165,3 +165,9 @@
     sizeof(const typeof(signed_long)) +
     sizeof(const typeof(unsigned_long)) +
     sizeof(const typeof(unnamed_struct));
+
+/* expect+1: syntax error 'int' [249] */
+thread int thread_int;
+__thread int thread_int;
+/* expect+1: syntax error 'int' [249] */
+__thread__ int thread_int;
diff -r 7928cb22eaf8 -r 261f630edf4f tests/usr.bin/xlint/lint1/decl.exp
--- a/tests/usr.bin/xlint/lint1/decl.exp        Fri Jul 23 15:14:49 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/decl.exp        Fri Jul 23 15:21:47 2021 +0000
@@ -9,4 +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(170): error: syntax error 'int' [249]
+decl.c(173): error: syntax error 'int' [249]
 decl.c(114): warning: static function unused unused [236]



Home | Main Index | Thread Index | Old Index