D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22770 - C++ header generator generates trailing newlines
Summary: C++ header generator generates trailing newlines
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-02-13 22:38 UTC by Luís Ferreira
Modified: 2022-03-03 16:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Luís Ferreira 2022-02-13 22:38:00 UTC
The compiler should check for trailing newlines in the header buffer and avoid writing those to generate a clean header at the end.
Comment 1 Dlang Bot 2022-02-13 22:40:56 UTC
@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
Comment 2 Dlang Bot 2022-03-03 16:17:59 UTC
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