Closed Baltoli closed 3 months ago
cc @0cjs @stevenmeker
This is a fix for #1115, right?
Yep, I believe it morally should be, though I'm still not sure how to reproduce the configuration that causes the error.
...though I'm still not sure how to reproduce the configuration that causes the error.
Ah, my bad! I should have given you that info in the issue. We reproduced it only on Debian 12 running on aarch64
(a Docker container hosted on an Apple Silicon Mac). This should have been the standard clang package from Debian, as I don't see any way another clang could have snuck in there.
We spent quite some time trying to figure out if we could find a compiler warning flag that would warn on systems with signed ints, but couldn't find anything.
Using
-1
as the sentinel "not present" value for these weak symbols of typechar
is not correct, as the standard makes no guarantee whetherchar
is signed or not; it is therefore possible for an implementation to supply us with a type such that comparing the sentinels with-1
later is tautologically false.