changeset 29273:11bc1b22b29f

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Wed, 06 Jan 2021 17:13:54 -0500
parents 6570a35920c4 (current diff) 59696b24ea53 (diff)
children fed765133d53
files libgui/src/resource-manager.cc libgui/src/variable-editor-model.cc libinterp/parse-tree/oct-parse.yy m4/acinclude.m4
diffstat 2 files changed, 149 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/variable-editor-model.cc	Wed Jan 06 22:46:49 2021 +0100
+++ b/libgui/src/variable-editor-model.cc	Wed Jan 06 17:13:54 2021 -0500
@@ -987,7 +987,7 @@
   variable_editor_model::setData (const QModelIndex& idx,
                                   const QVariant& v_user_input, int role)
   {
-    if (role != Qt::EditRole || ! v_user_input.canConvert (QVariant::String)
+    if (role != Qt::EditRole || ! v_user_input.canConvert (QMetaType::QString)
         || ! idx.isValid ())
       return false;
 
--- a/libinterp/parse-tree/oct-parse.yy	Wed Jan 06 22:46:49 2021 +0100
+++ b/libinterp/parse-tree/oct-parse.yy	Wed Jan 06 17:13:54 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
@@ -383,7 +391,7 @@
 
 input           : simple_list '\n'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = nullptr;
                     std::shared_ptr<octave::tree_statement_list> tmp_lst ($1);
@@ -392,7 +400,7 @@
                   }
                 | simple_list END_OF_INPUT
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = nullptr;
                     lexer.m_end_of_input = true;
@@ -409,7 +417,7 @@
 
 simple_list     : opt_sep_no_nl
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = nullptr;
                   }
@@ -447,7 +455,7 @@
 
 fcn_list        : fcn_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -555,7 +563,7 @@
                   { $$ = $1 ? new octave::tree_matrix ($1) : nullptr; }
                 | matrix_rows ';' cell_or_matrix_row
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if ($1)
                       {
@@ -577,7 +585,7 @@
                   { $$ = $1 ? new octave::tree_cell ($1) : nullptr; }
                 | cell_rows ';' cell_or_matrix_row
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if ($1)
                       {
@@ -603,7 +611,7 @@
                   { $$ = nullptr; }
                 | ','
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = nullptr;
                   }
@@ -611,20 +619,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;
                   }
@@ -652,8 +660,8 @@
                   }
                 | '@' param_list anon_fcn_begin error
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsing_anon_fcn_body = false;
 
@@ -682,8 +690,8 @@
                   { $$ = $1; }
                 | '(' expression ')'
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = $2->mark_in_parens ();
                   }
@@ -691,7 +699,7 @@
 
 magic_colon     : ':'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     octave_value tmp (octave_value::magic_colon_t);
                     $$ = new octave::tree_constant (tmp);
@@ -700,7 +708,7 @@
 
 magic_tilde     : EXPR_NOT
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = new octave::tree_black_hole ();
                   }
@@ -714,21 +722,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;
@@ -737,7 +745,7 @@
 
 indirect_ref_op : '.'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_indirect_ref = true;
@@ -752,8 +760,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 (! $$)
@@ -764,8 +772,8 @@
                   }
                 | oper_expr '(' arg_list ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '(');
                     if (! $$)
@@ -776,8 +784,8 @@
                   }
                 | oper_expr '{' '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '{');
                     if (! $$)
@@ -788,8 +796,8 @@
                   }
                 | oper_expr '{' arg_list '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '{');
                     if (! $$)
@@ -806,8 +814,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);
                   }
@@ -855,8 +863,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 (! $$)
@@ -867,8 +875,8 @@
                   }
                 | power_expr '(' arg_list ')'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '(');
                     if (! $$)
@@ -879,8 +887,8 @@
                   }
                 | power_expr '{' '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($3);
 
                     $$ = parser.make_index_expression ($1, nullptr, '{');
                     if (! $$)
@@ -891,8 +899,8 @@
                   }
                 | power_expr '{' arg_list '}'
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_index_expression ($1, $3, '{');
                     if (! $$)
@@ -905,8 +913,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);
                   }
@@ -924,7 +932,7 @@
 
 colon_expr      : oper_expr ':' oper_expr
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = parser.make_colon_expression ($1, $3);
 
@@ -936,8 +944,8 @@
                   }
                 | oper_expr ':' oper_expr ':' oper_expr
                   {
-                    YYUSE ($2);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($2);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = parser.make_colon_expression ($1, $5, $3);
 
@@ -1100,7 +1108,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);
@@ -1142,7 +1150,7 @@
 
 if_cmd_list1    : expression stmt_begin opt_sep opt_list
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     $1->mark_braindead_shortcircuit ();
 
@@ -1157,8 +1165,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 ();
 
@@ -1168,8 +1176,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);
                   }
