guile-devel
[Top][All Lists]
Advanced

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

Re: gcc optimisation breaks guile floating point


From: Marius Vollmer
Subject: Re: gcc optimisation breaks guile floating point
Date: 03 Oct 2002 00:40:24 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Gary Houston <address@hidden> writes:

> > Under gcc, the following statement:
> > 
> >   asm volatile ("" : : : "memory");
> >
> > [...]
>
> This is good, it's similar to a previous work-around in libguile/throw.c.

I haven't checked with the standard, but it might be the case that a
compiler must assume that a pointer to char can alias any type.  Thus, 

  #define SCM_REAL_VALUE(x) (((scm_t_double *)((char *)SCM2PTR (x)))->real)

might work as well.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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