Hadrian2002 Posted November 6, 2019 Report Share Posted November 6, 2019 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 Link to comment Share on other sites More sharing options...
Roman Popov Posted November 7, 2019 Report Share Posted November 7, 2019 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 Link to comment Share on other sites More sharing options...
Hadrian2002 Posted November 14, 2019 Author Report Share Posted November 14, 2019 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 Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted December 3, 2019 Report Share Posted December 3, 2019 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.