changeset 29272:59696b24ea53 stable

avoid YYUSE in Octave parser files (see bug #59806) * oct-parse.yy (OCTAVE_YYUSE): New macro. Change all uses of YYUSE in rules to be OCTAVE_YYUSE instead.
author John W. Eaton <jwe@octave.org>
date Mon, 04 Jan 2021 16:09:33 -0500
parents 0348f3f57e3c
children 11bc1b22b29f 067b663529bb
files libinterp/parse-tree/oct-parse.yy
diffstat 1 files changed, 148 insertions(+), 140 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.yy	Mon Jan 04 13:37:34 2021 -0500
+++ b/libinterp/parse-tree/oct-parse.yy	Mon Jan 04 16:09:33 2021 -0500
@@ -93,6 +93,14 @@
 #define lexer (parser.get_lexer ())
 #define scanner lexer.m_scanner
 
+// Previous versions of Octave used Bison's YYUSE macro to avoid
+// warnings about unused values in rules.  But that Bison macro was
+// apparently never intended to be public.  So define our own.  All we
+// need to do is mention the symantic value somewhere in the rule.  It
+// doesn't actually need to be used to avoid the Bison warning, so just
+// define this macro to discard its parameter.
+#define OCTAVE_YYUSE(X)
+
 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
    // Disable this warning for code that is generated by Bison,
    // including grammar rules.  Push the current state so we can
@@ -382,7 +390,7 @@
 
 input           : simple_list '\n'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = nullptr;
                     std::shared_ptr<octave::tree_statement_list> tmp_lst ($1);
@@ -391,7 +399,7 @@
                   }
                 | simple_list END_OF_INPUT
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = nullptr;
                     lexer.m_end_of_input = true;
@@ -408,7 +416,7 @@
 
 simple_list     : opt_sep_no_nl
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = nullptr;
                   }
@@ -446,7 +454,7 @@
 
 fcn_list        : fcn_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -556,7 +564,7 @@
                   { $$ = $1 ? new octave::tree_matrix ($1) : nullptr; }
                 | matrix_rows ';' cell_or_matrix_row
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if ($1)
                       {
@@ -578,7 +586,7 @@
                   { $$ = $1 ? new octave::tree_cell ($1) : nullptr; }
                 | cell_rows ';' cell_or_matrix_row
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if ($1)
                       {
@@ -604,7 +612,7 @@
                   { $$ = nullptr; }
                 | ','
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = nullptr;
                   }
@@ -612,20 +620,20 @@
                   { $$ = $1; }
                 | arg_list ','
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
                 | ',' arg_list
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = $2;
                   }
                 | ',' arg_list ','
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = $2;
                   }
@@ -653,8 +661,8 @@
                   }
                 | '@' param_list anon_fcn_begin error
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsing_anon_fcn_body = false;
 
@@ -683,8 +691,8 @@
                   { $$ = $1; }
                 | '(' expression ')'
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = $2->mark_in_parens ();
                   }
@@ -692,7 +700,7 @@
 
 magic_colon     : ':'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     octave_value tmp (octave_value::magic_colon_t);
                     $$ = new octave::tree_constant (tmp);
@@ -701,7 +709,7 @@
 
 magic_tilde     : EXPR_NOT
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = new octave::tree_black_hole ();
                   }
@@ -715,21 +723,21 @@
                   { $$ = new octave::tree_argument_list ($1); }
                 | arg_list ',' magic_colon
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
                   }
                 | arg_list ',' magic_tilde
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
                   }
                 | arg_list ',' expression
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -738,7 +746,7 @@
 
 indirect_ref_op : '.'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_indirect_ref = true;
@@ -753,8 +761,8 @@
                   { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); }
                 | oper_expr '(' ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '(');
                     if (! $$)
@@ -765,8 +773,8 @@
                   }
                 | oper_expr '(' arg_list ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '(');
                     if (! $$)
@@ -777,8 +785,8 @@
                   }
                 | oper_expr '{' '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '{');
                     if (! $$)
@@ -789,8 +797,8 @@
                   }
                 | oper_expr '{' arg_list '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '{');
                     if (! $$)
@@ -807,8 +815,8 @@
                   { $$ = parser.make_indirect_ref ($1, $3->text ()); }
                 | oper_expr indirect_ref_op '(' expression ')'
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
 
                     $$ = parser.make_indirect_ref ($1, $4);
                   }
