Module Name: src Committed By: rillig Date: Sun Jan 28 08:17:27 UTC 2024
Modified Files: src/tests/usr.bin/xlint/lint1: accept.sh c11.c c23.c check-expect.lua d_c99_init.c decl.c decl_arg.c decl_direct_abstract.c msg_083.c msg_090.c msg_092.c msg_095.c msg_128.c msg_132.c msg_138.c msg_165.c msg_182.c msg_188.c msg_249.c msg_277.c msg_324.c msg_343.c op_colon.c platform_lp64_c90.c platform_lp64_c99.c platform_lp64_trad.c Log Message: tests/lint: sort multiple diagnostics per line chronologically For now, the chronologic order is not enforced but has to be established manually, for example by removing all 'expect' comment lines and regenerating them with 'accept.sh -u'. While here, clean up a few instances that came up when regenerating the 'expect' comments, such as wrong indentation or needless deviation from the 'expect+1' form. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/accept.sh \ src/tests/usr.bin/xlint/lint1/msg_249.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/c11.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/c23.c \ src/tests/usr.bin/xlint/lint1/msg_083.c \ src/tests/usr.bin/xlint/lint1/msg_090.c \ src/tests/usr.bin/xlint/lint1/msg_095.c \ src/tests/usr.bin/xlint/lint1/msg_128.c \ src/tests/usr.bin/xlint/lint1/op_colon.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/check-expect.lua \ src/tests/usr.bin/xlint/lint1/msg_324.c cvs rdiff -u -r1.46 -r1.47 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.27 -r1.28 src/tests/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/xlint/lint1/decl_arg.c cvs rdiff -u -r1.11 -r1.12 \ src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_092.c \ src/tests/usr.bin/xlint/lint1/msg_138.c \ src/tests/usr.bin/xlint/lint1/msg_165.c \ src/tests/usr.bin/xlint/lint1/msg_182.c \ src/tests/usr.bin/xlint/lint1/msg_188.c cvs rdiff -u -r1.32 -r1.33 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_277.c cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/msg_343.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c \ src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c \ src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/accept.sh diff -u src/tests/usr.bin/xlint/lint1/accept.sh:1.14 src/tests/usr.bin/xlint/lint1/accept.sh:1.15 --- src/tests/usr.bin/xlint/lint1/accept.sh:1.14 Sat Jul 8 10:01:17 2023 +++ src/tests/usr.bin/xlint/lint1/accept.sh Sun Jan 28 08:17:27 2024 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: accept.sh,v 1.14 2023/07/08 10:01:17 rillig Exp $ +# $NetBSD: accept.sh,v 1.15 2024/01/28 08:17:27 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -26,7 +26,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -# usage: accept.sh <pattern>... +# usage: accept.sh [-u] <pattern>... # # Run one or more lint tests, saving their output in the corresponding # .exp files, for incorporating the messages into the .c files as Index: src/tests/usr.bin/xlint/lint1/msg_249.c diff -u src/tests/usr.bin/xlint/lint1/msg_249.c:1.14 src/tests/usr.bin/xlint/lint1/msg_249.c:1.15 --- src/tests/usr.bin/xlint/lint1/msg_249.c:1.14 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_249.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_249.c,v 1.14 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_249.c,v 1.15 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_249.c" // Test for message: syntax error '%s' [249] @@ -30,8 +30,8 @@ int recover_from_rbrace; void function(void) { - /* expect+2: warning: statement not reached [193] */ if (0) + /* expect+1: warning: statement not reached [193] */ ; /* expect+1: error: syntax error ')' [249] */ ); @@ -71,9 +71,9 @@ int gcc_statement_expression_1 = ({ unused_label: 1; 1; + /* expect+2: error: syntax error 'labels are only valid inside a function' [249] */ + /* expect+1: error: non-constant initializer [177] */ }); -/* expect-1: error: non-constant initializer [177] */ -/* expect-2: error: syntax error 'labels are only valid inside a function' [249] */ /* Even another function definition does not help. */ void @@ -85,6 +85,6 @@ int gcc_statement_expression_2 = ({ unused_label: 1; 1; + /* expect+2: error: syntax error 'labels are only valid inside a function' [249] */ + /* expect+1: error: non-constant initializer [177] */ }); -/* expect-1: error: non-constant initializer [177] */ -/* expect-2: error: syntax error 'labels are only valid inside a function' [249] */ Index: src/tests/usr.bin/xlint/lint1/c11.c diff -u src/tests/usr.bin/xlint/lint1/c11.c:1.5 src/tests/usr.bin/xlint/lint1/c11.c:1.6 --- src/tests/usr.bin/xlint/lint1/c11.c:1.5 Thu Aug 3 18:48:42 2023 +++ src/tests/usr.bin/xlint/lint1/c11.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: c11.c,v 1.5 2023/08/03 18:48:42 rillig Exp $ */ +/* $NetBSD: c11.c,v 1.6 2024/01/28 08:17:27 rillig Exp $ */ # 3 "c11.c" /* @@ -73,11 +73,11 @@ void fcompat(void) int (*p)[4][n+1]; int c[n][n][6][m]; int (*r)[n][n][n+1]; - /* expect+2: warning: 'p' set but not used in function 'fcompat' [191] */ - /* expect+1: warning: illegal combination of 'pointer to array[4] of array[1] of int' and 'pointer to array[6] of array[1] of int', op '=' [124] */ + /* expect+2: warning: illegal combination of 'pointer to array[4] of array[1] of int' and 'pointer to array[6] of array[1] of int', op '=' [124] */ + /* expect+1: warning: 'p' set but not used in function 'fcompat' [191] */ p = a; - /* expect+2: warning: 'r' set but not used in function 'fcompat' [191] */ - /* expect+1: warning: illegal combination of 'pointer to array[1] of array[1] of array[1] of int' and 'pointer to array[1] of array[6] of array[1] of int', op '=' [124] */ + /* expect+2: warning: illegal combination of 'pointer to array[1] of array[1] of array[1] of int' and 'pointer to array[1] of array[6] of array[1] of int', op '=' [124] */ + /* expect+1: warning: 'r' set but not used in function 'fcompat' [191] */ r = c; } @@ -153,8 +153,8 @@ thread_local int thread_local_variable_c _Thread_local int thread_local_variable_c11; /* The '_Noreturn' must not appear after the declarator. */ +/* expect+2: error: formal parameter #1 lacks name [59] */ +/* expect+1: warning: empty declaration [2] */ void _Noreturn exit(int) _Noreturn; -/* expect-1: error: formal parameter #1 lacks name [59] */ -/* expect-2: warning: empty declaration [2] */ /* expect+2: error: syntax error '' [249] */ /* expect+1: error: cannot recover from previous errors [224] */ Index: src/tests/usr.bin/xlint/lint1/c23.c diff -u src/tests/usr.bin/xlint/lint1/c23.c:1.7 src/tests/usr.bin/xlint/lint1/c23.c:1.8 --- src/tests/usr.bin/xlint/lint1/c23.c:1.7 Fri Jul 28 22:05:44 2023 +++ src/tests/usr.bin/xlint/lint1/c23.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: c23.c,v 1.7 2023/07/28 22:05:44 rillig Exp $ */ +/* $NetBSD: c23.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "c23.c" // Tests for the option -Ac23, which allows features from C23 and all earlier @@ -50,7 +50,7 @@ function(void) // storage classes. The other storage classes cannot be combined. extern thread_local int extern_thread_local_1; thread_local extern int extern_thread_local_2; +/* expect+1: warning: static variable 'static_thread_local_1' unused [226] */ static thread_local int static_thread_local_1; +/* expect+1: warning: static variable 'static_thread_local_2' unused [226] */ thread_local static int static_thread_local_2; -/* expect-2: warning: static variable 'static_thread_local_1' unused [226] */ -/* expect-2: warning: static variable 'static_thread_local_2' unused [226] */ Index: src/tests/usr.bin/xlint/lint1/msg_083.c diff -u src/tests/usr.bin/xlint/lint1/msg_083.c:1.7 src/tests/usr.bin/xlint/lint1/msg_083.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_083.c:1.7 Fri Jul 7 06:03:31 2023 +++ src/tests/usr.bin/xlint/lint1/msg_083.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_083.c,v 1.7 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_083.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_083.c" // Test for message: storage class after type is obsolescent [83] @@ -8,8 +8,8 @@ void example(void) { - /* expect+2: warning: 'x' unused in function 'example' [192] */ - /* expect+1: warning: storage class after type is obsolescent [83] */ + /* expect+2: warning: storage class after type is obsolescent [83] */ + /* expect+1: warning: 'x' unused in function 'example' [192] */ int register x; } Index: src/tests/usr.bin/xlint/lint1/msg_090.c diff -u src/tests/usr.bin/xlint/lint1/msg_090.c:1.7 src/tests/usr.bin/xlint/lint1/msg_090.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_090.c:1.7 Fri Jul 7 06:03:31 2023 +++ src/tests/usr.bin/xlint/lint1/msg_090.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_090.c,v 1.7 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_090.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_090.c" // Test for message: inconsistent redeclaration of extern '%s' [90] @@ -10,8 +10,8 @@ extern int random_number(void); void use(void) { - /* expect+3: warning: 'random_number' unused in function 'use' [192] */ - /* expect+2: warning: nested 'extern' declaration of 'random_number' [352] */ - /* expect+1: warning: inconsistent redeclaration of extern 'random_number' [90] */ + /* expect+3: warning: nested 'extern' declaration of 'random_number' [352] */ + /* expect+2: warning: inconsistent redeclaration of extern 'random_number' [90] */ + /* expect+1: warning: 'random_number' unused in function 'use' [192] */ extern int random_number(int); } Index: src/tests/usr.bin/xlint/lint1/msg_095.c diff -u src/tests/usr.bin/xlint/lint1/msg_095.c:1.7 src/tests/usr.bin/xlint/lint1/msg_095.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_095.c:1.7 Fri Jul 7 06:03:31 2023 +++ src/tests/usr.bin/xlint/lint1/msg_095.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_095.c,v 1.7 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_095.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_095.c" // Test for message: declaration of '%s' hides earlier one [95] @@ -12,8 +12,8 @@ example(int identifier) { { - /* expect+2: warning: 'identifier' set but not used in function 'example' [191] */ - /* expect+1: warning: declaration of 'identifier' hides earlier one [95] */ + /* expect+2: warning: declaration of 'identifier' hides earlier one [95] */ + /* expect+1: warning: 'identifier' set but not used in function 'example' [191] */ int identifier = 3; } Index: src/tests/usr.bin/xlint/lint1/msg_128.c diff -u src/tests/usr.bin/xlint/lint1/msg_128.c:1.7 src/tests/usr.bin/xlint/lint1/msg_128.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_128.c:1.7 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_128.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_128.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_128.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_128.c" // Test for message: operands of '%s' have incompatible pointer types to '%s' and '%s' [128] @@ -9,7 +9,7 @@ void conversion_to_unconst(const char *cstr) { char *str; - /* expect+2: warning: 'str' set but not used in function 'conversion_to_unconst' [191] */ - /* expect+1: warning: operands of '=' have incompatible pointer types to 'char' and 'const char' [128] */ + /* expect+2: warning: operands of '=' have incompatible pointer types to 'char' and 'const char' [128] */ + /* expect+1: warning: 'str' set but not used in function 'conversion_to_unconst' [191] */ str = cstr; } Index: src/tests/usr.bin/xlint/lint1/op_colon.c diff -u src/tests/usr.bin/xlint/lint1/op_colon.c:1.7 src/tests/usr.bin/xlint/lint1/op_colon.c:1.8 --- src/tests/usr.bin/xlint/lint1/op_colon.c:1.7 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/op_colon.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: op_colon.c,v 1.7 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: op_colon.c,v 1.8 2024/01/28 08:17:27 rillig Exp $ */ # 3 "op_colon.c" /* @@ -59,9 +59,9 @@ test_merge_qualifiers(_Bool cond, int *p void c99_6_5_15_p6(_Bool cond, const volatile double *cv_dp) { - /* expect+2: ... 'pointer to const volatile double' ... */ - /* expect+2: ... 'pointer to const volatile double' ... */ + /* expect+1: ... 'pointer to const volatile double' ... */ sink(cond ? cv_dp : (void *)0); + /* expect+1: ... 'pointer to const volatile double' ... */ sink(cond ? (void *)0 : cv_dp); } @@ -76,33 +76,33 @@ c99_6_5_15_p8( const char *c_cp ) { - /* expect+2: ... 'pointer to const void' ... */ - /* expect+2: ... 'pointer to const void' ... */ + /* expect+1: ... 'pointer to const void' ... */ sink(cond ? c_vp : c_ip); + /* expect+1: ... 'pointer to const void' ... */ sink(cond ? c_ip : c_vp); - /* expect+2: ... 'pointer to volatile int' ... */ - /* expect+2: ... 'pointer to volatile int' ... */ + /* expect+1: ... 'pointer to volatile int' ... */ sink(cond ? v_ip : 0); + /* expect+1: ... 'pointer to volatile int' ... */ sink(cond ? 0 : v_ip); - /* expect+2: ... 'pointer to const volatile int' ... */ - /* expect+2: ... 'pointer to const volatile int' ... */ + /* expect+1: ... 'pointer to const volatile int' ... */ sink(cond ? c_ip : v_ip); + /* expect+1: ... 'pointer to const volatile int' ... */ sink(cond ? v_ip : c_ip); - /* expect+2: ... 'pointer to const void' ... */ - /* expect+2: ... 'pointer to const void' ... */ + /* expect+1: ... 'pointer to const void' ... */ sink(cond ? vp : c_cp); + /* expect+1: ... 'pointer to const void' ... */ sink(cond ? c_cp : vp); - /* expect+2: ... 'pointer to const int' ... */ - /* expect+2: ... 'pointer to const int' ... */ + /* expect+1: ... 'pointer to const int' ... */ sink(cond ? ip : c_ip); + /* expect+1: ... 'pointer to const int' ... */ sink(cond ? c_ip : ip); - /* expect+2: ... 'pointer to void' ... */ - /* expect+2: ... 'pointer to void' ... */ + /* expect+1: ... 'pointer to void' ... */ sink(cond ? vp : ip); + /* expect+1: ... 'pointer to void' ... */ sink(cond ? ip : vp); } Index: src/tests/usr.bin/xlint/lint1/check-expect.lua diff -u src/tests/usr.bin/xlint/lint1/check-expect.lua:1.9 src/tests/usr.bin/xlint/lint1/check-expect.lua:1.10 --- src/tests/usr.bin/xlint/lint1/check-expect.lua:1.9 Sat Jan 27 15:10:57 2024 +++ src/tests/usr.bin/xlint/lint1/check-expect.lua Sun Jan 28 08:17:27 2024 @@ -1,5 +1,5 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.9 2024/01/27 15:10:57 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.10 2024/01/28 08:17:27 rillig Exp $ --[[ @@ -185,21 +185,36 @@ test(function() assert_equals(matches("abc123xyz", "...y..."), true) assert_equals(matches("abc123xyz", "...z..."), true) assert_equals(matches("pattern", "...pattern..."), true) + assert_equals(matches("pattern", "... pattern ..."), false) end) --- Inserts the '/* expect */' lines to the .c file, so that the .c file matches --- the .exp file. Multiple 'expect' comments for a single line of code are not --- handled correctly, but it's still better than doing the same work manually. +-- Inserts the '/* expect */' lines to the .c file, so that the .c file +-- matches the .exp file. +-- +-- TODO: Fix crashes in tests with '# line file' preprocessing directives. local function insert_missing(missing) for fname, items in pairs(missing) do - table.sort(items, function(a, b) return a.lineno > b.lineno end) + for i, item in ipairs(items) do + item.stable_sort_rank = i + end + local function less(a, b) + if a.lineno ~= b.lineno then + return a.lineno > b.lineno + end + return a.stable_sort_rank > b.stable_sort_rank + end + table.sort(items, less) local lines = assert(load_lines(fname)) + local seen = {} for _, item in ipairs(items) do local lineno, message = item.lineno, item.message local indent = (lines[lineno] or ""):match("^([ \t]*)") - local line = ("%s/* expect+1: %s */"):format(indent, message) + local offset = 1 + (seen[lineno] or 0) + local line = ("%s/* expect+%d: %s */"):format(indent, offset, message) + print(("insert %s:%d %s"):format(fname, lineno, line)) table.insert(lines, lineno, line) + seen[lineno] = (seen[lineno] or 0) + 1 end save_lines(fname, lines) end Index: src/tests/usr.bin/xlint/lint1/msg_324.c diff -u src/tests/usr.bin/xlint/lint1/msg_324.c:1.9 src/tests/usr.bin/xlint/lint1/msg_324.c:1.10 --- src/tests/usr.bin/xlint/lint1/msg_324.c:1.9 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_324.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_324.c,v 1.9 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_324.c,v 1.10 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_324.c" // Test for message: suggest cast from '%s' to '%s' on op '%s' to avoid overflow [324] @@ -22,13 +22,13 @@ example(char c, int i, unsigned u) long long ll; unsigned long long ull; - /* expect+2: warning: 'll' set but not used in function 'example' [191] */ - /* expect+1: warning: suggest cast from 'int' to 'long long' on op '+' to avoid overflow [324] */ + /* expect+2: warning: suggest cast from 'int' to 'long long' on op '+' to avoid overflow [324] */ + /* expect+1: warning: 'll' set but not used in function 'example' [191] */ ll = c + i; /* expect+1: warning: suggest cast from 'int' to 'long long' on op '-' to avoid overflow [324] */ ll = i - c; - /* expect+2: warning: 'ull' set but not used in function 'example' [191] */ - /* expect+1: warning: suggest cast from 'unsigned int' to 'unsigned long long' on op '*' to avoid overflow [324] */ + /* expect+2: warning: suggest cast from 'unsigned int' to 'unsigned long long' on op '*' to avoid overflow [324] */ + /* expect+1: warning: 'ull' set but not used in function 'example' [191] */ ull = c * u; /* expect+1: warning: suggest cast from 'unsigned int' to 'unsigned long long' on op '+' to avoid overflow [324] */ ull = u + c; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.46 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.47 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.46 Sun Jul 9 11:01:27 2023 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.46 2023/07/09 11:01:27 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.47 2024/01/28 08:17:27 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -420,7 +420,7 @@ ensure_array_type_is_not_modified_during } struct point unknown_member_name_beginning = { - /* expect+1: error: type 'struct point' does not have member 'r' [101] */ + /* expect+1: error: type 'struct point' does not have member 'r' [101] */ .r = 5, .x = 4, .y = 3, @@ -489,7 +489,7 @@ union { }; int designator_for_scalar = { - /* expect+1: error: syntax error 'scalar type cannot use designator' [249] */ + /* expect+1: error: syntax error 'scalar type cannot use designator' [249] */ .value = 3, }; @@ -557,10 +557,10 @@ struct offset_and_data offset_and_data = // The size of the array is determined by the maximum index, not by the last // one mentioned. int arr_11[] = { [10] = 10, [0] = 0 }; +/* expect+1: error: negative array dimension (-11) [20] */ typedef int ctassert_11[-(int)(sizeof(arr_11) / sizeof(arr_11[0]))]; -/* expect-1: error: negative array dimension (-11) [20] */ // Without an explicit subscript designator, the subscript counts up. int arr_3[] = { [1] = 1, [0] = 0, 1, 2 }; +/* expect+1: error: negative array dimension (-3) [20] */ typedef int ctassert_3[-(int)(sizeof(arr_3) / sizeof(arr_3[0]))]; -/* expect-1: error: negative array dimension (-3) [20] */ Index: src/tests/usr.bin/xlint/lint1/decl.c diff -u src/tests/usr.bin/xlint/lint1/decl.c:1.27 src/tests/usr.bin/xlint/lint1/decl.c:1.28 --- src/tests/usr.bin/xlint/lint1/decl.c:1.27 Tue Jan 23 19:44:28 2024 +++ src/tests/usr.bin/xlint/lint1/decl.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.27 2024/01/23 19:44:28 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.28 2024/01/28 08:17:27 rillig Exp $ */ # 3 "decl.c" /* @@ -169,10 +169,10 @@ __thread int thread_int; /* expect+1: error: syntax error 'int' [249] */ __thread__ int thread_int; -/* expect+4: error: old-style declaration; add 'int' [1] */ -/* expect+2: warning: static function 'cover_func_declarator' unused [236] */ static +/* expect+1: warning: static function 'cover_func_declarator' unused [236] */ cover_func_declarator(void) +/* expect+1: error: old-style declaration; add 'int' [1] */ { } Index: src/tests/usr.bin/xlint/lint1/decl_arg.c diff -u src/tests/usr.bin/xlint/lint1/decl_arg.c:1.12 src/tests/usr.bin/xlint/lint1/decl_arg.c:1.13 --- src/tests/usr.bin/xlint/lint1/decl_arg.c:1.12 Wed Aug 2 18:51:25 2023 +++ src/tests/usr.bin/xlint/lint1/decl_arg.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: decl_arg.c,v 1.12 2023/08/02 18:51:25 rillig Exp $ */ +/* $NetBSD: decl_arg.c,v 1.13 2024/01/28 08:17:27 rillig Exp $ */ # 3 "decl_arg.c" /* @@ -30,8 +30,8 @@ void type_qualifier_pointer(const number /* expect+2: warning: parameter 'a_struct' unused in function 'old_style' [231] */ extern void old_style(an_int, a_const_int, a_number, a_function, a_struct) -/* expect+2: warning: empty declaration [2] */ -/* expect+1: error: only 'register' is valid as storage class in parameter [9] */ +/* expect+2: error: only 'register' is valid as storage class in parameter [9] */ +/* expect+1: warning: empty declaration [2] */ static; /* expect+1: error: syntax error '"' [249] */ static "error"; @@ -71,8 +71,8 @@ const (parenthesized_name); const array[]; /* expect+1: error: declared parameter 'array_size' is missing [53] */ const array_size[1+1+1]; -/* expect+2: error: declared parameter 'multi_array' is missing [53] */ -/* expect+1: error: null dimension [17] */ +/* expect+2: error: null dimension [17] */ +/* expect+1: error: declared parameter 'multi_array' is missing [53] */ const multi_array[][][][][][]; /* expect+1: error: declared parameter 'function' is missing [53] */ const function(void); Index: src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c diff -u src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.11 src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.12 --- src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.11 Sun Oct 22 21:30:32 2023 +++ src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: decl_direct_abstract.c,v 1.11 2023/10/22 21:30:32 rillig Exp $ */ +/* $NetBSD: decl_direct_abstract.c,v 1.12 2024/01/28 08:17:27 rillig Exp $ */ # 3 "decl_direct_abstract.c" /* @@ -57,7 +57,7 @@ function_returning_pointer(void) { // GCC says 'error: cast specifies function type'. // Clang says 'char (short *(*)(long))'. - /* expect+1: error: invalid cast from 'struct incompatible' to 'function(pointer to function(long) returning pointer to short) returning char' [147] */ + /* expect+1: ... 'function(pointer to function(long) returning pointer to short) returning char' ... */ x = (char(short *(long)))x; /* expect+1: warning: nested 'extern' declaration of 'f2' [352] */ Index: src/tests/usr.bin/xlint/lint1/msg_092.c diff -u src/tests/usr.bin/xlint/lint1/msg_092.c:1.6 src/tests/usr.bin/xlint/lint1/msg_092.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_092.c:1.6 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_092.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_092.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_092.c,v 1.7 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_092.c" // Test for message: inconsistent redeclaration of static '%s' [92] @@ -16,8 +16,8 @@ use_random(void) { random(); - /* expect+3: warning: 'random' unused in function 'use_random' [192] */ - /* expect+2: warning: dubious static function 'random' at block level [93] */ - /* expect+1: warning: inconsistent redeclaration of static 'random' [92] */ + /* expect+3: warning: dubious static function 'random' at block level [93] */ + /* expect+2: warning: inconsistent redeclaration of static 'random' [92] */ + /* expect+1: warning: 'random' unused in function 'use_random' [192] */ static double random(void); } Index: src/tests/usr.bin/xlint/lint1/msg_138.c diff -u src/tests/usr.bin/xlint/lint1/msg_138.c:1.6 src/tests/usr.bin/xlint/lint1/msg_138.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_138.c:1.6 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_138.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_138.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_138.c,v 1.7 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_138.c" // Test for message: unknown operand size, op '%s' [138] @@ -14,8 +14,8 @@ struct incomplete; void function(_Bool cond, struct incomplete *i1, struct incomplete *i2) { - /* expect+2: error: 'local' has incomplete type 'incomplete struct incomplete' [31] */ - /* expect+1: error: cannot initialize 'incomplete struct incomplete' from 'pointer to incomplete struct incomplete' [185] */ + /* expect+2: error: cannot initialize 'incomplete struct incomplete' from 'pointer to incomplete struct incomplete' [185] */ + /* expect+1: error: 'local' has incomplete type 'incomplete struct incomplete' [31] */ struct incomplete local = i1; /* expect+1: error: unknown operand size, op '=' [138] */ Index: src/tests/usr.bin/xlint/lint1/msg_165.c diff -u src/tests/usr.bin/xlint/lint1/msg_165.c:1.6 src/tests/usr.bin/xlint/lint1/msg_165.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_165.c:1.6 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_165.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_165.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_165.c,v 1.7 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_165.c" // Test for message: constant truncated by assignment [165] @@ -10,7 +10,7 @@ example(void) { unsigned char ch; - /* expect+2: warning: 'ch' set but not used in function 'example' [191] */ - /* expect+1: warning: constant truncated by assignment [165] */ + /* expect+2: warning: constant truncated by assignment [165] */ + /* expect+1: warning: 'ch' set but not used in function 'example' [191] */ ch = 0x1234; } Index: src/tests/usr.bin/xlint/lint1/msg_182.c diff -u src/tests/usr.bin/xlint/lint1/msg_182.c:1.6 src/tests/usr.bin/xlint/lint1/msg_182.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_182.c:1.6 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_182.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_182.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_182.c,v 1.7 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_182.c" // Test for message: incompatible pointer types to '%s' and '%s' [182] @@ -15,7 +15,7 @@ return_discarding_volatile(volatile void void init_discarding_volatile(volatile void *arg) { - /* expect+2: warning: 'array' set but not used in function 'init_discarding_volatile' [191] */ - /* expect+1: warning: incompatible pointer types to 'void' and 'volatile void' [182] */ + /* expect+2: warning: incompatible pointer types to 'void' and 'volatile void' [182] */ + /* expect+1: warning: 'array' set but not used in function 'init_discarding_volatile' [191] */ void *array[] = { arg }; } Index: src/tests/usr.bin/xlint/lint1/msg_188.c diff -u src/tests/usr.bin/xlint/lint1/msg_188.c:1.6 src/tests/usr.bin/xlint/lint1/msg_188.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_188.c:1.6 Fri Jul 7 06:03:31 2023 +++ src/tests/usr.bin/xlint/lint1/msg_188.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_188.c,v 1.6 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_188.c,v 1.7 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_188.c" /* Test for message: no automatic aggregate initialization in traditional C [188] */ @@ -18,8 +18,8 @@ struct point global = { void function() { - /* expect+2: warning: 'local' set but not used in function 'function' [191] */ - /* expect+1: warning: no automatic aggregate initialization in traditional C [188] */ + /* expect+2: warning: no automatic aggregate initialization in traditional C [188] */ + /* expect+1: warning: 'local' set but not used in function 'function' [191] */ struct point local = { 3, 4, Index: src/tests/usr.bin/xlint/lint1/msg_132.c diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.32 src/tests/usr.bin/xlint/lint1/msg_132.c:1.33 --- src/tests/usr.bin/xlint/lint1/msg_132.c:1.32 Sun Aug 6 19:44:50 2023 +++ src/tests/usr.bin/xlint/lint1/msg_132.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_132.c,v 1.32 2023/08/06 19:44:50 rillig Exp $ */ +/* $NetBSD: msg_132.c,v 1.33 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_132.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] @@ -174,9 +174,9 @@ to_bool(long a, long b) const char * cover_build_plus_minus(const char *arr, double idx) { - /* expect+3: error: operands of '+' have incompatible types 'pointer to const char' and 'double' [107] */ - /* expect+2: error: function 'cover_build_plus_minus' expects to return value [214] */ if (idx > 0.0) + /* expect+2: error: operands of '+' have incompatible types 'pointer to const char' and 'double' [107] */ + /* expect+1: error: function 'cover_build_plus_minus' expects to return value [214] */ return arr + idx; return arr + (unsigned int)idx; } Index: src/tests/usr.bin/xlint/lint1/msg_277.c diff -u src/tests/usr.bin/xlint/lint1/msg_277.c:1.8 src/tests/usr.bin/xlint/lint1/msg_277.c:1.9 --- src/tests/usr.bin/xlint/lint1/msg_277.c:1.8 Fri Jul 7 06:03:31 2023 +++ src/tests/usr.bin/xlint/lint1/msg_277.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_277.c,v 1.8 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_277.c,v 1.9 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_277.c" // Test for message: initialization of '%s' with '%s' [277] @@ -29,7 +29,7 @@ example(enum E e, int i) /* expect+1: warning: 'init_0' set but not used in function 'example' [191] */ enum E init_0 = 0; - /* expect+2: warning: 'init_1' set but not used in function 'example' [191] */ - /* expect+1: warning: initialization of 'enum E' with 'int' [277] */ + /* expect+2: warning: initialization of 'enum E' with 'int' [277] */ + /* expect+1: warning: 'init_1' set but not used in function 'example' [191] */ enum E init_1 = 1; } Index: src/tests/usr.bin/xlint/lint1/msg_343.c diff -u src/tests/usr.bin/xlint/lint1/msg_343.c:1.10 src/tests/usr.bin/xlint/lint1/msg_343.c:1.11 --- src/tests/usr.bin/xlint/lint1/msg_343.c:1.10 Thu Sep 14 21:53:02 2023 +++ src/tests/usr.bin/xlint/lint1/msg_343.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_343.c,v 1.10 2023/09/14 21:53:02 rillig Exp $ */ +/* $NetBSD: msg_343.c,v 1.11 2024/01/28 08:17:27 rillig Exp $ */ # 3 "msg_343.c" /* Test for message: static array size requires C11 or later [343] */ @@ -36,7 +36,7 @@ int returns_volatile_int_array(int a[volatile 3]) { /* expect+2: error: cannot dereference non-pointer type 'int' [96] */ - /* expect+1: ... expects to return value [214] */ + /* expect+1: error: function 'returns_volatile_int_array' expects to return value [214] */ return a[0]; } Index: src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c diff -u src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c:1.2 src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c:1.3 --- src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c:1.2 Sat Jan 27 20:03:14 2024 +++ src/tests/usr.bin/xlint/lint1/platform_lp64_c90.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_lp64_c90.c,v 1.2 2024/01/27 20:03:14 rillig Exp $ */ +/* $NetBSD: platform_lp64_c90.c,v 1.3 2024/01/28 08:17:27 rillig Exp $ */ # 3 "platform_lp64_c90.c" /* @@ -39,11 +39,11 @@ void *lex_integer[] = { 18446744073709551615, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffff, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000, /* expect+1: ... integer 'unsigned int' ... */ @@ -74,11 +74,11 @@ void *lex_integer[] = { 18446744073709551615U, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffffU, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616U, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000U, /* expect+1: ... integer 'long' ... */ @@ -114,8 +114,8 @@ void *lex_integer[] = { /* expect+2: warning: integer constant out of range [252] */ /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616L, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000L, /* expect+1: ... integer 'unsigned long' ... */ @@ -146,11 +146,11 @@ void *lex_integer[] = { 18446744073709551615UL, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffffUL, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616UL, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000UL, /* expect+1: ... integer 'long long' ... */ @@ -183,11 +183,11 @@ void *lex_integer[] = { 18446744073709551615LL, /* expect+1: ... integer 'unsigned long long' ... */ 0xffffffffffffffffLL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616LL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 0x00010000000000000000LL, /* expect+1: ... integer 'unsigned long long' ... */ @@ -218,8 +218,8 @@ void *lex_integer[] = { 18446744073709551615ULL, /* expect+1: ... integer 'unsigned long long' ... */ 0xffffffffffffffffULL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616ULL, /* expect+2: warning: integer constant out of range [252] */ /* expect+1: ... integer 'unsigned long long' ... */ Index: src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c diff -u src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c:1.2 src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c:1.3 --- src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c:1.2 Sat Jan 27 20:03:14 2024 +++ src/tests/usr.bin/xlint/lint1/platform_lp64_c99.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_lp64_c99.c,v 1.2 2024/01/27 20:03:14 rillig Exp $ */ +/* $NetBSD: platform_lp64_c99.c,v 1.3 2024/01/28 08:17:27 rillig Exp $ */ # 3 "platform_lp64_c99.c" /* @@ -39,11 +39,11 @@ void *lex_integer[] = { 18446744073709551615, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffff, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000, /* expect+1: ... integer 'unsigned int' ... */ @@ -74,11 +74,11 @@ void *lex_integer[] = { 18446744073709551615U, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffffU, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616U, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000U, /* expect+1: ... integer 'long' ... */ @@ -114,8 +114,8 @@ void *lex_integer[] = { /* expect+2: warning: integer constant out of range [252] */ /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616L, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000L, /* expect+1: ... integer 'unsigned long' ... */ @@ -146,11 +146,11 @@ void *lex_integer[] = { 18446744073709551615UL, /* expect+1: ... integer 'unsigned long' ... */ 0xffffffffffffffffUL, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 18446744073709551616UL, - /* expect+2: ... integer 'unsigned long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long' ... */ 0x00010000000000000000UL, /* expect+1: ... integer 'long long' ... */ @@ -183,11 +183,11 @@ void *lex_integer[] = { 18446744073709551615LL, /* expect+1: ... integer 'unsigned long long' ... */ 0xffffffffffffffffLL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616LL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 0x00010000000000000000LL, /* expect+1: ... integer 'unsigned long long' ... */ @@ -218,8 +218,8 @@ void *lex_integer[] = { 18446744073709551615ULL, /* expect+1: ... integer 'unsigned long long' ... */ 0xffffffffffffffffULL, - /* expect+2: ... integer 'unsigned long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'unsigned long long' ... */ 18446744073709551616ULL, /* expect+2: warning: integer constant out of range [252] */ /* expect+1: ... integer 'unsigned long long' ... */ Index: src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c diff -u src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c:1.2 src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c:1.3 --- src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c:1.2 Sat Jan 27 20:03:14 2024 +++ src/tests/usr.bin/xlint/lint1/platform_lp64_trad.c Sun Jan 28 08:17:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_lp64_trad.c,v 1.2 2024/01/27 20:03:14 rillig Exp $ */ +/* $NetBSD: platform_lp64_trad.c,v 1.3 2024/01/28 08:17:27 rillig Exp $ */ # 3 "platform_lp64_trad.c" /* @@ -37,11 +37,11 @@ void *lex_integer[] = { 18446744073709551615, /* expect+1: ... integer 'long' ... */ 0xffffffffffffffff, - /* expect+2: ... integer 'long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'long' ... */ 18446744073709551616, - /* expect+2: ... integer 'long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'long' ... */ 0x00010000000000000000, /* expect+1: ... integer 'long' ... */ @@ -77,8 +77,8 @@ void *lex_integer[] = { /* expect+2: warning: integer constant out of range [252] */ /* expect+1: ... integer 'long' ... */ 18446744073709551616L, - /* expect+2: ... integer 'long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'long' ... */ 0x00010000000000000000L, /* expect+1: ... integer 'long long' ... */ @@ -111,10 +111,10 @@ void *lex_integer[] = { 18446744073709551615LL, /* expect+1: ... integer 'long long' ... */ 0xffffffffffffffffLL, - /* expect+2: ... integer 'long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'long long' ... */ 18446744073709551616LL, - /* expect+2: ... integer 'long long' ... */ - /* expect+1: warning: integer constant out of range [252] */ + /* expect+2: warning: integer constant out of range [252] */ + /* expect+1: ... integer 'long long' ... */ 0x00010000000000000000LL, };