[Bug ada/81106] gnatchop -r does not correctly propagate BOM

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 24 18:05:32 GMT 2025


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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:7ca42b7a4026fcc9635d2c2c8f6ab2b9ce92ccbd

commit r16-5558-g7ca42b7a4026fcc9635d2c2c8f6ab2b9ce92ccbd
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon Nov 24 19:00:43 2025 +0100

    Ada: Fix incorrect handling of BOM by -r switch of gnatchop

    As reported and analyzed in the PR, gnatchop does not correctly propagate
    a BOM present in the source file to the first compilation unit it outputs,
    in the case where the -r switch is specified, because it copies the BOM
    for the first compilation unit as part of the chopping process instead of
    copying it specifically at the start of the unit.

    gcc/ada/
            PR ada/81106
            * gnatchop.adb (Gnatchop): If present in the source file, output
            the BOM at the start of every compilation unit.


More information about the Gcc-bugs mailing list