http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56460
--- Comment #4 from Chris Reed <cr at progress dot com> 2013-02-27 12:15:52 UTC --- Yes, I'm happy to address the copyright issue - the copyright disclaimer route seems simpler. qsort'ing the entire array was more for simplicity - I was more concerned by the performance of throwing a lot of exceptions than the one time cost of sorting the array (and I expect an ever changing number of registrations would be unusual). The sort order was changed simply because it matched the bsearch algorithm used elsewhere and seemed more intuitive. I considered a binary tree; a sorted array was just simpler to implement.