https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69805

--- Comment #5 from vries at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #4)
> (In reply to vries from comment #3)
> > This changes the semantics of greater_than_spec_func slightly. Strictly
> > speaking not necessary to fix the ICE. But the new semantics will perhaps be
> > easier to understand.
> 
> In fact, I originally changed greater_than_spec_func to assert argc is odd,
> and
> verify that both argv[0] and argv[argc - 3] is "-" and compared argv[argc -
> 2] with argv[argc - 1].  But then I found %* and thought changing the
> semantics of %:gt() might be cleaner, allow better composability of spec
> language.

Agreed.

> It could be perhaps even cleaner if we add some spec grammar extension that
> gives you the last word from list of words

I also wondered about this. We could have '%$' as the '%*' variant that only
gives the last entry instead of all the entries (Using '$' as an attempt to
make it intuitive by connecting the 'last' meaning to the regexp end-of-line
meaning for '$'). But AFAIU, you propose something more generic.

Reply via email to