------- Comment #6 from pinskia at gcc dot gnu dot org 2006-10-01 05:45 ------- (In reply to comment #4) > Well, it isn't failing in any obvious fashion. It's quietly putting the label > at the wrong place, without complaint. There is no wrong place if you don't use it via a local computed goto as mention in the documetnion.
> The same code later in a function does > put the labels at the right place, so the failure mode is moderately subtle. > If you don't intent to support my use-case, then gcc should warn/error-out > rather than be quietly wrong. It is not placing the label in the wrong place as you don't have a computed goto in the function. > > That said, I don't really understand why this can't be supported. In what way > is this "not the correct way to think about what I'm doing"? How else should > I > achieve what I want? what do you really want? Because what you have mentioned so far seems like you should be writting a .s file and not something in C. > I should mention that this is Linux kernel code, and there are a number of > places within the kernel where it would be useful to take the address of a > particular statement without needing to "goto" to it, but have the code > generated as if there is a goto (ie, merely taking the address of a label > should be taken to be equivalent to actually having a goto to that label). It is wrong to store the label to jump back to that label outside of the function as mentioned in the documention. Read the documentation again. Actually it sounds like you would like to have more information for people filing bug reports well this is not the correct way of doing it. You should plan a better way. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29305