httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean gaudet <dgaudet-list-new-ht...@arctic.org>
Subject Re: checking for EWOULDBLOCK/EAGAIN *inside* APR
Date Fri, 07 Apr 2000 19:50:47 GMT
any compiler worth its salt will remove a redundant comparison.

-dean

% cat tr.c
int foo(int a)
{
        return a == 11 || a == 11;
}
% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
% gcc -O -S -c tr.c
% cat tr.s
        .file   "tr.c"
        .version        "01.01"
gcc2_compiled.:
.text
        .align 4
.globl foo
        .type    foo,@function
foo:
        pushl %ebp
        movl %esp,%ebp
        cmpl $11,8(%ebp)
        sete %al
        andl $255,%eax
        leave
        ret
.Lfe1:
        .size    foo,.Lfe1-foo
        .ident  "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"



Mime
View raw message