-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Char-type is incorrectly sized #2907
Comments
Not key to the discussion, but I think -1 is a valid and idiomatic way in C/C++ to refer to the largest value an unsigned type can hold. |
This is relevant if you want to add a |
Doc's need to be updated then: http:https://docs.julialang.org/en/latest/manual/calling-c-and-fortran-code.html#type-correspondences |
Also, while there's nothing we can do about it, using |
on windows, wint_t and wchar_t are declared unsigned short (Uint16)
http:https://msdn.microsoft.com/en-us/library/windows/desktop/aa367308(v=vs.85).aspx
and from
_mingw.h
:(somewhat amusingly, someone at microsoft apparently believes unsigned numbers can hold the value -1, as demonstrated by their documentation for this type. while not strictly wrong -- it can indeed hold the value 0xFFFF -- ok, yes it is wrong)
The text was updated successfully, but these errors were encountered: