Boost logo

Boost :

Subject: Re: [boost] Official warnings policy?
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2009-11-11 02:13:46


Hi Steven,

On Tuesday 10 November 2009, you wrote:
> I don't know of any way to locally silence individual warnings on
> gcc.

With modern gcc (read: 4.3 and higher), you can use the following:

-----------snip---------
 #if defined(__GNUC__)
    #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
 
void foo(int bar
{
}

+#if defined(__GNUC__)
+ #pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif
--------------------------------------------------------

do disable warnings locally.

If you want find out which options controls this warning, use

     <toolset>gcc:<cxxflags>-fdiagnostics-show-option

for current gcc.

> For Boost, making the suppression local is more important than
> only suppressing a specific warning.

This should work.
Maybe we should add "-fdiagnostics-show-option" to gcc.jam for gcc
greater 4.3...

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk