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 .

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

    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. RandyMcMillan cross-referenced this on Feb 18, 2022 from issue refactor: base58.cpp - preemptively remove deprecated += by RandyMcMillan
  8. fanquake approved
  9. fanquake commented at 11:29 AM on February 23, 2022: member

    ACK 9999f891d1c9093e552492cf8ccc3168370c7a39

  10. fanquake merged this on Feb 23, 2022
  11. fanquake closed this on Feb 23, 2022

  12. MarcoFalke deleted the branch on Feb 23, 2022
  13. sidhujag referenced this in commit 4592c3f1bb on Feb 23, 2022
  14. PastaPastaPasta referenced this in commit 5e4db4ea26 on Apr 7, 2022
  15. PastaPastaPasta referenced this in commit 7e598dd632 on Apr 11, 2022
  16. bitcoin 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: 2026-05-20 06:53 UTC