Skip to content

Commit e02c7a7

Browse files
committed
Ignore only warnings known by clang
Clang 17 does not know warning group '-Wgnu-empty-initializer'.
1 parent 97152d4 commit e02c7a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

addr2line.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
99
**********************************************************************/
1010

11-
#if defined(__clang__)
11+
#if defined(__clang__) && defined(__has_warning)
12+
#if __has_warning("-Wgnu-empty-initializer")
1213
#pragma clang diagnostic ignored "-Wgnu-empty-initializer"
14+
#endif
15+
#if __has_warning("-Wgcc-compat")
1316
#pragma clang diagnostic ignored "-Wgcc-compat"
1417
#endif
18+
#endif
1519

1620
#include "ruby/internal/config.h"
1721
#include "ruby/defines.h"

0 commit comments

Comments
 (0)