qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [7234] Use a more natural order


From: Lennart Sorensen
Subject: Re: [Qemu-devel] Re: [7234] Use a more natural order
Date: Thu, 23 Apr 2009 15:46:27 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Apr 23, 2009 at 09:37:05PM +0200, Jan Kiszka wrote:
> Lennart Sorensen wrote:
> > It may be more natural, but it is also less safe.
> > 
> > After all
> > 
> > if (0 = x) {
> > 
> > fails compile, while
> > 
> > if (x = 0) {
> > 
> > compiles silently even when you didn't mean that.
> 
> Today gcc will warn you as well. Of course this means you have to look
> at warnings.

True.  You can tell it off by doing if ((x = 0)) it seems.

Always safer to treat warnings as errors it seems.

-- 
Len Sorensen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]