jeudi 13 août 2015

gcc 4.8.4 "pragma GCC diagnostic not applied"

Using g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

In a pre-compiled-header I have the following:

63 #pragma GCC diagnostic push
64 #pragma GCC diagnostic ignored "-Wunused-variable"
65 #include <boost/filesystem.hpp>
66 #pragma GCC diagnostic pop

Now when I go to run our build system I get the following build error:

from <>../../../../Core_Pch.h:65,
    from <command-line>:0:
<>/../../../../external/include/BoostBase/boost/system/error_code.hpp: At global scope:
<>/../../../../external/include/BoostBase/boost/system/error_code.hpp:221:36: error: ‘boost::system::posix_category’ defined but not used [-Werror=unused-variable]
     static const error_category &  posix_category = generic_category();

There appears to be a possible bug already opened in gcc's bug tracker http://ift.tt/1s26oWk. However, I am wondering if anyone has this working? The bug eludes to the fact that the behaviour of the preprocessor used by the c lexer works differently than that used by the c++ lexer.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire