You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that using unions for type-punning is valid C but not valid C++ (though GNU compilers avoid undefined behavior here). In C++ you have a few options, the easiest being std::bit_cast but this is only introduced in C++20.
I suspect this would only be an issue on odd compilers (which is unfortunately common in gamedev) or with newer optimizations. I’m not sure if there’s a warning that would flag this.
We are using both unions and memcpy here, so I'm not sure but only skimmed through articles.
Thanks for reference! I guess we'll leave this simmering and see if anyone has any problem.
Version/Branch of Dear ImGui:
Version around Jan 6 2024, no modifications
Back-ends:
n/a
Compiler, OS:
gcc 13.2.1 20230801 on Arch Linux x86_64
Full config/build information:
n/a (build warning)
Details:
The following warnings are produced:
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: