-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Strict Aliasing Problem #152
Comments
Can you point me to the code that generate that warning? |
Including either |
I also get a lot of those in Android NDK 9c (only in release build). An example from 0.9.5.1 release:
However, it occurs in tons of places. |
So I am not 100% sure I fixed the issue but at least a apply a tentative fix to resolve it. This fix is available in GLM 0.9.5 branch of the repository. Thanks for contributing, |
The issue still occurs with the Android NDK, using glm branch 0.9.5 at func_integer.inl:234/175:
Full warning:
|
If that was the only two issues left I think this time the problem should be fixed. This changes will be part of GLM 0.9.5.3. Thanks for contributing, |
I guess you fixed the wrong line. The faulty one was the line below it: |
@Groovounet and a bit of research it seems to be the appropriate way. If you would like to integrate this solution, just let me know which branch I should open a PR against. |
I'll read this before coming to a conclusion. I am not convinced that the aliasing here in GLM is really an issue because it's aliasing from a temporary variable created in the function generating that aliasing. Aliasing of the arguments is an issue that should be fixed in GLM 0.9.5. |
This issue should be fixed in GLM 0.9.5 branch for GLM 0.9.5.4 release. Thanks, |
Using the -O2 flag for g++ 4.8.1 with glm, I get aliasing warnings everywhere:
warning: dereferencing type-punned pointer will break strict-aliasing rules
Edit: I'm also using the -Wall flag
The text was updated successfully, but these errors were encountered: