bugs caused by dynamic arrays in boolean evaluation
context
Turn it into a warning
https://github.com/D-Programming-Language/dmd/commit/b9177ab9322f8fac7f20f279a5517eda26734ef9
Merge pull request #2885 from yebblies/issue4733
Issue 4733 - Possible bugs caused by dynamic arrays in boolean
https://issues.dlang.org/show_bug.cgi?id=4733
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|--
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #30 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org
https://github.com/D-Programming-Language/dlang.org/commit/baa98b725ac75356a29405c164743f7cea7d502d
Add changelog en
4733 - Possible bugs caused by dynamic arrays in boolean
evaluation context"
This reverts commit 727233c9c5c1d81d13527f74b0a640f546f28a6c.
https://github.com/D-Programming-Language/dmd/commit/ef0bb27a609ffa9102a7bac713e4f418f16e92c1
Merge pull request #4623 from andralex/fix-array-to-bool-warni
Revert "Fix Issue 4733 - Possible bugs caused by dynamic arrays in boolean
evaluation context"
https://github.com/D-Programming-Language/dmd/commit/ef0bb27a609ffa9102a7bac713e4f418f16e92c1
Merge pull request #4623 from andralex/fix-array-to-bool-warning
--
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #33 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dlang.org
https://github.com/D-Programming-Language/dlang.org/commit/baa98b725ac75356a29405c164743f7cea7d502d
Add changelog en
https://issues.dlang.org/show_bug.cgi?id=4733
Kenji Hara changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
https://issues.dlang.org/show_bug.cgi?id=4733
Steven Schveighoffer changed:
What|Removed |Added
Status|REOPENED|RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=4733
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #38 from Nick Tre
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #39 from anonymous4 ---
AIU some believe it's a feature, not a bug? Then it becomes a style rule.
Editions are only supposed for consensus.
--
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #40 from Nick Treleaven ---
Isn't there a consensus that the feature is bug prone (at the very least for
new users)?
--
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #41 from Steven Schveighoffer ---
I would vote for `if(arr)` to be true only if length > 0, instead of making it
illegal.
But some people do distinguish between null arrays and empty arrays, and this
would be a breaking change for that co
https://issues.dlang.org/show_bug.cgi?id=4733
Paul Backus changed:
What|Removed |Added
CC||snarwin+bugzi...@gmail.com
--- Comment #42 from
https://issues.dlang.org/show_bug.cgi?id=4733
Vladimir Panteleev changed:
What|Removed |Added
CC||timon.g...@gmx.ch
--- Comment #36 from V
boolean evaluation
context
https://github.com/dlang/dmd/commit/b9177ab9322f8fac7f20f279a5517eda26734ef9
Merge pull request #2885 from yebblies/issue4733
https://github.com/dlang/dmd/commit/72e8bfd2ac371d9a2acc34d7313882a5c4547ce0
Revert "Fix Issue 4733 - Possible bugs caused by dynamic arra
http://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #1 from bearophile_h...@eml.cc 2012-02-19 04:57:20 PST ---
See also issue 7539
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
http://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #2 from bearophile_h...@eml.cc 2013-03-25 15:59:36 PDT ---
I have created a thread about this issue in the main D newsgroup:
http://forum.dlang.org/thread/bwgnbflygowctlisi...@forum.dlang.org
It was well received by almost every on
http://d.puremagic.com/issues/show_bug.cgi?id=4733
Dmitry S changed:
What|Removed |Added
CC||ds.dl...@gmail.com
--- Comment #3 from Dmit
http://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #4 from bearophile_h...@eml.cc 2013-09-21 05:19:09 PDT ---
See also issue 11080, that asks to disallow this bug-prone construct:
assert("something going wrong");
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?
https://d.puremagic.com/issues/show_bug.cgi?id=4733
yebblies changed:
What|Removed |Added
Keywords||pull
CC|
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #6 from github-bugzi...@puremagic.com 2013-11-26 23:07:47 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/e5ed1beb8ebf86314136875801c2d
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #7 from bearophile_h...@eml.cc 2013-11-27 01:13:24 PST ---
(In reply to comment #5)
> Warning:
>
> https://github.com/D-Programming-Language/dmd/pull/2885
The new warning is:
warning("converting dynamic arrays to boolean is depre
https://d.puremagic.com/issues/show_bug.cgi?id=4733
rswhi...@googlemail.com changed:
What|Removed |Added
CC||rswhi...@googlemail.com
---
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #9 from yebblies 2013-11-27 21:12:54 EST ---
How about:
"converting dynamic arrays to boolean is deprecated, instead use
std.array.empty or array.ptr"
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=emai
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #10 from yebblies 2013-11-27 21:15:07 EST ---
(In reply to comment #8)
> Or simply: use arr.length != 0
That is not the same as `if (arr)`, and I don't want this to make people
accidentally break their code.
--- Comment #11 from
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #10 from yebblies 2013-11-27 21:15:07 EST ---
(In reply to comment #8)
> Or simply: use arr.length != 0
That is not the same as `if (arr)`, and I don't want this to make people
accidentally break their code.
--- Comment #11 from
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #12 from rswhi...@googlemail.com 2013-11-27 02:20:29 PST ---
(In reply to comment #11)
> (In reply to comment #8)
> > Or simply: use arr.length != 0
>
> That is not the same as `if (arr)`, and I don't want this to make people
> acc
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #13 from yebblies 2013-11-27 21:31:49 EST ---
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #8)
> > > Or simply: use arr.length != 0
> >
> > That is not the same as `if (arr)`, and I don't want thi
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #14 from rswhi...@googlemail.com 2013-11-27 02:37:17 PST ---
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > (In reply to comment #8)
> > > > Or simply: use arr.length != 0
> > >
> > > That
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #15 from github-bugzi...@puremagic.com 2013-11-27 02:39:58 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/218ad0bf43299bea71b98a9f2bf8e056
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #17 from rswhi...@googlemail.com 2013-11-27 03:19:55 PST ---
(In reply to comment #16)
> (In reply to comment #14)
>
> > I would prefer that the warning consider arr.length != 0 more than
> > std.array.empty. Nothing else. Hope you
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #16 from bearophile_h...@eml.cc 2013-11-27 03:16:45 PST ---
(In reply to comment #14)
> I would prefer that the warning consider arr.length != 0 more than
> std.array.empty. Nothing else. Hope you understand me now.
Suggesting peo
https://d.puremagic.com/issues/show_bug.cgi?id=4733
Martin Nowak changed:
What|Removed |Added
CC||c...@dawg.eu
--- Comment #18 from Mart
https://d.puremagic.com/issues/show_bug.cgi?id=4733
Walter Bright changed:
What|Removed |Added
CC||bugzi...@digitalmars.com
--- Comment
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #20 from bearophile_h...@eml.cc 2013-12-10 03:53:21 PST ---
(In reply to comment #19)
> 1. making this change will break existing code
Yes, it's one of the small breaking changes, this one I have asked since
2010-08-26. There are a
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #21 from bearophile_h...@eml.cc 2013-12-10 05:24:44 PST ---
(In reply to comment #20)
> Yes, it's one of the small breaking changes, ...
As usual, sorry for the little aggressive tone of some of my answers, Walter.
--
Configure
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #22 from bearophile_h...@eml.cc 2013-12-10 05:51:18 PST ---
> It's not something you do often. I don't think I have 1 case in my code where
> I
> need to do this.
I have few usages of array.ptr in my D code: for variable length st
https://d.puremagic.com/issues/show_bug.cgi?id=4733
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--- Co
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #24 from Martin Nowak 2013-12-14 02:12:58 PST ---
Let me restate the obvious. The following code has a bug.
if (arr)
writeln(arr[0]);
I don't understand why this causes so much discussion.
> making this change will b
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #24 from Martin Nowak 2013-12-14 02:12:58 PST ---
Let me restate the obvious. The following code has a bug.
if (arr)
writeln(arr[0]);
I don't understand why this causes so much discussion.
> making this change will b
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #26 from Martin Nowak 2013-12-14 02:15:34 PST ---
Let me restate the obvious. The following code has a bug.
if (arr)
writeln(arr[0]);
I don't understand why this causes so much discussion.
> making this change will b
https://d.puremagic.com/issues/show_bug.cgi?id=4733
--- Comment #27 from github-bugzi...@puremagic.com 2013-12-15 08:53:54 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/6a8d98dd296448b3e840660b30f98db7
https://issues.dlang.org/show_bug.cgi?id=4733
--- Comment #28 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/3f50d37b2bed43a82fda3c5fee47b63eaa8765c1
missing executeArgs
43 matches
Mail list logo