[Issue 15192] DIP25: Nested ref returns are type checked unsoundly
https://issues.dlang.org/show_bug.cgi?id=15192 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 15192] DIP25: Nested ref returns are type checked unsoundly
https://issues.dlang.org/show_bug.cgi?id=15192 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ad419f24f498526e112f07bf9fbe26e31de319bc fix Issue 15192 - DIP25: Nested ref returns are type checked unsoundly https://github.com/dlang/dmd/commit/feb06a7548341ab1d794061d66850c611a7fb074 Merge pull request #5893 from WalterBright/fix15192 fix Issue 15192 - DIP25: Nested ref returns are type checked unsoundly --
[Issue 15193] DIP25 (implementation): Lifetimes of temporaries tracked incorrectly
https://issues.dlang.org/show_bug.cgi?id=15193 Walter Bright changed: What|Removed |Added Keywords||pull --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/5895 --
[Issue 16195] delete should be @system
https://issues.dlang.org/show_bug.cgi?id=16195 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 16195] delete should be @system
https://issues.dlang.org/show_bug.cgi?id=16195 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e64ae1d3e5aa078a036242864a68499617c9b278 fix Issue 16195 - delete should be @system https://github.com/dlang/dmd/commit/71ecbed629c830fd10c7923cf6298cfce7f54ee7 Merge pull request #5887 from WalterBright/fix16195 fix Issue 16195 - delete should be @system --
[Issue 15193] DIP25 (implementation): Lifetimes of temporaries tracked incorrectly
https://issues.dlang.org/show_bug.cgi?id=15193 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 15193] DIP25 (implementation): Lifetimes of temporaries tracked incorrectly
https://issues.dlang.org/show_bug.cgi?id=15193 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f2c50d0ba2fdff00bc58fa6be732e405f2ddf600 fix Issue 15193 - DIP25 (implementation): Lifetimes of temporaries tracked incorrectly https://github.com/dlang/dmd/commit/2b297099a0d8acb241a1032b7783628914d4c5c2 Merge pull request #5895 from WalterBright/fix15193 fix Issue 15193 - DIP25 (implementation): Lifetimes of temporaries tracked incorrectly --
[Issue 16224] New: -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 Issue ID: 16224 Summary: -cov marks the last line of do/while(0); as uncovered Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Consider: int fun(int x) { do { if (x != 0) break; if (x != 1) break; if (x != -1) break; return x; } while (0); return x * x * x; } unittest { fun(0); fun(1); fun(2); } The do/while(0); idiom is a trick used to avoid goto or additional state variables. It simply allows code to jump to a common point by using "break". The coverage analyzer marks the line with "while (0);" as uncovered, although that is an useless tidbit. --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #1 from hst...@quickfur.ath.cx --- So what's the problem here? --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 --- Comment #2 from hst...@quickfur.ath.cx --- Nevermind, I get it now. Sorry for the noise. --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 --- Comment #3 from Andrei Alexandrescu --- For clarity, I'll paste the code (fixed to do something useful, i.e. compute the cube of an int) and the listing: int cube(int x) { do { if (x == 0) break; if (x == 1) break; if (x == -1) break; return x * x * x; } while (0); return x; } unittest { cube(0); cube(1); cube(-1); cube(2); } = |int cube(int x) |{ |do |{ 4|if (x == 0) 1|break; 3|if (x == 1) 1|break; 2|if (x == -1) 1|break; 1|return x * x * x; |} 000|while (0); 3|return x; |} | |unittest |{ 1|cube(0); 1|cube(1); 1|cube(-1); 1|cube(2); |} --
[Issue 16225] New: Internal error cod1.c 1338 with -O
https://issues.dlang.org/show_bug.cgi?id=16225 Issue ID: 16225 Summary: Internal error cod1.c 1338 with -O Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: 4bur...@gmail.com When using -O with dmd fails with the following code (reduced): ``` struct C { hash_t foo( ) { int y; return ((cast(ubyte*)&y)[1]); } } ``` ``` nemanjaboric:/home/nemanjaboric/test-clean.reduced $ dmd -O testreduced.d Internal error: backend/cod1.c 1338 ``` ``` DMD64 D Compiler v2.071.1 ``` --
[Issue 16225] Internal error cod1.c 1338 with -O
https://issues.dlang.org/show_bug.cgi?id=16225 Dicebot changed: What|Removed |Added CC||pub...@dicebot.lv Severity|enhancement |critical --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #4 from Steven Schveighoffer --- I don't see why while(true) is any worse. Essentially: while(true) { ... break; } Is the same as the do...while(0) --
[Issue 16225] Internal error cod1.c 1338 with -O
https://issues.dlang.org/show_bug.cgi?id=16225 Steven Schveighoffer changed: What|Removed |Added Keywords||ice-on-valid-code --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 --- Comment #5 from Andrei Alexandrescu --- (In reply to Steven Schveighoffer from comment #4) > I don't see why while(true) is any worse. > > Essentially: > > while(true) > { > ... > break; > } > > Is the same as the do...while(0) Yah, switch is also fine: switch (0) { default: } It just seems to me do/while(0) is the clearest, most obvious, and the least bug-prone. --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 --- Comment #6 from Johan Engelen --- > The coverage analyzer marks the line with "while (0);" as uncovered, > although that is an useless tidbit. I don't think it is useless. In the OP example, while(0) is uncovered because there is never a "fallthrough exit" of that scope. Consider something like this where coverage of while(0) is useful. int fun(int x) { do { if (x != 0) break; if (x != 1) break; if (x != -1) break; mightThrow(x); } while (0); return x * x * x; } --
[Issue 16225] Internal error cod1.c 1338 with -O
https://issues.dlang.org/show_bug.cgi?id=16225 --- Comment #1 from Nemanja Boric <4bur...@gmail.com> --- Looks like it got introduced in 2.068 --
[Issue 16224] -cov marks the last line of do/while(0); as uncovered
https://issues.dlang.org/show_bug.cgi?id=16224 --- Comment #7 from Andrei Alexandrescu --- (In reply to Johan Engelen from comment #6) > > The coverage analyzer marks the line with "while (0);" as uncovered, > > although that is an useless tidbit. > > I don't think it is useless. In the OP example, while(0) is uncovered > because there is never a "fallthrough exit" of that scope. Consider > something like this where coverage of while(0) is useful. > > int fun(int x) > { > do > { > if (x != 0) > break; > if (x != 1) > break; > if (x != -1) > break; > mightThrow(x); > } > while (0); > return x * x * x; > } In this case I agree coverage should be as usual. The presence of "return" changes things. --
[Issue 16225] [REG 2.068] Internal error cod1.c 1338 with -O
https://issues.dlang.org/show_bug.cgi?id=16225 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com Summary|Internal error cod1.c 1338 |[REG 2.068] Internal error |with -O |cod1.c 1338 with -O OS|Linux |All Severity|critical|regression --- Comment #2 from Steven Schveighoffer --- Confirms it fails also on MacOS --
[Issue 16142] Adding a dtor / postblit (even disabled) forces opAssign
https://issues.dlang.org/show_bug.cgi?id=16142 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/517f14a949a2998e51517cbef444f2b3208a3789 Fix issue 16142: Disabled opEquals is overriden when a dtor/postblit is present In order to pick up disabled opEquals, we need to process the members of the struct anyway even if there is a dtor / postblit. https://github.com/dlang/dmd/commit/113cf3f4f8b4a786d7d7dca6bfc62ed024d12af9 Merge pull request #5854 from mathias-lang-sociomantic/opassign-2 Fix issue 16142: Disabled opAssign is overriden when a dtor/postblit is present --
[Issue 16226] New: -dip25 doesn't work if the return type is not explicit
https://issues.dlang.org/show_bug.cgi?id=16226 Issue ID: 16226 Summary: -dip25 doesn't work if the return type is not explicit Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: issues.dl...@jmdavisprog.com This code results in an error with -dip25: void main() @safe { int i; foo(i); } ref int foo(ref int bar) @safe { return bar; } but this code void main() @safe { int i; foo(i); } ref foo(ref int bar) @safe { return bar; } and this code void main() @safe { int i; foo(i); } ref auto foo(ref int bar) @safe { return bar; } do not result in an error. Note that unless the return type actually includes int explictly rather than letting it be inferred, -dip25 is bypassed completely. Interestingly enough, it does catch this case though and error out correctly: void main() @safe { foo(); } ref foo() @safe { int bar = 42; return bar; } --
[Issue 16226] -dip25 doesn't work if the return type is not explicit
https://issues.dlang.org/show_bug.cgi?id=16226 Jonathan M Davis changed: What|Removed |Added Keywords||safe --