Resolve #936 "Treating warnings as errors breaks local complexity profiling"
- Related issues: #936 (closed)
- Requested reviewers: @kiene
Reason why this change is needed
The merge of !1249 (merged) added the compiler flag -Werror treating all warnings as errors. As a result, the building the complexity instrumented code with Clang fails.
The complexity instrumentation uses dollar sign in the identifiers of instrumentation macros.
Even though it is not explicitly mentioned, it seems that in Clang -pedantic activates -Wpedantic, similar to GCC
In Clang, -Wpedantic activates -Wdollar-in-identifier-extension. This leads to warnings from each use of dollar sign in instrumentation macros in the code. When treating warnings as errors, the build fails.
Description of the change
The instrumentation script prepare_instrumentation.sh removes the compiler flag -Werror from Makefile and CMakeLists.txt that are used for building the instrumented code.
Affected operating points
- Only the build process of complexity-instrumented code is affected.