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
Daily bump.
[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
b56aec7
..
f2a7971
100644
(file)
--- a/
gcc/c-family/c-opts.c
+++ b/
gcc/c-family/c-opts.c
@@
-113,7
+113,7
@@
static void set_std_cxx98 (int);
static void set_std_cxx11 (int);
static void set_std_c89 (int, int);
static void set_std_c99 (int);
static void set_std_cxx11 (int);
static void set_std_c89 (int, int);
static void set_std_c99 (int);
-static void set_std_c1
x
(int);
+static void set_std_c1
1
(int);
static void check_deps_environment_vars (void);
static void handle_deferred_opts (void);
static void sanitize_cpp_opts (void);
static void check_deps_environment_vars (void);
static void handle_deferred_opts (void);
static void sanitize_cpp_opts (void);
@@
-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;
@@
-444,10
+449,6
@@
c_common_handle_option (size_t scode, const char *arg, int value,
cpp_opts->warn_endif_labels = value;
break;
cpp_opts->warn_endif_labels = value;
break;
- case OPT_Werror:
- global_dc->warning_as_error_requested = value;
- break;
-
case OPT_Wformat:
set_Wformat (value);
break;
case OPT_Wformat:
set_Wformat (value);
break;
@@
-599,14
+600,6
@@
c_common_handle_option (size_t scode, const char *arg, int value,
cpp_opts->extended_identifiers = value;
break;
cpp_opts->extended_identifiers = value;
break;
- case OPT_fgnu_runtime:
- flag_next_runtime = !value;
- break;
-
- case OPT_fnext_runtime:
- flag_next_runtime = value;
- break;
-
case OPT_foperator_names:
cpp_opts->operator_names = value;
break;
case OPT_foperator_names:
cpp_opts->operator_names = value;
break;
@@
-802,14
+795,14
@@
c_common_handle_option (size_t scode, const char *arg, int value,
set_std_c99 (false /* ISO */);
break;
set_std_c99 (false /* ISO */);
break;
- case OPT_std_c1
x
:
+ case OPT_std_c1
1
:
if (!preprocessing_asm_p)
if (!preprocessing_asm_p)
- set_std_c1
x
(true /* ISO */);
+ set_std_c1
1
(true /* ISO */);
break;
break;
- case OPT_std_gnu1
x
:
+ case OPT_std_gnu1
1
:
if (!preprocessing_asm_p)
if (!preprocessing_asm_p)
- set_std_c1
x
(false /* ISO */);
+ set_std_c1
1
(false /* ISO */);
break;
case OPT_trigraphs:
break;
case OPT_trigraphs:
@@
-997,10
+990,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)
{
@@
-1058,6
+1058,13
@@
c_common_post_options (const char **pfilename)
&& flag_preprocess_only && !flag_no_line_commands)
pp_dir_change (parse_in, get_src_pwd ());
&& flag_preprocess_only && !flag_no_line_commands)
pp_dir_change (parse_in, get_src_pwd ());
+ /* Disable LTO output when outputting a precompiled header. */
+ if (pch_file && flag_lto)
+ {
+ flag_lto = 0;
+ flag_generate_lto = 0;
+ }
+
return flag_preprocess_only;
}
return flag_preprocess_only;
}
@@
-1461,7
+1468,7
@@
set_std_c89 (int c94, int iso)
flag_no_nonansi_builtin = iso;
flag_isoc94 = c94;
flag_isoc99 = 0;
flag_no_nonansi_builtin = iso;
flag_isoc94 = c94;
flag_isoc99 = 0;
- flag_isoc1
x
= 0;
+ flag_isoc1
1
= 0;
}
/* Set the C 99 standard (without GNU extensions if ISO). */
}
/* Set the C 99 standard (without GNU extensions if ISO). */
@@
-1472,20
+1479,20
@@
set_std_c99 (int iso)
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc1
x
= 0;
+ flag_isoc1
1
= 0;
flag_isoc99 = 1;
flag_isoc94 = 1;
}
flag_isoc99 = 1;
flag_isoc94 = 1;
}
-/* Set the C 1
X standard draft
(without GNU extensions if ISO). */
+/* Set the C 1
1 standard
(without GNU extensions if ISO). */
static void
static void
-set_std_c1
x
(int iso)
+set_std_c1
1
(int iso)
{
{
- cpp_set_lang (parse_in, iso ? CLK_STDC1
X: CLK_GNUC1X
);
+ cpp_set_lang (parse_in, iso ? CLK_STDC1
1: CLK_GNUC11
);
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc1
x
= 1;
+ flag_isoc1
1
= 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
}
flag_isoc99 = 1;
flag_isoc94 = 1;
}