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
add root/checkedint.h and .c #3800
Conversation
Cool. How goes 2.066? Is it currently branched and taking cherry pickings from master? I would initially suggest wait until after release to make sure this doesn't accidently get pulled in. |
Does this exactly match the |
With the api matching, I will completely drop this file for ddmd. |
|
mkdir -p $(INSTALL_DIR)/$(OS)/$(bin_dir) | ||
cp dmd $(INSTALL_DIR)/$(OS)/$(bin_dir)/dmd | ||
cp ../ini/$(OS)/$(bin_dir)/dmd.conf $(INSTALL_DIR)/$(OS)/$(bin_dir)/dmd.conf | ||
cp ../ini/$(OS)/$(bin_dir)/dmd.conf $(INSTALL_DIR)/bin/dmd.conf |
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.
What is going on here?
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.
merge problem. Fixed.
Can you be more specific? Those types should be straightforward aliases. |
The macro constants are typed incorrectly with dmc. |
That's really worrying, but anyway - what does this have to do with using |
UINT32_MAX is the wrong type, so would have to be constantly cast, or the overloads in the unittests are incorrect. |
I have no idea what you mean. You've just redefined |
Also, dmd throughout uses |
This experience makes me long (!) for D's predictable integral types. |
So is there a technical limitation that's stopping you from using
You could always put this off until after the switch to D. |
int32_t is simply pointless. DMD uses int, it needs to overflow check on ints, not int32_t's. We could put off everything until after the switch to D. But this addition shouldn't affect ddmd in any material way, you can just skip these files. |
Auto-merge toggled on |
This failed to add the new files to the VC projects. |
VC projects are not officially supported. Feel free to make a pull request to update them. |
This pull introduced a compile error on Linux/x86_64 when building with
(there are many pages of similar errors that follow this). |
This is a direct translation of druntime's core.checkedint to C++. The idea is to replace the several ad-hoc overflow checks in dmd with these. Even includes unit tests!