guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-225-gde7aa


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-225-gde7aa61
Date: Fri, 07 Mar 2014 09:45:50 +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=de7aa61ac48811610b1b99005ada2464cf1a96f1

The branch, stable-2.0 has been updated
       via  de7aa61ac48811610b1b99005ada2464cf1a96f1 (commit)
       via  ce0ba9d087fd5b03d85a64deddaf3c59bd136a3d (commit)
       via  b8d7aacd682ce70d496fecf1626365c72132ada0 (commit)
      from  c3c3032608c9658c5dc5019d85446b6a1c2f7fcc (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 de7aa61ac48811610b1b99005ada2464cf1a96f1
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 7 04:21:46 2014 -0500

    Improve compliance with C standards regarding signed integer shifts.
    
    * configure.ac: Add -fwrapv when using GCC (or compatible), if
      supported.
    
    * libguile/numbers.h (SCM_I_MAKINUM): Cast to scm_t_bits (unsigned)
      before shifting, to avoid undefined behavior.

commit ce0ba9d087fd5b03d85a64deddaf3c59bd136a3d
Author: Mark H Weaver <address@hidden>
Date:   Thu Mar 6 23:59:56 2014 -0500

    chars.c: Remove duplicate 'const' specifiers.
    
    * libguile/chars.c (scm_r5rs_charnums, scm_r6rs_charnums)
      (scm_r7rs_charnums, scm_C0_control_charnums, scm_alt_charnums):
      Remove duplicate 'const' specifiers.

commit b8d7aacd682ce70d496fecf1626365c72132ada0
Author: Mark H Weaver <address@hidden>
Date:   Thu Mar 6 23:56:48 2014 -0500

    snarf.h: Declare static const function name vars as SCM_UNUSED.
    
    * libguile/snarf.h (SCM_DEFINE_GSUBR, SCM_DEFINE, SCM_PRIMITIVE_GENERIC,
      SCM_DEFINE_PUBLIC, SCM_PROC, SCM_REGISTER_PROC, SCM_GPROC): Declare
      static const function name variables as SCM_UNUSED to avoid spurious
      warnings.

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

Summary of changes:
 configure.ac       |    9 +++++----
 libguile/chars.c   |   10 +++++-----
 libguile/numbers.h |    4 ++--
 libguile/snarf.h   |   16 ++++++++--------
 4 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/configure.ac b/configure.ac
index e99b272..a5cb4b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1516,7 +1516,8 @@ AC_SUBST(HOST_CC)
 
 GUILE_CHECK_GUILE_FOR_BUILD
                        
-## If we're using GCC, ask for aggressive warnings.
+## If we're using GCC, add flags to reduce strictness of undefined
+## behavior, and ask for aggressive warnings.
 GCC_CFLAGS=""
 case "$GCC" in
   yes )
@@ -1526,13 +1527,13 @@ case "$GCC" in
     ## -Wundef was removed because Gnulib prevented it (see
     ## <http://thread.gmane.org/gmane.lisp.guile.bugs/5329>.)
 
-    ## Build with `-fno-strict-aliasing' to prevent miscompilation on
-    ## some platforms.  See
+    ## Build with `-fno-strict-aliasing' and `-fwrapv' to prevent
+    ## miscompilation on some platforms.  See
     ## <http://lists.gnu.org/archive/html/guile-devel/2012-01/msg00487.html>.
 
     POTENTIAL_GCC_CFLAGS="-Wall -Wmissing-prototypes \
       -Wdeclaration-after-statement -Wpointer-arith \
-      -Wswitch-enum -fno-strict-aliasing"
+      -Wswitch-enum -fno-strict-aliasing -fwrapv"
     # Do this here so we don't screw up any of the tests above that might
     # not be "warning free"
     if test "${GUILE_ERROR_ON_WARNING}" = yes
diff --git a/libguile/chars.c b/libguile/chars.c
index 697a5c4..e1aab1d 100644
--- a/libguile/chars.c
+++ b/libguile/chars.c
@@ -536,7 +536,7 @@ static const char *const scm_r5rs_charnames[] = {
   "space", "newline"
 };
 
-static const scm_t_uint32 const scm_r5rs_charnums[] = {
+static const scm_t_uint32 scm_r5rs_charnums[] = {
   0x20, 0x0a
 };
 
@@ -548,7 +548,7 @@ static const char *const scm_r6rs_charnames[] = {
   /* 'space' and 'newline' are already included from the R5RS list.  */
 };
 
-static const scm_t_uint32 const scm_r6rs_charnums[] = {
+static const scm_t_uint32 scm_r6rs_charnums[] = {
   0x00, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
   0x0d, 0x1b, 0x7f
 };
@@ -559,7 +559,7 @@ static const char *const scm_r7rs_charnames[] = {
   "escape"
 };
 
-static const scm_t_uint32 const scm_r7rs_charnums[] = {
+static const scm_t_uint32 scm_r7rs_charnums[] = {
   0x1b
 };
 
@@ -575,7 +575,7 @@ static const char *const scm_C0_control_charnames[] = {
   "sp", "del"
 };
 
-static const scm_t_uint32 const scm_C0_control_charnums[] = {
+static const scm_t_uint32 scm_C0_control_charnums[] = {
   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@@ -589,7 +589,7 @@ static const char *const scm_alt_charnames[] = {
   "null", "nl", "np"
 };
 
-static const scm_t_uint32 const scm_alt_charnums[] = {
+static const scm_t_uint32 scm_alt_charnums[] = {
   0x00, 0x0a, 0x0c
 };
 
diff --git a/libguile/numbers.h b/libguile/numbers.h
index 4d977dc..b4202f2 100644
--- a/libguile/numbers.h
+++ b/libguile/numbers.h
@@ -4,7 +4,7 @@
 #define SCM_NUMBERS_H
 
 /* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006,
- *   2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
+ *   2008, 2009, 2010, 2011, 2013, 2014 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -60,7 +60,7 @@ typedef scm_t_int32 scm_t_wchar;
 #define SCM_I_INUMP(x) (2 & SCM_UNPACK (x))
 #define SCM_I_NINUMP(x) (!SCM_I_INUMP (x))
 #define SCM_I_MAKINUM(x) \
-  (SCM_PACK ((((scm_t_signed_bits) (x)) << 2) + scm_tc2_int))
+  (SCM_PACK ((((scm_t_bits) (x)) << 2) + scm_tc2_int))
 #define SCM_I_INUM(x)   (SCM_SRS ((scm_t_signed_bits) SCM_UNPACK (x), 2))
 
 /* SCM_FIXABLE is true if its long argument can be encoded in an SCM_INUM. */
diff --git a/libguile/snarf.h b/libguile/snarf.h
index 1c072ba..1655e2c 100644
--- a/libguile/snarf.h
+++ b/libguile/snarf.h
@@ -4,7 +4,7 @@
 #define SCM_SNARF_H
 
 /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- *   2004, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ *   2004, 2006, 2009, 2010, 2011, 2014 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -87,7 +87,7 @@ DOCSTRING ^^ }
 
 #define SCM_DEFINE_GSUBR(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
 SCM_SNARF_HERE(\
-static const char s_ ## FNAME [] = PRIMNAME; \
+SCM_UNUSED static const char s_ ## FNAME [] = PRIMNAME; \
 SCM FNAME ARGLIST\
 )\
 SCM_SNARF_INIT(\
@@ -103,7 +103,7 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, 
OPT, VAR, DOCSTRING)
 #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
 SCM_SYMBOL (scm_i_paste (FNAME, __name), PRIMNAME);                    \
 SCM_SNARF_HERE(                                                                
\
-  static const char scm_i_paste (s_, FNAME) [] = PRIMNAME;             \
+  SCM_UNUSED static const char scm_i_paste (s_, FNAME) [] = PRIMNAME;  \
   SCM_API SCM FNAME ARGLIST;                                           \
   SCM_IMMUTABLE_POINTER (scm_i_paste (FNAME, __subr_foreign),           \
                          (scm_t_bits) &FNAME); /* the subr */           \
@@ -141,7 +141,7 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, 
OPT, VAR, DOCSTRING)
 
 #define SCM_PRIMITIVE_GENERIC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, 
DOCSTRING) \
 SCM_SNARF_HERE(\
-static const char s_ ## FNAME [] = PRIMNAME; \
+SCM_UNUSED static const char s_ ## FNAME [] = PRIMNAME; \
 static SCM g_ ## FNAME; \
 SCM FNAME ARGLIST\
 )\
@@ -155,7 +155,7 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, 
OPT, VAR, DOCSTRING)
 
 #define SCM_DEFINE_PUBLIC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
 SCM_SNARF_HERE(\
-static const char s_ ## FNAME [] = PRIMNAME; \
+SCM_UNUSED static const char s_ ## FNAME [] = PRIMNAME; \
 SCM FNAME ARGLIST\
 )\
 SCM_SNARF_INIT(\
@@ -166,12 +166,12 @@ scm_c_export (s_ ## FNAME, NULL); \
 SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
 
 #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN)  \
-SCM_SNARF_HERE(static const char RANAME[]=STR) \
+SCM_SNARF_HERE(SCM_UNUSED static const char RANAME[]=STR) \
 SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \
                                    (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN))
 
 #define SCM_REGISTER_PROC(RANAME, STR, REQ, OPT, VAR, CFN)  \
-SCM_SNARF_HERE(static const char RANAME[]=STR) \
+SCM_SNARF_HERE(SCM_UNUSED static const char RANAME[]=STR) \
 SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \
                                    (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN);) \
 SCM_SNARF_DOCS(register, CFN, STR, (), REQ, OPT, VAR, \
@@ -179,7 +179,7 @@ SCM_SNARF_DOCS(register, CFN, STR, (), REQ, OPT, VAR, \
 
 #define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF)  \
 SCM_SNARF_HERE(\
-static const char RANAME[]=STR;\
+SCM_UNUSED static const char RANAME[]=STR;\
 static SCM GF \
 )SCM_SNARF_INIT(\
 GF = SCM_PACK (0);  /* Dirk:FIXME:: Can we safely use #f instead of 0? */ \


hooks/post-receive
-- 
GNU Guile



reply via email to

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