Cast to integral type ignores qualifier volatile#288
Merged
hathach merged 1 commit intoadafruit:masterfrom Mar 29, 2021
henrygab:patch-1
Merged
Cast to integral type ignores qualifier volatile#288hathach merged 1 commit intoadafruit:masterfrom henrygab:patch-1
volatile#288hathach merged 1 commit intoadafruit:masterfrom
henrygab:patch-1
Conversation
Attempting to cast to a `volatile uint32_t` does nothing different from cast to a `uint32_t`, with the exception of **_looking like_** it's accessing a register.
Author
|
@hathach -- Here's another simple PR, no corresponding issue (as requested) |
hathach
approved these changes
Mar 29, 2021
Member
hathach
left a comment
There was a problem hiding this comment.
I agree with you that the volatile cast do nothing and gcc is right to raise the warning, __text_start__ is a linker symbol.
Look like it is from the original repo https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/Reset.cpp#L31
You probably could submit a PR there as well.
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.
Attempting to cast to a
volatile uint32_tdoes nothing different from cast to auint32_t,with the exception of looking like it's accessing a register.
Just remove the word
volatileto fix.