[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #40123] Nested with-compile-options problem
From: |
Matthieu Vachon |
Subject: |
[Bug-kawa] [bug #40123] Nested with-compile-options problem |
Date: |
Fri, 27 Sep 2013 01:59:29 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?40123>
Summary: Nested with-compile-options problem
Project: Kawa
Submitted by: maoueh
Submitted on: Fri 27 Sep 2013 01:59:28 AM GMT
Category: Scheme language
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Consider the following snippet:
(define (nested-with-compile-options)
(with-compile-options warn-unreachable: #f
(let ((one "one") (two "two"))
(with-compile-options warn-unreachable: #f
(if (primitive-throw (java.lang.NullPointerException)) one two)))
(if (primitive-throw (java.lang.NullPointerException)) 1 2)))
Both `(if ...)` statement generate an unreachable warning.
The first one is not reported as expected because the nested
`with-compile-options` catch it. However, the second one still generates a
warning even tough it is still wrapped in the first `with-compile-options`.
It's like the nested one affect the options set by the first one when the
block is exited.
Just like that, the snippet is not very common. However, we faced this problem
because one of our big macro creates an unreachable warning that we need to
fix. As a temp fix, we wrap the piece of code in a `with-compile-options`. It
works great, except when nest the macro in which case, the warning is still
issued.
I'm going to add a test case after submission.
Regards,
Matt
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40123>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bug #40123] Nested with-compile-options problem,
Matthieu Vachon <=