core.atomic.cas: add 'const' attribute to local variable 'arg1'#3373
core.atomic.cas: add 'const' attribute to local variable 'arg1'#3373dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @thaven! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. 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 + druntime#3373" |
5fe1877 to
b748ecd
Compare
|
This seems to break both the dmd's and phobos's test suites. |
|
That looks like an invalid issue to me. You should not be able to store a const(int)* ptr;
int* ptr = ptr;Which is not sound. |
|
@Geod24 not really. The case is more like: int* a;
const(int)* b;
int* c;
if (a is b)
a = c;So it is just comparing pointer to const against pointer to mutable. |
|
Oh, I see. Indeed. However using |
|
ping @thaven . How do we proceed here? |
b748ecd to
2c97de0
Compare
|
It all depends on what to do about the assignments to 'resolve implicit conversions'. I guess those are there to get more clear error messages in case of a type error related to Anyway, the mere presence of those lines doesn't cause the issue, it's the wrong type on |
|
This seems to be passing all tests now. |
2c97de0 to
b46844a
Compare
Avoid possible unnecessary const to mutable conversion, which is not implicit for pointers. See Issue 21631 for details.