optimization/6004: gcc 3.0.4 always compiles main() with frame (and ebp) even with -fomit-frame-pointer and -ffixed-ebp

jakub@gcc.gnu.org jakub@gcc.gnu.org
Wed Mar 20 01:57:00 GMT 2002


Synopsis: gcc 3.0.4 always compiles main() with frame (and ebp) even with -fomit-frame-pointer and -ffixed-ebp

State-Changed-From-To: open->analyzed
State-Changed-By: jakub
State-Changed-When: Wed Mar 20 01:57:57 2002
State-Changed-Why:
    -fomit-frame-pointer documentation sais:
    Don't keep the frame pointer in a register for functions that
    don't need one, ...
    which means the compiler makes no guarantees it will be
    actually eliminated.
    Particularly main if it aligns the stack pointer.
    You might try
    gcc -O2 -fomit-frame-pointer -ffixed-ebp -mpreferred-stack-boundary=2 x.c
    for the .c file containing main.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6004



More information about the Gcc-prs mailing list