Skip to content

Squelch newer GCC warning on memmove8 - #986

Merged
kriegsman merged 8 commits into
FastLED:masterfrom
marcmerlin:master
Jul 29, 2020
Merged

kriegsman merged 8 commits into
FastLED:masterfrom
marcmerlin:master

Conversation

@marcmerlin

Copy link
Copy Markdown
Contributor

Discussion in #985

@5chmidti 5chmidti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a quick test on the following (only if it compiles on c++14, but this should be correct according to the standard):
Why not just outright remove the warnings about CRGB and CHSV not being trivially copyable instead of casting the warning away?
By simply removing the user defined copy constructor' and copy assignments', CRGB and CHSV could simply be made trivially copyable by using the default copy constructor and copy assignment. One could write explicitly that we want to use the default with for example:
inline CRGB &operator=(const CRGB &rhs) __attribute__((always_inline)) = default;
Which I guess could be preferrable or even necessary because we have other copy assignments with other arguments for CRGB, as I don't know if the copy assignment for CRGB would be deleted.
After that the warnings shouldn't be there anymore, as the types would be trivially copyable.

@kriegsman

Copy link
Copy Markdown
Member

Thanks for the PR on this one; we're trying to work down the backlog, and appreciate all the contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants