Problems compiling gcc 2.7.2
Paulo Pinto
paulo.pinto@cern.ch
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
works.
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.
Cheers,
Paulo
Ian Lance Taylor wrote:
>Paulo Pinto <paulo.pinto@cern.ch> 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
>double.
>
>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.
>
>Ian
>
>
More information about the Gcc-help
mailing list