bug-bash
[Top][All Lists]
Advanced

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

"break" inside a while-condition


From: Philippe Wang
Subject: "break" inside a while-condition
Date: Tue, 11 Sep 2012 16:40:41 +0200

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: darwin12.0.0
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='darwin12.0.0' -DCONF_MACHTYPE='i386-apple-darwin12.0.0' 
-DCONF_VENDOR='apple' -DLOCALEDIR='/alien/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib -I./lib/intl 
-I/Users/phil/gnuutils/bash-4.2/lib/intl  -g -O2
uname output: Darwin mba.local 12.1.0 Darwin Kernel Version 12.1.0: Tue Aug 14 
13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64
Machine Type: i386-apple-darwin12.0.0

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

Description:
  "break" keyword inside a while-condition doesn't work as expected : it breaks 
the wrong loop.


Repeat-By:
  # 1) should raise a parsing error  (but it doesn't)
  while break ; true ; do true ; done 

  # 2) should break the outer loop  (but it doesn't)
  while true ; do while break ; do whatever-because-never-reached ; done ; echo 
fail ; done

Fix:
   I don't know.


reply via email to

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