From: Greg C. <chi...@co...> - 2005-03-06 12:19:41
|
On 2005-02-26 10:16 AM, Mattia Barbon wrote: > On Mon, 21 Feb 2005 18:56:24 +1300 Danny Smith <dan...@cl...> wrote: > >>Greg Chicares wrote: >> >>>Building a cvs snapshot of wxWidgets produces many warnings >>>with MinGW gcc-3.4.2 (their makefile uses '-W'): >>> >>> C:/wx-cvs-20050216/wxWidgets/build/msw[0]$ \ >>> grep "type attributes are honored only at type definition" \ >>> buildlog |wc -l >>> 33673 > > <snip> > [Danny Smith replied:] >>Probaly the best place is in GCC's bugzilla.. The place where the warning is >>emitted is not specific to dllexport/dllimport, but affects all type atributes >>(i0e aligned, packed). Only windows code seems to be in the habit of adding >>attributes to forward declarations of user defined types. > > I should mention that older MinGW GCC 3.x warned if there > were inconsistencies in dllexport/dllimport attributes between > forward declarations and definitions. I know that in some cases [1] > GCC did not generate export symbols for the classes if it first saw > a forward declaration without dllexport and then the definition with > dllexport. This is why in wxWidgets all forward declarations have the > attribute. > > Regards > Mattia > > [1] I think it was GCC 3.3 and forward declaration of friend classes, > as in "friend class Foo" At last I made time to do as Danny asked; if anyone mentions this on a wxwidgets list, you can refer them to: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20345 |