blob: 8eba671a05825d97cae1c770d2f767977c5b9c58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// { dg-do compile }
// { dg-options "-Wstrict-aliasing=2 -fstrict-aliasing" }
struct s {
char *p;
};
void
func(struct s *ptr)
{
*(void **)&ptr->p = 0; /* { dg-warning "type-punned pointer" "" { xfail *-*-* } } */
}
|