[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-mode adds newlines

From: David Kastrup
Subject: Re: cc-mode adds newlines
Date: Sun, 21 Nov 2004 12:06:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Andries Brouwer <address@hidden> writes:

> On Sat, Nov 20, 2004 at 03:14:24PM +0000, Alan Mackenzie wrote:
>> >It is not the goal of an editor to force the user to write syntactically
>> >correct programs.
>> Well, that is debateable.  I'd tend to agree with you, whilst pointing
>> out that in this case, there was no "force" used [see below].
>> An equally valid argument is that of the programmer who hacks through the
>> night and sets off a build (which takes several hours to complete), goes
>> home for some sleep, then comes back into the office the following
>> afternoon.  He then finds that the build failed for lack of a final
>> newline in one of the files.  Then he expostulates "FAQ!  Why couldn't
>> that stupid editor have put that stupid newline in for me?".
> That is a phantasy argument.
> Old compilers just accept the C source without final newline
> without any complaint. Some newer pedantic ones print a warning.

I would not be surprised if there were compilers that just dropped the
last character of a line read in, assuming it to be a linefeed.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]