Date: Wed, 29 Jan 1997 10:19:30 +0000 From: Bill Currie Subject: Re: local labels in in-line assembler? To: Paul Lay Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <32EF2432.4DB2@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <32EDD76A DOT 41C67EA6 AT nortel DOT co DOT uk> Paul Lay wrote: > > Is it possible to use local labels from in-line assembler > in a C function? > > I've tried using "L" labels, which would be local if I > were writing straight assembler, but compiling my C program > gives label already defined errors where I've used the same > "L" label in different functions. Those are the wrong sort of local labes. You use '0' to '9' (giving 10 local labels in each direction) eg 0: jmp 0f jumps v 1: jmp 2f jumps v one line 2: jmp 3f jumps v ... 0: jmp 0b jumps ^ 1: jmp 2b jumps ^ 2: jmp 1b jumps ^ one line 3: ... Bill -- Leave others their otherness.