From owner-freebsd-bugs Sat Jan 5 15:50: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C373F37B419 for ; Sat, 5 Jan 2002 15:50:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g05No0672685; Sat, 5 Jan 2002 15:50:00 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BF34037B417 for ; Sat, 5 Jan 2002 15:41:47 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g05Nflp70161; Sat, 5 Jan 2002 15:41:47 -0800 (PST) (envelope-from nobody) Message-Id: <200201052341.g05Nflp70161@freefall.freebsd.org> Date: Sat, 5 Jan 2002 15:41:47 -0800 (PST) From: Vladimir Kushnir To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/33590: imaxabs(3), imaxdiv(3) does not work with C++ linkage 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: 33590 >Category: misc >Synopsis: imaxabs(3), imaxdiv(3) does not work with C++ linkage >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 05 15:50:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Vladimir Kushnir >Release: FreeBSD-CURRENT >Organization: ITP >Environment: FreeBSD kushnir1.kiev.ua 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sun Dec 30 10:26:14 EET 2001 root@kushnir1.kiev.ua:/usr/obj/usr/ncvs/src/sys/KUSHNIR i386 >Description: Libc functions imaxabs(3), imaxdiv(3) used in C++ programs lead to "undefined reference" errors. >How-To-Repeat: Compile as C++ this code: /* test.cc */ #include main() { intmax_t a = 1; intmax_t b; imaxdiv_t c; b = imaxabs(a); c = imaxdiv(a, b); } Output: ~> c++ -o itest test.cc /tmp/ccplyujk.o: In function `main': /tmp/ccplyujk.o(.text+0x21): undefined reference to `imaxabs(long long)' /tmp/ccplyujk.o(.text+0x4e): undefined reference to `imaxdiv(long long, long long)' >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message