This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: bug in sprintf
On Tue, Jun 03, 2003 at 09:05:01AM +0200, Daniel Lidsten wrote:
> > > Indeed. More importantly, it's curious why the 'size_t' branch of
> > > that conditional is even being executed for simple signed values.
> >
> > I don't think it is. Looking at the asm, it looks like the
> > size_t code has invoked a bug in the optimizer which caused
> > it to get the signed branch of the condition wrong.
>
> Do you mean that there is a bug in the compiler which causes this to
> appear? I am using powerpc-eabi-gcc version 2.95.2, which is quite old.
> Is there any meaning to upgrade to a newer version to get rid of this
> problem or is this something that can be fixed in the eCos repository?
It looks like a compiler bug. Im not sure which versions of the
compiler have this problem. So upgrading to a newer version might fix
it, or the bug might still be present.
There was also a post which changes the code slightly so that the bug
in the compiler is not invoked. I will leave it to Jifl to decide if
he wants to commit that change.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss