Remove testsuite compile errors with GCC5.
GCC5 defaults to the GNU11 standard for C and warns by default for implicit function declarations and implicit return types. https://gcc.gnu.org/gcc-5/porting_to.html Fixing these issues in the testsuite turns 9 untested and 17 unsupported testcases into 417 new passes when compiling with GCC5. gdb/testsuite/ChangeLog: * gdb.arch/i386-bp_permanent.c (standard): New declaration. * gdb.base/disp-step-fork.c: Include unistd.h. * gdb.base/siginfo-obj.c: Include stdio.h. * gdb.base/siginfo-thread.c: Likewise. * gdb.mi/non-stop.c: Include unistd.h. * gdb.mi/nsthrexec.c: Include stdio.h. * gdb.mi/pthreads.c: Include unistd.h. * gdb.modula2/unbounded1.c (main): Declare returns int. * gdb.reverse/consecutive-reverse.c: Likewise. * gdb.threads/create-fail.c: Include unistd.h. * gdb.threads/killed.c: Likewise. * gdb.threads/linux-dp.c: Likewise. * gdb.threads/non-ldr-exc-1.c: Include stdio.h and string.h. * gdb.threads/non-ldr-exc-2.c: Likewise. * gdb.threads/non-ldr-exc-3.c: Likewise. * gdb.threads/non-ldr-exc-4.c: Likewise. * gdb.threads/pthreads.c: Include unistd.h. (main): Declare returns int. * gdb.threads/tls-main.c (foo): New declaration. * gdb.threads/watchpoint-fork-mt.c: Define _GNU_SOURCE.
This commit is contained in:
parent
43063f1e4f
commit
37bc665e4e
@ -1,3 +1,26 @@
|
||||
2015-01-25 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* gdb.arch/i386-bp_permanent.c (standard): New declaration.
|
||||
* gdb.base/disp-step-fork.c: Include unistd.h.
|
||||
* gdb.base/siginfo-obj.c: Include stdio.h.
|
||||
* gdb.base/siginfo-thread.c: Likewise.
|
||||
* gdb.mi/non-stop.c: Include unistd.h.
|
||||
* gdb.mi/nsthrexec.c: Include stdio.h.
|
||||
* gdb.mi/pthreads.c: Include unistd.h.
|
||||
* gdb.modula2/unbounded1.c (main): Declare returns int.
|
||||
* gdb.reverse/consecutive-reverse.c: Likewise.
|
||||
* gdb.threads/create-fail.c: Include unistd.h.
|
||||
* gdb.threads/killed.c: Likewise.
|
||||
* gdb.threads/linux-dp.c: Likewise.
|
||||
* gdb.threads/non-ldr-exc-1.c: Include stdio.h and string.h.
|
||||
* gdb.threads/non-ldr-exc-2.c: Likewise.
|
||||
* gdb.threads/non-ldr-exc-3.c: Likewise.
|
||||
* gdb.threads/non-ldr-exc-4.c: Likewise.
|
||||
* gdb.threads/pthreads.c: Include unistd.h.
|
||||
(main): Declare returns int.
|
||||
* gdb.threads/tls-main.c (foo): New declaration.
|
||||
* gdb.threads/watchpoint-fork-mt.c: Define _GNU_SOURCE.
|
||||
|
||||
2015-01-23 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* gdb.mi/mi-var-list-children-invalid-grandchild.c: New file.
|
||||
|
@ -21,6 +21,8 @@
|
||||
#define SYMBOL(str) #str
|
||||
#endif
|
||||
|
||||
void standard (void);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
@ -16,6 +16,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void
|
||||
marker () {}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static const char *image;
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
|
@ -30,7 +30,7 @@ foo (unbounded a)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
unbounded t;
|
||||
|
@ -27,6 +27,7 @@ int foo ()
|
||||
return a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6];
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
foo ();
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Count the number of tasks/threads in the PID thread group. */
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int pid;
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* The number of philosophers at the table. */
|
||||
int num_philosophers;
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
static const char *image;
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
static const char *image;
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
static const char *image;
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
static const char *image;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void
|
||||
cond_wait (pthread_cond_t *cond, pthread_mutex_t *mut)
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Under HPUX 10, the second arg of pthread_create
|
||||
is prototyped to be just a "pthread_attr_t", while under Solaris it
|
||||
@ -110,6 +111,7 @@ foo (a, b, c)
|
||||
if (verbose) printf("a=%d\n", a);
|
||||
}
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
@ -1,3 +1,4 @@
|
||||
int foo (void);
|
||||
__thread int i_tls = 2;
|
||||
int main ()
|
||||
{
|
||||
|
@ -22,6 +22,9 @@
|
||||
#include <sys/wait.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* pthread_yield is a GNU extension. */
|
||||
#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
|
||||
#include <asm/unistd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user