This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Label question


Mustafa Celik wrote:

Hi there,
Can a label be defined globally? All I want is to have an array of label addresses, and a bunch of labels. I want to write the work that each label does seperately.

You might be asking why labels? I don't want to use labels as they are meant, but I don't know if there is anything else in GCC as close to what I want. Labels simply provide an address which you can jump to anytime in scope. I also want my code to jump some other places globally, to some code I want be executed.

Is it possible at all?

Thanks,
Not as such because global labels does't exist.
But it is possible with "computed goto's" and/or declaring/jumping to
labels in asm.

!! "computed goto's" was not working totally correctly for me in gcc 2.8.1 and 2.95.3
(not verified with more recent version) especially code path reachability.


Luc Van Oostenryck



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]