[ECOS] Compiler bug (arm-elf-gcc)?
llandre
r&d@wawnet.biz
Wed Jul 10 01:00:00 GMT 2002
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
More information about the Ecos-discuss
mailing list