This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Mac line ending at EOF AND no newline warnings
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 17 Feb 2005 16:15:09 -0800
- Subject: Re: [RFC] Mac line ending at EOF AND no newline warnings
- References: <6D4EC32B-3F38-4A11-A9F9-B2C4CCCEA41B@apple.com>
Devang Patel <dpatel@apple.com> writes:
> GCC emits no-newline warning when it sees Mac line ending
> at the end of file. This is because _cpp_convert_input()
> automatically inserts '\n' at the end of buffer. This
> confuses _cpp_clean_line() when it sees '\r' and '\n' together.
I would rather this was dealt with in _cpp_convert_input - have it
check for a \r at EOF and not stick in an extra \n in that case.
zw