[Issue 6949] no warning or error if unsigned variable is compared to 0
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 30 05:25:52 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #14 from bearophile_hugs at 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()?
> >
> >
> > void foo(uint x) {
> > if (x < 0) {} // error or warning here
> > }
> > void bar(T)(T x) {
> > if (x < 0) {} // OK
> > }
> > void main() {
> > foo(5U);
> > bar(5U);
> > }
>
> I doubt it.
I'd like a better answer about this, maybe from Don or Hara or someone that
knows this answer better.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list