nemequ/portable-snippets

Wrong detection of intsafe.h at MinGW (with GCC 4.8.1)

tbeu opened this issue · 0 comments

tbeu commented

It was reported in modelica/ModelicaStandardLibrary#3556 that the following lines

# if defined(__has_include)
# if __has_include(<intsafe.h>)
# define PSNIP_SAFE_HAVE_INTSAFE_H
# endif
# elif defined(_WIN32)
# define PSNIP_SAFE_HAVE_INTSAFE_H
# endif

are not protable enough for MinGW with GCC 4.8.1 (not exclusively to that version). The issue probably is, that old GCC 4.8.1 has no __has_include why it then sets PSNIP_SAFE_HAVE_INTSAFE_H in the else branch since MinGW defines _WIN32. AFAIK, there is no intsafe.h on MinGW yet.