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

[REG 2.067] Issue 15490 - Error variable __nrvoretval cannot be modified at compile time when using -inline #5415

Merged
merged 1 commit into from
Feb 7, 2016

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Feb 6, 2016

CTFE interpretr can recognize a form CommaExp(DeclaraationExp(v), VarExp(v)) as a CTFEable variable declaration when v._init is null. In other cases, for examle a sole DeclarationExp should have v._init for CTFE-ability.

Supply VoidInitializer to allow inlining the temporary for NRVO.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15490 [REG 2.067] Error variable __nrvoretval cannot be modified at compile time when using -inline

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

Thanks for this.

@ibuclaw
Copy link
Member

ibuclaw commented Feb 6, 2016

Auto-merge toggled on

…ompile time when using -inline

CTFE interpretr can recognize a form `CommaExp(DeclaraationExp(v), VarExp(v))` as
a CTFEable variable declaration when `v._init` is `null`. In other cases, for
examle a sole `DeclarationExp` should have v._init for CTFE-ability.

Supply `VoidInitializer` to allow inlining the temporary for NRVO.
ibuclaw added a commit that referenced this pull request Feb 7, 2016
[REG 2.067] Issue 15490 - Error variable __nrvoretval cannot be modified at compile time when using -inline
@ibuclaw ibuclaw merged commit 31232a9 into dlang:stable Feb 7, 2016
@9rnsr 9rnsr deleted the fix15490 branch February 7, 2016 01:05
@9rnsr
Copy link
Contributor Author

9rnsr commented Feb 7, 2016

Thanks!

tramker added a commit to tramker/dmd that referenced this pull request Feb 14, 2016
[REG 2.067] Issue 15490 - Error variable __nrvoretval cannot be modified at compile time when using -inline
Conflicts:
	src/inline.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants