[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unassigned/untyped behaviour
From: |
M |
Subject: |
unassigned/untyped behaviour |
Date: |
Thu, 16 Nov 2023 21:00:56 +0100 |
From: crap0101
To: bug-gawk@gnu.org
Subject: unassigned/untyped behaviour
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -DNDEBUG
uname output: Linux orange 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4
18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Gawk Version: 5.3.0
Attestation 1:
I have read https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
Yes
Attestation 2:
I have not modified the sources before building gawk.
True
Description:
Hi! here again :)
I found a "strange" behaviour testing a lib/extension i'm writing.
It's about managing unassigned/untyped array's values. At first it was a
bug in the code i wrote, but i noticed this behaviour only in the last
release (5.3.0, pulled from git just today). As per the manual section
(9.1.8 Getting Type Information) referencing never used identifiers (simple
variable or array elements) come "bring" them to life, and this should
works for every (builtin or not) function but typeof() and isarray(). So,
printing an untyped array elements, we expect it to become
unassigned...but, for example printing with printf() (see attached files)
with a different format string gives different results: using %s gives the
array element a string type, using %d left it untouched, untyped. I don't
know if it's a printf() releated issue (same behaviour using sprintf).
Repeat-By:
printf on untyped array elements (see attached files).
Fix:
I don't have yet.
--
me -> http://crap0101.altervista.org/
r.awk
Description: application/awk
r.awk.output
Description: Binary data
r.awk.output.diff
Description: Text Data
- unassigned/untyped behaviour,
M <=
- Re: unassigned/untyped behaviour, Andrew J. Schorr, 2023/11/16
- Re: unassigned/untyped behaviour, Andrew J. Schorr, 2023/11/16
- Re: unassigned/untyped behaviour, arnold, 2023/11/21
- Re: unassigned/untyped behaviour, arnold, 2023/11/21
- Re: unassigned/untyped behaviour, Andrew J. Schorr, 2023/11/21
- Re: unassigned/untyped behaviour, arnold, 2023/11/21
- Re: unassigned/untyped behaviour, arnold, 2023/11/22
- Re: unassigned/untyped behaviour, Andrew J. Schorr, 2023/11/22