aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
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
commit453ac4a75a7f11fe84612213c13823ed335f509b (patch)
tree4e80b309006c68e4354723b06147466655fc40c2 /parse.y
parentc26df684d0193ac09e0ed4393cd0097654ca00b3 (diff)
downloadruby-453ac4a75a7f11fe84612213c13823ed335f509b.tar.gz
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 2 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 9791a67f49..9c3e5f9602 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)
{