Boost logo

Boost Users :

Subject: Re: [Boost-users] Experience with dealing with warnings from the Clang toolset?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-12-05 10:53:25


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

--
View this message in context: http://boost.2283326.n4.nabble.com/Experience-with-dealing-with-warnings-from-the-Clang-toolset-tp4639396p4639479.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net