[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: Branko Čibej <brane_at_apache.org>
Date: Fri, 16 Mar 2018 10:54:42 +0100

On 16.03.2018 10:22, Daniel Shahaf wrote:
> 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).

It appears that you're right (for C90 and C99 and C++98, but not for
C++11 and later).

Shows that in the good old days, standards authors had a feeling for
good writing style, too. :)

-- Brane
Received on 2018-03-16 10:54:47 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.