From f1f1d888e4aea4ae33efe8a10d05cd33c5537b63 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Wed, 20 Jan 2010 23:51:54 +0000 Subject: [PATCH] avoid use of -Wno-variadic-macros, which causes an error with gcc 3. --- CMakeLists.txt | 2 +- stasis/common.h | 4 ++++ stasis/page/compression/pluginDispatcher.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a431737..4334134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/stasis) IF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" ) SET(COMMON_LIBRARIES stasis m pthread stdc++) SET(CMAKE_C_FLAGS "-g -Wall -pedantic -std=gnu99 -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-variadic-macros -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") ELSEIF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro" ) SET(COMMON_LIBRARIES stasis m pthread Crun Cstd) SET(CMAKE_C_FLAGS "-g -xc99=all -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") diff --git a/stasis/common.h b/stasis/common.h index 53e5ed1..a372742 100644 --- a/stasis/common.h +++ b/stasis/common.h @@ -122,6 +122,10 @@ typedef int16_t pagetype_t; /*#define PROFILE_LATCHES*/ /*#define NO_LATCHES */ + +// ICK: Only way to portably shut up GCC warnings about variadic macros +#pragma GCC system_header + #ifdef DEBUGGING /** @todo Files that use DEBUG have to pull in stdio.h, which is a pain! */ #define DEBUG(...) \ diff --git a/stasis/page/compression/pluginDispatcher.h b/stasis/page/compression/pluginDispatcher.h index dffae8c..bdccba3 100644 --- a/stasis/page/compression/pluginDispatcher.h +++ b/stasis/page/compression/pluginDispatcher.h @@ -43,6 +43,8 @@ namespace rose { class PluginDispatcher{ public: +// Silence GCC variadic macro warnings... +#pragma GCC system_header #define dispatchSwitch(col,cases,...) \ static const int base = USER_DEFINED_PAGE(0) + 3 * 2 * 4;\