summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cortex-m/vecttable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/cortex-m/vecttable.c b/core/cortex-m/vecttable.c
index d27962a7d8..10b4b22422 100644
--- a/core/cortex-m/vecttable.c
+++ b/core/cortex-m/vecttable.c
@@ -92,6 +92,14 @@ void svc_helper_handler()
*/
#define IRQ_UNUSED_OFFSET 8
+/* Disable warning that "initializer overrides prior initialization of this
+ * subobject", since we are explicitly doing this to handle the unused IRQs.
+ */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winitializer-overrides"
+#endif /* __clang__ */
+
#define table(x) \
const func vectors[] __attribute__((section(".text.vecttable"))) = { \
x \
@@ -379,6 +387,12 @@ table(
irq(254)
)
+#if PASS == 2
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif /* __clang__ */
+#endif
+
#if PASS == 1
#undef PASS
#define PASS 2