Bug#64107: base: 08 mis-parsed as octal?
Package: base
Version: 20000514
Severity: normal
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -I/home/swt/doko/export/packages/bash/bash-2.04 -I/home/swt/doko/export/packages/bash/bash-2.04/include -I/home/swt/doko/export/packages/bash/bash-2.04/lib -I/usr/include -g -O2
uname output: Linux canopus 2.2.14-jimd-ipsec #4 Thu Apr 13 22:04:39 PDT 2000 i586 unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.04
Patch Level: 0
Release Status: release
Description:
Expresssions like:
echo $[ 08 + 0 ] and echo $(( 08 + 0 ))
Give errors like:
sh: 08: value too great for base (error token is "08")
Though echo $[ 07 + 2 ] gives the expected result (9).
This is inconsistent with earlier versions of bash as well as
ksh (using the supported $(( ... )) syntax).
Repeat-By:
echo $[ 08 + 0 ]
Fix:
Might be a problem in glibc?
-- System Information
Debian Release: 2.2
Kernel Version: Linux canopus 2.2.14-jimd-ipsec #4 Thu Apr 13 22:04:39 PDT 2000 i586 unknown
Reply to: