CVS commit: src/usr.bin/xlint/lint1

"Roland Illig" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	rillig
Date:		Mon Apr  6 07:10:44 UTC 2026

Modified Files:
	src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: don't rely on the floating point rounding mode

When checking whether a floating point constant can be converted to an
integer constant with the same value, ULLONG_MAX is not representable
exactly in a 64-bit long double, so the comparison value could have been
rounded down, leading to wrong warnings about lossy conversions.

Perform exact calculations instead.


To generate a diff of this commit:
cvs rdiff -u -r1.709 -r1.710 src/usr.bin/xlint/lint1/tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.