From 2123ef034850039c54b47d493ec09907dedb797b Mon Sep 17 00:00:00 2001 From: Timothy Rae Date: Fri, 31 Mar 2017 12:40:58 +0900 Subject: [PATCH] Use pedantic warnings From the gcc manual: Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used. Note: ISO C++98 doesn't support the "long long" data type, so we disable that warning -Winit-self can be removed as it's enabled by -Wall --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e0ba8c..c87dee5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ else (MSVC) set(CPPLINT_ARG_OUTPUT "--output=eclipse") set(CPPCHECK_ARG_TEMPLATE "--template=gcc") # Useful compile flags and extra warnings - add_compile_options(-fstack-protector -Wall -Wextra -Winit-self -Wswitch-enum -Wshadow -Winline) + add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline) if (CMAKE_COMPILER_IS_GNUCXX) # GCC flags if (SQLITECPP_USE_GCOV AND CMAKE_COMPILER_IS_GNUCXX)