Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-7.C
blob71ed6cae851b7a3a8731f496487e08c40ad86527
1 /* { dg-do compile } */
2 /* { dg-options "-Wstrict-aliasing=2 -O2" } */
4 int a[2];
6 double *foo1(void)
8   return (double *)a; /* { dg-warning "strict-aliasing" } */
11 double *foo2(void)
13   return (double *)&a[0]; /* { dg-warning "strict-aliasing" } */
16 __complex__ double x;
17 int *bar(void)
19   return (int *)&__imag__ x; /* { dg-warning "strict-aliasing" } */