* [ECOS] Compiler bug (arm-elf-gcc)?
@ 2002-07-10 1:00 llandre
0 siblings, 0 replies; only message in thread
From: llandre @ 2002-07-10 1:00 UTC (permalink / raw)
To: ecos-discuss
I experienced a strange problem in the file hal_misc.c (hal\arm\arch),
function
cyg_hal_invoke_constructors.
The following loop
for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
(*p) ();
causes a never-ending loop because the pointer p is never decremented.
I changed it as follows
for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; )
{
(*p) ();
p--;
}
and now its behavior is correct.
It it really a compiler bug (arm-elf-gcc 2.95.2)?
Thanks in advance.
llandre
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-10 8:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-10 1:00 [ECOS] Compiler bug (arm-elf-gcc)? llandre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).