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

GLM can't handle -Wpedantic again (GLM 0.9.9.2) #814

Closed
Cazadorro opened this issue Sep 14, 2018 · 1 comment
Closed

GLM can't handle -Wpedantic again (GLM 0.9.9.2) #814

Cazadorro opened this issue Sep 14, 2018 · 1 comment

Comments

@Cazadorro
Copy link

Cazadorro commented Sep 14, 2018

similar to this issue #524

Since 2016, GLM has been modified such that anonymous struct checks against GCC -Wpedantic cause warnings again. This appears to be because glm/detail/type_vec2.hpp, glm/detail/type_vec3.hpp and glm/detail/type_vec4.hpp have actually removed the fix seen already in use here

error example:

.../glm/detail/type_vec4.hpp:34:28: error: ISO C++ prohibits anonymous structs [-Werror=pedantic]
     struct { T s, t, p, q; };
                            ^

Last time the following lines were used to simply suppress compiler warnings at critical sites, like so:

#if GLM_COMPILER & GLM_COMPILER_GCC
#				pragma GCC diagnostic push
#				pragma GCC diagnostic ignored "-Wpedantic"
#			endif
#			if GLM_COMPILER & GLM_COMPILER_CLANG
#				pragma clang diagnostic push
#				pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
#				pragma clang diagnostic ignored "-Wnested-anon-types"
#			endif

 ... // anonymous struct code

#			if GLM_COMPILER & GLM_COMPILER_CLANG
#				pragma clang diagnostic pop
#			endif
#			if GLM_COMPILER & GLM_COMPILER_GCC
#				pragma GCC diagnostic pop
#			endif

Is there a reason why this has since been removed as of the latest development branch (as far as I can tell)? There doesn't appear to be a way to simply mute anonymous struct warnings in GCC and pedantic is required for my code base.

I'm able to make the changes locally with no pedantic errors, but I believe this issue has actually regressed into all places where it was previously needed (quaternion and vec1 need this as well?)

@Cazadorro Cazadorro changed the title GLM can't handle [-Werror=pedantic] again (GLM 0.9.9.2) GLM can't handle -Werror again (GLM 0.9.9.2) Sep 14, 2018
@Cazadorro Cazadorro changed the title GLM can't handle -Werror again (GLM 0.9.9.2) GLM can't handle -Wpedantic again (GLM 0.9.9.2) Sep 14, 2018
Groovounet added a commit that referenced this issue Sep 18, 2018
…guage extensions but using W4 or Wpedantic warnings #814 #775
@Groovounet
Copy link
Member

This issue is fixed in master branch thanks to GLM_FORCE_SILENT_WARNINGS define.

Thanks for reporting!

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

No branches or pull requests

2 participants