Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcsun!unido!tub!tmpmbx!trepex From: trepex@tmpmbx.UUCP (Ralf Moritz) Newsgroups: comp.unix.xenix Subject: Re: (Yet another) Bug in C compiler (SCO Xenix V/386 R 2.3.1) Message-ID: <1715@tmpmbx.UUCP> Date: 20 Sep 89 12:38:58 GMT References: <12744@eddie.MIT.EDU> Reply-To: trepex@tmpmbx.UUCP (Ralf Moritz) Organization: netmbx GbR, Berlin, West Germany Lines: 38 In article <12744@eddie.MIT.EDU> eliot%lees-rif.MIT.EDU@eddie.MIT.EDU (Eliot Frank) writes: >When I compile the code fragment below I get an error Another little bug with tan() - also very easy to "fix" :-) Op Sys: SCO Xenix V/386 R2.3.2 Dev Sys: SCO Xenix V/386 R2.3.0 $ cat test.c #include main() { double x; x = 1.0; #ifdef BUG printf("tan(%f) = %f\n", x, tan(x)); #else printf("tan(%f) = %f\n", x, sin(x)/cos(x)); #endif } $ cc -o bug -DBUG -lm test.c test.c /bin/ld : error: Unresolved externals: _xtan in file(s): /lib/386/Slibm.a(tan.c) $ cc -o nobug -lm test.c ; nobug test.c tan(1.000000) = 1.557408 Ralf -- UUCP: trepex@tmpmbx (Bang: ...!uunet!unido!tmpmbx!trepex) BITNET: moritz@db0tui6 (Ralf Moritz, netmbx GbR)