ARMCC compatibility: permit anonymous unions.
When ubxlib is compiled under ARMCC an error occurs in u_short_range.h:
anonymous unions are only supported in --gnu mode, or when enabled with #pragma anon_unions
This commit adds that #pragma for ARMCC in u_short_range.h (and stops GCC complaining about the unknown ARMCC #pragma).
@@ -139,6 +139,15 @@ typedef enum {
U_SHORT_RANGE_CONNECTION_IPv6
} uShortRangeIpVersion_t;
+// Enable anonymous unions inclusion for ARM compiler
+#ifdef __arm__
+// Stop GCC complaining
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
+#pragma anon_unions
+#pragma GCC diagnostic pop
+#endif
+
typedef struct {
uShortRangeIpVersion_t type;
union {
