annotate gcc/testsuite/gcc.dg/assign-warn-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test diagnostics for bad type conversion when inlining unprototyped
kono
parents:
diff changeset
2 functions: should not be errors with -pedantic-errors. */
kono
parents:
diff changeset
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
kono
parents:
diff changeset
4 /* { dg-do compile } */
kono
parents:
diff changeset
5 /* { dg-options "-O3 -std=c99 -pedantic-errors" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 /* This is valid to execute, so maybe shouldn't warn at all. */
kono
parents:
diff changeset
8 inline void f0(x) signed char *x; { }
kono
parents:
diff changeset
9 void g0(unsigned char *x) { f0(x); } /* { dg-bogus "warning: pointer targets in passing argument 1 of 'f0' differ in signedness" } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 /* This is undefined on execution but still must compile. */
kono
parents:
diff changeset
12 inline void f1(x) int *x; { }
kono
parents:
diff changeset
13 void g1(unsigned int *x) { f1(x); } /* { dg-bogus "warning: pointer targets in passing argument 1 of 'f1' differ in signedness" } */