This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
"This" pointer problem
- To: gcc-bugs at gcc dot gnu dot org
- Subject: "This" pointer problem
- From: Michael Shearer <ms4 at hermes dot usherb dot ca>
- Date: Tue, 27 Jun 2000 18:21:56 -0400
- CC: Dany Chateauneuf <dchateauneuf_99 at yahoo dot com>,Martin Tardif <tarm01 at gel dot usherb dot ca>
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