Sign in
gnu
/
gcc
/
e5cfb9cac1d7aba9a8ea73bfe7922cfaff9d61f3
/
.
/
gcc
/
testsuite
/
gcc.dg
/
alias-8.c
blob: 690f1b62da94bd8045ab83bed16052de232dafeb [
file
] [
log
] [
blame
]
// { 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" } */
}