The compiler should check for trailing newlines in the header buffer and avoid writing those to generate a clean header at the end.
@ljmf00 created dlang/dmd pull request #13649 "Fix issue 22770: C++ header generator generates trailing newlines" fixing this issue: - Fix issue 22770: C++ header generator generates trailing newlines This patch adds logic to check for trailing newlines in dtoh generator and remove them. Signed-off-by: Luís Ferreira <contact@lsferreira.net> https://github.com/dlang/dmd/pull/13649
dlang/dmd pull request #13649 "Fix issue 22770: C++ header generator generates trailing newlines" was merged into master: - 5e32ea6aec91c6829027803a8c408f8cc0939af3 by Luís Ferreira: Fix issue 22770: C++ header generator generates trailing newlines This patch adds logic to check for trailing newlines in dtoh generator and remove them. Signed-off-by: Luís Ferreira <contact@lsferreira.net> https://github.com/dlang/dmd/pull/13649