@@ -856,8 +864,8 @@
                   { $$ = parser.make_postfix_op (MINUS_MINUS, $1, $2); }
                 | power_expr '(' ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '(');
                     if (! $$)
@@ -868,8 +876,8 @@
                   }
                 | power_expr '(' arg_list ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '(');
                     if (! $$)
@@ -880,8 +888,8 @@
                   }
                 | power_expr '{' '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '{');
                     if (! $$)
@@ -892,8 +900,8 @@
                   }
                 | power_expr '{' arg_list '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '{');
                     if (! $$)
@@ -906,8 +914,8 @@
                   { $$ = parser.make_indirect_ref ($1, $3->text ()); }
                 | power_expr indirect_ref_op '(' expression ')'
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
 
                     $$ = parser.make_indirect_ref ($1, $4);
                   }
@@ -925,7 +933,7 @@
 
 colon_expr      : oper_expr ':' oper_expr
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = parser.make_colon_expression ($1, $3);
 
@@ -937,8 +945,8 @@
                   }
                 | oper_expr ':' oper_expr ':' oper_expr
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_colon_expression ($1, $5, $3);
 
@@ -1099,7 +1107,7 @@
                   { $$ = new octave::tree_decl_elt ($1); }
                 | identifier '=' decl_param_init expression
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_looking_at_initializer_expression = false;
                     $$ = new octave::tree_decl_elt ($1, $4);
@@ -1141,7 +1149,7 @@
 
 if_cmd_list1    : expression stmt_begin opt_sep opt_list
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     $1->mark_braindead_shortcircuit ();
 
@@ -1156,8 +1164,8 @@
 
 elseif_clause   : ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list
                   {
-                    YYUSE ($3);
-                    YYUSE ($6);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($6);
 
                     $4->mark_braindead_shortcircuit ();
 
@@ -1167,8 +1175,8 @@
 
 else_clause     : ELSE stash_comment opt_sep opt_list
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = new octave::tree_if_clause ($4, $2);
                   }
@@ -1180,7 +1188,7 @@
 
 switch_command  : SWITCH stash_comment expression opt_sep case_list END
                   {
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($4);
 
                     if (! ($$ = parser.finish_switch_command ($1, $3, $5, $6, $2)))
                       {
@@ -1214,8 +1222,8 @@
 
 switch_case     : CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list
                   {
-                    YYUSE ($3);
-                    YYUSE ($6);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($6);
 
                     $$ = parser.make_switch_case ($1, $4, $7, $2);
                   }
@@ -1223,8 +1231,8 @@
 
 default_case    : OTHERWISE stash_comment opt_sep opt_list
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = new octave::tree_switch_case ($4, $2);
                   }
@@ -1236,7 +1244,7 @@
 
 loop_command    : WHILE stash_comment expression stmt_begin opt_sep opt_list END
                   {
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($5);
 
                     $3->mark_braindead_shortcircuit ();
 
@@ -1248,15 +1256,15 @@
                   }
                 | DO stash_comment opt_sep opt_list UNTIL expression
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_do_until_command ($5, $4, $6, $2);
                   }
                 | FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
                   {
-                    YYUSE ($4);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($4);
+                    OCTAVE_YYUSE ($7);
 
                     if (! ($$ = parser.make_for_command (FOR, $1, $3, $5,
                                                          nullptr, $8, $9, $2)))
@@ -1267,10 +1275,10 @@
                   }
                 | FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
-                    YYUSE ($7);
-                    YYUSE ($8);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
+                    OCTAVE_YYUSE ($7);
+                    OCTAVE_YYUSE ($8);
 
                     if (! ($$ = parser.make_for_command (FOR, $1, $4, $6,
                                                          nullptr, $9, $10, $2)))
@@ -1281,8 +1289,8 @@
                   }
                 | PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END
                   {
-                    YYUSE ($4);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($4);
+                    OCTAVE_YYUSE ($7);
 
                     if (! ($$ = parser.make_for_command (PARFOR, $1, $3, $5,
                                                          nullptr, $8, $9, $2)))
@@ -1293,11 +1301,11 @@
                   }
                 | PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
