Branko Čibej wrote on Fri, 16 Mar 2018 10:14 +0100:
> On 16.03.2018 10:05, danie...@apache.org wrote:
> > Author: danielsh
> > Date: Fri Mar 16 09:05:45 2018
> > New Revision: 1826928
> >
> > URL: http://svn.apache.org/viewvc?rev=1826928&view=rev
> > Log:
> > * subversion/libsvn_client/shelf.c: Add newline at end of file.
> >     I would have added -Wno-newline-eof to configure's auto flags, but
> >     technically having no final newline is undefined behaviour.
> 
> 
> Uh, no it's not? C doesn't care about newlines at EOF.
> 
> It's bad writing style, but does not affect the meaning of the program.

According to http://port70.net/~nsz/c/c89/c89-draft.html#A.6.2 (first
bullet), it is UB for a file not to end with a newline.  That's a draft, but
I think it agrees with the final standard on this point (and if it doesn't,
I'd be happy to add -Wno-newline-eof to our build flags instead).

Cheers,

Daniel

Reply via email to