This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/9245: Loop commands should return a value if they are aborted
- From: ville_jungman at hotmail dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: Loop-commands at sources dot redhat dot com, should at sources dot redhat dot com, return at sources dot redhat dot com, a at sources dot redhat dot com, value at sources dot redhat dot com, if at sources dot redhat dot com, they at sources dot redhat dot com, are at sources dot redhat dot com, aborted at sources dot redhat dot com
- Date: 9 Jan 2003 15:46:51 -0000
- Subject: other/9245: Loop commands should return a value if they are aborted
- Reply-to: ville_jungman at hotmail dot com
>Number: 9245
>Category: other
>Synopsis: Loop commands should return a value if they are aborted
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Jan 09 07:56:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Ville Jungman
>Release: unknown-1.0
>Organization:
>Environment:
-
>Description:
Wouldn't it be nice if loop commands (while, for etc) returned a value. The value is often needed if the loop is aborted. I mean:
--------------------------------------
if(
for(i=0;;i++){
if(i == 5)break;
}
){
printf("Loop didn't finish!");
}
--------------------------------------
This is needed very often when you'd like to exit the loop, so I consider this might not be a bug improvement - but a nice feature.
Regards, Ville
>How-To-Repeat:
-
>Fix:
?
>Release-Note:
>Audit-Trail:
>Unformatted: