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