Module Name:    src
Committed By:   rillig
Date:           Wed May  1 05:38:11 UTC 2024

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_132.c

Log Message:
lint: demonstrate wrong warning about out-of-range bit-field


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/usr.bin/xlint/lint1/msg_132.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/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.38 src/tests/usr.bin/xlint/lint1/msg_132.c:1.39
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.38	Mon Mar 25 23:39:14 2024
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Wed May  1 05:38:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.38 2024/03/25 23:39:14 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.39 2024/05/01 05:38:11 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -449,4 +449,7 @@ binary_operators_on_bit_fields(void)
 	u64 = s.u64 | s.u48 | s.u15;
 	cond = (s.u15 | s.u48 | s.u64) != 0;
 	cond = (s.u64 | s.u48 | s.u15) != 0;
+
+	/* expect+1: warning: conversion of 'int' to 'int:4' is out of range [119] */
+	s32 = 8 - bits.u3;
 }

Reply via email to