[Qt-interest] Unexpected behaviour for loop
Parker
userqt at gmail.com
Thu May 28 09:56:00 CEST 2009
Heh, that's it.
It seems it was an optimization... thank you :)
----- Original Message -----
From: "Andreas Pakulat" <apaku at gmx.de>
To: <qt-interest at trolltech.com>
Sent: Thursday, May 28, 2009 10:43 AM
Subject: Re: [Qt-interest] Unexpected behaviour for loop
> On 28.05.09 10:28:17, Parker wrote:
>> Hello,
>> I noticed something strange while using the for loop. Here :
>>
>> for(int i = 1;i < integerList.size();i++)
>> {
>>
>>
>> }
>>
>>
>>
>> "i" should be initialized to 1 and we should enter the loop. But it's not
>> happenig. I debuged, the i variable is just not initialized.
>
> How did you test that? And if you don't have a body in your loop, then
> your compiler may optimize the whole loop out of your application when
> building with optimizations enabled.
>
> Andreas
>
> --
> Be cheerful while you are alive.
> -- Phathotep, 24th Century B.C.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4098 (20090522) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
More information about the Qt-interest-old
mailing list