[Bug target/35921] Con/de-structor definition fails to override dllimport declaration

dannysmith at users dot sourceforge dot net gcc-bugzilla@gcc.gnu.org
Thu May 29 21:00:00 GMT 2008



------- Comment #8 from dannysmith at users dot sourceforge dot net  2008-05-29 21:00 -------
(In reply to comment #7)
> Created an attachment (id=15702)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15702&action=view) [edit]
> Minimal testcase for vtable issue
> 
> I'm not sure whether this is related, but the effect is similar so I'm adding
> it to this same bug.
> 
> Basically, we get an undefined reference to the vtable for a dllimport-ed
> struct with a single inner-defined virtual function.



Uhh, if you declare a struct as dllimport, then you are declaring that it's
vtable is defined in a dll. So why is this a bug?

Of course if you allow compiler to actually inline the virtual function in your
example, the vtable should not be needed. 

Anyway, thanks for reminding me of this bug.  I'll backport 4.4 patch to 4.3.2
once branch reopens.

Danny


-- 


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



More information about the Gcc-bugs mailing list