This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: "no newline at end of file"


On Tue, 27 Mar 2007, Michael Meissner wrote:

> translation (5.1.1.2 in the C99 standard, should be close in the C90
> standard).  In particular, in paragraph 3, it says:
> 
> 	    A source file shall not end in a partial preprocessing token or a
> 	    partial comment...
> 
> If there is no trailing (logical) newline, then the file would end in a partial
> preprocessing token.

As has been extensively discussed without resolution, the reference to a 
"partial preprocessing token" in the standard is defective: there is no 
such thing because of the rule that a preprocessing token is always the 
maximum sequence of characters forming a valid preprocessing token.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]