This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Label question
- From: Luc Van Oostenryck <luc dot vanoostenryck at easynet dot be>
- To: gcc at gnu dot org
- Date: Fri, 20 Sep 2002 00:59:31 +0200
- Subject: Re: Label question
- References: <F41hJrvJ1xKjtgZe0J600000d96@hotmail.com>
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