Fix compile errors with VS2019 v16.9.3 and GCC v7.5.0 (see issue #3140)

This commit is contained in:
Marshall Greenblatt
2021-06-20 12:08:10 -04:00
parent 529b91bc6e
commit 9efd3dc8ee
14 changed files with 39 additions and 3 deletions

View File

@ -67,6 +67,15 @@
#define HAS_BUILTIN(x) 0
#endif
// __has_feature and __has_attribute don't exist for MSVC.
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif // !defined(__has_feature)
#if !defined(__has_attribute)
#define __has_attribute(x) 0
#endif // !defined(__has_attribute)
// Annotate a variable indicating it's ok if the variable is not used.
// (Typically used to silence a compiler warning when the assignment
// is important for some other reason.)