guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-68-gda


From: Ludovic Courtès
Subject: Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-68-gdab48cc
Date: Tue, 06 Mar 2012 18:13:49 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hi,

"Andy Wingo" <address@hidden> skribis:

> commit dab48cc567f931b275ad647db1e47135b63c6675
> Author: Andy Wingo <address@hidden>
> Date:   Fri Mar 2 17:46:28 2012 +0100
>
>     tweaks to -Wformat's gettext detection
>     
>     * module/language/tree-il/analyze.scm (proc-ref?): Change to use less
>       false-if-exception and more variable-bound?.  If a variable is present
>       in the local module but not bound, assume that it is gettext if it has
>       the right name.  This is to allow for (define _ gettext).

What’s the functional change?

>     * test-suite/tests/tree-il.test ("warnings"): Update (_ "foo") example.

[...]

> diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
> index b47528e..3d5989e 100644
> --- a/test-suite/tests/tree-il.test
> +++ b/test-suite/tests/tree-il.test
> @@ -2221,18 +2221,15 @@
>                            #:opts %opts-w-format
>                            #:to 'assembly)))))
>  
> -     (pass-if "non-literal format string with forward declaration"
> -       (let ((w (call-with-warnings
> -                 (lambda ()
> -                   (compile '(begin
> -                               (define (foo)
> -                                 (format #t (_ "~A ~A!") "hello" "world"))
> -                               (define _ bar))
> -                            #:opts %opts-w-format
> -                            #:to 'assembly)))))
> -         (and (= (length w) 1)
> -              (number? (string-contains (car w)
> -                                        "non-literal format string")))))
> +     (pass-if "non-literal format string with (define _ gettext)"
> +       (null? (call-with-warnings
> +               (lambda ()
> +                 (compile '(begin
> +                             (define _ gettext)
> +                             (define (foo)
> +                               (format #t (_ "~A ~A!") "hello" "world")))
> +                          #:opts %opts-w-format
> +                          #:to 'assembly)))))

Could you reinstate "non-literal format string with forward
declaration", which tests something different as the name implies (see
d3160473)?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]