September 02, 2015 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 --- Comment #10 from github-bugzilla@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3bbe72b5fdc278fe1293c20b39af4f94b10070bb fix Issue 14696 - destructor for temporary called before statement is complete with conditional operator https://github.com/D-Programming-Language/dmd/commit/38d31b0364e555ce42a8f47ca656e59b1cf90aad Merge pull request #5003 from 9rnsr/fix14696_cdmd Issue 14696, 14708, and [REG2.068] 14979 - Fix destructor issues for temporary in conditional operator -- |
September 02, 2015 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 github-bugzilla@puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- |
September 07, 2015 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 --- Comment #11 from github-bugzilla@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3bbe72b5fdc278fe1293c20b39af4f94b10070bb fix Issue 14696 - destructor for temporary called before statement is complete with conditional operator https://github.com/D-Programming-Language/dmd/commit/38d31b0364e555ce42a8f47ca656e59b1cf90aad Merge pull request #5003 from 9rnsr/fix14696_cdmd -- |
November 28, 2019 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 Suleyman Sahmi (سليمان السهمي) <sahmi.soulaimane@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |sahmi.soulaimane@gmail.com Resolution|FIXED |--- --- Comment #12 from Suleyman Sahmi (سليمان السهمي) <sahmi.soulaimane@gmail.com> --- The following case is still affected: ``` extern(C) void puts(const char*); struct S { int i; ~this() { puts("D"); } } S makeS(int i) { return S(i); } void main() { int var = true ? 1 : makeS(makeS(1).i - 1).i; } ``` The program prints "D" at runtime which means the destructor is called when it shouldn't. -- |
November 28, 2019 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 --- Comment #13 from Dlang Bot <dlang-bot@dlang.rocks> --- @SSoulaimane created dlang/dmd pull request #10628 "Fix issue 14696 - Fix a remaining case where the destructor is still called on a cold branch" fixing this issue: - Fix issue 14696 - Fix a remaining case where the destructor is still called on a cold branch Temporary variables should not be destroyed when the branch that initializes them is not taken. https://github.com/dlang/dmd/pull/10628 -- |
November 29, 2019 [Issue 14696] destructor for temporary called before statement is complete with conditional operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14696 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #14 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #10628 "Fix issue 14696 - Fix a remaining case where the destructor is still called on a cold branch" was merged into master: - 2ec3f1090a11c5b6fe0a9507ba47f7081161ba7f by سليمان السهمي (Suleyman Sahmi): Fix issue 14696 - Fix a remaining case where the destructor is still called on a cold branch Temporary variables should not be destroyed when the branch that initializes them is not taken. https://github.com/dlang/dmd/pull/10628 -- |
Copyright © 1999-2021 by the D Language Foundation