ada: output.adb: fix newline being inserted when buffer is full
authorGhjuvan Lacambre <lacambre@adacore.com>
Thu, 8 Dec 2022 08:58:28 +0000 (09:58 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 3 Jan 2023 09:29:54 +0000 (10:29 +0100)
commit238ff612f2fd88372c585753dd2faa73cb94cbb5
tree6b75e6a23f45427c2db1565569e7f830cc3b8a69
parent54d7221aca4b4aa2e20534924215cc39ebe2cd73
ada: output.adb: fix newline being inserted when buffer is full

Before this commit, when GNAT needed to emit lines longer than
the buffer, it accidentally inserted a newline in its output when
attempting to flush its buffer.

We fix this by using Flush_Buffer instead of Write_Eol in Write_Char.

gcc/ada/

* output.adb (Write_Buffer): Use Flush_Buffer instead of Write_Eol.
gcc/ada/output.adb