[Bug c++/34094] [4.2 Regression] Undefined static data member in anonymous namespace can acquire a definition anyway
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Nov 25 20:46:00 GMT 2007
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-11-25 20:46 -------
Here is a testcase which shows this is not a complete fix, it does not fix the
case where the static const was initialized inside the class.
namespace {
struct c
{
static const bool t = 0;
};
}
const bool &f()
{
return c::t;
}
int main(void)
{
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34094
More information about the Gcc-bugs
mailing list