ref: 472abcff8be97ff23f8196412041624fc3e34ce4
parent: 805abd6f66415c22a934fe4e169cc7f1ef1ec681
author: Bernhard Schelling <14200249+schellingb@users.noreply.github.com>
date: Sun Nov 14 21:38:06 EST 2021
Please pedantic compiler warnings Use #pragmas to avoid changing the API (#60)
--- a/tml.h
+++ b/tml.h
@@ -88,8 +88,22 @@
// - pitch_bend for TML_PITCH_BEND messages
union
{
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable:4201) //nonstandard extension used: nameless struct/union
+ #elif defined(__GNUC__)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wpedantic" //ISO C++ prohibits anonymous structs
+ #endif
+
struct { union { char key, control, program, channel_pressure; }; union { char velocity, key_pressure, control_value; }; };
struct { unsigned short pitch_bend; };
+
+ #ifdef _MSC_VER
+ #pragma warning( pop )
+ #elif defined(__GNUC__)
+ #pragma GCC diagnostic pop
+ #endif
};
// The pointer to the next message in time following this event