-                    YYUSE ($7);
-                    YYUSE ($9);
-                    YYUSE ($10);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
+                    OCTAVE_YYUSE ($7);
+                    OCTAVE_YYUSE ($9);
+                    OCTAVE_YYUSE ($10);
 
                     if (! ($$ = parser.make_for_command (PARFOR, $1, $4, $6,
                                                          $8, $11, $12, $2)))
@@ -1333,9 +1341,9 @@
 except_command  : UNWIND stash_comment opt_sep opt_list CLEANUP
                   stash_comment opt_sep opt_list END
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
+                    OCTAVE_YYUSE ($7);
 
                     if (! ($$ = parser.make_unwind_command ($1, $4, $8, $9, $2, $6)))
                       {
@@ -1346,9 +1354,9 @@
                 | TRY stash_comment opt_sep opt_list CATCH stash_comment
                   opt_sep opt_list END
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
+                    OCTAVE_YYUSE ($7);
 
                     if (! ($$ = parser.make_try_command ($1, $4, $7, $8, $9, $2, $6)))
                       {
@@ -1358,7 +1366,7 @@
                   }
                 | TRY stash_comment opt_sep opt_list END
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     if (! ($$ = parser.make_try_command ($1, $4, 0, nullptr,
                                                          $5, $2, nullptr)))
@@ -1388,7 +1396,7 @@
 
 param_list_beg  : '('
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_parameter_list = true;
@@ -1405,7 +1413,7 @@
 
 param_list_end  : ')'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_parameter_list = false;
@@ -1457,7 +1465,7 @@
                   { $$ = new octave::tree_parameter_list (octave::tree_parameter_list::in, $1); }
                 | param_list2 ',' param_list_elt
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -1476,8 +1484,8 @@
 
 return_list     : '[' ']'
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_looking_at_return_list = false;
 
@@ -1504,8 +1512,8 @@
                   }
                 | '[' return_list1 ']'
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     lexer.m_looking_at_return_list = false;
 
@@ -1528,7 +1536,7 @@
                   }
                 | return_list1 ',' identifier
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append (new octave::tree_decl_elt ($3));
                     $$ = $1;
@@ -1560,7 +1568,7 @@
 
 file            : begin_file opt_nl opt_list END_OF_INPUT
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if (lexer.m_reading_fcn_file)
                       {
@@ -1588,9 +1596,9 @@
                   }
                 | begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT
                   {
-                    YYUSE ($2);
-                    YYUSE ($5);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($5);
+                    OCTAVE_YYUSE ($7);
 
                     // Unused symbol table context.
                     lexer.m_symtab_context.pop ();
@@ -1625,8 +1633,8 @@
                   }
                 | GET '.' identifier
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsed_function_name.top () = true;
                     lexer.m_maybe_classdef_get_set_method = false;
@@ -1635,8 +1643,8 @@
                   }
                 | SET '.' identifier
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsed_function_name.top () = true;
                     lexer.m_maybe_classdef_get_set_method = false;
@@ -1696,15 +1704,15 @@
 function        : function_beg stash_comment fcn_name
                   opt_param_list opt_sep opt_list function_end
                   {
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($5);
 
                     $$ = parser.make_function ($1, nullptr, $3, $4, $6, $7, $2);
                   }
                 | function_beg stash_comment return_list '=' fcn_name
                   opt_param_list opt_sep opt_list function_end
                   {
-                    YYUSE ($4);
-                    YYUSE ($7);
+                    OCTAVE_YYUSE ($4);
+                    OCTAVE_YYUSE ($7);
 
                     $$ = parser.make_function ($1, $3, $5, $6, $8, $9, $2);
                   }
@@ -1733,7 +1741,7 @@
 
 classdef        : classdef_beg stash_comment attr_list identifier opt_sep superclass_list class_body END
                   {
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($5);
 
                     octave::comment_list *lc = $2;
                     octave::comment_list *tc = lexer.get_comment ();
@@ -1754,9 +1762,9 @@
                   { $$ = nullptr; }
                 | '(' attr_list1 ')' opt_sep
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = $2;
                   }
@@ -1766,7 +1774,7 @@
                   { $$ = new octave::tree_classdef_attribute_list ($1); }
                 | attr_list1 ',' attr
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -1777,14 +1785,14 @@
                   { $$ = new octave::tree_classdef_attribute ($1); }
                 | identifier '=' decl_param_init expression
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_looking_at_initializer_expression = false;
                     $$ = new octave::tree_classdef_attribute ($1, $4);
                   }
                 | EXPR_NOT identifier
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = new octave::tree_classdef_attribute ($2, false);
                   }
