Skip to content

Commit

Permalink
Fixed strict aliasing warnings in GCC 4.8.1 / Android NDK 9c (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Riccio committed Mar 16, 2014
1 parent 4b9e2d4 commit 658d7e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions glm/detail/func_integer.inl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ namespace glm
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");

uint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);
msb = *(reinterpret_cast<uint32*>(&Value64) + 1);
uint32* PointerMSB = (reinterpret_cast<uint32*>(&Value64) + 1);
msb = *PointerMSB;
lsb = reinterpret_cast<uint32&>(Value64);
}

Expand Down Expand Up @@ -230,7 +231,8 @@ namespace glm
GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");

int64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);
msb = *(reinterpret_cast<int32*>(&Value64) + 1);
int32* PointerMSB = (reinterpret_cast<int32*>(&Value64) + 1);
msb = *PointerMSB;
lsb = reinterpret_cast<int32&>(Value64);
}

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ GLM 0.9.5.3: 2014-0X-XX
- Added GLM_GTX_matrix_transform_2d extension (#178, #176)
- Fixed CUDA issues (#169, #168, #183, #182)
- Added support for all extensions but GTX_string_cast to CUDA
- Fixed strict aliasing warnings in GCC 4.8.1 / Android NDK 9c (#152)

================================================================================
GLM 0.9.5.2: 2014-02-08
Expand Down

0 comments on commit 658d7e2

Please sign in to comment.