Disable type-checking of `SCM_UNPACK' for the broken HP compilers.
authorLudovic Courtès <ludo@gnu.org>
Sat, 28 Jun 2008 18:31:01 +0000 (20:31 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 28 Jun 2008 18:31:01 +0000 (20:31 +0200)
NEWS
libguile/ChangeLog
libguile/tags.h

diff --git a/NEWS b/NEWS
index 55302b7..f9c5f68 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,7 +46,7 @@ This makes these internal functions technically not callable from
 application code.
 
 ** `guile-config link' now prints `-L$libdir' before `-lguile'
-** Fix build issue on Tru64
+** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
 
 \f
 Changes in 1.8.5 (since 1.8.4)
index 1ca6dca..c5bab5b 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-28  Ludovic Courtès  <ludo@gnu.org>
+
+       * tags.h (SCM_UNPACK): Disable type-checking for `__DECC' and
+       `__HP_cc'.  Reported by Peter O'Gorman <pogma@thewrittenword.com>.
+
 2008-06-02  Ludovic Courtès  <ludo@gnu.org>
 
        * deprecated.c (maybe_close_port): Rename EXCEPT to EXCEPT_SET
index 3f5483f..4e0700b 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef SCM_TAGS_H
 #define SCM_TAGS_H
 
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2008
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -113,8 +113,14 @@ typedef unsigned long scm_t_bits;
   and that there is no performance hit.  However, the alternative is
   compiled, and does generate a warning when used with the wrong
   pointer type.
- */
+
+  The Tru64 and ia64-hp-hpux11.23 compilers fail on `case (0?0=0:x)'
+  statements, so for them type-checking is disabled.  */
+#if defined __DECC || defined __HP_cc
+#   define SCM_UNPACK(x) ((scm_t_bits) (x))
+#else
 #   define SCM_UNPACK(x) ((scm_t_bits) (0? (*(SCM*)0=(x)): x))
+#endif
 
 /*
   There is no typechecking on SCM_PACK, since all kinds of types