Hadrian2002 0 Report post Posted November 6 Hi, I have 2 suggestions for the current SystemC reference implementation. I started to use pandantic compiling option for my project and this throws many warnings in SystemC headers. Altough it's annoying but there many simple fixes for unused variables. For base classes where you don't use the proposed parameter like here (one random example) ../systemc-lib/src/tlm_core/tlm_2/tlm_generic_payload/tlm_gp.h:349:57: warning: unused parameter 'ext' [-Wunused-parameter] template <typename T> void clear_extension(const T* ext) you can simply switch to this one template <typename T> void clear_extension(const T* /*ext*/) If you want I can do a pushRequest for this on github. But maybe you are not interested in this, than you could at least make it easy for users of CMake to not print them, if they compile their code. The simplest approach for this is to change the CMakelists.txt in src from ... target_include_directories(systemc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) .... to target_include_directories(systemc PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> PUBLIC INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) kind regards Quote Share this post Link to post Share on other sites
Roman Popov 72 Report post Posted November 7 Interesting, I'm not an expert in CMake, but even with existing CMakeLists.txt when I build my application SystemC include directory is recognized automatically as system headers: Quote /usr/bin/clang++ -isystem /home/ripopov/distrib/systemc/include -Wall -Wpedantic -g -pthread -std=gnu++11 -o CMakeFiles/test_systemc.dir/main.cpp.o -c /home/ripopov/work/personal/test_systemc/main.cpp And as a result I don't receive any warnings about issues in SystemC headers. Quote Share this post Link to post Share on other sites
Hadrian2002 0 Report post Posted November 14 mhh okay I think the problem is not pedantic, but -Wextra ... actually I use this compile options " -Wall -Wextra -pedantic", which creates warnings in clang Quote Share this post Link to post Share on other sites
Philipp A Hartmann 238 Report post Posted Tuesday at 06:16 PM You can check against the latest master branch in the public repository, if the warnings have now been fixed. We tried to address at least some of the warnings in recent commits, see 292b25a df7f1f6 9a69d7c 5af8908 Hope that helps, Philipp Quote Share this post Link to post Share on other sites