Uh oh!
There was an error while loading. Please reload this page.
Fix #671: Missing newline at end of file should produce a warning - #672
Conversation
firewave
commented
Jul 9, 2026
All these stray |
danmar
commented
Jul 9, 2026
I am not sure why the The |
firewave
commented
Jul 9, 2026
Me neither. Passing less means that the newline would be missing and the other changes add it. That is kind of a flip-flop.
If fiddling with the trailing newline is necessary that seems like a possible source of issues for users of the library. |
glankk
commented
Jul 9, 2026
The char arrays that are initialized with a string constant include a null terminator, which makes these test cases fail because they end with '\0' instead of '\n'.
I agree that it looks really ugly but it's not wrong. |
glankk
commented
Jul 9, 2026
I also agree that it's a bit awkward to implement this in simplecpp, since it doesn't really distinguish between C and C++. |
firewave
commented
Jul 10, 2026
Maybe we should something more explicit to highlight what we are doing and it doesn't look like we randomly added those. We should probably land #666 first which allows passing the actual sizes instead of just relying onto |
danmar
commented
Jul 12, 2026
Of course we should write test code properly. If the newline is not included in the test code then it is not included.
It's not "ugly" to write test code properly. I understand now why you write I.e. if we have |
I want that we are able to find this UB. But we do need to distinguish C/C++ somewhere. I can see these options:
current solution seems OK to me. |
Uh oh!
There was an error while loading. Please reload this page.
No description provided.