bench: Avoid deprecated use of volatile += #24372

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2202-20 changing 1 files +1 −1
  1. MarcoFalke commented at 4:47 pm on February 17, 2022: member

    Deprecated in C++20 according to https://eel.is/c++draft/expr.ass#6 .

    0bench/examples.cpp:16:13: warning: compound assignment with ‘volatile’-qualified left operand is deprecated [-Wvolatile]
    1   16 |         sum += sin(d);
    2      |         ~~~~^~~~~~~~~
    

    While C++20 is currently unsupported, I don’t see any downside to a minor fixup to an example benchmark. This will also make a hypothetical C++20 patch smaller.

  2. bench: Avoid deprecated use of volatile += 9999f891d1
  3. MarcoFalke commented at 4:49 pm on February 17, 2022: member
    Can be tested with #24169 or by looking at the CI output: https://cirrus-ci.com/task/6478320643604480?logs=ci#L3123
  4. MarcoFalke commented at 5:05 pm on February 17, 2022: member
    On my system this doesn’t change the binary with g++ -O2, but it does with clang++ -O2.
  5. DrahtBot added the label Tests on Feb 17, 2022
  6. RandyMcMillan referenced this in commit 786a5e6ba4 on Feb 18, 2022
  7. fanquake approved
  8. fanquake commented at 11:29 am on February 23, 2022: member
    ACK 9999f891d1c9093e552492cf8ccc3168370c7a39
  9. fanquake merged this on Feb 23, 2022
  10. fanquake closed this on Feb 23, 2022

  11. MarcoFalke deleted the branch on Feb 23, 2022
  12. sidhujag referenced this in commit 4592c3f1bb on Feb 23, 2022
  13. PastaPastaPasta referenced this in commit 5e4db4ea26 on Apr 7, 2022
  14. PastaPastaPasta referenced this in commit 7e598dd632 on Apr 11, 2022
  15. DrahtBot locked this on Feb 23, 2023

github-metadata-mirror

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: 2024-06-18 10:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me