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]

c++: undefined local static variable



hi -

For a recent cvs version of g++ (2.96 20000724 on i686-pc-linux-gnu),
the following input generates a reference to a symbol that is
not present in the assembly code:

-------------------------------------------------------------------
struct Cleaner
{
  ~Cleaner();
};

template <class T>
void bar ()
{
  static Cleaner cleanup;
}


inline
void foo() { bar<int>(); }
-------------------------------------------------------------------

$ ./cc1plus -quiet x.cc
$ grep cleanup x.s
	pushl	$cleanup.6


The assembly code contains a reference to the symbol `cleanup.6', which
is nowhere defined.

thanks,
sss

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