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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:4805b92a32637b987f924463d6af9dcf95b21f63

commit r12-2771-g4805b92a32637b987f924463d6af9dcf95b21f63
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Aug 5 17:34:16 2021 +0200

    libcpp: Fix makeucnid bug with combining values [PR100977]

    I've noticed in ucnid.h two adjacent lines that had all flags and combine
    values identical and as such were supposed to be merged.

    This is due to a bug in makeucnid.c, which records last_flag,
    last_combine and really_safe of what has just been printed, but
    because of a typo mishandles it for last_combine, always compares against
    the combining_value[0] which is 0.

    This has two effects on the table, one is that often the table is
    unnecessarily large, as for non-zero .combine every character has its own
    record instead of adjacent characters with the same flags and combine
    being merged.  This means larger tables.
    The other is that sometimes the last char that has combine set doesn't
    actually have it in the tables, because the code is printing entries only
    upon seeing the next character and if that character does have
    combining_value of 0 and flags are otherwise the same as previously
printed,
    it will not print anything.

    The following patch fixes that, for clarity what exactly it affects
    I've regenerated with the same Unicode files as last time it has
    been regenerated.

    2021-08-05  Jakub Jelinek  <ja...@redhat.com>

            PR c++/100977
            * makeucnid.c (write_table): Fix computation of last_combine.
            * ucnid.h: Regenerated using Unicode 6.3.0 files.

Reply via email to