SystemC-2.2 can not be compiled with clang due to syntax violation of SystemC library.
Such violations are fixed in SystemC-2.3 but not perfect.
Clang emits warnings with -Wall and -Wextra option.
It is important to set the warning level higher to keep code clean.
If warnings are emitted at the library, warnings of user code may be concealed by them.
This is why libraries must be warning-free.
I wrote small patch to suppress such warnings.
Apply systemc-2.3_clang.patch before configure., then build it as usual.
- tar zxvf systemc-2.3.0.tgz
- patch -p0 < systemc-2.3_clang.patch
- cd systemc-2.3.0
- env CC=clang CXX=clang++ CPP="clang -E" ./configure
- make install