repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged r158907 through r159238 into branch.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wstrict-aliasing-bogus-signed-unsigned.C
blob
5e71ebff805107fa06178eaa7966d3d077720ed2
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
}