Skip to content
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 22067 - importC: cast-expression accepted as lvalue in assignment-expression #12736

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jun 22, 2021

Without having to go though the D semantic and modify each place where there's deviation from C, just check that each kind of expression is a valid lvalue in C11 if used in one of the contexts where an lvalue is required during CParse. This only deals with op codes, the Expression semantic pass can deal with more complex errors later - such as wrong type or assigning to const.

@ibuclaw ibuclaw added Severity:Bug Fix Feature:ImportC Pertaining to ImportC support labels Jun 22, 2021
@dlang-bot
Copy link
Contributor

dlang-bot commented Jun 22, 2021

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
22067 critical importC: cast-expression accepted as lvalue in assignment-expression

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#12736"

@ibuclaw ibuclaw force-pushed the issue22067 branch 5 times, most recently from 46ac11e to b99ba0c Compare June 23, 2021 17:08
@ibuclaw ibuclaw requested a review from RazvanN7 as a code owner June 23, 2021 17:08
@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 24, 2021

Re-added closing brace in test, result of bad rebase.

@dlang-bot dlang-bot merged commit 6e51796 into dlang:master Jun 24, 2021
@ibuclaw ibuclaw deleted the issue22067 branch June 24, 2021 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants