From: Fred Fish Date: Fri, 23 Aug 1996 00:47:10 +0000 (+0000) Subject: * valprint.c (print_longest): Test for CC_HAS_LONG_LONG as well as X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d538f9cfbc088d986672f3bf9c74d6478b0cf70b;p=binutils-gdb.git * valprint.c (print_longest): Test for CC_HAS_LONG_LONG as well as PRINTF_HAS_LONG_LONG. * expprint.c (dump_expression): Ditto. * configure.in: Fix check for long long support in compiler to use a function body, not a nested function. * configure: Rebuild with autoconf. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12c9c288d28..888fead5af3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +Wed Aug 21 16:31:27 1996 Fred Fish + + * valprint.c (print_longest): Test for CC_HAS_LONG_LONG as well as + PRINTF_HAS_LONG_LONG. + * expprint.c (dump_expression): Ditto. + * configure.in: Fix check for long long support in compiler to + use a function body, not a nested function. + * configure: Rebuild with autoconf. + Tue Aug 20 17:59:42 1996 Ian Lance Taylor * aclocal.m4: Include ../bfd/aclocal.m4. diff --git a/gdb/configure b/gdb/configure index a836d32ba07..35dbadda725 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1631,14 +1631,12 @@ else int main() { return 0; } int t() { -long long foo; -void bar () -{ - switch (foo & 2) { case 0: return; } -} + extern long long foo; + switch (foo & 2) { case 0: return 1; } + ; return 0; } EOF -if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes else @@ -1666,7 +1664,7 @@ else gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then gdb_cv_printf_has_long_long=yes else @@ -1700,7 +1698,7 @@ if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -1736,7 +1734,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then gdb_cv_printf_has_long_double=yes else @@ -1771,7 +1769,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1825,7 +1823,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_mmap=yes else @@ -1918,7 +1916,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1940,7 +1938,7 @@ int t() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -1965,7 +1963,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1987,7 +1985,7 @@ int t() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:1991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -2012,7 +2010,7 @@ if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2034,7 +2032,7 @@ int t() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -2449,12 +2447,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2581,12 +2579,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* diff --git a/gdb/configure.in b/gdb/configure.in index 42ffb2e1a5e..4045fbf6fe7 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -69,11 +69,9 @@ dnl See if compiler supports "long long" type. AC_MSG_CHECKING(for long long support in compiler) AC_CACHE_VAL(gdb_cv_c_long_long, [AC_TRY_COMPILE(, [ -long long foo; -void bar () -{ - switch (foo & 2) { case 0: return; } -}], + extern long long foo; + switch (foo & 2) { case 0: return 1; } +], gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)]) AC_MSG_RESULT($gdb_cv_c_long_long) if test $gdb_cv_c_long_long = yes; then