Module Name:    src
Committed By:   rillig
Date:           Tue Nov  5 04:53:28 UTC 2024

Modified Files:
        src/tests/usr.bin/xlint/lint1: expr_promote.c expr_promote_trad.c
            lang_level_c99.c platform_long.c
        src/tests/usr.bin/xlint/lint2: emit.ln read.ln

Log Message:
lint: fix cross references in comments


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/expr_promote.c \
    src/tests/usr.bin/xlint/lint1/expr_promote_trad.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/lang_level_c99.c \
    src/tests/usr.bin/xlint/lint1/platform_long.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint2/emit.ln
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint2/read.ln

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/expr_promote.c
diff -u src/tests/usr.bin/xlint/lint1/expr_promote.c:1.4 src/tests/usr.bin/xlint/lint1/expr_promote.c:1.5
--- src/tests/usr.bin/xlint/lint1/expr_promote.c:1.4	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/expr_promote.c	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: expr_promote.c,v 1.4 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: expr_promote.c,v 1.5 2024/11/05 04:53:28 rillig Exp $	*/
 # 3 "expr_promote.c"
 
 /*
@@ -38,7 +38,7 @@ caller(struct arithmetic_types *arg)
 {
 	/* See expr_promote.exp-ln for the resulting types. */
 	sink("",
-	    arg->boolean,		/* gets promoted to 'int' */
+	    arg->boolean,		/* should get promoted to 'int' */
 	    arg->plain_char,		/* gets promoted to 'int' */
 	    arg->signed_char,		/* gets promoted to 'int' */
 	    arg->unsigned_char,		/* gets promoted to 'int' */
@@ -56,7 +56,7 @@ caller(struct arithmetic_types *arg)
 	    arg->float_complex,
 	    arg->double_complex,
 	    arg->long_double_complex,
-	    arg->enumerator);
+	    arg->enumerator);		/* should get promoted to 'int' */
 }
 
 /*
Index: src/tests/usr.bin/xlint/lint1/expr_promote_trad.c
diff -u src/tests/usr.bin/xlint/lint1/expr_promote_trad.c:1.4 src/tests/usr.bin/xlint/lint1/expr_promote_trad.c:1.5
--- src/tests/usr.bin/xlint/lint1/expr_promote_trad.c:1.4	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/expr_promote_trad.c	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: expr_promote_trad.c,v 1.4 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: expr_promote_trad.c,v 1.5 2024/11/05 04:53:28 rillig Exp $	*/
 # 3 "expr_promote_trad.c"
 
 /*
@@ -47,7 +47,7 @@ caller(arg)
 	    arg->unsigned_long,
 	    arg->single_floating,	/* gets promoted to 'double' */
 	    arg->double_floating,
