This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35921] Con/de-structor definition fails to override dllimport declaration
- From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2008 21:00:04 -0000
- Subject: [Bug target/35921] Con/de-structor definition fails to override dllimport declaration
- References: <bug-35921-14702@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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