lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] fixing "type attributes are honored only at type definition" warni


From: Vaclav Slavik
Subject: [lmi] fixing "type attributes are honored only at type definition" warning
Date: Fri, 7 Mar 2008 22:33:14 +0100
User-agent: KMail/1.9.9

Hi,

now that wx-2.8.7 is used for MSW builds, can we change forward
declarations of wx classes to use WXDLLIMPEXP_FWD_CORE instead
of WXDLLEXPORT? It will fix gcc4's "type attributes are honored
only at type definition" warning in code using forward declaration
of wx classes.

The change is probably better described by a sed script than a patch:

sed --in-place \
 -e 's/class WXDLLEXPORT \(.*\);/class WXDLLIMPEXP_FWD_CORE \1;/g' \
 -e 's/class WXDLLIMPEXP_\([A-Z]*\) \(.*\);/class WXDLLIMPEXP_FWD_\1 \2;/g' \
 *.?pp

Additionally, -Wno-attributes is no longer needed and can be removed from
workhorse.make (assuming there are no forgotten places in wx headers
themselves that would cause problems in 2.8.7 -- I couldn't test it, I don't
know how to setup MSW makefiles to use gcc 4.2 and gave up trying to
convince my cross-compiler... at worst, this part could be done after
wx-2.8.8):

diff -u -u -r1.107 workhorse.make
--- workhorse.make      13 Jan 2008 20:03:20 -0000      1.107
+++ workhorse.make      7 Mar 2008 12:54:16 -0000
@@ -454,13 +454,6 @@
 $(wx_dependent_objects):                gcc_common_extra_warnings :=
 $(wx_dependent_physical_closure_files): gcc_common_extra_warnings :=

-# MinGW gcc-4.2.1 has stricter warnings than 3.4.5, but also offers a
-# new option to suppress one that arises often with wx.
-#
-ifeq (4.2.1,$(gcc_version))
-  $(wx_dependent_objects):                gcc_common_extra_warnings := 
-Wno-attributes
-  $(wx_dependent_physical_closure_files): gcc_common_extra_warnings := 
-Wno-attributes
-endif

 # Boost didn't remove an unused parameter in this file:



Vaclav

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]