------- Comment #8 from dannysmith at users dot sourceforge dot net 2009-01-02 04:19 ------- Hello John, This patch:
Index: gcc/config/i386/winnt-cxx.c =================================================================== --- gcc/config/i386/winnt-cxx.c (revision 142383) +++ gcc/config/i386/winnt-cxx.c (working copy) @@ -65,7 +65,7 @@ ignore the class attribute. */ else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl) && TREE_PUBLIC (decl) - && !DECL_EXTERNAL (decl)) + && DECL_NOT_REALLY_EXTERN (decl)) { if (!DECL_VIRTUAL_P (decl)) error ("definition of static data member %q+D of " fixes your testcase and causes no regressions in g++ testsuite. I have only tested on narrow range of dll builds, to check that the patch does not break anything. I think it may cause spurious errors with import of static data members, but that can be fixed. Could you please test with your projects. Thanks Danny -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654