ruby-changes:41027
From: nobu <ko1@a...>
Date: Mon, 14 Dec 2015 13:47:58 +0900 (JST)
Subject: [ruby-changes:41027] nobu:r53106 (trunk): parse.y: suppress warnings
nobu 2015-12-14 13:47:37 +0900 (Mon, 14 Dec 2015) New Revision: 53106 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53106 Log: 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. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 53105) +++ parse.y (revision 53106) @@ -95,10 +95,9 @@ enum lex_state_e { https://github.com/ruby/ruby/blob/trunk/parse.y#L95 #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 s https://github.com/ruby/ruby/blob/trunk/parse.y#L9207 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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/