www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/01/03:49:19

Date: Mon, 1 Jul 1996 03:40:49 +0300 (EET DST)
From: Samuli Takala <tax AT cc DOT hut DOT fi>
To: djgpp AT delorie DOT com
Subject: DJGPP inlining functions...
Message-ID: <Pine.OSF.3.93.960701032210.3478A-100000@alpha.hut.fi>
MIME-Version: 1.0

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:
 - Make the compiler automagically alter the labels so that it can inline
   the function.
 - Somehow tell the compiler that that function should not be inlined.
   I tried the __volatile__ keyword, but it did not help.
 - Any other method? I would like to keep automatic inlining on, since
   I usually don't remember to use the __inline__ keyword.


Thanks,
Samppa

Samuli Takala      Samuli DOT Takala AT hut DOT fi       Finger tax AT hut DOT fi for more info.
See my homepage for Formula One Shadow Series: http://www.hut.fi/~tax/
		  "Kuorma-auto - Hyödyksesi tiellä"

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019