public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mate Soos <soos.mate@gmail.com>
To: Brian Budge <brian.budge@gmail.com>
Cc: "Zdeněk Sojka" <zsojka@seznam.cz>,
	"Jonathan Wakely" <jwakely.gcc@gmail.com>,
	gcc-help@gcc.gnu.org
Subject: Re: Could someone tell me what is wrong here?
Date: Wed, 19 Jan 2011 22:57:00 -0000	[thread overview]
Message-ID: <4D376C5D.8070509@gmail.com> (raw)
In-Reply-To: <AANLkTin17yV3XTyW=t2YJuw2pAxnVFuJvG1uhByx0fRQ@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 01/19/2011 11:53 PM, Brian Budge wrote:
> 2011/1/19 ZdenĂŹk Sojka <zsojka@seznam.cz>:
>> 
>>> ------------ PĂšvodnĂ­ zprĂĄva ------------ Od: Brian Budge
>>> <brian.budge@gmail.com> 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 <jwakely.gcc@gmail.com> 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-----

  reply	other threads:[~2011-01-19 22:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 21:15 Máté Soós
2011-01-19 21:22 ` Brian Budge
2011-01-19 21:54   ` Jonathan Wakely
2011-01-19 22:02     ` Brian Budge
2011-01-19 22:39       ` Zdeněk Sojka
2011-01-19 22:54         ` Brian Budge
2011-01-19 22:57           ` Mate Soos [this message]
2011-01-19 21:53 ` Jonathan Wakely

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=4D376C5D.8070509@gmail.com \
    --to=soos.mate@gmail.com \
    --cc=brian.budge@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=zsojka@seznam.cz \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).