From owner-freebsd-bugs Sun Dec 23 11:30:16 2001 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 B457137B416 for ; Sun, 23 Dec 2001 11:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBNJU0335666; Sun, 23 Dec 2001 11:30:00 -0800 (PST) (envelope-from gnats) Received: from serv1.ilse.nl (serv1.ilse.nl [195.18.92.131]) by hub.freebsd.org (Postfix) with ESMTP id AB01E37B416 for ; Sun, 23 Dec 2001 11:26:37 -0800 (PST) Received: (from marcolz@localhost) by crime.ncc1701.org (8.11.6/8.9.3) id fBNJHun02054; Sun, 23 Dec 2001 20:17:56 +0100 (CET) (envelope-from marcolz) Message-Id: <200112231917.fBNJHun02054@crime.ncc1701.org> Date: Sun, 23 Dec 2001 20:17:56 +0100 (CET) From: Marc Olzheim Reply-To: Marc Olzheim To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/33117: empty struct md_coredump in pcb.h and user.h violates strict ansi 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: 33117 >Category: kern >Synopsis: empty struct md_coredump in pcb.h and user.h violates strict ansi >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: Sun Dec 23 11:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Marc Olzheim >Release: FreeBSD 4.5-PRERELEASE i386 >Organization: ilse technology >Environment: System: FreeBSD crime.ncc1701.org 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Sun Dec 23 03:24:54 CET 2001 root@crime.ncc1701.org:/usr/src/sys/compile/crime i386 >Description: In /usr/src/sys/i386/include/pcb.h and /usr/src/sys/sys/user.h an empty struct md_coredump is defined. ANSI C does not allow empty structs. >How-To-Repeat: compile with gcc -pedantic: #include #include >Fix: Put the struct inside a #if ! defined __STRICT_ANSI__: --- /usr/src/sys/i386/include/pcb.h Sun Sep 5 18:30:26 1999 +++ /usr/src/sys/i386/include/pcb.h Sun Sep 5 18:31:00 1999 @@ -86,8 +86,10 @@ * The pcb is augmented with machine-dependent additional data for * core dumps. For the i386: ??? */ +#if ! defined(__STRICT_ANSI__) struct md_coredump { }; +#endif #ifdef _KERNEL --- /usr/src/sys/sys/origuser.h Thu Oct 11 12:05:10 2001 +++ /usr/src/sys/sys/user.h Tue Nov 13 19:38:48 2001 @@ -106,7 +106,10 @@ * Remaining fields for a.out core dumps - not valid at other times! */ struct kinfo_proc u_kproc; /* proc + eproc */ + +#if !defined(__STRICT_ANSI__) /* no empty structs please */ struct md_coredump u_md; /* machine dependent glop */ +#endif }; #endif >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message