Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wnonnull warnings with GCC 11 #7403

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Commits on Sep 16, 2024

  1. Fix -Wnonnull warnings with GCC 11

    Version 11 and later of GCC consider the implicit `this` parameter of
    nonstatic member functions to be annotated with `nonnull` for the
    purposes of the `-Wnonnull` warning. This change generates new warnings
    that are resolved here with the use of `TR_ASSERT_FATAL` on the objects
    that the compiler thinks could be `NULL`. The macro `TR_ASSERT` is
    insufficient, as the `TR::assertion` method isn't (and cannot be)
    annotated with `OMR_NORETURN`.
    
    Signed-off-by: Christian Despres <despresc@ibm.com>
    cjjdespres committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    c40a511 View commit details
    Browse the repository at this point in the history