unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: Gary Houston <ghouston@arglist.com>, guile-devel@gnu.org
Subject: Re: gcc optimisation breaks guile floating point
Date: 28 Aug 2002 22:26:12 +0200	[thread overview]
Message-ID: <8765xuzq57.fsf@zagadka.ping.de> (raw)
In-Reply-To: <15723.64888.759743.439428@blauw.xs4all.nl>

Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:

> I think that these double (as in twice) initializations are weird, and
> should go. Why not
> 
>     scm_t_double bla;
>     bla.tag = scm_double_tag
>     bla.pad = 0x0
>     bla.double = z;
>     return scm_double_cell (
>         ((scm_t_double_cell*) &bla) -> car,
>         ((scm_t_double_cell*) &bla) -> cbr,
>         ((scm_t_double_cell*) &bla) -> ccr,
>         ((scm_t_double_cell*) &bla) -> cdr);

This looks wierd as well, don't you think?

> Another option
> 
>   *((unsigned long *) z) = 0;
>   scm_remember ((SCM) z);
>   *((double *) z) = x;
>   return z;

I like this better (with a suitable comment of course).

I guess that the funny aliasing behaviour applies only to pointers to
floating point types, right?

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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-08-28 20:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-27 21:10 gcc optimisation breaks guile floating point Gary Houston
2002-08-27 22:30 ` Han-Wen Nienhuys
2002-08-28 20:26   ` Marius Vollmer [this message]
2002-08-28 22:53     ` Han-Wen Nienhuys
2002-08-30 17:44       ` Gary Houston
2002-09-05 21:10         ` Han-Wen Nienhuys
2002-09-12  1:46           ` Carl R. Witty
2002-09-13 21:20             ` Han-Wen Nienhuys
2002-09-24 22:32             ` Gary Houston
     [not found]             ` <200209242233.PAA04201@onyx.he.net>
2002-10-02 22:40               ` Marius Vollmer
2002-10-02 23:34                 ` Gary Houston
     [not found]                 ` <200210022336.QAA18265@onyx.he.net>
2002-10-03 12:33                   ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8765xuzq57.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --cc=ghouston@arglist.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).