On Thu, Apr 29, 2010 at 8:25 PM, Brian Hill <bch...@bch.net> wrote:
> I have an 15-year old C program (which I didn't write) that compiles and
> runs fine with SparcWorks cc on Sun SPARC with SunOS 5.10.
>
> It compiles on CentOS 5 64-bit with gcc 4.1.2 but core dumps all over the
> place.
>
> Switching to 32-bit compile doesn't help much.
>
> I did as much debugging as I could, but seems to come down to liberal use of
> memory that the SparcWorks compiler accommodates that gcc doesn't by
> default.
>
> Is there some simple compiler option or other measure I can take to
> compile/run the code with gcc?
>
> Rather than get into the details of the code, I figured I start with this
> angle.

This kind of question really doesn't belong here but on gcc-help. But
while we're here...

The standard 1st questions are:
1) Did you compile with -Wall -Wextra and solve all warnings?
2) Did you try with -fno-strict-aliasing?

There is just not enough information in your question to be more helpful.

Good luck,

Ciao!
Steven

Reply via email to