summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-opts.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/gcc/c-opts.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/gcc/c-opts.c')
-rw-r--r--contrib/gcc/c-opts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/gcc/c-opts.c b/contrib/gcc/c-opts.c
index ed6b771..6b29068 100644
--- a/contrib/gcc/c-opts.c
+++ b/contrib/gcc/c-opts.c
@@ -487,6 +487,12 @@ c_common_handle_option (size_t scode, const char *arg, int value)
cpp_opts->warn_multichar = value;
break;
+ /* APPLE LOCAL begin -Wnewline-eof */
+ case OPT_Wnewline_eof:
+ cpp_opts->warn_newline_at_eof = value;
+ break;
+ /* APPLE LOCAL end -Wnewline-eof */
+
case OPT_Wnormalized_:
if (!value || (arg && strcasecmp (arg, "none") == 0))
cpp_opts->warn_normalize = normalized_none;
OpenPOWER on IntegriCloud