This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Compiler bug (arm-elf-gcc)?
- From: "llandre" <r&d at wawnet dot biz>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 10 Jul 2002 10:01:42 +0200
- Subject: [ECOS] Compiler bug (arm-elf-gcc)?
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