Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/ExceptionTests.cpp
diff options
context:
space:
mode:
authorPhil Nash2012-08-16 20:35:52 +0100
committerPhil Nash2012-08-16 20:35:52 +0100
commitd5fbe2ec5dcc2382afcd44a09cd4cb93c7464dd0 (patch)
tree6c1826c87ad6648ac21e74eee7ca8fb6a00b7092 /projects/SelfTest/ExceptionTests.cpp
parent5bc030ddd7e6aad984f499b203aa1451825945a0 (diff)
downloadcatch3-d5fbe2ec5dcc2382afcd44a09cd4cb93c7464dd0.tar.gz
conditionally compile GCC pragmas
Diffstat (limited to 'projects/SelfTest/ExceptionTests.cpp')
-rw-r--r--projects/SelfTest/ExceptionTests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/projects/SelfTest/ExceptionTests.cpp b/projects/SelfTest/ExceptionTests.cpp
index 6165decf..bf02e2dd 100644
--- a/projects/SelfTest/ExceptionTests.cpp
+++ b/projects/SelfTest/ExceptionTests.cpp
@@ -113,8 +113,10 @@ TEST_CASE_NORETURN( "./failing/exceptions/custom/double", "Unexpected custom exc
throw double( 3.14 );
}
+#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
TEST_CASE( "./failing/exceptions/in-section", "Exceptions thrown from sections report file/ line or section" )
{
@@ -127,7 +129,9 @@ TEST_CASE( "./failing/exceptions/in-section", "Exceptions thrown from sections r
}
}
+#ifdef __GNUC__
#pragma GCC diagnostic pop
+#endif
TEST_CASE( "./succeeding/exceptions/error messages", "The error messages produced by exceptions caught by Catch matched the expected form" )
{