Mercurial > octave-antonio
diff libinterp/parse-tree/oct-parse.in.yy @ 18127:d76f790b4eec gui-release
enable do_braindead_shortcircuit_evaluation by default and deprecate
* octave.cc (maximum_braindamage): Don't call
Fdo_brainded_shortcircuit_evaluation.
* pt-exp.h (tree_expression::mark_braindead_shortcircuit): Eliminate
file name argument.
* pt-binop.h, pt-binop.cc
(tree_binary_expression::mark_braindead_shortcircuit): Likewise.
* oct-parse.in.yy (if_cmd_list1, elseif_clause, loop_command):
Eliminate argument from call to mark_braindead_shortcircuit.
* pt-binop.h, pt-binop.cc (Vdo_braindead_shortcircuit_evaluation):
Initialize to true.
(tree_binary_expression::matlab_style_short_circuit_warning): New function.
(tree_binary_expression::rvalue1): Call
matlab_style_short_circuit_warning if short circuit evaluation occurs.
(Fdo_braindead_shortcircuit_evaluation): Display deprecated warning.
Delete tests for do_braindead_shortcircuit_evaluation.
(tree_binary_expression::braindead_shortcircuit_warning_issued): New
member variable.
* NEWS: Mention change in default value and deprecated function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Dec 2013 20:51:22 -0500 |
parents | 6b51f5f44aea |
children | c7b68a11074b 4cf930a64fad |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy Thu Dec 05 11:48:58 2013 -0800 +++ b/libinterp/parse-tree/oct-parse.in.yy Wed Dec 11 20:51:22 2013 -0500 @@ -943,7 +943,7 @@ if_cmd_list1 : expression stmt_begin opt_sep opt_list { - $1->mark_braindead_shortcircuit (lexer.fcn_file_full_name); + $1->mark_braindead_shortcircuit (); $$ = parser.start_if_command ($1, $4); } @@ -956,7 +956,7 @@ elseif_clause : ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list { - $4->mark_braindead_shortcircuit (lexer.fcn_file_full_name); + $4->mark_braindead_shortcircuit (); $$ = parser.make_elseif_clause ($1, $4, $7, $2); } @@ -1018,7 +1018,7 @@ loop_command : WHILE stash_comment expression stmt_begin opt_sep opt_list END { - $3->mark_braindead_shortcircuit (lexer.fcn_file_full_name); + $3->mark_braindead_shortcircuit (); if (! ($$ = parser.make_while_command ($1, $3, $6, $7, $2))) {