Samuel Viegas commented on a discussion on cpukit/include/rtems/confdefs/inittask.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1208#note_148838 > #endif > > /* > - * Ignore the following warnings from g++ and clang in the uses of > - * _CONFIGURE_ASSERT_NOT_NULL() below: > - * > - * warning: the address of 'void Init()' will never be NULL [-Waddress] > - * > - * warning: comparison of function 'Init' not equal to a null pointer is > always > - * true [-Wtautological-pointer-compare] > + * _CONFIGURE_ASSERT_NOT_NULL is used to validate function pointers at > compile time. > + * When the configured value is a function symbol (e.g., void Init()), the > compiler proves that its address is never NULL and reports the comparison as > tautological. > + * This is expected for this assertion pattern, triggering warnings (e.g., > -Waddress and -Wtautological-pointer-compare). > + * Those warnings are therefore suppressed locally because they are a > by-product of the assertion, not a real defect. > + * Additionally, -Wpragmas is suppressed since some toolchains may not > support every warning option named below, > + * which maintains compatibility across different toolchains without > causing unnecessary warnings. Right, you are referring to the preprocessor check that triggers an error message, correct? Do you want me to add a comment stating that here as well? -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1208#note_148838 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
