mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 16:24:04 +02:00
Improve compiler support for older versions of GCC.
This commit is contained in:
+6
-6
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user