timing.hpp: Casting to atomic uint64_t before Running/last_ assignment#3844
Open
spchamp wants to merge 1 commit into
Open
timing.hpp: Casting to atomic uint64_t before Running/last_ assignment#3844spchamp wants to merge 1 commit into
spchamp wants to merge 1 commit into
Conversation
This patch adds a cast for an assignment to an atomic integer value
in timing.hpp
Previous to the patch, compiling Rubinius v5.0 with clang 11 on
FreeBSD 11.1:
~~~~
4: CXX machine/accessor_primitives.cpp
In file included from machine/accessor_primitives.cpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/includes.hpp:15:
In file included from ./machine/class/block_environment.hpp:12:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/variable_scope.hpp:9:
In file included from /usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/class/fiber.hpp:13:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
if(last_) last_ = run;
^~~
In file included from machine/bytecode_verifier.cpp:17:
/usr/home/u1000/wk/dist_wk/ports_devo/lang/rubinius/work/rubinius-5.0/machine/diagnostics/timing.hpp:116:25: error: incompatible integer to pointer conversion assigning to 'std::atomic<uint>
if(last_) last_ = run;
^~~
~~~~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds a cast for an assignment to an atomic integer value in timing.hpp
Updated: This patch serves as a duplicate or alternate approach to how the issue is addressed in Pull #3836
Previous to the patch, compiling Rubinius v5.0 with clang 11 on FreeBSD 11.1: