[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare -ag with assignment bug
From: |
Joseph Graham |
Subject: |
declare -ag with assignment bug |
Date: |
Thu, 26 Apr 2012 21:50:39 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Configuration Information [Automatically generated, do not change]:
Machine: mips64el
OS: linux-gnu
Compiler: mips64el-unknown-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='mips64el'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='mips64el-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -march=loongson2f
-mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
-DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin'
-DSTANDARD_UTILS_PATH='/usr/bin:/bin:/usr/sbin:/sbin'
-DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout'
uname output: Linux yeeloong.t67.eu 3.3.0-1-LIBRE #1 PREEMPT Mon Apr 2 18:49:26
UTC 2012 mips64 ICT Loongson-2 V0.3 FPU V0.1 lemote-yeeloong-2f-8.9inches
GNU/Linux
Machine Type: mips64el-unknown-linux-gnu
Bash Version: 4.2
Patch Level: 24
Release Status: release
Description:
Arrays defined in a function with declare -ag are not
available outside the function if an assignment is done with the
declaration, though it works if the assignment is done seperately from
the declaration.
Repeat-By:
$ f() { declare -ag a=(my array); }; f; declare -p a
declare -a a='()'
$ f() { declare -ag a; a=(my array); }; f; declare -p a
declare -a a='([0]="my" [1]="array")'
- declare -ag with assignment bug,
Joseph Graham <=