diff options
author | Alan Modra <amodra@gmail.com> | 2019-03-28 16:53:32 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-03-28 17:10:31 +1030 |
commit | 242a115951fe55e62036bac555017eb817ca1aa6 (patch) | |
tree | c7e676c00296cd37ed77da28fa4b43d43e835887 /bfd/configure | |
parent | 96a86c01d119372f4af5aff2501d3104e6c1a8e3 (diff) | |
download | gdb-242a115951fe55e62036bac555017eb817ca1aa6.zip gdb-242a115951fe55e62036bac555017eb817ca1aa6.tar.gz gdb-242a115951fe55e62036bac555017eb817ca1aa6.tar.bz2 |
PR24392, Clang warning Wtautological-constant-out-of-range-compare
PR 24392
* configure.ac: Invoke AC_CHECK_SIZEOF(int).
* configure: Regenerate.
* coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
workaround with SIZEOF_LONG vs. SIZEOF_INT check.
* elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
* elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
* mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
Diffstat (limited to 'bfd/configure')
-rwxr-xr-x | bfd/configure | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bfd/configure b/bfd/configure index 8d6c94a..202ef20 100755 --- a/bfd/configure +++ b/bfd/configure @@ -13367,6 +13367,39 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + if test "x${ac_cv_sizeof_void_p}" = "x8"; then host64=true |