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
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 
        cc1plus: warnings being treated as errors
error: ‘<unnamed>::_1’ defined but not used
error: ‘<unnamed>::_2’ defined but not used
error: ‘<unnamed>::_3’ defined but not used
error: ‘<unnamed>::_4’ defined but not used
error: ‘<unnamed>::_5’ defined but not used
error: ‘<unnamed>::_6’ defined but not used
error: ‘<unnamed>::_7’ defined but not used
error: ‘<unnamed>::_8’ defined but not used
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

        #ifndef BOOST_FIX
        #define BOOST_FIX
        // A fix for Boost (used in SystemC) defining placeholders that are not 
        // 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!


Tel:      +44 (1590) 610184
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@xxxxxxxxxxxx

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