]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix incorrect handling of BOM by -r switch of gnatchop
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 24 Nov 2025 18:00:43 +0000 (19:00 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 24 Nov 2025 18:05:01 +0000 (19:05 +0100)
commit7ca42b7a4026fcc9635d2c2c8f6ab2b9ce92ccbd
treec4286b287a8fcf46df090f95931be19009e0251d
parentf726857ded73f5692280a33be958ce75ffc54b18
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.
gcc/ada/gnatchop.adb