Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try union workaround to function cast warning #30803

Merged
merged 1 commit into from
May 24, 2019

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

The pragma-based solution wasn't working on older gcc versions. It could be made to work with extra #ifdefs, but would be even more messy.

Describe the solution

Try a solution using unions to type-pun instead.

Describe alternatives you've considered

We've tried various ways of casting, but they all tend to fall foul of a different compiler warning.

Additional context

I can't compile this locally, so relying on CI to do so.

The pragma-based solution would be even more messy if made to work on
all gcc versions.
@ZhilkinSerg ZhilkinSerg added the Code: Build Issues regarding different builds and build environments label May 24, 2019
@ZhilkinSerg ZhilkinSerg merged commit f14fa7a into CleverRaven:master May 24, 2019
@jbytheway jbytheway deleted the function_cast_workaround branch May 24, 2019 10:51
@neitsa
Copy link
Contributor

neitsa commented May 24, 2019

Thank you very much for handling this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Build Issues regarding different builds and build environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants