Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wstrict-aliasing-2.C
blob: 713b35461cf72d65dfe4b5c45b79e831012ade2e [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-Wstrict-aliasing=2 -O2" } */
double
x
;
template
<
typename
T
>
T
*
foo
(
void
)
{
return
(
T
*)&
x
;
/* { dg-bogus "strict-aliasing" } */
}
template
double
*
foo
<double>
(
void
);