aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-6.C
blob: 6f935c8540bf8aefd4aa3312777816b96fbc0f7e (plain)
1
2
3
4
5
6
7
8
9
/* { dg-do compile } */
/* { dg-options "-Wstrict-aliasing=2 -O2" } */

int foo ()
{
  char buf[8];
  return *((int *)buf); /* { dg-warning "strict-aliasing" } */
}