From: burkarth AT prodad DOT de (Holger Burkarth) Subject: Gcc 29 Nov 1998 05:25:00 -0800 Message-ID: Reply-To: Holger Burkarth Mime-Version: 1.0 Content-Type: text/plain To: gnu-win32 AT cygnus DOT com Hi, i have a little question, the normaly so good gcc machine-code, is in any case not so good, what is the reason ? ------ Source ------- void test2() { const char* Tst=""; if(Tst != NULL) printf(Tst); } $ gcc main.cpp -O2 -S ------ Output ------- ..file"main.cc" # GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) # (i686-pc-cygwin32) compiled by GNU C version egcs-2.91.57 19980901 # (egcs-1.1 release). # options passed: -mcpu=i486 -mno-stack-arg-probe -O2 -Wchar-subscripts # -Wcomment -Wimplicit -Wparentheses -Wreturn-type -Wunused # -Wuninitialized -Wshadow -Wwrite-strings -Waggregate-return -Winline # -fno-exceptions -fomit-frame-pointer -fverbose-asm # options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps # -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps # -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse -finline # -fkeep-static-consts -fcaller-saves -freg-struct-return -fgcse # -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns2 # -fsjlj-exceptions -fcommon -fverbose-asm -fgnu-linker -fregmove # -foptimize-register-move -fargument-alias -m80387 -mhard-float # -mno-soft-float -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcpu=i686 # -march=pentium gcc2_compiled.: ___gnu_compiled_cplusplus: ..text LC0: ..ascii "\0" ..globl _Test2__Fv _Test2__Fv: movl $LC0,%eax testl %eax,%eax je L138 <- why this ? pushl %eax call _printf addl $4,%esp L138: ret -- Holger Burkarth Software-Developer burkarth AT prodad DOT de http://www.prodad.de - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".