------- Comment #13 from dannysmith at users dot sourceforge dot net  
2009-03-28 07:24 -------
(In reply to comment #12)
> Both the dg-error clauses now fail; previously (4.3.2), only the second one
> failed.  Reverting the patch causes the first dg-error (line 21) to pass again
> by restoring the error message
> 
> /gnu/gcc/release/gcc4-4.3.3-1/src/gcc-4.3.3/gcc/testsuite/g++.dg/ext/dllimport7.
> C:21: error: definition of static data member 'Bar::three' of dllimport'd 
> class
> 
> I'm not sure why that should be a problem in the first place, so I don't know
> if the underlying issue is now fixed and not an error any more.  Anybody?
> 

IMO, the hard error should occur.
The native MS compiler emits a similar error message.
Allowing a static data member to be defined in more than one place is a bad
thing.  It most be defined in the dll if the class is defined there and, in the
situation the testcase is testing will be defined again in the exe or dll that
uses the dll.   


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36654

Reply via email to