Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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
);