Commit f6b3ca5a by Jakub Jelinek Committed by Jakub Jelinek

predict.c (test_prediction_value_range): Use -1U instead of -1 to avoid…

predict.c (test_prediction_value_range): Use -1U instead of -1 to avoid narrowing conversion warning.

	* predict.c (test_prediction_value_range): Use -1U instead of -1
	to avoid narrowing conversion warning.
	* dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
	to avoid narrowing conversion warning.
	* opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
	-1.
	* optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.

From-SVN: r249683
parent 58b45c4f
2017-06-27 Jakub Jelinek <jakub@redhat.com>
* predict.c (test_prediction_value_range): Use -1U instead of -1
to avoid narrowing conversion warning.
* dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
to avoid narrowing conversion warning.
* opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
-1.
* optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
2017-06-27 Jerome Lambourg <lambourg@adacore.com> 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
* config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
......
...@@ -110,9 +110,9 @@ static const struct dump_option_value_info dump_options[] = ...@@ -110,9 +110,9 @@ static const struct dump_option_value_info dump_options[] =
{"missed", MSG_MISSED_OPTIMIZATION}, {"missed", MSG_MISSED_OPTIMIZATION},
{"note", MSG_NOTE}, {"note", MSG_NOTE},
{"optall", MSG_ALL}, {"optall", MSG_ALL},
{"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_GRAPH | TDF_STMTADDR {"all", dump_flags_t (~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_GRAPH
| TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS | TDF_SCEV | TDF_STMTADDR | TDF_RHS_ONLY | TDF_NOUID
| TDF_GIMPLE)}, | TDF_ENUMERATE_LOCALS | TDF_SCEV | TDF_GIMPLE))},
{NULL, 0} {NULL, 0}
}; };
......
...@@ -275,7 +275,7 @@ function var_ref(name, flags) ...@@ -275,7 +275,7 @@ function var_ref(name, flags)
return "offsetof (struct gcc_options, x_target_flags)" return "offsetof (struct gcc_options, x_target_flags)"
if (opt_args("InverseMask", flags) != "") if (opt_args("InverseMask", flags) != "")
return "offsetof (struct gcc_options, x_target_flags)" return "offsetof (struct gcc_options, x_target_flags)"
return "-1" return "(unsigned short) -1"
} }
# Given the option called NAME return a sanitized version of its name. # Given the option called NAME return a sanitized version of its name.
......
...@@ -336,7 +336,7 @@ for (i = 0; i < n_opts; i++) { ...@@ -336,7 +336,7 @@ for (i = 0; i < n_opts; i++) {
alias_posarg = nth_arg(1, alias_arg) alias_posarg = nth_arg(1, alias_arg)
alias_negarg = nth_arg(2, alias_arg) alias_negarg = nth_arg(2, alias_arg)
if (var_ref(opts[i], flags[i]) != "-1") if (var_ref(opts[i], flags[i]) != "(unsigned short) -1")
print "#error Alias setting variable" print "#error Alias setting variable"
if (alias_posarg != "" && alias_negarg == "") { if (alias_posarg != "" && alias_negarg == "") {
......
...@@ -4031,7 +4031,7 @@ test_prediction_value_range () ...@@ -4031,7 +4031,7 @@ test_prediction_value_range ()
{ {
branch_predictor predictors[] = { branch_predictor predictors[] = {
#include "predict.def" #include "predict.def"
{NULL, -1} {NULL, -1U}
}; };
for (unsigned i = 0; predictors[i].name != NULL; i++) for (unsigned i = 0; predictors[i].name != NULL; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment