Fix unsigned int bug in sort test and C++ standard library assertions - #3996
Conversation
|
I'm curious about how the failing test was identified. In Nixpkgs, we run the DOLFINx C++ unit tests, and they appear to pass. logs: https://logs.ofborg.org/?key=nixos/nixpkgs.460685&attempt_id=72429051-7804-43da-af4b-3ba47e85a033 |
|
My understanding is that Debian and Ubuntu are starting to use GCC options like -fhardening which enables hardened C++ standard libraries with more asserts enabled, amongst other things. This picked up this bug, but we didn't see it in our CI. To avoid this, we will be enabling more hardening on our CI systems, which use our custom CMake Developer build type, over the coming weeks. We do not plan to adjust the standard CMake built types, e.g. Release - we leave this to downstream packagers discretion. |
|
Debian also uses gcc-15 now, which has tightened up standards (C23 language standard by default) and catches use of old conventions for function definitions. The flags debian uses are managed via |
This PR:
-O2but not completely certain.As an aside, there are quite a number of useful compile warnings not included
-Wallwhich we should consider turning on.These extra checks produce no discernable increase in test time.