Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - Boost warnings when compiling Message Thread: Previous | Next
  • To: "systemc-forum@xxxxxxxxxxxxxxxxx" <systemc-forum@xxxxxxxxxxxxxxxxx>
  • From: Jeremy Bennett <jeremy.bennett@xxxxxxxxxxxx>
  • Date: Wed, 29 Jul 2009 16:08:05 +0100
Send Email to systemc-forum@lists.systemc.org:
Send new message
Reply to this message
I find I am routinely getting the following compile warnings from Boost
when building SystemC models.

        g++ -DHAVE_CONFIG_H -I. 
-I../../../../testsuite/unit-tests/unit-cycle-jtagtests -I../../..  
-I../../../../jtagreg -I../../../../jtagsys -I/opt/systemc/include 
-DSC_INCLUDE_DYNAMIC_PROCESSES -I/opt/tlm/include/tlm -I../../../../utils 
-DTARGET_BIG_ENDIAN  -g -O2 -Wall -Werror -MT cycle_jtagtest-TapEngineSC.o -MD 
-MP -MF .deps/cycle_jtagtest-TapEngineSC.Tpo -c -o cycle_jtagtest-TapEngineSC.o 
`test -f 'TapEngineSC.cpp' || echo 
'../../../../testsuite/unit-tests/unit-cycle-jtagtests/'`TapEngineSC.cpp
        cc1plus: warnings being treated as errors
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:54: 
error: ‘<unnamed>::_1’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:55: 
error: ‘<unnamed>::_2’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:56: 
error: ‘<unnamed>::_3’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:57: 
error: ‘<unnamed>::_4’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:58: 
error: ‘<unnamed>::_5’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:59: 
error: ‘<unnamed>::_6’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:60: 
error: ‘<unnamed>::_7’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:61: 
error: ‘<unnamed>::_8’ defined but not used
        /opt/systemc/include/sysc/packages/boost/bind/placeholders.hpp:62: 
error: ‘<unnamed>::_9’ defined but not used

I can get round the problem by declaring variables which reference these
unused variables in any source file where the problem occurs, for
example:

        #ifndef BOOST_FIX
        #define BOOST_FIX
        
        // A fix for Boost (used in SystemC) defining placeholders that are not 
used,
        // triggering warnings in g++.
        static  boost::arg<1> a1 = _1;  //!< Workaround Boost problem: unused
        static  boost::arg<2> a2 = _2;  //!< Workaround Boost problem: unused
        static  boost::arg<3> a3 = _3;  //!< Workaround Boost problem: unused
        static  boost::arg<4> a4 = _4;  //!< Workaround Boost problem: unused
        static  boost::arg<5> a5 = _5;  //!< Workaround Boost problem: unused
        static  boost::arg<6> a6 = _6;  //!< Workaround Boost problem: unused
        static  boost::arg<7> a7 = _7;  //!< Workaround Boost problem: unused
        static  boost::arg<8> a8 = _8;  //!< Workaround Boost problem: unused
        static  boost::arg<9> a9 = _9;  //!< Workaround Boost problem: unused
        
        #endif  // BOOST_FIX

I haven't been able to deduce what triggers the problem. It doesn't
occur in every SystemC source file in this system, and I can't see any
common characteristic of those in which it does occur.

Has anyone else seen this, or can anyone offer an explanation. I'm using
GCC 4.3.0 under Fedora 9!


Jeremy

-- 
Tel:      +44 (1590) 610184
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@xxxxxxxxxxxx
Web:     www.embecosm.com


By Date: Previous | Next Current Thread By Thread: Previous | Next