[Top][All Lists]

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

Re: 1.8.0: C++-style cast

From: John W. Eaton
Subject: Re: 1.8.0: C++-style cast
Date: Wed, 12 Jul 2006 21:59:18 -0400

On 13-Jul-2006, Kevin Ryde wrote:

| Mike Gran <address@hidden> writes:
| >
| > 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.
| >
| > -  guile_Inf = (*(X_CAST(double *, DINFINITY)));
| > +  guile_Inf = (*((double *) (DINFINITY)));
| >
| > ...
| I don't think it's c++.  I'm guessing X_CAST is an OSF macro.  Dunno
| if it does anything good.  John Eaton contributed that, maybe he can
| say (Cc'ed).

Sorry, I extracted part of that code from Octave and X_CAST was a macro
used in the Octave source code that could expand to a C-style cast if
the C++ compiler did not yet support C++-style casts.  As for the
declaration mixed with code, well that is they way code is intended to
be written and I guess I forgot that I was writing C.  :-)

I'm guessing this was inside an #ifdef for a platform I no longer
have, so I didn't see warnings about it.


reply via email to

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