https://issues.dlang.org/show_bug.cgi?id=6949
RazvanN changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=6949
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P4
--
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #17 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-12-18
09:19:32 PST ---
*** Issue 5539 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #12 from bearophile_h...@eml.cc 2012-11-30 04:17:15 PST ---
Regarding a comment by Don, is it possible to generate a warning/error only in
foo() and not in bar()?
void foo(uint x) {
if (x 0) {} // error or warning here
}
void
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #14 from bearophile_h...@eml.cc 2012-11-30 05:25:50 PST ---
(In reply to comment #13)
(In reply to comment #12)
Regarding a comment by Don, is it possible to generate a warning/error only
in
foo() and not in bar()?
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #15 from Don clugd...@yahoo.com.au 2012-11-30 06:31:17 PST ---
(In reply to comment #14)
(In reply to comment #13)
(In reply to comment #12)
Regarding a comment by Don, is it possible to generate a warning/error
only in
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #16 from bearophile_h...@eml.cc 2012-11-30 09:36:58 PST ---
(In reply to comment #15)
BTW std.bigint has a lot of examples of valid comparisons of unsigned 0 .
The comparisons in std.bigint are like this, all of them are inside
http://d.puremagic.com/issues/show_bug.cgi?id=6949
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
Keywords||pull
http://d.puremagic.com/issues/show_bug.cgi?id=6949
bearophile_h...@eml.cc changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
---
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-29
16:40:59 PST ---
(In reply to comment #2)
Is Phobos giving some warnings with this patch? More study is
probably needed.
The autotester is running. It failed once
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-29
17:21:48 PST ---
(In reply to comment #4)
In your code this comment is obsolete:
// Warn when unsigned type is ...
Thanks.
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #4 from bearophile_h...@eml.cc 2012-11-29 17:20:37 PST ---
(In reply to comment #3)
I've added a workaround so the warning isn't triggered in this case anymore.
We'll see what the tester says..
OK. It seems Andrei has
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #6 from bearophile_h...@eml.cc 2012-11-29 18:03:20 PST ---
How about code like this?
void main() {
uint i = 0;
if (i == -2)
assert(0, never);
}
Note that this is currently valid D code:
void main() {
uint i =
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #7 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-29
18:14:27 PST ---
(In reply to comment #6)
How about code like this?
void main() {
uint i = 0;
if (i == -2)
assert(0, never);
}
Note that
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #8 from bearophile_h...@eml.cc 2012-11-29 18:17:45 PST ---
(In reply to comment #7)
I want to see how Walter reacts to the pull before these are handled.
Right, OK.
This new error message of yours hits code like this in
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #9 from bearophile_h...@eml.cc 2012-11-29 18:22:17 PST ---
Maybe you want to temporarily turn your new error message into a warning (that
later will become an error again, if you want), so if Phobos gets entirely
compiled with -wi
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #10 from Walter Bright bugzi...@digitalmars.com 2012-11-29
19:50:14 PST ---
(In reply to comment #6)
How about code like this?
void main() {
uint i = 0;
if (i == -2)
assert(0, never);
}
Equality has nothing
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #11 from bearophile_h...@eml.cc 2012-11-29 20:15:15 PST ---
(In reply to comment #10)
Some languages, such as Java, deal with this duality by defining the unsigned
type out of existence.
There are languages like Ada, that have
http://d.puremagic.com/issues/show_bug.cgi?id=6949
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
19 matches
Mail list logo