https://issues.dlang.org/show_bug.cgi?id=259
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #73 from thomas.bock...@gmail.com ---
(In reply to Stewart Gordon from comment #72)
> I don't understand. How can code that the spec explicitly forbids possibly
> be correct?
Normal programmers, who are not language lawyers, generally cons
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #72 from Stewart Gordon ---
(In reply to thomas.bockman from comment #71)
> The real problem is that the current strange behaviour of mixed comparisons
> is occasionally deliberately used in correct code. D must not be updated in
> a way th
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #71 from thomas.bock...@gmail.com ---
(In reply to Manuel König from comment #69)
> Not sure how to deal with the slower comparisons like long-unsigned
> that have no direct assembly comparison instruction, maybe just
> produce an error mess
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #70 from Basile-z ---
The promotion trick works unless both operand are 64 bits (and considering that
cent/ucent are not a thing yet) but that would be a progress. For long cmp
ulong a warning could be emitted.
This topic should make its c
https://issues.dlang.org/show_bug.cgi?id=259
Manuel König changed:
What|Removed |Added
CC||manuel...@gmx.net
--- Comment #69 from Manuel K
https://issues.dlang.org/show_bug.cgi?id=259
Walter Bright changed:
What|Removed |Added
CC||bugzi...@digitalmars.com
Severity|cr
https://issues.dlang.org/show_bug.cgi?id=259
Issue 259 depends on issue 9960, which changed state.
Issue 9960 Summary: Show warnings/deprecations during template instantiation
https://issues.dlang.org/show_bug.cgi?id=9960
What|Removed |Added
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #68 from hst...@quickfur.ath.cx ---
Whoa. This is approaching 12 years now, and even has a preapproved pull. When
will the fix actually get merged?!
--
https://issues.dlang.org/show_bug.cgi?id=259
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
https://issues.dlang.org/show_bug.cgi?id=259
Nick Treleaven changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #67 from Andrei Alexandrescu ---
(In reply to thomas.bockman from comment #66)
> Oops! That's the wrong DMD bug. This is the one I
> actually meant:
> https://issues.dlang.org/show_bug.cgi?id=14835
That makes sense. Thanks, and for the
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #66 from thomas.bock...@gmail.com ---
Oops! That's the wrong DMD bug. This is the one I
actually meant:
https://issues.dlang.org/show_bug.cgi?id=14835
--
https://issues.dlang.org/show_bug.cgi?id=259
thomas.bock...@gmail.com changed:
What|Removed |Added
CC||thomas.bock...@gmail.com
--- Comment
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #64 from Andrei Alexandrescu ---
Time to finalize this. We should be fine with a slight loss in efficiency in
mixed sign compare. What active PRs are open at this time?
--
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #63 from Dominikus Dittes Scherkl ---
(In reply to Dominikus Dittes Scherkl from comment #58)
> So why don't we change to something that simply always works?
I have meanwhile improved my solution to something more straight forward, with
le
https://issues.dlang.org/show_bug.cgi?id=259
Jon Degenhardt changed:
What|Removed |Added
CC||jrdemail2000-dl...@yahoo.co
https://issues.dlang.org/show_bug.cgi?id=259
Sobirari Muhomori changed:
What|Removed |Added
Keywords||industry
--
https://issues.dlang.org/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
Target Milestone|2.059 |---
Version|D1 & D2
https://issues.dlang.org/show_bug.cgi?id=259
naptime changed:
What|Removed |Added
CC||naptimeentertainment@gmail.
|
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #61 from Stewart Gordon ---
(In reply to Dominikus Dittes Scherkl from comment #58)
> The problem is still there, and the behaviour is completely inconsistent, so
> braking any code isn't a problem I think because I cannot imagine that
> an
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #60 from Dominikus Dittes Scherkl ---
(In reply to Lionello Lunesu from comment #59)
> It's currently using the C integer promotion rules, which are consistent
> (they're rules after all) but far from simple.
Ah, ok. I see why a this is a
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #59 from Lionello Lunesu ---
It's currently using the C integer promotion rules, which are consistent
(they're rules after all) but far from simple.
--
https://issues.dlang.org/show_bug.cgi?id=259
Dominikus Dittes Scherkl changed:
What|Removed |Added
CC||domini...@scherkl.de
--- Comment #5
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #57 from Lionello Lunesu ---
(In reply to Andrei Alexandrescu from comment #56)
> What's left to do about this?
I need to finish some of the static code analysis that I have been adding so we
get less false positives. It's the false positi
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #56 from Andrei Alexandrescu ---
What's left to do about this?
--
https://issues.dlang.org/show_bug.cgi?id=259
Marc Schütz changed:
What|Removed |Added
CC||schue...@gmx.net
--
https://issues.dlang.org/show_bug.cgi?id=259
--- Comment #55 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/8890678458e775e93ade1de307a417b06032ee0f
Merge pull request #
https://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #54 from bearophile_h...@eml.cc 2013-12-07 06:48:38 PST ---
If an immutable int x is inside the if branch that asserts it to be not
negative, the assignments and comparisons with an uint should not give
warnings:
uint z;
void main(
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #53 from github-bugzi...@puremagic.com 2013-09-22 14:11:38 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/439d079dce0079cbacaedd91648d85
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #52 from Lionello Lunesu 2013-09-07
12:12:57 PDT ---
Also submitted fixes to druntime:
https://github.com/D-Programming-Language/druntime/pull/601
(Note: check the pull requests for the latest info)
--
Configure issuemail: http:/
http://d.puremagic.com/issues/show_bug.cgi?id=259
Nick Treleaven changed:
What|Removed |Added
CC||ntrel-pub...@yahoo.co.uk
--- Comment #
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #50 from Lionello Lunesu 2013-05-03
14:20:12 PDT ---
I've discovered one additional case,
1b. If both types can be cast to the bigger signed type, the cast is safe
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.c
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #49 from Lionello Lunesu 2013-04-12
22:01:28 PDT ---
We should probably consider making this a warning or deprecation, instead of an
error. The silent failures within templates make it very hard to fix code.
Warnings and errors dur
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #48 from Lionello Lunesu 2013-04-11
19:42:37 PDT ---
// For the record: my test cases. Will add/fix existing unittests as well.
import std.traits;
int i;
uint ui;
long l;
ulong ul;
// 0. same-signed-ness
static assert(__traits(compi
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #47 from Lionello Lunesu 2013-04-11
19:24:53 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1889
There are many things silently(!) breaking, though, as some templates are not
being chosen because of internal comparison
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #46 from Andrei Alexandrescu 2013-04-10
09:45:57 PDT ---
(In reply to comment #45)
> uint b;
> if (b > -2) { ... }
>
> The integral expression -2 doesn't have any size per se, but whole size thing
> shouldn't even apply here, since
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #45 from Lionello Lunesu 2013-04-10
09:20:22 PDT ---
uint b;
if (b > -2) { ... }
The integral expression -2 doesn't have any size per se, but whole size thing
shouldn't even apply here, since the two expressions have ranges that ar
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #44 from Andrei Alexandrescu 2013-04-09
08:37:50 PDT ---
Thanks Lionello for working on this! It will make D noticeably better at
bread-and-butter work. Regarding your question - what Stewart said. Let me know
if you hit any snag.
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #43 from Stewart Gordon 2013-04-09 05:21:52 PDT ---
(In reply to comment #42)
> Yes, I'll have this done this week.
> For point 1: how to cope with the fact that I can safely cast an uint to long,
> but can't cast an int to an ulong
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #42 from Lionello Lunesu 2013-04-09
03:02:20 PDT ---
Yes, I'll have this done this week.
For point 1: how to cope with the fact that I can safely cast an uint to long,
but can't cast an int to an ulong (without issues)?
Surely ca
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #41 from Andrei Alexandrescu 2013-04-08
16:14:12 PDT ---
(In reply to comment #40)
> Sounds good but ... given that people have been trying for 7 years without
> success to implement the basic rule from the spec, how many more years
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #40 from Stewart Gordon 2013-04-08 15:57:45 PDT ---
Sounds good but ... given that people have been trying for 7 years without
success to implement the basic rule from the spec, how many more years can we
realistically expect it to b
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #39 from Andrei Alexandrescu 2013-04-08
07:21:23 PDT ---
Thanks Lionello for taking this over. I thought of one more case this morning
so let me insert in the food chain:
(Recall a is signed and b is unsigned.)
==
1.
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #38 from bearophile_h...@eml.cc 2013-04-07 19:29:00 PDT ---
(In reply to comment #35)
> 3. Otherwise, the comparison is in error. The error message may recommend
> using
> the std.traits.unsigned function, which executes a size-info
http://d.puremagic.com/issues/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
AssignedTo|bugzi...@digitalmars.com|nob...@puremagic.com
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #36 from Andrei Alexandrescu 2013-04-07
18:57:27 PDT ---
Preapproved FTW! Who wants to implement this?
--
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=259
--- Comment #35 from Andrei Alexandrescu 2013-04-07
18:38:23 PDT ---
Great. Here's a solution Walter and I just discussed:
Consider a comparison a < b, a <= b, a > b, or a >= b, in which a and b are
integral types of different signedness. With
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #34 from Walter Bright 2013-04-07
17:50:06 PDT ---
I don't mind if it is reopened. It's just that it's sat at the top of the
"critical" bug list forever with no movement towards a solution. I'd like to
get this resolved one way or a
http://d.puremagic.com/issues/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|WONTFI
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #32 from Walter Bright 2013-04-07
16:50:41 PDT ---
(In reply to comment #31)
> How does pull request 119 not work?
Follow the links & comments
https://github.com/D-Programming-Language/dmd/pull/119
If you want to discuss that fur
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #31 from Stewart Gordon 2013-04-07 16:02:40 PDT ---
(In reply to comment #30)
> (In reply to comment #29)
> > This is a bit abrupt. What was the decision process? I just shared an
> > anecdote
> > about a few major bugs at work caus
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #30 from Walter Bright 2013-04-07
15:49:14 PDT ---
(In reply to comment #29)
> This is a bit abrupt. What was the decision process? I just shared an anecdote
> about a few major bugs at work caused by this exact behavior.
It's been
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #29 from Andrei Alexandrescu 2013-04-07
15:03:49 PDT ---
(In reply to comment #27)
> I think we're going to have to give up on this one.
This is a bit abrupt. What was the decision process? I just shared an anecdote
about a few maj
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #28 from Denis Shelomovskij
2013-04-07 20:42:55 MSD ---
(In reply to comment #27)
> I think we're going to have to give up on this one.
Not being able to at least highlight signed to unsigned comparisons in a
program is a major lac
http://d.puremagic.com/issues/show_bug.cgi?id=259
Walter Bright changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|
http://d.puremagic.com/issues/show_bug.cgi?id=259
Denis Shelomovskij changed:
What|Removed |Added
CC||verylonglogin@gmail.com
--- Co
http://d.puremagic.com/issues/show_bug.cgi?id=259
Jesse Phillips changed:
What|Removed |Added
CC||jesse.k.phillip...@gmail.co
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #25 from bearophile_h...@eml.cc 2011-11-25 04:26:23 PST ---
(In reply to comment #24)
Thank you Don.
> Of course there could be code which relies on (-1<2u) being false.
> But surely such code is broken.
I don't like this is in D.
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #24 from Don 2011-11-25 04:05:29 PST ---
It seems wrong to me that:
if (-1 < 2u) {...}
fails to compile. Both are in the range -int.max .. int.max, so they can safely
be compared using signed comparison.
The problems with mixed sig
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #23 from bearophile_h...@eml.cc 2011-11-25 02:32:32 PST ---
I think Walter is willing to accept that patch if someone improves the patch to
remove some of its false positives.
--
Configure issuemail: http://d.puremagic.com/issues/us
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #22 from bearophile_h...@eml.cc 2011-11-24 19:25:19 PST ---
(In reply to comment #21)
> But druntime and Phobos will probably need some changes.
Keeping this as a warning in the current compiler, and turn it into an
(deprecated) err
http://d.puremagic.com/issues/show_bug.cgi?id=259
bearophile_h...@eml.cc changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
--- Comm
http://d.puremagic.com/issues/show_bug.cgi?id=259
Christian Kamm changed:
What|Removed |Added
CC||kamm-removethis@incasoftwar
http://d.puremagic.com/issues/show_bug.cgi?id=259
�ric Esti�venart changed:
What|Removed |Added
CC||eric.estieven...@free.fr
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
Severity|major |critical
--- Comment #18 from And
http://d.puremagic.com/issues/show_bug.cgi?id=259
Witold Baryluk changed:
What|Removed |Added
CC||bary...@smp.if.uj.edu.pl
--- Comment #
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #16 from Ellery Newcomer 2009-09-08
10:43:00 PDT ---
Cool. That sounds like a much better solution than the patch I posted.
Concerning my patch, I just realized that comparison with unsigned and zero
generally doesn't make sense ei
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #15 from Don 2009-09-08 09:40:30 PDT ---
(In reply to comment #14)
> Okay, so what I have is it checks for
[snip]
>
> signed cmp unsigned
>
> or vice versa is okay if the signed arg is a literal and its value is
> nonnegative.
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #14 from Ellery Newcomer 2009-09-03
13:51:16 PDT ---
Okay, so what I have is it checks for
signed cmp unsigned
or vice versa in CmpExp::Semantic just before typeCombine gets called, which
works, but then stuff like
1 < 1u
d
http://d.puremagic.com/issues/show_bug.cgi?id=259
Don changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
--- Comment #13 from Don
http://d.puremagic.com/issues/show_bug.cgi?id=259
Ellery Newcomer changed:
What|Removed |Added
CC||ellery-newco...@utulsa.edu
--- Comm
http://d.puremagic.com/issues/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
AssignedTo|and...@metalanguage.com |bugzi...@digitalmars.com
http://d.puremagic.com/issues/show_bug.cgi?id=259
Andrei Alexandrescu changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #9 from Qian Xu 2009-07-22 01:34:05 PDT
---
(In reply to comment #8)
> As I look, bug 2006 doesn't seem to have anything to do with this one at all.
>
> But if you find a duplicate of a bug, then mark it as one!
sorry, i mean i
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #8 from Stewart Gordon 2009-07-22 01:17:51 PDT ---
As I look, bug 2006 doesn't seem to have anything to do with this one at all.
But if you find a duplicate of a bug, then mark it as one!
--
Configure issuemail: http://d.purema
http://d.puremagic.com/issues/show_bug.cgi?id=259
Qian Xu changed:
What|Removed |Added
CC||qian...@funkwerk-itk.com
--- Comment #7 fro
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #6 from jarrett.billings...@gmail.com 2009-02-23 07:53 ---
(In reply to comment #5)
> > uint a = 5;
> > if (a > -2) { ... }
> >
>
> Why not? This is obviously a bug!
Agreed. I can't tell you how many times I've done som
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #5 from 2kor...@gmail.com 2009-02-23 07:40 ---
(In reply to comment #4)
> Even more critical, any fix for this bug should not make code like the
> following fail to compile:
>
> uint a = 5;
> if (a > -2) { ... }
>
Why no
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #4 from ddparn...@bigpond.com 2009-02-23 02:34 ---
Even more critical, any fix for this bug should not make code like the
following fail to compile:
uint a = 5;
if (a > -2) { ... }
--
http://d.puremagic.com/issues/show_bug.cgi?id=259
--- Comment #3 from clugd...@yahoo.com.au 2009-02-23 02:28 ---
Note that it's critical than any fix for this bug should not make code like the
following fail to compile:
uint a = 5;
if (a > 2) { ... }
Otherwise the cure would be wors
http://d.puremagic.com/issues/show_bug.cgi?id=259
s...@iname.com changed:
What|Removed |Added
CC||o.da...@gmx.de
--- Comment #2 fro
82 matches
Mail list logo