Fix C tests for Javascript and c++17

This commit is contained in:
William S Fulton 2021-10-23 16:11:59 +01:00
parent 1c34be2d24
commit 1bd3e771a0
1 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,18 @@
struct swig_tree;
%}
%{
#if defined(__cplusplus)
#if __cplusplus >= 201703L
/*
Fix for languages that compile C tests as C++:
error: ISO C++17 does not allow register storage class specifier [-Werror=register]
*/
#define register
#endif
#endif
%}
// bug # 924413
%inline {
void clear_tree_flags(register struct swig_tree *tp, register int i) {}