[Issue 10862] Assignment inside if condition still sometimes accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 20 14:52:27 PDT 2013


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-08-20 14:52:21 PDT ---
Are you saying that

if((a = b) == 0)

should be disallowed or just

if((a = b) = 0)

The first syntax is what is used to shut up gcc's warnings about using the
assignment operator in a condition, whereas the second clearly is using the
assignment operator in the same way that

if(a = b)

is, and that's clearly illegal.

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