[Issue 18788] New: static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 Issue ID: 18788 Summary: static arrays with a length specified at runtime should dynamically allocate on the stack Product: D Version: D2 Hardware: All OS: All

[Issue 18788] static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 Nicholas Wilson changed: What|Removed |Added CC|

[Issue 3925] Missed escaping reference of a local variable

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3925 Nick Treleaven changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18738] [scope] scope delegates can be escaped via closure

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18738 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment

[Issue 18789] New: std.stdio messes up UTF conversions on output

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18789 Issue ID: 18789 Summary: std.stdio messes up UTF conversions on output Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

[Issue 18789] std.stdio messes up UTF conversions on output

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18789 ag0aep6g changed: What|Removed |Added Keywords||pull

[Issue 3024] Array slicing allows returning an escaping reference to a local stack variable

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3024 Nick Treleaven changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18788] static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 --- Comment #2 from Mike Franklin --- Yes it is unsafe, but not any less safe than void unsafeRecursion(size_t iterations) { if(iterations) { byte[256] buffer; unsafeRecursion(--iterations); } } As

[Issue 15348] std.stdio.writef format specifier error message

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15348 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment

[Issue 18788] static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 Adam D. Ruppe changed: What|Removed |Added CC|

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 --- Comment #3 from Steven Schveighoffer --- (In reply to Jonathan M Davis from comment #1) > (In reply to Steven Schveighoffer from comment #0) > > The most basic string output range is char[]. Why can't I put a string in > >

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 --- Comment #5 from Steven Schveighoffer --- (In reply to Jonathan M Davis from comment #1) > Because char[] isn't an output range at all. isOutputRange!(char[], char) is > false. Something to consider: isOutputRange!(char[],

[Issue 18525] Constraint on std.algorithm.mutation.remove fails with char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18525 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18525] Constraint on std.algorithm.mutation.remove fails with char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18525 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/8d314b5ffbeb67adf27c68e11976a1d63917717b Fix Issue 18525: std.algorithm.mutate.remove should

[Issue 18790] New: can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 Issue ID: 18790 Summary: can't put a const(char)[] into a char[] Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority:

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 --- Comment #4 from hst...@quickfur.ath.cx --- Given that std.range.put goes out of its way to support putting single elements, multiple elements, and in some cases even dchars into strings, I'm shocked that putting dchar into char[] doesn't work.

[Issue 15869] RVO can overwrite argument

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 Walter Bright changed: What|Removed |Added CC|

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 --- Comment #6 from Steven Schveighoffer --- PR: https://github.com/dlang/phobos/pull/6471 --

[Issue 15869] RVO can overwrite argument

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 --- Comment #10 from Walter Bright --- https://github.com/dlang/dmd/pull/8200 --

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 --- Comment #7 from Jonathan M Davis --- (In reply to hsteoh from comment #4) > Given that std.range.put goes out of its way to support putting single > elements, multiple elements, and in some cases even dchars into

[Issue 18790] can't put a const(char)[] into a char[]

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18790 Nicholas Wilson changed: What|Removed |Added CC|

[Issue 18788] static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 --- Comment #5 from Mike Franklin --- Another way of achieving the same result would be to make a `scope`d dynamic array allocate on the stack --- class C { } void main() { scope C c = new C(); // `c` is allocated on

[Issue 15869] RVO can overwrite argument

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 --- Comment #11 from Ketmar Dark --- ahem. i was under impression that "constructors" in D are actually "post-initializers". i.e. that object must be fully initialized with default values before calling ctor, and can't have

[Issue 15869] RVO can overwrite argument

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15869 --- Comment #12 from Walter Bright --- (In reply to Walter Bright from comment #9) > The most pragmatic solution is to not allow taking a reference to an > unconstructed field. That proved unworkable. One that does work

[Issue 18788] static arrays with a length specified at runtime should dynamically allocate on the stack

2018-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18788 Jonathan M Davis changed: What|Removed |Added CC|