A NOTE has been added to this issue. 
====================================================================== 
http://austingroupbugs.net/view.php?id=1058 
====================================================================== 
Reported By:                stephane
Assigned To:                
====================================================================== 
Project:                    1003.1(2013)/Issue7+TC1
Issue ID:                   1058
Category:                   Shell and Utilities
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     Resolved
Name:                       Stephane Chazelas 
Organization:                
User Reference:              
Section:                    break utility 
Page Number:                2358 
Line Number:                75119 
Interp Status:              --- 
Final Accepted Text:        http://austingroupbugs.net/view.php?id=1058#c3814 
Resolution:                 Accepted As Marked
Fixed in Version:           
====================================================================== 
Date Submitted:             2016-06-11 22:15 UTC
Last Modified:              2017-08-10 16:24 UTC
====================================================================== 
Summary:                    is it an error to call "break [n]" (or continue)
when not in a loop?
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
child of            0000842 meaning of "enclosing loop" w...
====================================================================== 

---------------------------------------------------------------------- 
 (0003815) eblake (manager) - 2017-08-10 16:24
 http://austingroupbugs.net/view.php?id=1058#c3815 
---------------------------------------------------------------------- 
Regarding the issue of a 'break' or 'continue' inside a function
definition, where the function is then run in a loop: this was already
dealt with in bugid#842, where we added things such as line 76324:

"If n is greater than the number of enclosing loops, the outermost
enclosing loop shall be exited. If there is no enclosing loop, the behavior
is unspecified."

The unspecified nature SHOULD be sufficient to cover warning messages,
errors, or treating the function body as if it were inlined and breaking to
the (now-enclosing) scope.

Regarding 010 being decimal 10, the standard already states at line 7239,
as part of the utility syntax guidelines:

"Unless otherwise specified, whenever an operand or option-argument is, or
contains, a numeric value:
    - The number is interpreted as a decimal integer."

and break/continue do not state otherwise. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-06-11 22:15 stephane       New Issue                                    
2016-06-11 22:15 stephane       Name                      => Stephane Chazelas
2016-06-11 22:15 stephane       Section                   => break utility   
2016-06-11 22:15 stephane       Page Number               => 2358            
2016-06-11 22:15 stephane       Line Number               => 75119           
2017-08-10 16:00 Don Cragun     Relationship added       child of 0000842    
2017-08-10 16:02 geoffclare     Note Added: 0003814                          
2017-08-10 16:03 geoffclare     Interp Status             => ---             
2017-08-10 16:03 geoffclare     Final Accepted Text       =>
http://austingroupbugs.net/view.php?id=1058#c3814    
2017-08-10 16:03 geoffclare     Status                   New => Resolved     
2017-08-10 16:03 geoffclare     Resolution               Open => Accepted As
Marked
2017-08-10 16:03 geoffclare     Tag Attached: tc3-2008                       
2017-08-10 16:24 eblake         Note Added: 0003815                          
======================================================================


Reply via email to