OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
/c-family
[pf3gnuchains/gcc-fork.git]
/
gcc
/
c-family
/
c-opts.c
diff --git
a/gcc/c-family/c-opts.c
b/gcc/c-family/c-opts.c
index
6869d5c
..
14e4933
100644
(file)
--- a/
gcc/c-family/c-opts.c
+++ b/
gcc/c-family/c-opts.c
@@
-406,6
+406,7
@@
c_common_handle_option (size_t scode, const char *arg, int value,
warn_reorder = value;
warn_cxx0x_compat = value;
warn_delnonvdtor = value;
warn_reorder = value;
warn_cxx0x_compat = value;
warn_delnonvdtor = value;
+ warn_narrowing = value;
}
cpp_opts->warn_trigraphs = value;
}
cpp_opts->warn_trigraphs = value;
@@
-436,6
+437,10
@@
c_common_handle_option (size_t scode, const char *arg, int value,
cpp_opts->warn_cxx_operator_names = value;
break;
cpp_opts->warn_cxx_operator_names = value;
break;
+ case OPT_Wc__0x_compat:
+ warn_narrowing = value;
+ break;
+
case OPT_Wdeprecated:
cpp_opts->cpp_warn_deprecated = value;
break;
case OPT_Wdeprecated:
cpp_opts->cpp_warn_deprecated = value;
break;
@@
-997,10
+1002,17
@@
c_common_post_options (const char **pfilename)
if (warn_implicit_function_declaration == -1)
warn_implicit_function_declaration = flag_isoc99;
if (warn_implicit_function_declaration == -1)
warn_implicit_function_declaration = flag_isoc99;
- /* If we're allowing C++0x constructs, don't warn about C++0x
- compatibility problems. */
if (cxx_dialect == cxx0x)
if (cxx_dialect == cxx0x)
- warn_cxx0x_compat = 0;
+ {
+ /* If we're allowing C++0x constructs, don't warn about C++98
+ identifiers which are keywords in C++0x. */
+ warn_cxx0x_compat = 0;
+
+ if (warn_narrowing == -1)
+ warn_narrowing = 1;
+ }
+ else if (warn_narrowing == -1)
+ warn_narrowing = 0;
if (flag_preprocess_only)
{
if (flag_preprocess_only)
{