OSDN Git Service

2010-09-21 Jonathan Wakely <redi@gcc.gnu.org>
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 2010 14:12:58 +0000 (14:12 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 2010 14:12:58 +0000 (14:12 +0000)
    Jack Howarth  <howarth@bromo.med.uc.edu>

PR c++/45645
* g++.dg/torture/pr44972.C: Use portable assert().

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164479 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr44972.C

index b00b891..fd14eab 100644 (file)
@@ -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
index 8180607..e409148 100644 (file)
@@ -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() ; }
 
 } ;