summaryrefslogtreecommitdiffstats
path: root/contrib/gcclibs/libcpp/charset.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-18 14:53:36 +0000
committerpfg <pfg@FreeBSD.org>2013-12-18 14:53:36 +0000
commita90205432ca0c731faaa0bde8fa74bcd076de616 (patch)
tree0d7be4b28130528fcd5f0d0665a53f80951916b6 /contrib/gcclibs/libcpp/charset.c
parent726ec729ea0c241980ef730d0959106fa49221fd (diff)
downloadFreeBSD-src-a90205432ca0c731faaa0bde8fa74bcd076de616.zip
FreeBSD-src-a90205432ca0c731faaa0bde8fa74bcd076de616.tar.gz
gcc: add Apple compatible -Wnewline-eof
GCC 4.2 and previous have always warned about "No newline at end of file". Upstream GCC removed the warning completely but Apple made it an optional warning. Adopt it for compatibility with older GCC and clang. While here, add comment to complement r258712. Obtained from: Apple Inc. (Apple GCC 4.2 - 5531) MFC after: 1 week
Diffstat (limited to 'contrib/gcclibs/libcpp/charset.c')
-rw-r--r--contrib/gcclibs/libcpp/charset.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/gcclibs/libcpp/charset.c b/contrib/gcclibs/libcpp/charset.c
index 6361f8c..009106b 100644
--- a/contrib/gcclibs/libcpp/charset.c
+++ b/contrib/gcclibs/libcpp/charset.c
@@ -1628,6 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, const char *input_charset,
terminate with another \r, not an \n, so that we do not mistake
the \r\n sequence for a single DOS line ending and erroneously
issue the "No newline at end of file" diagnostic. */
+ /* APPLE LOCAL don't access to.text[-1] radar 6121572 */
if (to.len > 0 && to.text[to.len - 1] == '\r')
to.text[to.len] = '\r';
else
OpenPOWER on IntegriCloud