Since #20413 the minimum required GCC version is 7.
refactor: Drop noop gcc version checks #20491
pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:201125-gcc changing 3 files +4 −12-
hebasto commented at 12:27 PM on November 25, 2020: member
-
fanquake commented at 12:28 PM on November 25, 2020: member
-
830ddf4139
Drop noop gcc version checks
Since #20413 the minimum required GCC version is 7. Co-authored-by: practicalswift <practicalswift@users.noreply.github.com>
- hebasto force-pushed on Nov 25, 2020
-
hebasto commented at 12:41 PM on November 25, 2020: member
I think these are included in #19183. Also, unless we added that check, I'm not sure if we want to modify nanobench.
Edit: Saying that. #19183 is being split up/possibly blocked, so if the nanobench change is removed, I don't mind if this is merged earlier.
Removed nanobench change, and added credits to @practicalswift.
- MarcoFalke added the label Refactoring on Nov 25, 2020
- MarcoFalke renamed this:
Drop noop gcc version checks
refactor: Drop noop gcc version checks
on Nov 25, 2020 -
in src/test/fuzz/multiplication_overflow.cpp:17 in 830ddf4139
13 | @@ -14,7 +14,7 @@ 14 | #if __has_builtin(__builtin_mul_overflow) 15 | #define HAVE_BUILTIN_MUL_OVERFLOW 16 | #endif 17 | -#elif defined(__GNUC__) && (__GNUC__ >= 5) 18 | +#elif defined(__GNUC__)
MarcoFalke commented at 1:11 PM on November 25, 2020:isn't this covered by the previous check already?
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Integer-Overflow-Builtins.html
hebasto commented at 1:25 PM on November 25, 2020:Thanks! Updated.
hebasto force-pushed on Nov 25, 2020laanwj commented at 4:25 PM on November 25, 2020: memberCode review ACK a526ab4fca37d8148e45705c97da49da3aa36fae
MarcoFalke requested review from practicalswift on Nov 25, 2020fanquake commented at 7:52 AM on November 26, 2020: memberI'm not sure this is correct, or at-least, now that this is only using
__has_builtin()for the builtin checks, they wont be defined for GCC < 10, as that was the first version to get__has_builtin().New built-in functions: The __has_builtin built-in preprocessor operator can be used to query support for built-in functions provided by GCC and other compilers that support it.
Is that the desired behavior? I assume that's why it also has a check for
__GNUC__.i.e:
#include <iostream> int main() { #if defined(__has_builtin) std::cout << "has __has_builtin()\n"; #endif return 0; }g++ --version g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 g++ test.cpp && ./a.out # not avaliable g++-10 test.cpp && ./a.out has __has_builtin()hebasto force-pushed on Nov 28, 2020hebasto commented at 9:21 PM on November 28, 2020: memberI'm not sure this is correct, or at-least, now that this is only using
__has_builtin()for the builtin checks, they wont be defined for GCC < 10, as that was the first version to get__has_builtin().Updated (reverted back).
fanquake approvedfanquake commented at 7:54 AM on November 30, 2020: memberACK 830ddf413934226d0b6ca99165916790cc52ca18
fanquake merged this on Nov 30, 2020fanquake closed this on Nov 30, 2020hebasto deleted the branch on Nov 30, 2020sidhujag referenced this in commit 888a0d5b5c on Nov 30, 2020christiancfifi referenced this in commit 116dcb6693 on Oct 3, 2021christiancfifi referenced this in commit 3ab1378747 on Oct 4, 2021christiancfifi referenced this in commit e447c4e0cd on Oct 11, 2021pravblockc referenced this in commit 8d0121b435 on Nov 18, 2021MarcoFalke locked this on Feb 15, 2022ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 03:14 UTC
More mirrored repositories can be found on mirror.b10c.me