-	    arg->enumerator);
+	    arg->enumerator);		/* should get promoted to 'int' */
 }
 
 /*

Index: src/tests/usr.bin/xlint/lint1/lang_level_c99.c
diff -u src/tests/usr.bin/xlint/lint1/lang_level_c99.c:1.5 src/tests/usr.bin/xlint/lint1/lang_level_c99.c:1.6
--- src/tests/usr.bin/xlint/lint1/lang_level_c99.c:1.5	Sat Jun  8 13:50:47 2024
+++ src/tests/usr.bin/xlint/lint1/lang_level_c99.c	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: lang_level_c99.c,v 1.5 2024/06/08 13:50:47 rillig Exp $	*/
+/*	$NetBSD: lang_level_c99.c,v 1.6 2024/11/05 04:53:28 rillig Exp $	*/
 # 3 "lang_level_c99.c"
 
 /*
@@ -162,7 +162,7 @@ compound_literal(void)
 
 // [x] designated initializers
 //
-// See d_c99_init.c.
+// See init_c99.c.
 
 // [x] // comments
 //
Index: src/tests/usr.bin/xlint/lint1/platform_long.c
diff -u src/tests/usr.bin/xlint/lint1/platform_long.c:1.5 src/tests/usr.bin/xlint/lint1/platform_long.c:1.6
--- src/tests/usr.bin/xlint/lint1/platform_long.c:1.5	Tue Mar 28 14:44:35 2023
+++ src/tests/usr.bin/xlint/lint1/platform_long.c	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: platform_long.c,v 1.5 2023/03/28 14:44:35 rillig Exp $	*/
+/*	$NetBSD: platform_long.c,v 1.6 2024/11/05 04:53:28 rillig Exp $	*/
 # 3 "platform_long.c"
 
 /*
@@ -17,10 +17,9 @@ convert_unsigned_char_to_size(unsigned c
 {
 	/*
 	 * In this function call, uc is first promoted to INT. It is then
-	 * converted to size_t, which is ULONG. The portable bit size of INT
-	 * is 24 (see INT_RSIZE in inittyp.c), which is less than the 32 of
-	 * ULONG. Since the portable bit size increases from 24 to 32, there
-	 * is no warning.
+	 * converted to size_t, which is ULONG. The portable rank of INT
+	 * (see INT_RANK in inittyp.c) is lower than the rank of ULONG.
+	 * Since the portable rank increases, there is no warning.
 	 *
 	 * XXX: Investigate whether this rule makes sense. Warning 259 is
 	 * about prototype mismatch, not about lossy integer conversions,

Index: src/tests/usr.bin/xlint/lint2/emit.ln
diff -u src/tests/usr.bin/xlint/lint2/emit.ln:1.6 src/tests/usr.bin/xlint/lint2/emit.ln:1.7
--- src/tests/usr.bin/xlint/lint2/emit.ln:1.6	Sat Oct  1 10:04:06 2022
+++ src/tests/usr.bin/xlint/lint2/emit.ln	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-# $NetBSD: emit.ln,v 1.6 2022/10/01 10:04:06 rillig Exp $
+# $NetBSD: emit.ln,v 1.7 2024/11/05 04:53:28 rillig Exp $
 #
 # Test emitting a lint library file.
 
@@ -53,8 +53,8 @@ S expr_promote.c
 0 d 0.0 d 17var_unsigned_long uL
 0 d 0.0 d 20var_signed_long_long Q
 0 d 0.0 d 22var_unsigned_long_long uQ
-# see emit_lp64 for __int128_t
-# see emit_lp64 for __uint128_t
+# see emit_lp64.c for __int128_t
+# see emit_lp64.c for __uint128_t
 0 d 0.0 d 9var_float sD
 0 d 0.0 d 10var_double D
 0 d 0.0 d 15var_long_double lD

Index: src/tests/usr.bin/xlint/lint2/read.ln
diff -u src/tests/usr.bin/xlint/lint2/read.ln:1.8 src/tests/usr.bin/xlint/lint2/read.ln:1.9
--- src/tests/usr.bin/xlint/lint2/read.ln:1.8	Wed Aug  2 18:51:25 2023
+++ src/tests/usr.bin/xlint/lint2/read.ln	Tue Nov  5 04:53:28 2024
@@ -1,4 +1,4 @@
-# $NetBSD: read.ln,v 1.8 2023/08/02 18:51:25 rillig Exp $
+# $NetBSD: read.ln,v 1.9 2024/11/05 04:53:28 rillig Exp $
 #
 # Cover each path of reading declarations, definitions and usages.
 
@@ -25,8 +25,8 @@ S read.c
 112 d 0.112 e 4f112 F0 uL	# ULONG		unsigned long	f112(void);
 113 d 0.113 e 4f113 F0 Q	# LLONG		long long	f113(void);
 114 d 0.114 e 4f114 F0 uQ	# ULLONG	unsigned long long f114(void);
-# INT128	works only in 64-bit mode, see read_lp64.
-# UINT128	works only in 64-bit mode, see read_lp64.
+# INT128	works only in 64-bit mode, see read_lp64.ln.
+# UINT128	works only in 64-bit mode, see read_lp64.ln.
 117 d 0.117 e 4f117 F0 sD	# FLOAT		float		f117(void);
 118 d 0.118 e 4f118 F0 D	# DOUBLE	double		f118(void);
 119 d 0.119 e 4f119 F0 lD	# LDOUBLE	long double	f119(void);

Reply via email to