summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 04:47:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 04:47:37 +0000
commit430082c0134db7d8a82b5316fe9d6d7b766452b4 (patch)
tree4e80b309006c68e4354723b06147466655fc40c2
parent52cd994814335d6cee5ee4fae2827edd5e0d73b9 (diff)
parse.y: suppress warnings
* parse.y (SET_LEX_STATE): explicit cast to suppress sign-compare warnings in the case restoring from saved num in the parser stack and getting from kwtable state. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--parse.y6
1 files changed, 2 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 9791a67..9c3e5f9 100644
--- a/parse.y
+++ b/parse.y
@@ -95,10 +95,9 @@ enum lex_state_e {
#define IS_lex_state_all(ls) IS_lex_state_all_for(lex_state, (ls))
# define SET_LEX_STATE(ls) \
- (lex_state = trace_lex_state(lex_state, (ls), __LINE__))
+ (lex_state = (yydebug ? trace_lex_state(lex_state, (ls), __LINE__) : \
+ (enum lex_state_e)(ls)))
static enum lex_state_e trace_lex_state(enum lex_state_e from, enum lex_state_e to, int line);
-# define trace_lex_state(from, to, line) \
- (yydebug ? trace_lex_state(from, to, line) : (to))
typedef VALUE stack_type;
@@ -9208,7 +9207,6 @@ append_lex_state_name(enum lex_state_e state, VALUE buf)
return buf;
}
-#undef trace_lex_state
static enum lex_state_e
trace_lex_state(enum lex_state_e from, enum lex_state_e to, int line)
{