-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nim & C disagree on type size #6860
Comments
I think the -d:checkabi should be turned on by default. Just like this one: |
They are only dangerous if |
Not exactly. This is a simple example on macOS: import posix
var ids: seq[Uid] = @[1, 2, 3, 4]
echo "ids:", ids # ids:@[1, 0, 2, 0] |
What is the When I run the last example I get the following error:
Which means that -d:checkabi is incorrect now, because |
Seems like thats a bug in
|
I just fixed checkabi (not merged yet). The problem was that the constant -3 for the size of a type is used to tag the type as: nim doesn't know the size of that type and should not even try to guess. The switch |
By turn on checkabi, many errors in stdlib show up.
These errors are very dangerous, that can cause undefined runtime behaviors. See #6496
A list of errors show up in my app (It's only a small part of whole stdlib):
The text was updated successfully, but these errors were encountered: