unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Jay K <jay.krell@cornell.edu>
Cc: bug-guile@gnu.org
Subject: Re: isinf and type-pun warning/error on OSF guile 1.8.7
Date: Thu, 10 Jun 2010 00:28:00 +0200	[thread overview]
Message-ID: <m3k4q7q1sf.fsf@pobox.com> (raw)
In-Reply-To: <COL101-W62CFE67A93B5A4972DD5C3E6D70@phx.gbl> (Jay K.'s message of "Wed, 9 Jun 2010 15:43:49 +0000")

Hi Jay,

On Wed 09 Jun 2010 17:43, Jay K <jay.krell@cornell.edu> writes:

> libtool: compile:  gcc -DHAVE_CONFIG_H -I.. -I/home/jayk/src/guile-1.8.7 -I.. -mieee -mieee -D_REENTRANT -pthread -g -O2 -Wall -Wmissing-prototypes -Werror -MT libguile_la-numbers.lo -MD -MP -MF .deps/libguile_la-numbers.Tpo -c /home/jayk/src/guile-1.8.7/libguile/numbers.c  -DPIC -o .libs/libguile_la-numbers.o
> cc1: warnings being treated as errors
> /home/jayk/src/guile-1.8.7/libguile/numbers.c: In function 'xisinf':
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:144: error: implicit
> declaration of function 'isinf'

> I couldn't find isinf in any header. 

This call only occurs if configure detected support `isinf', so surely
it is there? Can you check again? Barring that can you send a
config.log, please.

> /home/jayk/src/guile-1.8.7/libguile/numbers.c: In function 'guile_ieee_init':
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:623: error: dereferencing type-punned pointer will break strict-aliasing rules
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:654: error: dereferencing type-punned pointer will break strict-aliasing rules

Does replacing that DINIFINITY block with the following help?

  /* OSF */
  extern unsigned int DINFINITY[2];
  union
  {
    double d;
    int i[2];
  } alias;
  alias.i[0] = DINFINITY[0];
  alias.i[1] = DINFINITY[1];
  guile_Inf = alias.d;

Likewise for DQNAN:

  {
    /* OSF */
    extern unsigned int DQNAN[2];
    union
    {
      double d;
      int i[2];
    } alias;
    alias.i[0] = DQNAN[0];
    alias.i[1] = DQNAN[1];
    guile_NaN = alias.d;
  }

> I recall seeing the same problem on Irix, where autoconf does a link check
> and compiles without -Wmissing-prototype so it passes, because the function
> does exist somewhere. Autoconf checks need to more closely resemble
> how later compilation will occur.

How does that work though -- does isinf have no header/declaration?

> /home/jayk/src/guile-1.8.7/test-suite/standalone/test-conversion.c:859:
> error: dereferencing type-punned pointer will break strict-aliasing
> rules make[4]: *** [test_conversion-test-conversion.o] Error 1

We can copy the above solution if it works. Let us know!

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2010-06-09 22:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 15:43 isinf and type-pun warning/error on OSF guile 1.8.7 Jay K
2010-06-09 22:28 ` Andy Wingo [this message]
2010-06-09 23:16   ` Jay K
2010-06-10  9:27   ` Jay K
2010-06-10 12:26     ` Andy Wingo
2010-09-07 22:52 ` Ludovic Courtès

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=m3k4q7q1sf.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=jay.krell@cornell.edu \
    /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).