summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-25 21:59:56 +0000
committerpfg <pfg@FreeBSD.org>2013-12-25 21:59:56 +0000
commite9055f74febe9413802e444141d5e339838b6f36 (patch)
treed6940ee2e4607ff30ee325cb6182f6a04f03adaf /contrib/gcc
parentddabe064bb57533b02711fc2409db19e1d615522 (diff)
downloadFreeBSD-src-e9055f74febe9413802e444141d5e339838b6f36.zip
FreeBSD-src-e9055f74febe9413802e444141d5e339838b6f36.tar.gz
MFC r258826, r259555, r 259558:
libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531)
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/c-opts.c6
-rw-r--r--contrib/gcc/c.opt6
-rw-r--r--contrib/gcc/doc/invoke.texi8
3 files changed, 20 insertions, 0 deletions
diff --git a/contrib/gcc/c-opts.c b/contrib/gcc/c-opts.c
index 0c584eb..a1ec3e3 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;
diff --git a/contrib/gcc/c.opt b/contrib/gcc/c.opt
index 80b5312..be3a80f 100644
--- a/contrib/gcc/c.opt
+++ b/contrib/gcc/c.opt
@@ -292,6 +292,12 @@ Wnested-externs
C ObjC Var(warn_nested_externs)
Warn about \"extern\" declarations not at file scope
+; APPLE LOCAL begin -Wnewline-eof
+Wnewline-eof
+C ObjC C++ ObjC++
+Warn about files missing a newline at the end of the file
+; APPLE LOCAL end -Wnewline-eof
+
Wnon-template-friend
C++ ObjC++ Var(warn_nontemplate_friend) Init(1)
Warn when non-templatized friend functions are declared within a template
diff --git a/contrib/gcc/doc/invoke.texi b/contrib/gcc/doc/invoke.texi
index 51ac30f..37a668a 100644
--- a/contrib/gcc/doc/invoke.texi
+++ b/contrib/gcc/doc/invoke.texi
@@ -169,6 +169,8 @@ in the following sections.
-trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol
-fallow-single-precision -fcond-mismatch @gol
-fsigned-bitfields -fsigned-char @gol
+@c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts **
+-Wnewline-eof (Apple compatible) @gol
-funsigned-bitfields -funsigned-char}
@item C++ Language Options
@@ -2041,6 +2043,12 @@ Inhibit all warning messages.
@opindex Wno-import
Inhibit warning messages about the use of @samp{#import}.
+@c APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts **
+@item -Wnewline-eof
+@opindex Wnewline-eof
+Warn about files missing a newline at the end of the file. (Apple compatible)
+@c APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts **
+
@item -Wchar-subscripts
@opindex Wchar-subscripts
Warn if an array subscript has type @code{char}. This is a common cause
OpenPOWER on IntegriCloud