public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again
Date: Mon, 7 Dec 2015 19:05:12 +0100	[thread overview]
Message-ID: <201512071905.12135.marex@denx.de> (raw)
In-Reply-To: <20151207174736.69E35383F2E@gemini.denx.de>

On Monday, December 07, 2015 at 06:47:36 PM, Wolfgang Denk wrote:
> Dear Marek,
> 
> In message <1449507714-9599-1-git-send-email-marex@denx.de> you wrote:
> > Second is the coding which causes gcc 4.9.x and newer scream gruesome
> > death and murder. The expression !x == 0 && !x == 1 is ambiguous and
> > should instead be rewritten into (x != 0) && (x != 1) to be correct.
> 
> But (!x == 0) && (!x == 1) ist not the same as (x != 0) && (x != 1);
> assume x=2:
> 
> 	(!2 == 0) && (!2 == 1) => (0 == 0) && (0 == 1) => 1 && 0 => 0
> 
> 	(2 != 0) && (2 != 1) => 1 && 1 => 1
> 
> ???

This really depends on where you put the parenthesis and GCC complains
about such ambiguous expressions. That's what the paragraph is about.
I never said that ((!x) == 0) && ((!x) == 1) <=> (x != 0) && (x != 1) 
or equally ((!x) == 0) && ((!x) == 1) <=> !(x == 0) && !(x == 1)

Best regards,
Marek Vasut

  parent reply	other threads:[~2015-12-07 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 17:01 [U-Boot] [PATCH] mkimage: Fix generating multi and script images again Marek Vasut
2015-12-07 17:18 ` Philippe De Swert
2015-12-07 17:32   ` Marek Vasut
2015-12-07 17:47 ` Wolfgang Denk
2015-12-07 18:03   ` Tom Rini
2015-12-07 18:05   ` Marek Vasut [this message]
2015-12-07 19:06 ` Tom Rini
2015-12-07 20:52   ` Philippe De Swert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201512071905.12135.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox