[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1826928 - /subversion/trunk/subversion/libsvn_client/shelf.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 16 Mar 2018 09:22:47 +0000

Branko Čibej wrote on Fri, 16 Mar 2018 10:14 +0100:
> On 16.03.2018 10:05, danielsh_at_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
Received on 2018-03-16 10:22:52 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.