test1

Henry Cejtin henry@sourcelight.com
Tue, 5 Feb 2002 22:14:31 -0600


But  the  label  isn't  a  C  value  except using the gcc extension, and when
Stephen tried that long ago gcc died horribly since it didn't understand  the
control  flow that that extension allows.  More concretely, at one time MLton
worked by compiling everything to one function and using gcc labels  (not  to
be  confused  with  goto  labels)  as a way of getting code addresses, and it
would return via
    goto *p;
This had problems any way because  of  gcc's  much-worse-than-linear  compile
times, but it also generated incorrect code (all the time).  It was as if the
optimizer just assumed that these branches didn't go any where.

Without first classs labels you would have to assume that  the  name  of  the
label  in  the  generated assembler was the same (or derivable) from the goto
label, and I don't think that that is the case.

As to gcc's arcane __asm__ flags, I remember  reading  through  them  several
times  and in the end, it looked like it was pretty much a matter of trial an
error.  This certainly was confirmed by what has happened several times  with
the  Linux  kernel,  where new releases of gcc require new flags added to the
__asm__ there.  I really think that there is no real semantics here,  just  a
bunch of hacks.  Sad.