Re: strange output on openbsd C code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Adam
Date: Monday, March 19, 2007 - 7:53 pm

"Gustavo Rios" <rios.gustavo@gmail.com> wrote:


Bleh, what a depressing thread.  Gustavo, why didn't you bother to
provide all the relevant info, like that you are foolishly compiling
with -O3?  Its pretty well known that gcc doesn't always produce correct
output when using optimizations more aggressive than -O2.  Stop using
-O3 and suddenly it prints 2 all the time.  Looks like this bug is
fixed in gcc 4.2 at least.

And what is with the "answers" being provided guys?  Its only 8 lines,
and its not that hard to follow.  Guessing random "answers" isn't
usually very helpful, maybe reading it and saying "there's nothing
wrong with that code, are you using compiler optimizations?" would
work better.  At least a few people tried it instead of making up
non-existant bugs in the code.

Adam
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
strange output on openbsd C code, Gustavo Rios, (Mon Mar 19, 3:12 pm)
Re: strange output on openbsd C code, Nick !, (Mon Mar 19, 4:40 pm)
Re: strange output on openbsd C code, Darrin Chandler, (Mon Mar 19, 7:17 pm)
Re: strange output on openbsd C code, a.velichinsky, (Mon Mar 19, 7:40 pm)
Re: strange output on openbsd C code, Adam, (Mon Mar 19, 7:53 pm)
Re: strange output on openbsd C code, Tobias Ulmer, (Mon Mar 19, 8:28 pm)
Re: strange output on openbsd C code, Woodchuck, (Mon Mar 19, 11:09 pm)
Re: strange output on openbsd C code, Stuart Henderson, (Tue Mar 20, 3:08 am)