unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Subject: Everyone working on the C side might want to read this article...
Date: Thu, 17 Apr 2003 15:00:22 -0500	[thread overview]
Message-ID: <873ckgevxl.fsf@raven.i.defaultvalue.org> (raw)


The following article explains gcc changes that may be behind at least
some of our recent set of bugs:

  http://www.ddj.com/documents/s=880/ddj0010d/0010d.htm

You may not need to read it if you're already familiar with what the C
standard says about type aliasing, or already know that (for example)
according to the standard this code is illegal and the results are
undefined:

   double d = 3.0;
   int* ip = (int*) &d;
   *ip = 7;

or if you know that an optimizer is within its rights according to the
standard to translate this:code:

  double d = 2.0;
  int *ip = (int*) &d;
  *ip = 3;
  d *= 2;

into this code:

  double d = 2.0;
  int *ip = (int*) &d;
  d *= 2;
  *ip = 3;

Thanks to Marius for tracking the pointer down.  I'm not yet sure what
this means for our code.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


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


             reply	other threads:[~2003-04-17 20:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-17 20:00 Rob Browning [this message]
2003-04-17 20:25 ` Everyone working on the C side might want to read this article Bruce Korb
2003-04-17 20:33 ` Dale P. Smith
2003-04-28 20:48 ` Rob Browning
2003-04-28 21:02   ` Bruce Korb
2003-04-28 22:30     ` Rob Browning

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=873ckgevxl.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.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).