Follow-up Comment #3, bug #33125 (project make):

So I'm happy to make this change, because it does seem cleaner, but I must
confess I don't understand how the original error is caused by it.

The code uses isspace() to count spaces the first time through the list. 
isspace() matches spaces and tabs, but also form feeds, carriage-returns, etc.
 The second loop skips ONLY spaces and tabs.

So it seems that the only possible problem here would be that the first loop
counts TOO MANY words and allocates TOO MUCH memory: more than is necessary. 
I don't see any way for the current code to UNDER-allocate the space for the
array, unless for some bizarre reason either space or TAB characters are not
matched by isspace() which seems impossible.

Can you provide me with a repro test case?  Even just the contents of the
string that were passed to the $(sort ...) function would be helpful.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33125>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to