diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2023-04-14 12:38:16 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2023-04-14 12:38:16 +0300 |
commit | 7f0ab65b2f250b2490cc449a576cdc5ff76211f5 (patch) | |
tree | 11a0c6fb5ed0fc1c2a075f187f3787fbb1b08b15 | |
parent | 5c9729c083cd068df238fe64b9b1b685038e5717 (diff) | |
download | gawk-7f0ab65b2f250b2490cc449a576cdc5ff76211f5.tar.gz |
Compile fix in array.c.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | array.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2023-04-14 Arnold D. Robbins <arnold@skeeve.com> + + * array.c (asort_actual): Handle Node_elem_new. Add braces + for scoping, fixes tcc compiler error (GCC is too permissive!). + Update copyright year. + 2023-04-13 Arnold D. Robbins <arnold@skeeve.com> * array.c (asort_actual): Handle Node_var_new. Can happen @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2014, 2016, 2018-2022, + * Copyright (C) 1986, 1988, 1989, 1991-2014, 2016, 2018-2023, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -944,6 +944,7 @@ asort_actual(int nargs, sort_context_t ctxt) value = dupnode(r->var_value); break; case Node_var_new: + case Node_elem_new: value = dupnode(Nnull_string); break; case Node_builtin_func: @@ -953,7 +954,9 @@ asort_actual(int nargs, sort_context_t ctxt) value = make_string(r->vname, strlen(r->vname)); break; case Node_var_array: + { NODE *arr; + arr = make_array(); subs = force_string(subs); arr->vname = subs->stptr; @@ -964,6 +967,7 @@ asort_actual(int nargs, sort_context_t ctxt) value = assoc_copy(r, arr); break; + } default: cant_happen("asort_actual: got unexpected type %s", nodetype2str(r->type)); } |