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 lint: add more test cases for dupl...
details: https://anonhg.NetBSD.org/src/rev/4b8466485001
branches: trunk
changeset: 1018015:4b8466485001
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jan 18 17:41:04 2021 +0000
description:
lint: add more test cases for duplicate type qualifiers
diffstat:
tests/usr.bin/xlint/lint1/msg_010.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 4685e70c376c -r 4b8466485001 tests/usr.bin/xlint/lint1/msg_010.c
--- a/tests/usr.bin/xlint/lint1/msg_010.c Mon Jan 18 17:20:15 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_010.c Mon Jan 18 17:41:04 2021 +0000
@@ -1,21 +1,36 @@
-/* $NetBSD: msg_010.c,v 1.2 2021/01/07 18:37:41 rillig Exp $ */
+/* $NetBSD: msg_010.c,v 1.3 2021/01/18 17:41:04 rillig Exp $ */
# 3 "msg_010.c"
// Test for message: duplicate '%s' [10]
-inline inline void
+inline inline void /* expect: [10] */
double_inline(void)
{
}
-const const int
+const const int /* expect: [10] */
double_const(void)
{
return 0;
}
-volatile volatile int
+volatile volatile int /* expect: [10] */
double_volatile(void)
{
return 0;
}
+
+int
+restrict_pointer(const int * /*restrict*/ p) // FIXME: assertion "== VOLATILE" failed
+{
+ return *p;
+}
+
+_Thread_local int thread_local_int;
+_Thread_local int *pointer_to_thread_local;
+
+int
+thread_local_parameter(_Thread_local int i) /* caught by the compiler */
+{
+ return i;
+}
Home |
Main Index |
Thread Index |
Old Index