Re: goto's ???

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Thu, 27 May 1999 13:00:20 -0400


Mofeed Shahin <shahin@labf.org> said:
> I was just have a bit of a look at the fs code, and noticed something a
> little odd. There are alot of 'goto' statements in the code. From what I
> can see they are not needed.

At least it used to be that a "return whatever;" generated a lot of code,
so in order to save that this construction is used in some places. Similar
stuff is used to keep little-used code out of line, where it won't fill up
the cache.

It is wise to check the compiler output if you don't understand what is
going on. In this case, write a small test proggie and compile with
-S. Note that the results _will_ vary wildly from gcc-2.7.2.3 to
egcs-1.1.6, and even more so compared against latest egcs snapshots, so you
might be seeing ancient history/backward compatibility in some places.
Perhaps some of it should be cleaned up.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

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