c++: Fix tree_contains_struct for TRAIT_EXPR
[official-gcc.git] / gcc / testsuite / gcc.dg / conv-2.c
blob83468cdad1c335b07570c73739c3d1da82679cb8
1 /* { dg-do compile } */
2 /* { dg-options "-Wpointer-sign" } */
4 void f1(long *); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" } */
5 void f2(unsigned long *); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" } */
7 int main()
9 long *lp;
10 unsigned long *ulp;
11 char *cp;
12 unsigned char *ucp;
13 signed char *scp;
15 ulp = lp; /* { dg-warning " pointer targets in assignment from 'long int \\*' to 'long unsigned int \\*' differ in signedness" } */
16 lp = ulp; /* { dg-warning " pointer targets in assignment from 'long unsigned int \\*' to 'long int \\*' differ in signedness" } */
17 f1(ulp); /* { dg-warning " differ in signedness" } */
18 f2(lp); /* { dg-warning " differ in signedness" } */
20 cp = ucp; /* { dg-warning " pointer targets in assignment from 'unsigned char \\*' to 'char \\*' differ in signedness" } */
21 cp = scp; /* { dg-warning " pointer targets in assignment from 'signed char \\*' to 'char \\*' differ in signedness" } */
22 ucp = scp; /* { dg-warning " pointer targets in assignment from 'signed char \\*' to 'unsigned char \\*' differ in signedness" } */
23 ucp = cp; /* { dg-warning " pointer targets in assignment from 'char \\*' to 'unsigned char \\*' differ in signedness" } */
24 scp = ucp; /* { dg-warning " pointer targets in assignment from 'unsigned char \\*' to 'signed char \\*' differ in signedness" } */
25 scp = cp; /* { dg-warning " pointer targets in assignment from 'char \\*' to 'signed char \\*' differ in signedness" } */