bugKawa - Bugs: bug #32678, set! and endless loop

 
 

bug #32678: set! and endless loop

Submitted by:  Helmut Eller <ellerh>
Submitted on:  Fri 04 Mar 2011 03:30:19 PM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 08 Mar 2011 05:49:06 PM UTC, comment #4:

A warning about dead code is OK, but
it seems undesirable to turn this kind of warning
into an error.

Helmut Eller <ellerh>
Tue 08 Mar 2011 04:56:51 PM UTC, comment #3:

I don't believe the warning is a false positive. Note that 'result' is never assigned to. I can't see how one would intentionally assign the result of a non-terminating loop to a variable, even in a server-like application. Notice the warning goes away if the set! is replaced by just the do.
Perhaps an improved diagnostic can help:
/tmp/y.scm:5:22: warning - 'result' can never be set because expression never finishes

Per Bothner <bothner>
Project Administrator
Tue 08 Mar 2011 11:00:38 AM UTC, comment #2:

Just want to note that the warning may be a false
positive if non-local exits are used to terminate the loop.
Not uncommon for server-like applications.

Helmut Eller <ellerh>
Mon 07 Mar 2011 11:35:52 PM UTC, comment #1:

I checked in some fixes for this. Basically I added various extra tests for the code being unreachable. (I tried some variation of the test-case, too.)

The test-case now produces a warning - I considered making it an error - perhaps later.

Per Bothner <bothner>
Project Administrator
Fri 04 Mar 2011 03:30:19 PM UTC, original submission:

Kawa fails to compile this example:
kawa --version -C /tmp/x.scm

Helmut Eller <ellerh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by ellerh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Mar 2011 11:35:52 PM UTCbothnerCategoryNone=>Code generation
      Item GroupNone=>Compile-time exception
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1