Ignore certain compiler options on ARMCC

ARMCC also sets __GNU__ macro, but doesn't support
GCC diagnostic pragmas.
This commit is contained in:
Yunhao Tian
2021-11-30 17:11:09 +08:00
parent dba59217da
commit ac20605e3f
3 changed files with 7 additions and 5 deletions

View File

@@ -106,12 +106,12 @@ typedef struct TU_ATTR_ALIGNED(4)
void dcd_init (uint8_t rhport);
// Interrupt Handler
#if __GNUC__
#if __GNUC__ && !defined(__ARMCC_VERSION)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
void dcd_int_handler(uint8_t rhport);
#if __GNUC__
#if __GNUC__ && !defined(__ARMCC_VERSION)
#pragma GCC diagnostic pop
#endif