Hi, "Andy Wingo" <[email protected]> skribis:
> commit dab48cc567f931b275ad647db1e47135b63c6675 > Author: Andy Wingo <[email protected]> > 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’.
