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]
Other format: [Raw text]

[Bug c++/34094] [4.2 Regression] Undefined static data member in anonymous namespace can acquire a definition anyway



------- 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


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