Skip to content

Commit 05b635d

Browse files
Fix -Wunknown-pragmas warnings (really)
1 parent dd91907 commit 05b635d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/base-stacktrace.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ using namespace icinga;
2020
* should be printed. If it looks somewhat meaningful, you can probably ignore a failure of this test case.
2121
*/
2222

23-
#ifndef _MSC_VER
23+
#if defined(__GNUC__) && !defined(__clang__)
2424
#pragma GCC push_options
25-
#pragma GCC optimize ("O0")
25+
#pragma GCC optimize("O0")
26+
#elif defined(__clang__)
2627
#pragma clang optimize off
27-
#else /* _MSC_VER */
28+
#elif defined(_MSC_VER)
2829
#pragma optimize("", off)
29-
#endif /* _MSC_VER */
30+
#endif
3031

3132
BOOST_AUTO_TEST_SUITE(base_stacktrace)
3233

@@ -66,9 +67,10 @@ BOOST_AUTO_TEST_CASE(stacktrace)
6667

6768
BOOST_AUTO_TEST_SUITE_END()
6869

69-
#ifndef _MSC_VER
70+
#if defined(__GNUC__) && !defined(__clang__)
7071
#pragma GCC pop_options
72+
#elif defined(__clang__)
7173
#pragma clang optimize on
72-
#else /* _MSC_VER */
74+
#elif defined(_MSC_VER)
7375
#pragma optimize("", on)
74-
#endif /* _MSC_VER */
76+
#endif

0 commit comments

Comments
 (0)