bug-bash
[Top][All Lists]
Advanced

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

Incorrect error reporting for arithmetics


From: AnMaster
Subject: Incorrect error reporting for arithmetics
Date: Wed, 17 Oct 2007 17:34:53 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070803)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Configuration Information [Automatically generated, do not change]:
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   -march=k8 -pipe -O2 -msse3
uname output: Linux tux 2.6.22-gentoo-r5 #1 Mon Aug 27 18:24:02 CEST 2007 
x86_64 AMD Sempron(tm) Processor 3300+ AuthenticAMD GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 3.2
Patch Level: 17
Release Status: release

Description:
        I had problems with mail first time I tried to send this so this may be 
a duplicate, if that is the case I'm sorry.
        Bash reports the wrong error token in arithmetic expansion and 
arithmetic evaluation.

Repeat-By:
        $ echo $(( 10/0 ))
        bash: 10/0 : division by 0 (error token is " ")
        $ echo $((10/0))
        bash: 10/0: division by 0 (error token is "0")
        $ (( 10/0 ))
        bash: ((: 10/0 : division by 0 (error token is " ")
        $ ((10/0))
        bash: ((: 10/0: division by 0 (error token is "0")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHFiuaWmK6ng/aMNkRCo2HAJ9m0Za59uMtdaliozh+r9id2IkJowCfaoGI
74E5xqOQAZLKjNtuocI6WU4=
=pSfL
-----END PGP SIGNATURE-----




reply via email to

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