[rtems commit] bsps/arm: fix nested extern decl. warnings brought by CMSIS files update

Karel Gardas karel at rtems.org
Fri Jul 28 19:53:13 UTC 2023


Module:    rtems
Branch:    master
Commit:    49c296b3248f6c63ba1980029a0e16f0c5e43485
Changeset: http://git.rtems.org/rtems/commit/?id=49c296b3248f6c63ba1980029a0e16f0c5e43485

Author:    Karel Gardas <karel at functional.vision>
Date:      Fri Jul 21 17:36:03 2023 +0200

bsps/arm: fix nested extern decl. warnings brought by CMSIS files update

---

 bsps/arm/include/cmsis_gcc.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/bsps/arm/include/cmsis_gcc.h b/bsps/arm/include/cmsis_gcc.h
index 4f0762d6dc..f8267ded0d 100644
--- a/bsps/arm/include/cmsis_gcc.h
+++ b/bsps/arm/include/cmsis_gcc.h
@@ -1,3 +1,6 @@
+/*
+ * The file was modified by RTEMS contributors.
+ */
 /**************************************************************************//**
  * @file     cmsis_gcc.h
  * @brief    CMSIS compiler GCC header file
@@ -136,6 +139,10 @@
  */
 __STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void)
 {
+#ifdef __rtems__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnested-externs"
+#endif /* __rtems__ */
   extern void _start(void) __NO_RETURN;
 
   typedef struct __copy_table {
@@ -154,6 +161,10 @@ __STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void)
   extern const __zero_table_t __zero_table_start__;
   extern const __zero_table_t __zero_table_end__;
 
+#ifdef __rtems__
+#pragma GCC diagnostic pop
+#endif /* __rtems__ */
+
   for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable) {
     for(uint32_t i=0u; i<pTable->wlen; ++i) {
       pTable->dest[i] = pTable->src[i];



More information about the vc mailing list