[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_LANG_BOOL_COMPILE_TRY(C) fails with OS vendor compilers
From: |
Thomas Dickey |
Subject: |
Re: AC_LANG_BOOL_COMPILE_TRY(C) fails with OS vendor compilers |
Date: |
Mon, 5 Jul 2004 08:54:21 -0400 (EDT) |
On Mon, 5 Jul 2004, Noah Misch wrote:
> On Mon, Jul 05, 2004 at 06:00:07AM -0400, Thomas Dickey wrote:
> > On Mon, 5 Jul 2004, Noah Misch wrote:
> >
> > > On Fri, Jul 02, 2004 at 07:37:25AM -0700, Paul Eggert wrote:
> > >
> > > > On the compilers in question, what value does 1/0 return? Perhaps we
> > > > can make use of that somehow.
> > >
> > > On the Compaq CC, the program ``int main() { int c = 1/0; printf("%d\n",
> > > c); }''
> > > prints ``0''.
> >
> > "man cc" shows the "-ieee" option, which appears to produce the result you
> > want.
>
> I'm not seeing different behavior in the test programs under discussion with
> the
> introduction of the -ieee option. How does it change behavior for you?
I made a program like this
#include <stdio.h>
#include <math.h>
int main()
{
int a = 1;
int b = 0;
printf("%d\n", a/b);
return 0;
}
compiled with cc -ieee option, and it dumped core (ymmv)
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net