DragonFly kernel List (threaded) for 2007-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: GCC-4 compiler bug
On Wed, 28 Nov 2007 19:57:15 -0600, Matthew D. Fuller wrote:
> On Wed, Nov 28, 2007 at 05:58:31AM +0000 I heard the voice of Jeremy
> Messenger, and lo! it spake thus:
>>
>> % cc test.c -o test
>
> Note Simon's mail:
>
>> Important to note is that this only happens when compiling with
>> optimization (they claim).
Yeah, I get that same result if add optimization. Daniel's suggest of add
-fwrapv seems to solve this problem.
% cc -O2 -fwrapv -o test test.c
% ./test
X
Cheers,
Mezz
> % cc -o test test.c
> % ./test
> X
> % cc -O -o test test.c
> % ./test
> X
> % cc -O2 -o test test.c
> % ./test
> %
>
> gcc version 4.2.1 20070719 [FreeBSD]
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]