TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Tulipant Gergely
from: Jasen Betts
date: 2003-06-10 06:52:08
subject: gcc -O

TG> #include 
 TG> int main(void) {
 TG>   puts("foo");
 TG>   return 0;
 TG> }

 TG>     .type         main,{at}function
 TG> main:
 TG>     pushl        %ebp
 TG>     movl        %esp, %ebp

 TG>     subl        $20, %esp

 TG>     pushl        $.LC0
 TG>     call        puts
 TG>     addl        $16, %esp


 TG>   That "addl $16, %esp" is pretty useless before
"leave", and -O2 does
 TG> eliminate it. Again, more is less

yeah.
with my DJGPP (GCC2.8.1) -O1 does that.

I'm trying to figure out why 32 bytes are reserved on the stack....
must be a linux thing. DJGPP doesn't do it.

 -=> Bye <=-

---
* Origin: Black Holes were created when God divided by zero! (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.