aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pid_t-1.c
blob: f4f3f688100f78acc8fbf0499e2e43aca763f649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-Wall" } */
/* { dg-require-fork "" } */

/* Compile with -Wall to get a warning if built-in and system pid_t don't
   match.  */

#include <sys/types.h>

typedef __typeof (__builtin_fork ()) __builtin_pid_t;

__builtin_pid_t __p_t__;
pid_t *p_t_p;

void
pt (void)
{
  p_t_p = &__p_t__;
}