What -W values in gcc correspond to which actual warnings?

Posted by SebastianK on Stack Overflow See other posts from Stack Overflow or by SebastianK
Published on 2010-06-08T13:26:13Z Indexed on 2010/06/11 1:13 UTC
Read the original article Hit count: 252

Filed under:
|

Preamble: I know, disabling warnings is not a good idea. Anyway, I have a technical question about this.


Using GCC 3.3.6, I get the following warning:

choosing ... over ... because conversion sequence for the argument is better.

Now, I want to disable this warning as described in gcc warning options by providing an argument like

-Wno-theNameOfTheWarning

But I don't know the name of the warning. How can I find out the name of the option that disables this warning?


I am not able to fix the warning, because it occurs in a header of an external library that can not be changed. It is in boost serialization (rx(s, count)):

template<class Archive, class Container, class InputFunction, class R>
inline void load_collection(Archive & ar, Container &s)
{
    s.clear();
    // retrieve number of elements
    collection_size_type count;
    unsigned int item_version;
    ar >> BOOST_SERIALIZATION_NVP(count);
    if(3 < ar.get_library_version())
        ar >> BOOST_SERIALIZATION_NVP(item_version);
    else
        item_version = 0;
    R rx;
    rx(s, count);
    std::size_t c = count;
    InputFunction ifunc;
    while(c-- > 0){
        ifunc(ar, s, item_version);
    }
}

I have already tried #pragma GCC system_header but this had no effect. Using -isystem instead of -I also does not work.

The general question remains is: I know the text of the warning message. But I do not know the correlation to the gcc warning options.

© Stack Overflow or respective owner

Related posts about c++

Related posts about gcc