From owner-freebsd-current Fri Sep 18 10:05:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21407 for freebsd-current-outgoing; Fri, 18 Sep 1998 10:05:34 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from trinity.radio-do.de (trinity.Radio-do.de [193.101.164.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA21402 for ; Fri, 18 Sep 1998 10:05:31 -0700 (PDT) (envelope-from fn@trinity.radio-do.de) Received: (from fn@localhost) by trinity.radio-do.de (8.9.1/8.8.5/RADIO-1.1) id TAA02724; Fri, 18 Sep 1998 19:05:09 +0200 (CEST) Message-ID: <19980918190509.A2708@radio-do.de> Date: Fri, 18 Sep 1998 19:05:09 +0200 From: Frank Nobis To: freebsd-current@FreeBSD.ORG Subject: Bug in elf c++ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Taken from the configure script of groff, I found a bug in the elf version of c++. Here is the example: #ifdef __cplusplus extern "C" void exit(int); #endif extern "C" { void _exit(int); } int i; struct A { char dummy; A() { i = 1; } ~A() { if (i == 1) _exit(0); } }; volatile A a; int main() { return 1; } Compile it with 'c++ -aout' and the exit value is 0. Compile it just with 'c++' and the exit value is 1! This leads to a bug in the groff package. Since the constructors for some global class instances are not called, the default value for font_path is not set and therefore groff fails to format any man page. Regards Frank -- Frank Nobis Email: PGP AVAILABLE Landgrafenstr. 130 dg3dcn http://www.radio-do.de/~fn/ 44139 Dortmund Powered by FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message