From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22420 invoked by alias); 14 Oct 2004 07:53:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22401 invoked from network); 14 Oct 2004 07:53:00 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 14 Oct 2004 07:53:00 -0000 Received: (qmail 11389 invoked from network); 14 Oct 2004 07:52:59 -0000 Received: from taltos.codesourcery.com (zack@66.92.218.83) by mail.codesourcery.com with DES-CBC3-SHA encrypted SMTP; 14 Oct 2004 07:52:59 -0000 Received: by taltos.codesourcery.com (sSMTP sendmail emulation); Thu, 14 Oct 2004 00:52:59 -0700 To: gdb-patches@sources.redhat.com Subject: testsuite fixes for bleeding edge gcc From: Zack Weinberg Date: Thu, 14 Oct 2004 07:53:00 -0000 Message-ID: <87brf5n3c4.fsf@codesourcery.com> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-10/txt/msg00242.txt.bz2 Current development versions of GCC are substantially pickier about "built-in" library functions being properly declared, which causes a large number of GDB testsuite failures. The appended patch adds all the missing declarations to the 6.2-branch version of the testsuite. I haven't tried mainline. Thoughts? zw * gdb.base/auxv.c: Declare abort. * gdb.base/charset.c: Include stdlib.h. * gdb.base/complex.c: Declare abort and exit. * gdb.base/freebpcmd.c: Include stdio.h. * gdb.base/gcore.c: Include string.h. * gdb.base/sigaltstack.c: Include stdlib.h and string.h. * gdb.base/siginfo.c: Include string.h. * gdb.base/sigstep.c: Include string.h. * gdb.mi/basics.c: Include stdio.h. * gdb.mi/gdb701.c: Declare exit. * gdb.mi/var-cmd.c: Declare exit/ =================================================================== Index: testsuite/gdb.base/auxv.c --- testsuite/gdb.base/auxv.c 16 Mar 2004 21:47:03 -0000 1.1 +++ testsuite/gdb.base/auxv.c 14 Oct 2004 07:40:00 -0000 @@ -11,6 +11,7 @@ #endif #if HAVE_ABORT +extern void abort (void); #define ABORT abort() #else #define ABORT {char *invalid = 0; *invalid = 0xFF;} =================================================================== Index: testsuite/gdb.base/charset.c --- testsuite/gdb.base/charset.c 26 Feb 2004 17:23:23 -0000 1.3 +++ testsuite/gdb.base/charset.c 14 Oct 2004 07:40:00 -0000 @@ -22,6 +22,7 @@ bug-gdb@gnu.org */ #include +#include #include =================================================================== Index: testsuite/gdb.base/complex.c --- testsuite/gdb.base/complex.c 29 Jun 2003 20:32:23 -0000 1.1 +++ testsuite/gdb.base/complex.c 14 Oct 2004 07:40:00 -0000 @@ -1,6 +1,9 @@ /* Test taken from GCC. Verify that we can print a structure containing a complex number. */ +extern void abort (void); +extern void exit (int); + typedef __complex__ float cf; struct x { char c; cf f; } __attribute__ ((__packed__)); struct unpacked_x { char c; cf f; }; =================================================================== Index: testsuite/gdb.base/freebpcmd.c --- testsuite/gdb.base/freebpcmd.c 17 Dec 2003 21:34:51 -0000 1.2 +++ testsuite/gdb.base/freebpcmd.c 14 Oct 2004 07:40:00 -0000 @@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + int main (int argc, char **argv) { =================================================================== Index: testsuite/gdb.base/gcore.c --- testsuite/gdb.base/gcore.c 9 Jan 2002 00:37:41 -0000 1.1 +++ testsuite/gdb.base/gcore.c 14 Oct 2004 07:40:00 -0000 @@ -3,6 +3,7 @@ */ #include +#include int extern_array[4] = {1, 2, 3, 4}; static int static_array[4] = {5, 6, 7, 8}; =================================================================== Index: testsuite/gdb.base/long_long.c --- testsuite/gdb.base/long_long.c 16 Jun 2004 15:19:41 -0000 1.3 +++ testsuite/gdb.base/long_long.c 14 Oct 2004 07:40:00 -0000 @@ -26,6 +26,7 @@ * * cc +e +DA2.0 -g -o long_long long_long.c */ +#include enum { MAX_BYTES = 16 }; =================================================================== Index: testsuite/gdb.base/sigaltstack.c --- testsuite/gdb.base/sigaltstack.c 5 Apr 2004 21:00:21 -0000 1.1 +++ testsuite/gdb.base/sigaltstack.c 14 Oct 2004 07:40:00 -0000 @@ -21,6 +21,8 @@ #include #include +#include +#include #include enum level { MAIN, OUTER, INNER, LEAF, NR_LEVELS }; =================================================================== Index: testsuite/gdb.base/siginfo.c --- testsuite/gdb.base/siginfo.c 15 Apr 2004 21:14:00 -0000 1.1 +++ testsuite/gdb.base/siginfo.c 14 Oct 2004 07:40:00 -0000 @@ -20,6 +20,7 @@ #include #include +#include #include static volatile int done; =================================================================== Index: testsuite/gdb.base/sigstep.c --- testsuite/gdb.base/sigstep.c 21 Apr 2004 17:19:28 -0000 1.1 +++ testsuite/gdb.base/sigstep.c 14 Oct 2004 07:40:00 -0000 @@ -19,6 +19,7 @@ */ #include +#include #include #include =================================================================== Index: testsuite/gdb.mi/basics.c --- testsuite/gdb.mi/basics.c 14 Mar 2000 05:02:03 -0000 1.3 +++ testsuite/gdb.mi/basics.c 14 Oct 2004 07:40:00 -0000 @@ -2,6 +2,7 @@ * This simple program that passes different types of arguments * on function calls. Useful to test printing frames, stepping, etc. */ +#include int callee4 (void) { =================================================================== Index: testsuite/gdb.mi/gdb701.c --- testsuite/gdb.mi/gdb701.c 16 Sep 2002 19:01:43 -0000 1.1 +++ testsuite/gdb.mi/gdb701.c 14 Oct 2004 07:40:00 -0000 @@ -1,3 +1,5 @@ +extern void exit(int); + struct _foo { int x; =================================================================== Index: testsuite/gdb.mi/var-cmd.c --- testsuite/gdb.mi/var-cmd.c 23 Feb 2000 00:25:43 -0000 1.1 +++ testsuite/gdb.mi/var-cmd.c 14 Oct 2004 07:40:00 -0000 @@ -1,3 +1,5 @@ +extern void exit (int); + struct _simple_struct { int integer; unsigned int unsigned_integer;