Mail Archives: djgpp/1996/10/04/00:57:07
Farhan Yousaf wrote:
> [snip]
> What am I doing wrong? Help me, or I'll be bold soon! This error has driven
> me NUTS!!!
By using the -O3 switch you are instructing gcc to inline as many
functions as possible. Apparently it thinks that your asm function is
sufficiently simple to inline, and thus goes about placing multiple
copies of it around your program. This, naturally, causes the labels
'loc1' and 'loc2' to be defined in multipla places, causing the
assembler to have a conniption.
The solution to this involves using relative labels instead of absolute
ones, but I don't recall exactly what it is. Look in the asm chapter of
the gcc docs for more details. I _think_ that you need to define your
labels as '0:', '1:', etc., but I'm not sure.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Plan: To find ANYONE willing to | http://www.cs.com/fighteer |
| play Descent 2 on DWANGO! | Tagline: <this space for rent> |
---------------------------------------------------------------------
- Raw text -