Date: Mon, 1 Jul 1996 13:27:56 +0200 (IST) From: Eli Zaretskii To: Samuli Takala Cc: djgpp AT delorie DOT com Subject: Re: DJGPP inlining functions... In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 1 Jul 1996, Samuli Takala wrote: > First I think I should mention that I use C, not C++. > I wrote a function that has some assembly-code, including branches (and > of course labels). It works fine when the code is compiled without > optimations or with -O2. The problem is, when I'm compiling with -O3, > DJGPP insists on inlining that function. This causes the labels to appear > more than once in the code and the assembler chokes on it. > My question: > > How can I fix my problem? Here is a list of ways in order of preference: None of the above. Just use labels local to the function, like this: asm(" 0: decl %%ecx jnz 0b"); Also note that when jumping to numbered labels the 'b' and 'f' tags are use for backward and forward jump respectively.