This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] gimple statement iterators
> Since you have an end of list pointer, you could simply do one
> comparison:
> return i.ptr == &GS_SEQ_LAST (i.seq);
Thanks. Fixed and committed.
* gimple-iterator.h (gsi_one_before_end_p): Use GS_SEQ_LAST.
Index: gimple-iterator.h
===================================================================
--- gimple-iterator.h (revision 124150)
+++ gimple-iterator.h (working copy)
@@ -68,7 +68,7 @@ gsi_end_p (gimple_stmt_iterator i)
static inline bool
gsi_one_before_end_p (gimple_stmt_iterator i)
{
- return *i.ptr != NULL && GS_NEXT (*i.ptr) == NULL;
+ return i.ptr == &GS_SEQ_LAST (i.seq);
}
/* Return the next gimple statement in I. */