aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/Wno-pointer-sign.c
blob: 780c9d4e20718c50303bf0961aa4f94772f7a3d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile } */
/* { dg-options "-Wno-pointer-sign" } */

void f1(long *);
void f2(unsigned long *);

int main()
{
  long *lp;
  unsigned long *ulp;
  char *cp;
  unsigned char *ucp;
  signed char *scp;

  ulp = lp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  lp = ulp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  f1(ulp);	/* { dg-bogus " differ in signedness" } */
  f2(lp);	/* { dg-bogus " differ in signedness" } */

  cp = ucp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  cp = scp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  ucp = scp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  ucp = cp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  scp = ucp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
  scp = cp;	/* { dg-bogus " pointer targets in assignment differ in signedness" } */
}