-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Documentation: Remove warning that nonstandard primitive type sizes may reveal LLVM bugs #58262
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
Conversation
Only primitive types which are a multiple of 8 bits in size can be constructed. Therefore, the documentation should not speculate about possible bugs in other non-reachable cases. Additionally, it's not clear whether these LLVM bugs still exist now that C allows all integers sizes.
It would be pretty nice if we could enable support for arbitrary size primitive types. LLVM should be able to do so now that C Rust and Zig all support it. |
Yes, this would be nice, but unfortunately out-of-scope for this PR. Arbitrary bit sized primitives need at least two large changes to be really useful (each worth at least one separate PR):
I am currently working on two packages which would mostly circumvent these issues. However, I need to clarify whether we'll open-source them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Sizes used above" refers to 2 .^ (3:7)
, so the clause this PR removes isn't about multiples of 8 bits but about sizes that are larger or not powers of 2.
An accurate title for this PR would be "Remove warning that nonstandard primitive type sizes may reveal LLVM bugs"
Maybe I was too fast. Supporting arbitrary sized primitives which have a byte-sized It would open a can of worms for discussions about how This could make one of the two mentioned packages obsolete in the long run. |
Is this not already supported? julia> primitive type T 24 end
julia> sizeof(T)
3 |
What we're talking about here is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deleted comment used to be true, but I'm not aware of current LLVM (or Julia) bugs with these primitive types.
well that was quick. Turns out there are still plenty of bugs here. |
The label for this is "reverted" but not yet. |
Only primitive types which are a multiple of 8 bits in size can be constructed. Therefore, the documentation should not speculate about possible bugs in other non-reachable cases.
Additionally, it's not clear whether these LLVM bugs still exist now that C allows all integers sizes.