Sign in
android
/
toolchain
/
gcc
/
donut
/
.
/
gcc-4.3.1
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wstrict-aliasing-float-ref-int-obj.C
blob: 5527808b4a6a542335387d4b53d31d744b3bcc8c [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
int
foo
()
{
int
x
;
float
&
q
=
reinterpret_cast
<
float
&>
(
x
);
/* { dg-warning "type-punn" } */
q
=
1.0
;
return
x
;
}