config: add options to suppress some warnings
PGI compilers, now nvc, spits many warnings by default, some of them not worth to fix. For an example, the warning, branch_past_initialization force splitting declaring and initializing local variables with local scopes. Suppress them by options instead.
Esse commit está contido em:
@@ -690,6 +690,22 @@ CFLAGS="$CFLAGS $pac_cc_strict_flags"
|
||||
export CFLAGS
|
||||
])
|
||||
|
||||
AC_DEFUN([PAC_C_DEFAULT_OPTIONS],[
|
||||
pac_cc_defaut_flags="
|
||||
--diag_suppress=branch_past_initialization
|
||||
"
|
||||
# See if the above options work with the compiler
|
||||
accepted_flags=""
|
||||
for flag in $pac_cc_defaut_flags ; do
|
||||
PAC_PUSH_FLAG([CFLAGS])
|
||||
CFLAGS="$CFLAGS $accepted_flags"
|
||||
PAC_C_CHECK_COMPILER_OPTION([$flag],[accepted_flags="$accepted_flags $flag"],)
|
||||
PAC_POP_FLAG([CFLAGS])
|
||||
done
|
||||
CFLAGS="$CFLAGS $accepted_flags"
|
||||
export CFLAGS
|
||||
])
|
||||
|
||||
dnl Return the integer structure alignment in pac_cv_c_max_integer_align
|
||||
dnl Possible values include
|
||||
dnl packed
|
||||
|
||||
@@ -756,6 +756,9 @@ PAC_ARG_CACHING
|
||||
# it may influence the output of the other tests
|
||||
PAC_ARG_STRICT
|
||||
|
||||
# Add options that suppress default warnings, especially those from PGI compilers (now nvc)
|
||||
PAC_C_DEFAULT_OPTIONS
|
||||
|
||||
# To link C objects with Fortran main program may require -fPIE option
|
||||
PAC_C_CHECK_fPIE_OK
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário