
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vicente Botet Sent: Wednesday, December 05, 2012 3:53 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Experience with dealing with warnings from the Clang toolset?
Paul A. Bristow-2 wrote
I have added a little information on dealing with warnings when using the Clang toolset at
https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines
but I am sure there are people using Clang who can provide more detailed information and suggestions from their experiences.
Please tell me if you have anything to add.
Hi,
do you know if something like the macro is available on Boost? It could be adapted to also to clang.
Best, Vicente
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #define GCC_DIAG_STR(s) #s #define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y) # define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) # define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) \ GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) # else # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_DIAG_JOINSTR(-W,x)) # endif #else # define GCC_DIAG_OFF(x) # define GCC_DIAG_ON(x) #endif
I may give it a try (to avoid Mbyte of warnings (mainly from Boost library code - not mine) :-( but I was hoping someone had done this already :-) Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com