diff --git a/colour.cpp b/colour.cpp index d501c28b..c0eed86b 100644 --- a/colour.cpp +++ b/colour.cpp @@ -35,7 +35,7 @@ const util::colour \ util::colour::NAME = \ util::colour<4,float> (R,G,B,1) \ .template redim () \ - .template cast (); + .template cast () CONSTANT_COLOUR(WHITE,1,1,1); CONSTANT_COLOUR(BLACK,0,0,0); diff --git a/coord/store.hpp b/coord/store.hpp index 3ad57b83..8033658c 100644 --- a/coord/store.hpp +++ b/coord/store.hpp @@ -139,6 +139,8 @@ namespace util { namespace coord { struct { T w,h,d; }; }; }; + +#pragma GCC diagnostic pop } } #endif diff --git a/quaternion.hpp b/quaternion.hpp index 58de3725..e6d77502 100644 --- a/quaternion.hpp +++ b/quaternion.hpp @@ -26,12 +26,26 @@ namespace util { template struct quaternion { + /////////////////////////////////////////////////////////////////////// + // Disable GCC warnings about validity of anonyous structures in + // unions. Push comes to shove I'll manually redsign everything to + // keep this syntax anyway. +#pragma GCC diagnostic push +#if defined(COMPILER_GCC) +#pragma GCC diagnostic ignored "-pedantic" +#endif +#if defined(COMPILER_CLANG) +#pragma GCC diagnostic ignored "-Wgnu" +#endif + union { struct { T w, x, y, z; }; struct { T a, b, c, d; }; T data[4]; }; +#pragma GCC diagnostic pop + static const quaternion IDENTITY; static quaternion rotation (T radians, vector<3,T> axis);