This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Could someone tell me what is wrong here?


-----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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]