@@ -1799,7 +1807,7 @@
                   }
                 | superclass_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsing_classdef_decl = false;
                     lexer.m_parsing_classdef_superclass = false;
@@ -1811,13 +1819,13 @@
 superclass_list1
                 : EXPR_LT superclass
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = new octave::tree_classdef_superclass_list ($2);
                   }
                 | superclass_list1 EXPR_AND superclass
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -1832,7 +1840,7 @@
                   { $$ = nullptr; }
                 | class_body1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -1848,28 +1856,28 @@
                   { $$ = new octave::tree_classdef_body ($1); }
                 | class_body1 opt_sep properties_block
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
                   }
                 | class_body1 opt_sep methods_block
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
                   }
                 | class_body1 opt_sep events_block
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
                   }
                 | class_body1 opt_sep enum_block
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -1879,7 +1887,7 @@
 properties_block
                 : PROPERTIES stash_comment opt_sep attr_list property_list END
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     octave::comment_list *lc = $2;
                     octave::comment_list *tc = lexer.get_comment ();
@@ -1898,7 +1906,7 @@
                   { $$ = nullptr; }
                 | property_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -1909,7 +1917,7 @@
                   { $$ = new octave::tree_classdef_property_list ($1); }
                 | property_list1 sep class_property
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     // We don't look ahead to grab end-of-line comments.
                     // Instead, they are grabbed when we see the
@@ -1945,7 +1953,7 @@
                   }
                 | stash_comment identifier '=' decl_param_init expression
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     lexer.m_looking_at_initializer_expression = false;
 
@@ -1955,7 +1963,7 @@
 
 methods_block   : METHODS stash_comment opt_sep attr_list methods_list END
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     octave::comment_list *lc = $2;
                     octave::comment_list *tc = lexer.get_comment ();
@@ -1986,7 +1994,7 @@
                   { $$ = parser.finish_classdef_external_method ($2, nullptr, $1); }
                 | stash_comment return_list '='
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     lexer.m_defining_func++;
                     lexer.m_parsed_function_name.push (false);
@@ -2010,7 +2018,7 @@
                   { $$ = nullptr; }
                 | methods_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2026,7 +2034,7 @@
                   }
                 | methods_list1 opt_sep method
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     octave_value fcn;
                     if ($3)
@@ -2040,7 +2048,7 @@
 
 events_block    : EVENTS stash_comment opt_sep attr_list events_list END
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     octave::comment_list *lc = $2;
                     octave::comment_list *tc = lexer.get_comment ();
@@ -2059,7 +2067,7 @@
                   { $$ = nullptr; }
                 | events_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2069,7 +2077,7 @@
                   { $$ = new octave::tree_classdef_events_list ($1); }
                 | events_list1 opt_sep class_event
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -2082,7 +2090,7 @@
 
 enum_block      : ENUMERATION stash_comment opt_sep attr_list enum_list END
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     octave::comment_list *lc = $2;
                     octave::comment_list *tc = lexer.get_comment ();
@@ -2101,7 +2109,7 @@
                   { $$ = nullptr; }
                 | enum_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2111,7 +2119,7 @@
                   { $$ = new octave::tree_classdef_enum_list ($1); }
                 | enum_list1 opt_sep class_enum
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -2120,8 +2128,8 @@
 
 class_enum      : stash_comment identifier '(' expression ')'
                   {
-                    YYUSE ($3);
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($5);
 
                     $$ = new octave::tree_classdef_enum ($2, $4, $1);
                   }
@@ -2162,25 +2170,25 @@
 
 sep_no_nl       : ','
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = ',';
                   }
                 | ';'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = ';';
                   }
                 | sep_no_nl ','
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
                 | sep_no_nl ';'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2200,13 +2208,13 @@
 
 nl              : '\n'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = '\n';
                   }
                 | nl '\n'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2214,37 +2222,37 @@
 
 sep             : ','
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = ',';
                   }
                 | ';'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = ';';
                   }
                 | '\n'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = '\n';
                   }
                 | sep ','
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
                 | sep ';'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
                 | sep '\n'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }