Problems compiling gcc 2.7.2

Paulo Pinto
Wed Apr 7 07:30:00 GMT 2004

You right about fixing the generated code.
However now I've tried two other approaches
and both of them work.

If I use other C compiler to compile the language
runtime, it works. This was tested with lcc.

If I recode the main() function in assembly along
the generated code from my compiler, it also

So now I don't know if this is really a stack corruption
that only gcc becomes aware. Or if I am just missing
something related to mixing asm/gcc/libc.


Ian Lance Taylor wrote:

>Paulo Pinto <> writes:
>.... (cutted)
>>Does anyone have any idea?
>Well, the error message is telling you that the code in gcc 2.7.2 is
>incorrect.  The code used SFtype in va_arg, but it should have used
>This is not a big deal as bc-emit.c is never used.  You can probably
>just delete that function entirely.
>You may run into other problems.
>But if I were you I would fix your code, not gcc 2.7.2.  If your code
>crashes with the original egcs and with the current gcc 3.3.3, it is
>very likely that there is a bug in your code.  A segfault after
>returning from main generally indicates stack corruption.

More information about the Gcc-help mailing list