Problems with egcs
Edgar Villanueva
edgarvil@ix.netcom.com
Mon Apr 6 19:12:00 GMT 1998
I am sorry for the vague information.
I have made the (assumption) that egcs was the problem because the library
works fine
on other platforms as well as egcs without optimization.
ACE is a cross platform system library/framework written in C++. It works
on a variety of platforms and
most of the other platforms don't seem to have any problems.
I will try to look into where exactly the problems lay but it aint going to
be easy.
Sorry for the message.
Kaz Kylheku wrote:
> On Sunday, April 05, 1998 8:38 PM, Edgar Villanueva
> [SMTP:edgarvil@ix.netcom.com] wrote:
> > I am using a library that is compiled with egcs -O3 and -O2 options.
> >
> > All my binarys dump. If I compile the library and binaries without
> > optimizations
> > everything is ok.
> >
> > I would like to help to find the problems in egcs. But I cannot debug
> > because of time and
> > lack of knowledge about the library code and egcs.
>
> Why do you automatically assume that the problems are in the
> compiler?
>
> Have you considered that your own code may be broken?
>
> Code which invokes undefined behaviors may produce different
> results with the same compiler when it is optimized versus when it is
> not optimized. A C compiler must only preserve the correctness
> of correct programs, under optimization. There are no requirements
> as to what should happen as a result of translating and executing
> undefined programs.
>
> For example,
>
> i = 3;
> i = i++;
>
> could produce the value 4 when the compiler is invoked one
> way, the value 3 when it is invoked a different way, and 42
> in yet a third mode. Since there are no requirements as to
> what the result should be, such code can't be used as a basis
> for judging the correctness of the compiler.
>
> I would urge you to debug your program as much as possible
> to avoid submitting a bogus bug report.
>
> > If anyone is interested in looking at the code I am willing to help.
>
> You could help by creating the smallest example you can come up
> with which triggers the problem and submitting it as part of
> a bug report.
>
> > The library is ACE.
> > The platform is redhat 5.0 with libraries 2.0.7-6 egcs 1.02. 1.0.1 also
> > fails.
>
> If you could produce an example that doesn't need ACE or any
> other additional library, that would be a bonus.
More information about the Gcc
mailing list