Skip to content

CI: Remove -Wstrict-overflow#3516

Merged
nlohmann merged 1 commit intonlohmann:developfrom
falbrechtskirchinger:rm-wstrict-overflow
Jun 3, 2022
Merged

CI: Remove -Wstrict-overflow#3516
nlohmann merged 1 commit intonlohmann:developfrom
falbrechtskirchinger:rm-wstrict-overflow

Conversation

@falbrechtskirchinger
Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger commented Jun 3, 2022

Starting in GCC 12, ci_test_gcc generates the following error (in most if not all unit tests):

tests/src/unit-constructor1.cpp: In function ‘nlohmann::detail::dtoa_impl::cached_power nlohmann::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)’:
unit-constructor1.cpp:1585:1: error: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Werror=strict-overflow]

Neither rewriting the offending line nor suppressing the warning in get_cached_power_for_binary_exponent(int) is possible.

This PR removes -Wstrict-overflow from the CI warning flags, which is of dubious value anyway.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8d28e71 on falbrechtskirchinger:rm-wstrict-overflow into 6058d9a on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Jun 3, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jun 3, 2022
@nlohmann nlohmann merged commit 560cede into nlohmann:develop Jun 3, 2022
@falbrechtskirchinger falbrechtskirchinger deleted the rm-wstrict-overflow branch June 3, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants