guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-13-11-g3a


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-13-11-g3a1a883
Date: Wed, 20 Oct 2010 21:58:00 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=3a1a883b632f51bf316195a8a180e2e6c52a3363

The branch, master has been updated
       via  3a1a883b632f51bf316195a8a180e2e6c52a3363 (commit)
       via  fb3fad534629a44545282098104a5538ab2f912c (commit)
       via  abd7e37ab734eef8520965f2c3f52d5138584ca0 (commit)
      from  511246a193dc19d6fa6bc90067fb8b769f27b42c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3a1a883b632f51bf316195a8a180e2e6c52a3363
Author: Ludovic Courtès <address@hidden>
Date:   Wed Oct 20 22:40:10 2010 +0200

    Tweak `-Wunused-variable' and `-Wunused-toplevel' for special names.
    
    * module/language/tree-il/analyze.scm (gensym?): New procedure.
      (unused-variable-analysis): Ignore variables whose name passes
      `gensym?' or is `_'.
      (unused-toplevel-analysis): Ignore variables whose name passes
      `gensym?'.
    
    * test-suite/tests/tree-il.test ("warnings")["unused-variable"]("special
      variable names"): New test.
      ["unused-toplevel"]("special variable names"): New test.

commit fb3fad534629a44545282098104a5538ab2f912c
Author: Ludovic Courtès <address@hidden>
Date:   Tue Oct 19 23:36:04 2010 +0200

    Add `Libs.private' to the `.pc' files.
    
    * meta/guile-2.0-uninstalled.pc.in (Libs): Remove @address@hidden
      (Libs.private): New field.
    * meta/guile-2.0.pc.in (Libs): Remove @address@hidden
      (Libs.private): New field.

commit abd7e37ab734eef8520965f2c3f52d5138584ca0
Author: Ludovic Courtès <address@hidden>
Date:   Tue Oct 19 23:32:16 2010 +0200

    configure: Don't needlessly augment $LIBS (and $GUILE_LIBS.)
    
    * configure.ac: Don't augment $LIBS with $LTLIBUNISTRING and
      $BDW_GC_LIBS.
    
    * libguile/Makefile.am (address@hidden@_la_LDFLAGS):
      Remove @address@hidden  Add $(BDW_GC_LIBS).

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                        |    9 +++++----
 libguile/Makefile.am                |    4 +++-
 meta/guile-2.0-uninstalled.pc.in    |    3 ++-
 meta/guile-2.0.pc.in                |    3 ++-
 module/language/tree-il/analyze.scm |   11 +++++++++--
 test-suite/tests/tree-il.test       |   19 ++++++++++++++++++-
 6 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index faf31f3..4b4323f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -862,9 +862,7 @@ if test "x$HAVE_LIBGMP" != "xyes"; then
 fi
 
 dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
-if test "x$LTLIBUNISTRING" != "x"; then
-  LIBS="$LTLIBUNISTRING $LIBS"
-else
+if test "x$LTLIBUNISTRING" = "x"; then
   AC_MSG_ERROR([GNU libunistring is required, please install it.])
 fi
 
@@ -1231,8 +1229,9 @@ main ()
 #--------------------------------------------------------------------
 PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
 
-CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
+save_LIBS="$LIBS"
 LIBS="$BDW_GC_LIBS $LIBS"
+CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
 
 # `GC_do_blocking ()' is available in GC 7.1 but not declared.
 AC_CHECK_FUNCS([GC_do_blocking])
@@ -1249,6 +1248,8 @@ AC_CHECK_TYPE([GC_fn_type],
   [],
   [#include <gc/gc.h>])
 
+LIBS="$save_LIBS"
+
 
 AC_CHECK_SIZEOF(float)
 if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index de69a40..55a9764 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -451,11 +451,13 @@ noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c       
        \
 noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
 
 address@hidden@_la_DEPENDENCIES = @LIBLOBJS@
+
 address@hidden@_la_LIBADD =            \
   @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBLTDL)        \
   $(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)
+
 address@hidden@_la_LDFLAGS =                                                   
        \
-  @LTLIBINTL@ $(LIBFFI_LIBS) $(INET_NTOP_LIB) $(INET_PTON_LIB)                 
                        \
+  $(BDW_GC_LIBS) $(LIBFFI_LIBS) $(INET_NTOP_LIB) $(INET_PTON_LIB)              
                        \
   $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB)                             
                        \
   -version-info 
@LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@
    \
   -export-dynamic -no-undefined                                                
                                \
diff --git a/meta/guile-2.0-uninstalled.pc.in b/meta/guile-2.0-uninstalled.pc.in
index 4bf6058..b5fdcad 100644
--- a/meta/guile-2.0-uninstalled.pc.in
+++ b/meta/guile-2.0-uninstalled.pc.in
@@ -4,5 +4,6 @@ address@hidden@
 Name: GNU Guile (uninstalled)
 Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled)
 Version: @GUILE_VERSION@
-Libs: -L${builddir}/libguile address@hidden@ @GUILE_LIBS@
+Libs: -L${builddir}/libguile address@hidden@
+Libs.private: @LIBGMP@ @LIBLTDL@ @BDW_GC_LIBS@ @LIBFFI_LIBS@ @GUILE_LIBS@
 Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@ @BDW_GC_CFLAGS@
diff --git a/meta/guile-2.0.pc.in b/meta/guile-2.0.pc.in
index 1280756..3366345 100644
--- a/meta/guile-2.0.pc.in
+++ b/meta/guile-2.0.pc.in
@@ -14,5 +14,6 @@ address@hidden@
 Name: GNU Guile
 Description: GNU's Ubiquitous Intelligent Language for Extension
 Version: @GUILE_VERSION@
-Libs: -L${libdir} address@hidden@ @GUILE_LIBS@
+Libs: -L${libdir} address@hidden@
+Libs.private: @LIBGMP@ @LIBLTDL@ @BDW_GC_LIBS@ @LIBFFI_LIBS@ @GUILE_LIBS@
 Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ 
@BDW_GC_CFLAGS@
diff --git a/module/language/tree-il/analyze.scm 
b/module/language/tree-il/analyze.scm
index 8a51040..745ce39 100644
--- a/module/language/tree-il/analyze.scm
+++ b/module/language/tree-il/analyze.scm
@@ -602,6 +602,10 @@ accurate information is missing from a given `tree-il' 
element."
   (vars binding-info-vars)  ;; ((GENSYM NAME LOCATION) ...)
   (refs binding-info-refs)) ;; (GENSYM ...)
 
+(define (gensym? sym)
+  ;; Return #t if SYM is (likely) a generated symbol.
+  (string-any #\space (symbol->string sym)))
+
 (define unused-variable-analysis
   ;; Report unused variables in the given tree.
   (make-tree-analysis
@@ -662,7 +666,9 @@ accurate information is missing from a given `tree-il' 
element."
                         ;; the LOCS location stack.
                         (loc  (or (caddr var)
                                   (find pair? locs))))
-                    (warning 'unused-variable loc name)))))
+                    (if (and (not (gensym? name))
+                             (not (eq? name '_)))
+                        (warning 'unused-variable loc name))))))
           vars)
          (vlist-drop vars (length inner-vars)))
 
@@ -835,7 +841,8 @@ accurate information is missing from a given `tree-il' 
element."
            (vlist-for-each (lambda (name+loc)
                              (let ((name (car name+loc))
                                    (loc  (cdr name+loc)))
-                               (warning 'unused-toplevel loc name)))
+                               (if (not (gensym? name))
+                                   (warning 'unused-toplevel loc name))))
                            unused))))
 
      (make-reference-graph vlist-null vlist-null #f))))
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index 2294ef2..e28506f 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -665,6 +665,16 @@
        (null? (call-with-warnings
                 (lambda ()
                   (compile '(lambda (x y z) #t)
+                           #:opts %opts-w-unused)))))
+
+     (pass-if "special variable names"
+       (null? (call-with-warnings
+                (lambda ()
+                  (compile '(lambda ()
+                              (let ((_ 'underscore)
+                                    (#{gensym name}# 'ignore-me))
+                                #t))
+                           #:to 'assembly
                            #:opts %opts-w-unused))))))
 
    (with-test-prefix "unused-toplevel"
@@ -766,7 +776,14 @@
                                                 'foo)))
               (number? (string-contains (cadr w)
                                         (format #f "top-level variable `~A'"
-                                                'bar)))))))
+                                                'bar))))))
+
+     (pass-if "special variable names"
+       (null? (call-with-warnings
+                (lambda ()
+                  (compile '(define #{gensym name}# 'ignore-me)
+                           #:to 'assembly
+                           #:opts %opts-w-unused-toplevel))))))
 
    (with-test-prefix "unbound variable"
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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