[Issue 19253] New: extern(C++, "
https://issues.dlang.org/show_bug.cgi?id=19253 Issue ID: 19253 Summary: extern(C++, " Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: turkey...@gmail.com --
[Issue 19253] extern(C++, "
https://issues.dlang.org/show_bug.cgi?id=19253 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --
[Issue 15512] extern(C++, ns) should consider taking a string
https://issues.dlang.org/show_bug.cgi?id=15512 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/8667 --
[Issue 19252] Templated format with variable width allocates 2GB of RAM per call.
https://issues.dlang.org/show_bug.cgi?id=19252 FeepingCreature changed: What|Removed |Added Severity|major |regression --
[Issue 19252] New: Templated format with variable width allocates 2GB of RAM per call.
https://issues.dlang.org/show_bug.cgi?id=19252 Issue ID: 19252 Summary: Templated format with variable width allocates 2GB of RAM per call. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: default_357-l...@yahoo.de Consider the following code: void main() { import core.memory; import std.format; import std.stdio; auto s = format!"%0*d"(0, 0); writefln!"%s, but %s"(s, GC.stats.usedSize); } Since 2.079, this will output "Success with output: 0, but 2147483680". This happens because format will preallocate an appender based on its estimate of the output string length, but guessLength does not know about spec.DYNAMIC (the representation of "*"), which is represented by int.max. So ... guessLength guesses a length of int.max plus some small fry, allocating 2GB. This does not explode on Linux because the GC uses mmap, and Linux happily lets the program overcommit and allocate terabytes of RAM, since it isn't going to be used. But it's still quite bad. Fixed by https://github.com/dlang/phobos/pull/6713 --
[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts
https://issues.dlang.org/show_bug.cgi?id=17729 --- Comment #3 from er.kr...@gmail.com --- (In reply to ag0aep6g from comment #2) > Dereferencing a pointer gives an lvalue. If it gave an rvalue, pointers > would be pretty useless. You couldn't assign through them. > > If you disagree or have more questions on this, I'd suggest making a thread > on D.learn [1]. We're going off topic here. > > > [1] https://forum.dlang.org/group/learn Sure, now that I think about it, it seems indeed obvious, sorry for the OT. --
[Issue 17716] wrong result of IsExpression when not in static assert
https://issues.dlang.org/show_bug.cgi?id=17716 --- Comment #4 from er.kr...@gmail.com --- (In reply to ag0aep6g from comment #3) > > You made the same comment on issue 17729, and it makes more sense there. I > guess you posted it here by accident? Yes I did, I didn't notice that bugzilla had moved to the "next" bug and I thought it hadn't been posted. If there's a way to remove it (and this comment, if needed), please do, I don't think I can do it myself. --
[Issue 17716] wrong result of IsExpression when not in static assert
https://issues.dlang.org/show_bug.cgi?id=17716 --- Comment #3 from ag0aep6g --- (In reply to er.krali from comment #2) > Furthermore, it doesn't work with ref parameters either: [...] You made the same comment on issue 17729, and it makes more sense there. I guess you posted it here by accident? --
[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts
https://issues.dlang.org/show_bug.cgi?id=17729 --- Comment #2 from ag0aep6g --- (In reply to er.krali from comment #1) > I also can't understand why the workaround works at all, the result of > dereferencing a pointer should surely be a rvalue? > > Is that also a bug? Dereferencing a pointer gives an lvalue. If it gave an rvalue, pointers would be pretty useless. You couldn't assign through them. If you disagree or have more questions on this, I'd suggest making a thread on D.learn [1]. We're going off topic here. [1] https://forum.dlang.org/group/learn --
[Issue 17716] wrong result of IsExpression when not in static assert
https://issues.dlang.org/show_bug.cgi?id=17716 er.kr...@gmail.com changed: What|Removed |Added CC||er.kr...@gmail.com --- Comment #2 from er.kr...@gmail.com --- Furthermore, it doesn't work with ref parameters either: --- struct S { int i; } void fun(ref S s, int i) { s.i = i; } void main() { shared S s; /* This fails: onlineapp.d(17): Error: function onlineapp.fun(ref S s, int i) is not callable using argument types (S, int) onlineapp.d(17):cannot pass rvalue argument cast(S)s of type S to parameter ref S s fun(cast(S) s, 1); */ (*(cast (S*) )).fun(1); // Nasty workaround assert (s.i == 1); } --- I also can't understand why the workaround works at all, the result of dereferencing a pointer should surely be a rvalue? Is that also a bug? --
[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts
https://issues.dlang.org/show_bug.cgi?id=17729 er.kr...@gmail.com changed: What|Removed |Added CC||er.kr...@gmail.com --- Comment #1 from er.kr...@gmail.com --- Furthermore, it doesn't work with ref parameters either: --- struct S { int i; } void fun(ref S s, int i) { s.i = i; } void main() { shared S s; /* This fails: onlineapp.d(17): Error: function onlineapp.fun(ref S s, int i) is not callable using argument types (S, int) onlineapp.d(17):cannot pass rvalue argument cast(S)s of type S to parameter ref S s fun(cast(S) s, 1); */ (*(cast (S*) )).fun(1); // Nasty workaround assert (s.i == 1); } --- I also can't understand why the workaround works at all, the result of dereferencing a pointer should surely be a rvalue? Is that also a bug? --
[Issue 15609] Populate vtable in debuginfo
https://issues.dlang.org/show_bug.cgi?id=15609 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 19194] version for `-mscrtlib` specification
https://issues.dlang.org/show_bug.cgi?id=19194 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 19194] version for `-mscrtlib` specification
https://issues.dlang.org/show_bug.cgi?id=19194 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0563a79dc81366236cbda77eada43ea98761310d Fixes Issue 19194 - version for `-mscrtlib` specification Add __CXXLIB__ predefined enum. --