Commit ab2fd23b authored by David Reid's avatar David Reid

Improve compiler support for older versions of GCC.

parent 704dccf6
......@@ -1451,7 +1451,7 @@ extern "C" {
#pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */
#pragma warning(disable:4214) /* nonstandard extension used: bit field types other than int */
#pragma warning(disable:4324) /* structure was padded due to alignment specifier */
#else
#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */
#if defined(__clang__)
......@@ -1504,7 +1504,7 @@ typedef unsigned int ma_uint32;
typedef signed __int64 ma_int64;
typedef unsigned __int64 ma_uint64;
#else
#if defined(__GNUC__)
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlong-long"
#if defined(__clang__)
......@@ -1513,7 +1513,7 @@ typedef unsigned int ma_uint32;
#endif
typedef signed long long ma_int64;
typedef unsigned long long ma_uint64;
#if defined(__GNUC__)
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic pop
#endif
#endif
......@@ -3910,7 +3910,7 @@ struct ma_device
};
#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#else
#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic pop /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */
#endif
......@@ -6392,7 +6392,7 @@ static MA_INLINE void ma_yield()
#endif
#if defined(__GNUC__)
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
......@@ -6429,7 +6429,7 @@ static ma_format g_maFormatPriorities[] = {
ma_format_u8 /* Low quality */
};
#if defined(__GNUC__)
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic pop
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment