emacs-devel
[Top][All Lists]
Advanced

[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 16:01:57 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Andries Brouwer <address@hidden> writes:

> On Sun, Nov 21, 2004 at 02:51:49PM +0100, David Kastrup wrote:
>
>> "happens to work" and "valid" are two different things.  I don't know
>> any C standard that would specify well-defined behavior for a file
>> with a missing newline at the end.  The term "valid" is defined by a
>> language definition, not by the behavior of a particular
>> implementation.
>
> Let me quote the Reference Manual

Which one?

> in front of me.
>
> "Blanks, tabs, newlines, and comments (collectively, "white space")
> are ignored except as they serve to separate tokens."
>
> Not "happen to work" - it is the C definition.

Well, if you look in the wrong places...

Both ANSI C and ANSI C++ standards contain the demand:

   "The program must end with a newline character."

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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