summaryrefslogtreecommitdiffstats
path: root/contrib/gcclibs/libcpp/init.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/init.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/init.c')
-rw-r--r--contrib/gcclibs/libcpp/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/gcclibs/libcpp/init.c b/contrib/gcclibs/libcpp/init.c
index 248d84f..9620676 100644
--- a/contrib/gcclibs/libcpp/init.c
+++ b/contrib/gcclibs/libcpp/init.c
@@ -146,6 +146,10 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
pfile = XCNEW (cpp_reader);
cpp_set_lang (pfile, lang);
+ /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */
+ /* Suppress warnings about missing newlines at ends of files. */
+ CPP_OPTION (pfile, warn_newline_at_eof) = 0;
+ /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */
CPP_OPTION (pfile, warn_multichar) = 1;
CPP_OPTION (pfile, discard_comments) = 1;
CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1;
OpenPOWER on IntegriCloud