* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Enhance portability.

From-SVN: r157690
This commit is contained in:
Mike Stump 2010-03-24 03:04:16 +00:00 committed by Mike Stump
parent 5c3bacee38
commit 012cd3b6b5
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2010-03-23 Mike Stump <mikestump@comcast.net>
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Enhance portability.
2010-03-23 Jason Merrill <jason@redhat.com> 2010-03-23 Jason Merrill <jason@redhat.com>
* g++.dg/ext/altivec-17.C: Adjust error message. * g++.dg/ext/altivec-17.C: Adjust error message.

View File

@ -4,9 +4,9 @@
int foo() { int foo() {
int x; int x;
float& q = reinterpret_cast<float&> (x); /* { dg-message "initialized" "" { xfail *-*-* } } */ float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "" { target *-*-* } } */
q = 1.0; /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */ q = 1.0; /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */
return x; return x;
} }
/* { dg-message "dereferencing type-punned" "" { target *-*-* } 7 } */ /* { dg-message "initialized" "" { xfail *-*-* } 7 } */