You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CBMC build fails when using GCC 12 (latest version of GCC released in August 2022) on builds not using -O directives (meaning -O0).
Multiple new return-type warnings are produced when building with GCC 12.
This makes the build to fail as we use -Werror.
cbmc/src/util/interval.cpp: In static member function 'static exprt constant_interval_exprt::get_extreme(std::vector<exprt>, bool)':
cbmc/src/util/interval.cpp:567:1: error: control reaches end of non-void function [-Werror=return-type]
567 | }
| ^
cc1plus: all warnings being treated as errors
cbmc/src/util/simplify_expr_int.cpp: In member function 'simplify_exprt::resultt<> simplify_exprt::simplify_inequality_both_constant(const binary_relation_exprt&)':
cbmc/src/util/simplify_expr_int.cpp:1533:1: error: control reaches end of non-void function [-Werror=return-type]
1533 | }
| ^
It is possible that other files belonging to other submodules also fail, but the build failure stops the build earlier.
When building with CMake, it is possible to reproduce this by using Debug as CMAKE_BUILD_TYPE (cmake -DCMAKE_BUILD_TYPE=Debug ..).
Note that the error is not related with the addition of -DNDEBUG, but appears ONLY when -O0 is passed (or no -O directives are passed).
CBMC version: 5.80.0
Operating system: Ubuntu 22.04, MacOS, Fedora
Exact command line resulting in the issue: make
What behaviour did you expect: build succeed
What happened instead: build failure
The text was updated successfully, but these errors were encountered:
I think we should to tweak the implementation of our UNREACHABLE macro in order to make this error go-away. C23 introduces its own unreachable - https://en.cppreference.com/w/c/program/unreachable
We may be able to if def in a usage of gcc's __builtin_unreachable() when building with gcc.
CBMC build fails when using GCC 12 (latest version of GCC released in August 2022) on builds not using
-O
directives (meaning-O0
).Multiple new
return-type
warnings are produced when building with GCC 12.This makes the build to fail as we use -Werror.
It is possible that other files belonging to other submodules also fail, but the build failure stops the build earlier.
When building with CMake, it is possible to reproduce this by using
Debug
asCMAKE_BUILD_TYPE
(cmake -DCMAKE_BUILD_TYPE=Debug ..
).Note that the error is not related with the addition of
-DNDEBUG
, but appears ONLY when-O0
is passed (or no-O
directives are passed).CBMC version: 5.80.0
Operating system: Ubuntu 22.04, MacOS, Fedora
Exact command line resulting in the issue: make
What behaviour did you expect: build succeed
What happened instead: build failure
The text was updated successfully, but these errors were encountered: