[Bug c++/36654] [4.2/4.3 Regression] Inlined con/de-structor breaks virtual inheritance dllimport classes

dannysmith at users dot sourceforge dot net gcc-bugzilla@gcc.gnu.org
Fri Jan 2 04:21:00 GMT 2009



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



More information about the Gcc-bugs mailing list