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 22931 - importC: Error: 0 has no effect #13912

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

WalterBright
Copy link
Member

No description provided.

@WalterBright WalterBright added Review:Easy Review Feature:ImportC Pertaining to ImportC support labels Mar 29, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
22931 normal importC: Error: `0` has no effect

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#13912"

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings?

if (e.type is Type.tvoid)
discardValue(e.e1);
else if (!e.allowCommaExp && !e.isGenerated && !(sc.flags & SCOPE.Cfile))
else if (!e.allowCommaExp && !e.isGenerated)
e.error("Using the result of a comma expression is not allowed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to this PR, but shouldn't result be pointing to an ErrorExp in this case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably right. But that should be a separate PR.

@WalterBright
Copy link
Member Author

@ibuclaw it isn't in ImportC's mission to do warnings.

@WalterBright WalterBright merged commit 0be2f13 into dlang:master Mar 30, 2022
@WalterBright WalterBright deleted the fix22931 branch March 30, 2022 01:13
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.

5 participants