Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed:

           What    |Removed                     |Added
         Resolution|INVALID                     |FIXED

--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Andrew Pinski from comment #3)
> See that reasoning there.

"It's really not undefined at all.  gcc would be still be standard
conformant if we defined all input to end with a newline, whether or
not the actual physical Unix input file did so."

OK, but this needs to be documented.

The GCC manual says:

4.2 Environment

The behavior of most of these points are dependent on the implementation
of the C library, and are not defined by GCC itself.

   * 'The mapping between physical source file multibyte characters and
     the source character set in translation phase 1 (C90, C99 and C11'

However, the fact that all input files are regarded to end with a newline is
completely specific to GCC, not part of how the C library works.

Reply via email to