NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/58913: ctype(3) macros fail on (unsigned)EOF
The following reply was made to PR lib/58913; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: lib/58913: ctype(3) macros fail on (unsigned)EOF
Date: Wed, 18 Dec 2024 16:47:11 +0700
Date: Wed, 18 Dec 2024 02:25:01 +0000 (UTC)
From: campbell+netbsd%mumble.net@localhost
Message-ID: <20241218022501.3BA4A1A923B%mollari.NetBSD.org@localhost>
| Now, there is an argument that _no_ value of type unsigned
| `equal[s] the value of the macro EOF', because the value of the
| macro EOF is prescribed to be negative, so maybe we could hide
| behind that argument.
The argument is entirely valid, there is no hiding involved.
(unsigned)EOF is not equal to EOF, nor can its value be
represented by an unsigned char, hence by the text that you
quoted, the behaviour is explicitly undefined.
We have no bug here, and nothing to fix.
| But apparently there's a real-world application that tries
| this anyway:
So what? There are real world applications with all kinds of
bugs, we neither do, nor should, constantly adapt our system to
attempt to make broken code work. Simply fix the broken code
instead.
Change absolutely nothing here, except to close this PR as a
"not a bug".
kre
Home |
Main Index |
Thread Index |
Old Index