unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* 1.8.0:  C++-style cast
@ 2006-07-12  3:58 Mike Gran
  2006-07-12  8:20 ` Ludovic Courtès
  2006-07-13  1:48 ` Kevin Ryde
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Gran @ 2006-07-12  3:58 UTC (permalink / raw)


In guile-core-1.8-20060711, in libguile/numbers.c, in
guile_ieee_init(), a C++ style cast is used instead of a C-style cast. 
Also, a declaration block occurs in a code block.  These bend the rules
of old-school ANSI C.

--- numbers.c.orig      2006-05-09 16:15:10.000000000 -0700
+++ numbers.c   2006-07-11 20:54:36.000000000 -0700
@@ -598,7 +598,7 @@
 #elif HAVE_DINFINITY
   /* OSF */
   extern unsigned int DINFINITY[2];
-  guile_Inf = (*(X_CAST(double *, DINFINITY)));
+  guile_Inf = (*((double *) (DINFINITY)));
 #else
   double tmp = 1e+10;
   guile_Inf = tmp;
@@ -619,9 +619,11 @@
   /* C99 NAN, when available */
   guile_NaN = NAN;
 #elif HAVE_DQNAN
-  /* OSF */
-  extern unsigned int DQNAN[2];
-  guile_NaN =  (*(X_CAST(double *, DQNAN)));
+  {
+    /* OSF */ 
+    extern unsigned int DQNAN[2];
+    guile_NaN = (*((double *)(DQNAN)));
+  }
 #else
   guile_NaN = guile_Inf / guile_Inf;
 #endif


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-07-21  0:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12  3:58 1.8.0: C++-style cast Mike Gran
2006-07-12  8:20 ` Ludovic Courtès
2006-07-21  0:34   ` Kevin Ryde
2006-07-13  1:48 ` Kevin Ryde
2006-07-13  1:59   ` John W. Eaton
2006-07-13  2:13   ` Mike Gran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).