unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Everyone working on the C side might want to read this article...
@ 2003-04-17 20:00 Rob Browning
  2003-04-17 20:25 ` Bruce Korb
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rob Browning @ 2003-04-17 20:00 UTC (permalink / 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


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

end of thread, other threads:[~2003-04-28 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-17 20:00 Everyone working on the C side might want to read this article Rob Browning
2003-04-17 20:25 ` 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

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).