-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
fix Issue 20688 - Wrong code when linking to C complex number functions #11710
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11710" |
test/runnable/complex.d
Outdated
| cdouble r = cpowf(2. + 0i, 2. + 0i); | ||
| assert(cast(double)creal(r) == 4.0); | ||
| assert(cast(double)cimag(r) == 0.0); | ||
| printf("%f+%fi\n", cast(double)creal(r), cast(double)cimag(r)); |
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.
You can use RUN_OUTPUT to check the output for correctness.
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.
Or remove the printf as we're already covered by asserts?
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 printf is nice to save typing when it doesn't work.
be5ef3f to
469b35f
Compare
|
Didn't l fix this months ago? |
I don't see how, as it is failing on some platforms! |
|
See #12073, which tests all complex types on all extern linkages. |
|
Ahh, you're testing Windows. I didn't think that they had complex types. |
13128b6 to
6d6823e
Compare
6d6823e to
3561277
Compare
Settle dispute over whether it works or not :-)