Re^3: gotos

Daniel R. Levy levy at ttrdc.UUCP
Mon Apr 25 18:05:08 AEST 1988


In article <1988Apr24.004842.3251 at utzoo.uucp>, henry at utzoo.uucp (Henry Spencer) writes:
# > When faced with multiple occurances of a common section
# > of code, one has four choices (any others?):
# >   1) some sort of subroutine,
# >   2) replicating the code in multiple places,
# >   3) some type of big, ugly conditional statement to
# >      bring unite the occurances,
# >   4) goto.
# 
# Remember that there are two separate issues here:  what you write, and the
# code the compiler generates for it.  With modern compilers, the two are
# often quite different.

This may be highly undesireable in a language used for programming operating
systems, where the programmer needs something approaching WYSIWYG capability.
C is eminently such a language.  I'd rather program a "goto" using an older
technology compiler then put in a function call, if your proposed whoop-de-do
hyper-global-optimizing compiler is liable to turn my REAL function calls into
inline code, unbidden.  (OOPS, so THAT'S why I got a 4-megabyte kernel!!!)
This isn't just hay.  I see on this net reports that PC C-compilers hyper-
optimize this way.  Their benchmarks beat the band, but the executables they
make are elephantine.
-- 
|------------Dan Levy------------|  Path: ihnp4,<most AT&T machines>!ttrdc!levy
|              AT&T              |  I'm not a real hacker, but I play one on
|       Data Systems Group       |  USENET.  If you think that AT&T endorses
|--------Skokie, Illinois--------|  my opinions, I've a nice bridge to sell ya.



More information about the Comp.lang.c mailing list