__Volatile__ BUG

Fri, 25 Jul 1997 02:36:45 +0800



OK, the following code does not seem to actually define the variable - just
take a look at the asm produced by gpc!

Unit
    Testing;

Interface

Var
    TheBug : __Volatile__ Integer;

Implementation

End.


To work around this bug you can use the code below:


Unit
    Testing;

Interface

Var
    TheBug : __Volatile__ __AsmName__ 'Thebug' Integer;
    TheBug : Integer;

Implementation


Begin
    Asm(".globl _Thebug");
End.


WHY: The __AsmName__? 
         GPC defines '_thebug' instead of '_Thebug' (capital)
     The second definition?
         GPC does not define TheBug with __Volatile__. It knows that 'TheBug'
         exists, but it does not output it into the asm.
     The explicit .globl? 
         GPC forgets to do this!

Cya

 ________________________
|  _)        | |             e-mail: bernie@icenet.com.au
|___)ernhard |_|schirren             ptschirrenb@cc.curtin.edu.au
                             www:    www.geocities.com/CollegePark/Quad/8070/


Bernhard Tschirren (bernie@icenet.com.au)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es