[rtems commit] config: Clarify the use of pragmas

Sebastian Huber sebh at rtems.org
Fri Nov 27 07:46:46 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 25 07:59:30 2020 +0100

config: Clarify the use of pragmas

---

 cpukit/include/rtems/confdefs/wkspace.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/confdefs/wkspace.h b/cpukit/include/rtems/confdefs/wkspace.h
index 803d8bd..a08823f 100644
--- a/cpukit/include/rtems/confdefs/wkspace.h
+++ b/cpukit/include/rtems/confdefs/wkspace.h
@@ -137,7 +137,15 @@ const uintptr_t _Stack_Space_size = _CONFIGURE_STACK_SPACE_SIZE;
 
 #if defined(CONFIGURE_TASK_STACK_ALLOCATOR) \
   && defined(CONFIGURE_TASK_STACK_DEALLOCATOR)
-  /* Ignore potential warnings from the static assertions below */
+  /*
+   * Ignore the following warnings from g++ and clang in the static assertions
+   * below:
+   *
+   * warning: the address of 'f()' will never be NULL [-Waddress]
+   *
+   * warning: comparison of function 'f' not equal to a null pointer is always
+   * true [-Wtautological-pointer-compare]
+   */
   #pragma GCC diagnostic push
   #pragma GCC diagnostic ignored "-Waddress"
   #pragma GCC diagnostic ignored "-Wpragmas"



More information about the vc mailing list