Article View: gnu.gcc.bug
Article #1874Re: GCC 1.30 complaints
From: Eduardo Krell
Date: Sat, 22 Oct 1988 12:42
Date: Sat, 22 Oct 1988 12:42
14 lines
1128 bytes
1128 bytes
In article <8810220131.AA00312@ucsci.ucsc.edu> dsgn047@UCSCI.UCSC.EDU (10017047) writes:
>2) Loop optimization. GCC 1.30 does *not* get rid of empty for loops;
>does anybody know why? (I.e., 'for (a=0;a<100;a++);' is executed in its
>entirety.)
I don't know what your C compiler does, but if a is not equal to 100
after this for loop, it's generating wrong code.
You can't throw away this for loop since it is modifying a variable in
an outer scope.
Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ
UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com
Technical Details
Message-ID:
<10752@ulysses.homer.nj.att.com>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!ulysses!hector!ekrellReferences:
<8810220131.AA00312@ucsci.ucsc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: gnu.gcc.bug Subject: Re: GCC 1.30 complaints Message-ID: <10752@ulysses.homer.nj.att.com> Date: 22 Oct 88 12:42:04 GMT References: <8810220131.AA00312@ucsci.ucsc.edu> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Distribution: gnu Organization: AT&T Bell Laboratories Lines: 13