Skip to content

Commit

Permalink
Added "pedantic" to choc_DisableAllWarnings.h
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstorer committed Nov 6, 2024
1 parent 2cfcc62 commit c1a07dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions math/choc_MathHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ inline Int128 multiply128 (uint64_t a, uint64_t b)
result.low = _umul128 (a, b, &result.high);
return result;
#elif __LP64__
#if __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
auto total = static_cast<unsigned __int128> (a) * static_cast<unsigned __int128> (b);
#if __GNUC__
#pragma GCC diagnostic pop
#endif
return { static_cast<uint64_t> (total >> 64), static_cast<uint64_t> (total) };
#else
uint64_t a0 = static_cast<uint32_t> (a), a1 = a >> 32,
Expand Down
1 change: 1 addition & 0 deletions platform/choc_DisableAllWarnings.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
#pragma GCC diagnostic ignored "-Wvolatile"
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wpedantic"
#ifndef __MINGW32__
#pragma GCC diagnostic ignored "-Wredundant-move"
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -DDEBUG")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wshadow -Wno-missing-field-initializers -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wreorder -Wsign-conversion -Wno-ignored-qualifiers -Wunreachable-code -Wdeprecated-copy -Wdeprecated-copy-dtor ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wshadow -Wno-missing-field-initializers -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wreorder -Wsign-conversion -Wno-ignored-qualifiers -Wunreachable-code -Wdeprecated-copy -Wdeprecated-copy-dtor -Wpedantic ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
Expand Down

0 comments on commit c1a07dc

Please sign in to comment.