Skip to content

Commit fe7dd99

Browse files
committed
test: Ignore clang warnings about C++ main definition
clang seems confused about whether main should be extern "C" or not. Signed-off-by: Keith Packard <[email protected]>
1 parent d33e4d6 commit fe7dd99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test-cplusplus.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@
145145
#include <wctype.h>
146146
#include <wordexp.h>
147147

148+
#ifdef __clang__
149+
#pragma GCC diagnostic ignored "-Wpragmas"
150+
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
151+
#pragma GCC diagnostic ignored "-Wmain"
152+
#endif
153+
148154
extern "C" {
149155

150156
int main(void);

0 commit comments

Comments
 (0)