From owner-freebsd-bugs Mon Sep 30 16:10: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD52537B401 for ; Mon, 30 Sep 2002 16:10:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2524643E6E for ; Mon, 30 Sep 2002 16:10:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8UNA6Co042485 for ; Mon, 30 Sep 2002 16:10:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8UNA5cL042483; Mon, 30 Sep 2002 16:10:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 323F837B401 for ; Mon, 30 Sep 2002 16:09:50 -0700 (PDT) Received: from panther.freebsd.org (panther.freebsd.org [216.136.204.99]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE76343E81 for ; Mon, 30 Sep 2002 16:09:49 -0700 (PDT) (envelope-from archie@FreeBSD.org) Received: from panther.freebsd.org (localhost [127.0.0.1]) by panther.freebsd.org (8.12.6/8.12.6) with ESMTP id g8UN9nSX083275 for ; Mon, 30 Sep 2002 16:09:49 -0700 (PDT) (envelope-from archie@panther.freebsd.org) Received: (from archie@localhost) by panther.freebsd.org (8.12.6/8.12.6/Submit) id g8UN9nWh083274; Mon, 30 Sep 2002 16:09:49 -0700 (PDT) Message-Id: <200209302309.g8UN9nWh083274@panther.freebsd.org> Date: Mon, 30 Sep 2002 16:09:49 -0700 (PDT) From: Archie Cobbs Reply-To: Archie Cobbs To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/43544: Bogus definition of HUGE_VAL in Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43544 >Category: bin >Synopsis: Bogus definition of HUGE_VAL in >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 30 16:10:05 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Archie Cobbs >Release: FreeBSD 5.0-CURRENT sparc64 >Organization: Packet Design >Environment: System: FreeBSD panther.freebsd.org 5.0-CURRENT FreeBSD 5.0-CURRENT #7: Tue Sep 17 18:14:25 PDT 2002 peter@panther.freebsd.org:/s/src/sys/sparc64/compile/PANTHER sparc64 >Description: The defintion of HUGE_VAL in looks like this: extern char __infinity[]; #define HUGE_VAL (*(double *) __infinity) This causes compiler warnings when using -Wcast-align: xx.c: In function `main': xx.c:9: warning: cast increases required alignment of target type There is an additional problem: there are two versions of "math.h" in the FreeBSD tree: src/include/math.h src/lib/msun/src/math.h Contrary to what you might think, src/include/math.h is NOT the one that gets installed into /usr/include during installation. >How-To-Repeat: Logon to a sparc or alpha FreeBSD machine. Then do this: $ cat > xx.c #include #include int main(int ac, char **av) { double x = 0; printf("%d\n", x == HUGE_VAL); return (0); } ^D $ cc -Wcast-align -o xx xx.c >Fix: I tried to fix this with these commits: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/msun/src/math.h.diff?r1=1.14&r2=1.15 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/i386/gen/infinity.c.diff?r1=1.6&r2=1.7 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/alpha/gen/infinity.c.diff?r1=1.3&r2=1.4 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/ia64/gen/infinity.c.diff?r1=1.2&r2=1.3 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/sparc64/gen/infinity.c.diff?r1=1.3&r2=1.4 but for some completely screwed reason, the libc compilation fails because of bogus #include paths, and I had to back out my commit. I have no idea how to fix this... why the heck are there two versions of math.h?? >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message