unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Loss of location in (library) code
@ 2020-11-14 19:26 manday
  2020-11-14 19:36 ` manday
  0 siblings, 1 reply; 2+ messages in thread
From: manday @ 2020-11-14 19:26 UTC (permalink / raw)
  To: guile-devel

As discussed on #guile, we tried for a "possibly unbound variable" warning, on Guile 3.0.4:

When the offending form is somewhere in a RnRS module or Guile library, the warnings give inconsistent line numbers. For instance:

(library (test)
 (export f)
 (import (rnrs))
 (define (f x)
  (if x
   (cons x 3)
   (IS-UNBOUND x))))

produces "4:1: warning: possibly unbound variable `IS-UNBOUND'", the warning is located on the (define) whereas

; Line 1
; Line 2
; Line 3
(define (f x)
 (if x
  (cons x 3)
  (IS-UNBOUND x)))

produces "7:2: warning: possibly unbound variable `IS-UNBOUND'", the warning is located correctly.

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Loss of location in (library) code
  2020-11-14 19:26 Loss of location in (library) code manday
@ 2020-11-14 19:36 ` manday
  0 siblings, 0 replies; 2+ messages in thread
From: manday @ 2020-11-14 19:36 UTC (permalink / raw)
  To: guile-devel

I apologize for an editing mistake in the earlier mail. It was supposed to read:

"[...] When the offending form is somewhere in an __RnRS library__, the warnings give inconsistent line numbers. [...]"

The problem does not occur if Guile's modules are used (and the code thus placed at the exterior of the (define-module)).

On Sat, Nov 14, 2020 at 08:26:15PM +0100, manday@openmail.cc wrote:
> As discussed on #guile, we tried for a "possibly unbound variable" warning, on Guile 3.0.4:
> 
> When the offending form is somewhere in a RnRS module or Guile library, the warnings give inconsistent line numbers. For instance:
> 
> (library (test)
>  (export f)
>  (import (rnrs))
>  (define (f x)
>   (if x
>    (cons x 3)
>    (IS-UNBOUND x))))
> 
> produces "4:1: warning: possibly unbound variable `IS-UNBOUND'", the warning is located on the (define) whereas
> 
> ; Line 1
> ; Line 2
> ; Line 3
> (define (f x)
>  (if x
>   (cons x 3)
>   (IS-UNBOUND x)))
> 
> produces "7:2: warning: possibly unbound variable `IS-UNBOUND'", the warning is located correctly.

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-14 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-14 19:26 Loss of location in (library) code manday
2020-11-14 19:36 ` manday

unofficial mirror of guile-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-devel/0 guile-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-devel guile-devel/ https://yhetil.org/guile-devel \
		guile-devel@gnu.org
	public-inbox-index guile-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.devel
	nntp://news.gmane.io/gmane.lisp.guile.devel


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git