[Issue 10480] Warning against wrong usage of incorrect operator for bits set test

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 26 15:44:27 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10480


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2013-06-26 15:44:25 PDT ---
I'm unhappy with making this an error or a warning. It's perfectly reasonable
to write code that tests something that is (at compile time) always true or
false. This can happen:

1. in generic code

2. in reasonable attempts to avoid versioning

3. D code idiomatically does quite a bit more at compile time than other
languages do. This change would make that more difficult.

4. in temporary debugging code, like:

    if (0 && condition) ...

-- 
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