This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++: undefined local static variable
- To: gcc-bugs at gcc dot gnu dot org
- Subject: c++: undefined local static variable
- From: scott snyder <snyder at fnal dot gov>
- Date: Wed, 26 Jul 2000 16:55:20 CDT
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