summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-01 21:45:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-01 21:45:48 +0000
commit50e6933b094ea9e5851617e7e464aa1f4c332a00 (patch)
tree6a735167ef9e4eb5cf7e8e6570e320dcc49bbd15 /parse.y
parentf8c2658700d600ea5636de580a146131300cb147 (diff)
* error.c, parse.y, ruby.h (rb_compile_warn, rb_compile_warning): warn
for compilation. the parser should no longer use rb_warn() and rb_warning(). [ruby-dev:30121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y20
1 files changed, 10 insertions, 10 deletions
diff --git a/parse.y b/parse.y
index d8da199539..12265a8b35 100644
--- a/parse.y
+++ b/parse.y
@@ -491,11 +491,11 @@ static VALUE ripper_id2sym(ID);
#endif
#ifndef RIPPER
-# define rb_warn0(fmt) rb_warn(fmt)
-# define rb_warnI(fmt,a) rb_warn(fmt,a)
-# define rb_warnS(fmt,a) rb_warn(fmt,a)
-# define rb_warning0(fmt) rb_warning(fmt)
-# define rb_warningS(fmt,a) rb_warning(fmt,a)
+# define rb_warn0(fmt) rb_compile_warn(fmt)
+# define rb_warnI(fmt,a) rb_compile_warn(fmt,a)
+# define rb_warnS(fmt,a) rb_compile_warn(fmt,a)
+# define rb_warning0(fmt) rb_compile_warning(fmt)
+# define rb_warningS(fmt,a) rb_compile_warning(fmt,a)
#else
# define rb_warn0(fmt) ripper_warn0(parser, fmt)
# define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a)
@@ -735,7 +735,7 @@ bodystmt : compstmt
$$ = NEW_RESCUE($1, $2, $3);
}
else if ($3) {
- rb_warn("else without rescue is useless");
+ rb_warn0("else without rescue is useless");
$$ = block_append($$, $3);
}
if ($4) {
@@ -2231,7 +2231,7 @@ opt_call_args : none
call_args : command
{
- rb_warn("parenthesize argument(s) for future version");
+ rb_warn0("parenthesize argument(s) for future version");
/*%%%*/
$$ = NEW_LIST($1);
/*%
@@ -6927,7 +6927,7 @@ parser_warn(NODE *node, const char *mesg)
{
int line = ruby_sourceline;
ruby_sourceline = nd_line(node);
- rb_warn("%s", mesg);
+ rb_warnS("%s", mesg);
ruby_sourceline = line;
}
@@ -7547,7 +7547,7 @@ void_expr_gen(struct parser_params *parser, NODE *node)
int line = ruby_sourceline;
ruby_sourceline = nd_line(node);
- rb_warn("useless use of %s in void context", useless);
+ rb_warnS("useless use of %s in void context", useless);
ruby_sourceline = line;
}
}
@@ -7742,7 +7742,7 @@ cond0(struct parser_params *parser, NODE *node)
case NODE_DSTR:
case NODE_EVSTR:
case NODE_STR:
- rb_warn("string literal in condition");
+ rb_warn0("string literal in condition");
break;
case NODE_DREGX: