Skip to content

opal/asm: silence xlc warning about typeof usage #8458

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions config/opal_setup_cc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,27 @@ AC_DEFUN([OPAL_SETUP_CC],[
fi
fi

if test "$opal_c_vendor" = "ibm" ; then
# Check for flag to silence warnings about usage of typeof
CFLAGS_orig="$CFLAGS"

add=" -qkeyword=typeof"
CFLAGS="$CFLAGS_orig$add"
AC_CACHE_CHECK([if $CC supports -qkeyword=typeof],
[opal_cv_cc_qkeyword_typeof],
[AC_TRY_COMPILE([], [],
[opal_cv_cc_qkeyword_typeof="yes"]
[opal_cv_cc_qkeyword_typeof="no"])])
if test "$opal_cv_cc_qkeyword_typeof" = "no" ; then
add=
fi
CFLAGS="$CFLAGS_orig$add"

OPAL_FLAGS_UNIQ(CFLAGS)
AC_MSG_WARN([$add has been added to CFLAGS])
unset add
fi

OPAL_ENSURE_CONTAINS_OPTFLAGS("$OPAL_CFLAGS_BEFORE_PICKY")
OPAL_CFLAGS_BEFORE_PICKY="$co_result"

Expand Down