"This" pointer problem

Michael Shearer ms4@hermes.usherb.ca
Tue Jun 27 15:29:00 GMT 2000


I hope I'm mailing this to the correct place but we've been having
problems with the m68k-coff-gcc compiler.  When calling a singleton
class member within another singleton class, the this pointer for the
later is lost.  Doing a printf of the this pointer and the static
pointer of the singleton class reveals a discrepancy.

We're using GCC version 2.95.2 cross compiler for the Motorola 68000 on
a Linux box.  The list of options passed to the compiler are the
    -mcpu32 -msoft-float -ansi -O0 -fvolatile -fvolatile-global

Our current fix is to use the static pointer to the singleton class with
all of the member functions and variables within the class.  We would
appreciated any help with this problem.



Michael Shearer
Computer Engineering
University of Sherbrooke
Sherbrooke (Quebec) Canada

More information about the Gcc-bugs mailing list