Skip to content

Fix these warnings: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]#180

Merged
mywave82 merged 1 commit into
adplug:masterfrom
mywave82:adlibemu-typepuning
Apr 7, 2023
Merged

Fix these warnings: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]#180
mywave82 merged 1 commit into
adplug:masterfrom
mywave82:adlibemu-typepuning

Conversation

@mywave82

@mywave82 mywave82 commented Apr 6, 2023

Copy link
Copy Markdown
Contributor

The given code would not work as expected on big-endian systems, and doing floating point compares on a modern system is not that expensive.

 warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

The given code would not work as expected on big-endian systems, and doing floating point compares on a modern system is not that expensive.
@mywave82 mywave82 merged commit 986700d into adplug:master Apr 7, 2023
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.

1 participant