Boost logo

Boost :

Subject: Re: [boost] Can we suppress integer_traits warnings?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-10-26 12:13:51


----- Original Message -----
From: "Dmitry Goncharov" <dgoncharov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, October 26, 2009 4:24 PM
Subject: Re: [boost] Can we suppress integer_traits warnings?

>
>
>
>>> Maybe #pragma GCC system_header is an option?
>>
>> Ahah! That certainly seems to work, adding:
>>
>> #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) &&
>> (__GNUC_MINOR__ > 3)))
>> //
>> // The following code emits warnings when built with -pedantic, and
>> there appears
>> // to be no other way of suppressing these warnings as use of
>> __extension__ has no
>> // effect, so declare the rest of this header a system header.
>> //
>> # pragma GCC system_header
>> #endif
>>
>> near the end of the header, suppresses those warnings.
>>
>> Any downsides or objections to this?
>>
>>
>
> A downside is that #pragma GCC system_header suppreses all warnings, not
> just the one you need to suppress.

If you reach to isolate in a separated file the parts concerned by the warning, the #pragma GCC system_header will be less invasive.
I understand that this could be confusing just to remove some warnings.

Just an idea :)
Vicente


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