On 2024-05-02 3:04 pm, Christos Zoulas wrote:
On 2024-05-02 2:47 pm, Roland Illig wrote:
Am 02.05.2024 um 17:45 schrieb Christos Zoulas:
Module Name: src
Committed By: christos
Date: Thu May 2 15:45:36 UTC 2024
Modified Files:
src/usr.bin/base64: Makefile
Log Message:
comment out strict boolean lint check because isspace() returns int
and lint
complains.
In which exact environment did you experience this?
Lint's strict bool mode accepts 'a & b' as having either integer or
boolean type, so the macro version of isspace should definitely work.
The function variant of isspace doesn't work, though. So maybe you are
running outside _NETBSD_SOURCE mode or you have defined
_CTYPE_NOINLINE.
Any idea how lint can accept isspace as returning int/bool while not
assuming int/bool for strcmp? One idea is to explicitly list the
"bool-like" functions from the C standard library internally in lint,
another more flexible approach is to have a function attribute
__declared_int_but_actually_bool.
This is with clang.
And I don't get it. Gcc produces:
if (ignore &&
# 139 "base64.c" 3 4
((int)((_ctype_tab_ + 1)[(
# 139 "base64.c"
c
# 139 "base64.c" 3 4
)] & 0x0040))
# 139 "base64.c"
)
continue;
Clang produces:
if (ignore && ((int)((_ctype_tab_ + 1)[(c)] & 0x0040)))
continue;
and lint complains...
christos