diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-09-09 21:41:43 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-09-09 21:41:43 +0000 |
commit | 1ef33fd4cd139a24524f0cd41b07ea9526dfacc5 (patch) | |
tree | b7149e4369f374e9f99892f05766f1f5473cbcd6 /gcc/c-family | |
parent | 00c7a3c72adce967dc14999e14d166437dbb9f2d (diff) | |
download | gcc-1ef33fd4cd139a24524f0cd41b07ea9526dfacc5.zip gcc-1ef33fd4cd139a24524f0cd41b07ea9526dfacc5.tar.gz gcc-1ef33fd4cd139a24524f0cd41b07ea9526dfacc5.tar.bz2 |
invoke.texi (Wnormalized=): Update.
gcc/ChangeLog:
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* doc/invoke.texi (Wnormalized=): Update.
libcpp/ChangeLog:
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* include/cpplib.h (struct cpp_options): Declare warn_normalize as
int instead of enum.
gcc/c-family/ChangeLog:
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c.opt (Wnormalized): New.
(Wnormalized=): Use Enum and Reject Negative.
* c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
gcc/testsuite/ChangeLog:
2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gcc.dg/cpp/warn-normalized-3.c: Delete useless dg-prune-output.
From-SVN: r215093
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-opts.c | 23 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 27 |
3 files changed, 31 insertions, 25 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 7768555..81e253d 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org> + + * c.opt (Wnormalized): New. + (Wnormalized=): Use Enum and Reject Negative. + * c-opts.c (c_common_handle_option): Do not handle Wnormalized here. + 2014-09-08 Joseph Myers <joseph@codesourcery.com> * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index b701022..7486691 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -384,29 +384,6 @@ c_common_handle_option (size_t scode, const char *arg, int value, cpp_opts->warn_num_sign_change = value; break; - case OPT_Wnormalized_: - /* FIXME: Move all this to c.opt. */ - if (kind == DK_ERROR) - { - gcc_assert (!arg); - inform (input_location, "-Werror=normalized=: set -Wnormalized=nfc"); - cpp_opts->warn_normalize = normalized_C; - } - else - { - if (!value || (arg && strcasecmp (arg, "none") == 0)) - cpp_opts->warn_normalize = normalized_none; - else if (!arg || strcasecmp (arg, "nfkc") == 0) - cpp_opts->warn_normalize = normalized_KC; - else if (strcasecmp (arg, "id") == 0) - cpp_opts->warn_normalize = normalized_identifier_C; - else if (strcasecmp (arg, "nfc") == 0) - cpp_opts->warn_normalize = normalized_C; - else - error ("argument %qs to %<-Wnormalized%> not recognized", arg); - break; - } - case OPT_Wunknown_pragmas: /* Set to greater than 1, so that even unknown pragmas in system headers will be warned about. */ diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index d1c5c05..11703b9 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -633,9 +633,32 @@ Wnonnull C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall) ; +Wnormalized +C ObjC C++ ObjC++ Alias(Wnormalized=,nfc,none) +; + Wnormalized= -C ObjC C++ ObjC++ Joined Warning --Wnormalized=<id|nfc|nfkc> Warn about non-normalised Unicode strings +C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(warn_normalize) Init(normalized_C) Var(cpp_warn_normalize) Enum(cpp_normalize_level) +-Wnormalized=<none|id|nfc|nfkc> Warn about non-normalised Unicode strings + +; Required for these enum values. +SourceInclude +cpplib.h + +Enum +Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized) + +EnumValue +Enum(cpp_normalize_level) String(none) Value(normalized_none) + +EnumValue +Enum(cpp_normalize_level) String(nfkc) Value(normalized_KC) + +EnumValue +Enum(cpp_normalize_level) String(id) Value(normalized_identifier_C) + +EnumValue +Enum(cpp_normalize_level) String(nfc) Value(normalized_C) Wold-style-cast C++ ObjC++ Var(warn_old_style_cast) Warning |