Don't force pedantic back on. Instead, push and pop the current state.
Don't pass these options to Clang and ICC, since they don't have the
-pedantic option anyway.
Change-Id: I302f7fcfe974f23423ca2ac7711a7c4a8ac39d88
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
coap_address_t peer; /**< the peer to notify */
size_t tokenlen; /**< length of the token */
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-pedantic"
+#endif
__extension__ unsigned char token[]; /**< the token to use in a response */
-#pragma GCC diagnostic warning "-pedantic"
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
+#pragma GCC diagnostic pop
+#endif
} coap_async_state_t;
/* Definitions for Async Status Flags These flags can be used to
typedef int coap_tid_t;
#define COAP_INVALID_TID -1
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-pedantic"
+#endif
#ifdef WORDS_BIGENDIAN
typedef struct {
unsigned int version:2; /* protocol version */
__extension__ unsigned char token[0]; /* the actual token, if any */
} coap_hdr_t;
#endif
-#pragma GCC diagnostic warning "-pedantic"
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
+#pragma GCC diagnostic pop
+#endif
#define COAP_MESSAGE_IS_EMPTY(MSG) ((MSG)->code == 0)
#define COAP_MESSAGE_IS_REQUEST(MSG) (!COAP_MESSAGE_IS_EMPTY(MSG) \