diff options
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/c-opts.c | 6 | ||||
-rw-r--r-- | contrib/gcc/c.opt | 6 | ||||
-rw-r--r-- | contrib/gcc/doc/invoke.texi | 8 |
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 |