[cfe-users] How to suppress a specific warning:" dllexport attribute ignored"

Paul A. Bristow pbristow at hetp.u-net.com
Mon Nov 26 08:54:36 PST 2012


Can you please advise a Clang newbie how to suppress this warning message (compiling successfully an
application including Boost.Units and hence Boost.Serialization):

"
In file included from i:/boost-trunk\boost/serialization/nvp.hpp:34:
i:/boost-trunk\boost/serialization/void_cast_fwd.hpp In file included from
i:/boost-trunk\boost/serialization/base_object.hpp:39:
:29:1: warning: dllexport attribute ignored
BOOST_DLLEXPORT 
^
i:/boost-trunk\boost/serialization/force_include.hpp:37:43: note: expanded from macro
'BOOST_DLLEXPORT'
#       define BOOST_DLLEXPORT __declspec(dllexport)
                                          ^
<built-in>:150:38: note: expanded from macro '__declspec'
#define __declspec(a) __attribute__((a))
                                     ^
1 warning generated.
"

(I don't want to use -nowarnings - other warnings might be helpful).

Thanks

Paul

PS As several people are now compiling Boost with Clang, any general information and recommendations
about suppressing unhelpful warnings would be helpful to update

https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines

I didn't yet find a *full* list of warnings:
Individual Warning Groups
TODO: Generate this from tblgen. Define one anchor per warning group.
"

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow at hetp.u-net.com







More information about the cfe-users mailing list