Skip to content

Commit d15b217

Browse files
committed
Only disable -Wnoexcept-type on gcc >= 7
1 parent 616e3d8 commit d15b217

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
3232
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
3333
# pragma GCC diagnostic ignored "-Wattributes"
34-
# pragma GCC diagnostic ignored "-Wnoexcept-type"
34+
# if __GNUC__ >= 7
35+
# pragma GCC diagnostic ignored "-Wnoexcept-type"
36+
# endif
3537
#endif
3638

3739
#include "attr.h"

0 commit comments

Comments
 (0)