Just a final follow-up on this issue:
- I tried with gcc 4.2.1 and it didn't make any difference
- I poked around with compiler options etc. also to no avail
I finally broke-down and rebuilt gcc with debug symbols. After some
head-scratching, I found that the stack allocation routines in gcc 4.x
are quite different than in 3.x. A new macro LOCAL_ALIGNMENT is used to
override alignment for stack allocated variables. Unfortunately, this
macro is not defined for the SPARC (only for the x86).
I opened the following bug report to report this and see if it can be
corrected:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33594
Anyway, thanks for your suggestions...
-Amruth
John (Eljay) Love-Jensen wrote:
Hi Amruth,
I assume that testFunc2 is in testFunc2.c, testFunc is in TestFunc.c, and main is in main.c. And somewhere (either in the C source, or a header) there is a 'extern void testFunc2();' and 'extern void testFunc();' declared.
And they are being compiled:
gcc -O2 main.c testFunc.c testFunc2.c
Is that assumption correct?
HTH,
--Eljay