Subject: Re: More config changes, for ro source tree and disjoint build trees
To: None <>
From: J.T. Conklin <>
List: tech-kern
Date: 08/13/1996 19:05:09
> >kinda.  gcc will optimise out code that looks like
> >
> >int foo = 0;
> >
> >if (foo) {
> >	...
> >}
> Only if the variable declaration is in the same .c file; gcc can't
> optimize across compilation units.  (I'd be *very* impressed by any
> compiler that does!)

And it's declared static and it's not modified within the translation 
unit...  and even then, it might miss it.

However, it is not that uncommon in modern compilers to have a (possibly
optional) global optimization pass.  For example, the mipsco compiler I
used 5 or 6 years ago had that option.