bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unable to declare multiple empty arrays on one line in bash-3.1


From: Mike Frysinger
Subject: unable to declare multiple empty arrays on one line in bash-3.1
Date: Mon, 12 Dec 2005 01:59:24 +0000
User-agent: Mutt/1.5.11

Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -march=k8 -pipe
uname output: Linux vapier 2.6.14.2-grsec #2 PREEMPT Mon Nov 14 00:03:42 EST 
2005 x86_64 AMD Athlon(tm) 64 Processor 3500+ AuthenticAMD GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 3.1
Patch Level: 0
Release Status: release

Description:
attempting to declare multiple local empty arrays fails with bash-3.1.

for example, this works with bash-3.0:
func() { local -a foo=() bar=() ; }
but fails with bash-3.1 with this fun error:
bash: syntax error near unexpected token `('

however, this works:
func() { local -a foo=() ; local -a bar=() ; }

tested current Gentoo ebuild and vanilla tarball, both go boom
-mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]