From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12449 invoked by alias); 19 Jan 2011 22:57:57 -0000 Received: (qmail 12376 invoked by uid 22791); 19 Jan 2011 22:57:55 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f47.google.com (HELO mail-fx0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Jan 2011 22:57:50 +0000 Received: by fxm17 with SMTP id 17so1359611fxm.20 for ; Wed, 19 Jan 2011 14:57:47 -0800 (PST) Received: by 10.223.83.144 with SMTP id f16mr1314146fal.4.1295477855073; Wed, 19 Jan 2011 14:57:35 -0800 (PST) Received: from [192.168.1.100] (178-164-242-197.pool.digikabel.hu [178.164.242.197]) by mx.google.com with ESMTPS id y1sm2898338fak.39.2011.01.19.14.57.33 (version=SSLv3 cipher=RC4-MD5); Wed, 19 Jan 2011 14:57:34 -0800 (PST) Message-ID: <4D376C5D.8070509@gmail.com> Date: Wed, 19 Jan 2011 22:57:00 -0000 From: Mate Soos User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Brian Budge CC: =?ISO-8859-2?Q?Zden=ECk_Sojka?= , Jonathan Wakely , gcc-help@gcc.gnu.org Subject: Re: Could someone tell me what is wrong here? References: <61965.1876.3640-10981-136217698-1295476730@seznam.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00300.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On 01/19/2011 11:53 PM, Brian Budge wrote: > 2011/1/19 Zdenìk Sojka : >> >>> ------------ Pùvodní zpráva ------------ Od: Brian Budge >>> Pøedmìt: Re: Could someone tell me what >>> is wrong here? Datum: 19.1.2011 23:02:57 >>> ---------------------------------------- On Wed, Jan 19, 2011 at >>> 1:54 PM, Jonathan Wakely wrote: >>>> On 19 January 2011 21:22, Brian Budge wrote: >>>>> I haven't done an in-depth analysis of your code, but I >>>>> noticed that in my own code, that casting a bool to an >>>>> integer type did not always yield 0 or 1 (I believe this was >>>>> new in 4.5x). I ended up changing from += (uint32_t)mybool >>>>> to += mybool ? 1 : 0 >>>>> >>>>> Does this help in your code? >>>> >>>> That would be a (fairly serious IMHO) bug, if you can reproduce >>>> it please report it to bugzilla. >>> >>> I'll see if I can work up a minimal repro. >> >> Sorry, I didn't notice this issue is being discussed here as well. >> I have already opened >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47365 for that. >> >> Zdenek >> > > Is this the same issue? I believe it's the same, Vegard discussed this through IRC, and this is meant to be the reduced down version of the same bug. > I don't see casting through a bool in your attached example. I believe casting through a bool was not part of this problem (doing "b ? 1 : 0" doesn't fix my example). Bests, Mate - -- Mate Soos Security Research Labs http://www.srlabs.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk03bF0ACgkQsTOOstKb0jnA2gCbBxhBiS8Isncr6XEmyVs5hBIx CXwAmwTyjLmGv4JQh0TY+C+dx/Hsbyw5 =qfVj -----END PGP SIGNATURE-----