This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: code optimizations
On Thu, Aug 23, 2001 at 04:43:02PM +0100, Bart Veer wrote:
> Trenton> Here's some output from my stepping through my
> Trenton> pc-controller driver I'm making. Notice how the code
> Trenton> jumps back and forth? This shouldn't happen should it?
[...]
> This is expected behaviour if you are compiling with optimisation:
And I think it is always _allowed_ behavior. This version of
this compiler for this target happens to not re-arrange code
with -O0, but that's not gauranteed. It may stop working in
the future if you take that route.
There are already enough places where one almost has to depend
on compiler/platform assumptions -- you don't want to do it when
you don't have to. ;)
--
Grant Edwards
grante@visi.com