@@ -1181,7 +1189,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)))
                       {
@@ -1215,8 +1223,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);
                   }
@@ -1224,8 +1232,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);
                   }
@@ -1237,7 +1245,7 @@
 
 loop_command    : WHILE stash_comment expression stmt_begin opt_sep opt_list END
                   {
-                    YYUSE ($5);
+                    OCTAVE_YYUSE ($5);
 
                     $3->mark_braindead_shortcircuit ();
 
@@ -1249,15 +1257,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)))
@@ -1268,10 +1276,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)))
@@ -1282,8 +1290,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)))
@@ -1294,11 +1302,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)))
@@ -1353,9 +1361,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)))
                       {
@@ -1366,9 +1374,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)))
                       {
@@ -1378,7 +1386,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)))
@@ -1408,7 +1416,7 @@
 
 param_list_beg  : '('
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_parameter_list = true;
@@ -1425,7 +1433,7 @@
 
 param_list_end  : ')'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = 0;
                     lexer.m_looking_at_parameter_list = false;
@@ -1477,7 +1485,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;
@@ -1496,8 +1504,8 @@
 
 return_list     : '[' ']'
                   {
-                    YYUSE ($1);
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_looking_at_return_list = false;
 
@@ -1524,8 +1532,8 @@
                   }
                 | '[' return_list1 ']'
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
 
                     lexer.m_looking_at_return_list = false;
 
@@ -1548,7 +1556,7 @@
                   }
                 | return_list1 ',' identifier
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append (new octave::tree_decl_elt ($3));
                     $$ = $1;
@@ -1580,7 +1588,7 @@
 
 file            : begin_file opt_nl opt_list END_OF_INPUT
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     if (lexer.m_reading_fcn_file)
                       {
@@ -1608,9 +1616,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 ();
@@ -1645,8 +1653,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;
@@ -1655,8 +1663,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;
@@ -1716,15 +1724,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);
                   }
@@ -1753,7 +1761,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 ();
@@ -1774,9 +1782,9 @@
                   { $$ = nullptr; }
                 | '(' attr_list1 ')' opt_sep
                   {
-                    YYUSE ($1);
-                    YYUSE ($3);
-                    YYUSE ($4);
+                    OCTAVE_YYUSE ($1);
+                    OCTAVE_YYUSE ($3);
+                    OCTAVE_YYUSE ($4);
 
                     $$ = $2;
                   }
@@ -1786,7 +1794,7 @@
                   { $$ = new octave::tree_classdef_attribute_list ($1); }
                 | attr_list1 ',' attr
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -1797,14 +1805,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);
                   }
@@ -1819,7 +1827,7 @@
                   }
                 | superclass_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     lexer.m_parsing_classdef_decl = false;
                     lexer.m_parsing_classdef_superclass = false;
@@ -1831,13 +1839,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;
@@ -1852,7 +1860,7 @@
                   { $$ = nullptr; }
                 | class_body1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -1868,28 +1876,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;
@@ -1899,7 +1907,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 ();
@@ -1918,7 +1926,7 @@
                   { $$ = nullptr; }
                 | property_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -1929,7 +1937,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
@@ -1965,7 +1973,7 @@
                   }
                 | stash_comment identifier '=' decl_param_init expression
                   {
-                    YYUSE ($3);
+                    OCTAVE_YYUSE ($3);
 
                     lexer.m_looking_at_initializer_expression = false;
 
@@ -1975,7 +1983,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 ();
@@ -2006,7 +2014,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);
@@ -2030,7 +2038,7 @@
                   { $$ = nullptr; }
                 | methods_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2046,7 +2054,7 @@
                   }
                 | methods_list1 opt_sep method
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     octave_value fcn;
                     if ($3)
@@ -2060,7 +2068,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 ();
@@ -2079,7 +2087,7 @@
                   { $$ = nullptr; }
                 | events_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2089,7 +2097,7 @@
                   { $$ = new octave::tree_classdef_events_list ($1); }
                 | events_list1 opt_sep class_event
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -2102,7 +2110,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 ();
@@ -2121,7 +2129,7 @@
                   { $$ = nullptr; }
                 | enum_list1 opt_sep
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2131,7 +2139,7 @@
                   { $$ = new octave::tree_classdef_enum_list ($1); }
                 | enum_list1 opt_sep class_enum
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $1->append ($3);
                     $$ = $1;
@@ -2140,8 +2148,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);
                   }
@@ -2182,25 +2190,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;
                   }
@@ -2220,13 +2228,13 @@
 
 nl              : '\n'
                   {
-                    YYUSE ($1);
+                    OCTAVE_YYUSE ($1);
 
                     $$ = '\n';
                   }
                 | nl '\n'
                   {
-                    YYUSE ($2);
+                    OCTAVE_YYUSE ($2);
 
                     $$ = $1;
                   }
@@ -2234,37 +2242,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;
                   }