error: "no newline at end of file"

Joseph S. Myers joseph@codesourcery.com
Tue Mar 27 19:01:00 GMT 2007


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



More information about the Gcc mailing list