From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 7 Dec 2015 19:05:12 +0100 Subject: [U-Boot] [PATCH] mkimage: Fix generating multi and script images again In-Reply-To: <20151207174736.69E35383F2E@gemini.denx.de> References: <1449507714-9599-1-git-send-email-marex@denx.de> <20151207174736.69E35383F2E@gemini.denx.de> Message-ID: <201512071905.12135.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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