lkml.org 
[lkml]   [2000]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Chris Wedgwood wrote:
[Gcc not eliminating trivial dead code...
did you compile without optimisation?]

Gcc 2.96 does remove the unreached code in your example,
but it still emits string constants.

int func()
{
if (1)
a = "foo";
else
a = "bar";
}

.LC0:
.string "foo"
.LC1:
.string "bar"
.text
.align 4
.globl func
.type func,@function
func:
pushl %ebp
movl %esp, %ebp
movl $.LC0, a
popl %ebp
ret

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.175 / U:0.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site