From owner-freebsd-standards@FreeBSD.ORG Sat May 27 14:10:22 2006 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D170416BA5D for ; Sat, 27 May 2006 14:10:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AC7E43D48 for ; Sat, 27 May 2006 14:10:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4REAMtP041584 for ; Sat, 27 May 2006 14:10:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4REAMNh041583; Sat, 27 May 2006 14:10:22 GMT (envelope-from gnats) Date: Sat, 27 May 2006 14:10:22 GMT Message-Id: <200605271410.k4REAMNh041583@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Rostislav Krasny Cc: Subject: Re: standards/97928: fenv.h: fix to compile with gcc > 4.0. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rostislav Krasny List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2006 14:10:37 -0000 The following reply was made to PR standards/97928; it has been noted by GNATS. From: Rostislav Krasny To: Thierry Thomas Cc: bug-followup@FreeBSD.org Subject: Re: standards/97928: fenv.h: fix to compile with gcc > 4.0. Date: Sat, 27 May 2006 16:54:21 +0300 Hi, > >How-To-Repeat: > Try to compile something including with gcc41 (or later). Any regular program with fenv.h compiles without any problem. However running 'gcc41 -c inisig.c -DP_LINUX' reproduces the problem. That made me interested. After some searching on the web I've found that this is because in GCC 4.1 and newer "function prototype declarations in nested scopes are no longer accepted". So this is aster's bug. Try following patch: --- inisig.c.orig Thu Dec 22 09:51:16 2005 +++ inisig.c Sat May 27 16:34:05 2006 @@ -51,6 +51,11 @@ void stptrap(int sig); #endif +#ifdef P_LINUX +#define _GNU_SOURCE 1 +#include +#endif + #ifdef CRAY void INISIG( void ) #elif defined SOLARIS || IRIX || P_LINUX || TRU64 || SOLARIS64 @@ -103,8 +108,6 @@ #elif defined P_LINUX -#define _GNU_SOURCE 1 -#include /* Enable some exceptions. At startup all exceptions are masked. */ feenableexcept(FE_DIVBYZERO|FE_OVERFLOW);