OSDN Git Service

2009-02-02 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / Wstrict-aliasing-bogus-signed-unsigned.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
3
4
5 int foo () {
6   int i;
7   unsigned int* pu = reinterpret_cast<unsigned int*> (&i);  /* { dg-bogus "signed vs. unsigned" } */
8   *pu = 1000000;
9   return i;
10 }