diff options
author | Jonathan Wakely <redi@gcc.gnu.org> | 2010-09-21 15:12:58 +0100 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2010-09-21 14:12:58 +0000 |
commit | 5c0f24d0db7da7f83f2dc5d8dc8700d08b8c9e7c (patch) | |
tree | 224abd5edfc496e11e7346e823a2994937254710 | |
parent | d80148b8d4443eb6fbe55d603854407818a86383 (diff) | |
download | gcc-5c0f24d0db7da7f83f2dc5d8dc8700d08b8c9e7c.tar.gz |
re PR c++/45645 (pr44972.C fails with error: ‘__assert_fail’ was not declared in this scope)
2010-09-21 Jonathan Wakely <redi@gcc.gnu.org>
Jack Howarth <howarth@bromo.med.uc.edu>
PR c++/45645
* g++.dg/torture/pr44972.C: Use portable assert().
Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>
From-SVN: r164479
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr44972.C | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b00b8917df9..fd14eab5918 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-09-21 Jonathan Wakely <redi@gcc.gnu.org> + Jack Howarth <howarth@bromo.med.uc.edu> + + PR c++/45645 + * g++.dg/torture/pr44972.C: Use portable assert(). + 2010-09-21 Richard Guenther <rguenther@suse.de> PR tree-optimization/45580 diff --git a/gcc/testsuite/g++.dg/torture/pr44972.C b/gcc/testsuite/g++.dg/torture/pr44972.C index 81806076c58..e409148da1c 100644 --- a/gcc/testsuite/g++.dg/torture/pr44972.C +++ b/gcc/testsuite/g++.dg/torture/pr44972.C @@ -74,7 +74,7 @@ class optional : public optional_base<T> T const& get() const ; - T const* operator->() const { ((this->is_initialized()) ? static_cast<void> (0) : __assert_fail ("this->is_initialized()", "pr44972.C", 78, __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } + T const* operator->() const { assert(this->is_initialized()) ; return this->get_ptr_impl() ; } } ; |