From a90205432ca0c731faaa0bde8fa74bcd076de616 Mon Sep 17 00:00:00 2001 From: pfg Date: Wed, 18 Dec 2013 14:53:36 +0000 Subject: 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 --- contrib/gcclibs/libcpp/init.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib/gcclibs/libcpp/init.c') 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; -- cgit v1.1