summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-05-21 08:46:55 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2015-05-21 08:46:55 +0200
commita4f238b6d7ecee86b9c0a664b44add65058b0a91 (patch)
treecb54e50e2263bea756854df8ace327ea96c585fb
parent965566df8949a8b081d79569decc2fa424bcb730 (diff)
downloadgcc-a4f238b6d7ecee86b9c0a664b44add65058b0a91.tar.gz
genrecog: Address -Wsign-compare diagnostics.
g++-4.6 [...] [...]/gcc/genrecog.c [...]/gcc/genrecog.c: In function 'state_size find_subroutines(routine_type, state*, vec<state*>&)': [...]/gcc/genrecog.c:3338:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] [...]/gcc/genrecog.c:3347:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] [...]/gcc/genrecog.c:3359:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] [...]/gcc/genrecog.c:3365:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 3305 state_size size; [...] 3337 state_size to_size = find_subroutines (type, trans->to, procs); 3338 if (d->next && to_size.depth > MAX_DEPTH) [...] 3347 if (to_size.num_statements < MIN_NUM_STATEMENTS) [...] 3359 if (size.num_statements > MAX_NUM_STATEMENTS) [...] 3365 && size.num_statements > MAX_NUM_STATEMENTS) 175 static const int MAX_DEPTH = 6; [...] 179 static const int MIN_NUM_STATEMENTS = 5; [...] 185 static const int MAX_NUM_STATEMENTS = 200; [...] 3258 struct state_size 3259 { [...] 3261 unsigned int num_statements; [...] 3265 unsigned int depth; 3266 }; gcc/ * genrecog.c (MAX_DEPTH, MIN_NUM_STATEMENTS, MAX_NUM_STATEMENTS): Change to unsigned int. From-SVN: r223469
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/genrecog.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5bcbcb49d41..a62199a2faa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21 Thomas Schwinge <thomas@codesourcery.com>
+
+ * genrecog.c (MAX_DEPTH, MIN_NUM_STATEMENTS, MAX_NUM_STATEMENTS):
+ Change to unsigned int.
+
2015-05-20 Mikhail Maltsev <maltsevm@gmail.com>
* bb-reorder.c (set_edge_can_fallthru_flag): Use rtx_jump_insn where
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index b8325006bfc..4b6dee64b5a 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -172,17 +172,17 @@ static const bool force_unique_params_p = true;
/* The maximum (approximate) depth of block nesting that an individual
routine or subroutine should have. This limit is about keeping the
output readable rather than reducing compile time. */
-static const int MAX_DEPTH = 6;
+static const unsigned int MAX_DEPTH = 6;
/* The minimum number of pseudo-statements that a state must have before
we split it out into a subroutine. */
-static const int MIN_NUM_STATEMENTS = 5;
+static const unsigned int MIN_NUM_STATEMENTS = 5;
/* The number of pseudo-statements a state can have before we consider
splitting out substates into subroutines. This limit is about avoiding
compile-time problems with very big functions (and also about keeping
functions within --param optimization limits, etc.). */
-static const int MAX_NUM_STATEMENTS = 200;
+static const unsigned int MAX_NUM_STATEMENTS = 200;
/* The minimum number of pseudo-statements that can be used in a pattern
routine. */