This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"This" pointer problem


Hi!

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
following:
    -mcpu32 -msoft-float -ansi -O0 -fvolatile -fvolatile-global
-fno-exceptions.

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.

Cheers,

Mike

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]