bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compiler error in glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_nextafter l.c


From: David Byron
Subject: compiler error in glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_nextafter l.c
Date: Thu, 18 Oct 2001 07:33:12 -0700

I tried submitting this with glibcbug, but didn't see an entry show up in
gnats, so I'm trying this too.

Here's the info I wanted to submit using the form that glibcbug provided.

Thanks.

-DB

SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
From: address@hidden
To: address@hidden
Subject: compiler error in
glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_nextafterl.c

>Submitter-Id:  net
>Originator:    David Byron (address@hidden)
>Organization:  Coactive Networks
 <organization of PR author (multiple lines)>
>Confidential:  no
>Synopsis:      sysdeps/ieee754/ldbl-96/s_nextafterl.c:48: parse error
before return
>Severity:      serious
>Priority:      medium
>Category:      libc
>Class:         sw-bug
>Release:       libc-2.2.4
>Environment:
        building on x86 with 2.2.18 kernel as it says below.  But, I built
against the 2.4.6 headers using 2.95.2 as below.  Unfortunately, the script
seems to have gotten the wrong info.  I'll fill in the proper settings below
where I know, but I'm not sure what the 'right answer' is for kernel
headers.  Here were my arguments to configure:

        --target=i386-ci-linux
        --host=i386-ci-linux
        --with-headers=<my kernel headers dir>
        --with-libs=<my lib dir>
        --prefix=<my output directory>
        --build=i686-pc-linux-gnu
        --disable-sanity-checks
        --disable-shared
        --disable-profile
        --without-cvs
        --enable-add-ons=linuxthreads
        --enable-static-nss
        --with-elf
        --without-gd

Host type: i386-pc-linux-gnu
System: Linux porto 2.2.18pre21 #4 SMP Mon Apr 23 18:58:11 PDT 2001 i686
unknown
Architecture: i686

Addons: linuxthreads

Build CC: gcc
Compiler version: 2.95.2 20000220 (Debian GNU/Linux)
Kernel headers: UTS_RELEASE
Symbol versioning: yes
Build static: yes
Build shared: no
Build pic-default: no
Build profile: no
Build omitfp: no
Build bounded: no
Build static-nss: yes
Stdio: libio

>Description:
sysdeps/ieee754/ldbl-96/s_nextafterl.c:48: parse error before return
        
>How-To-Repeat:
just type make after configuring as above and...

make  -C math others
gcc ../sysdeps/ieee754/ldbl-96/s_nextafterl.c -c -O2 -Wall -Winline
-Wstrict-prototypes -Wwrite-strings -g     -Wno-uninitialized
-D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -I../include -I.
-I/home/dbyron/salem/build-CI/glibc-2.2.4-ci/math -I.. -I../libio
-I/home/dbyron/salem/build-CI/glibc-2.2.4-ci -I../sysdeps/i386/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/i386
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv
-I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem
/usr/lib/gcc-lib/i386-linux/2.95.2/include -isystem
/home/dbyron/salem/install-CI/usr/src/linux/include -D_LIBC_REENTRANT
-include ../include/libc-symbols.h     -o
/home/dbyron/salem/build-CI/glibc-2.2.4-ci/math/s_nextafterl.o
../sysdeps/ieee754/ldbl-96/s_nextafterl.c: In function `__nextafterl':
../sysdeps/ieee754/ldbl-96/s_nextafterl.c:48: warning: suggest parentheses
aroun
d && within ||
../sysdeps/ieee754/ldbl-96/s_nextafterl.c:48: parse error before `return'
make[2]: ***
[/home/dbyron/salem/build-CI/glibc-2.2.4-ci/math/s_nextafterl.o] Er
ror 1
make[1]: *** [math/others] Error 2
make: *** [all] Error 2
>Fix:
I hope I got the parentheses right.

address@hidden:~/salem/src/glibc-2.2.4/sysdeps/ieee754/ldbl-96$ diff -u
s_nextafterl.c.busted s_nextafterl.c
--- s_nextafterl.c.busted       Mon Oct 15 16:23:17 2001
+++ s_nextafterl.c Mon Oct 15 16:23:00 2001
@@ -43,9 +43,9 @@
        ix = esx&0x7fff;                /* |x| */
        iy = esy&0x7fff;                /* |y| */
 
-       if(((ix==0x7fff)&&((hx|lx)!=0) ||   /* x is nan */
-          ((iy==0x7fff)&&((hy|ly)!=0))     /* y is nan */
-          return x+y;
+       if (((ix==0x7fff) && ((hx|lx)!=0)) ||   /* x is nan */
+            ((iy==0x7fff) && ((hy|ly)!=0)))     /* y is nan */
+          return (x+y);
        if(x==y) return y;              /* x=y, return y */
        if((ix|hx|lx)==0) {                     /* x == 0 */
            SET_LDOUBLE_WORDS(x,esy&0x8000,0,1);/* return +-minsubnormal */
---
David Byron                     address@hidden
Coactive Networks, Inc.         http://www.coactive.com
28 Liberty Ship Way             voice:(415)289-7800
Sausalito, CA  94965            fax:(415)289-1320



reply via email to

[Prev in Thread] Current Thread [Next in Thread]