Fix build with g++ 3.4 with -pedantic[-errors] option.

The use of variadic macros results in a warning/error if -pedantic[-errors]
is used when compiling C++98 code as they are only formally part of C99 (or
C++11). With g++ 4 and later, this can be avoided by using -Wno-variadic-macros
option, but it doesn't exist in g++ 3, so a nasty workaround in the header
itself is required: mark it as system header in order to fix compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-10 16:52:08 +00:00
parent 39da0824d3
commit 91b7aab4c2
2 changed files with 21 additions and 0 deletions

View File

@@ -357,6 +357,12 @@ private:
method.
*/
#ifdef HAVE_VARIADIC_MACROS
// See wx/cpp.h for the explanations of this hack.
#if defined(__GNUC__) && __GNUC__ == 3
#pragma GCC system_header
#endif /* gcc-3.x */
#define wxTEST_DIALOG(codeToRun, ...) \
{ \
wxTEST_DIALOG_HOOK_CLASS wx_hook; \