From owner-freebsd-bugs Tue Apr 29 12:50:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA05600 for bugs-outgoing; Tue, 29 Apr 1997 12:50:05 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA05586; Tue, 29 Apr 1997 12:50:02 -0700 (PDT) Resent-Date: Tue, 29 Apr 1997 12:50:02 -0700 (PDT) Resent-Message-Id: <199704291950.MAA05586@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.ORG, Received:(from nobody@localhost) by.hub.freebsd.org.id.MAA05042;Tue; (8.8.5/8.8.5);, 29 Apr 1997 12:40:05.-0700 (PDT) Message-Id: <199704291940.MAA05042@hub.freebsd.org> Date: Tue, 29 Apr 1997 12:40:05 -0700 (PDT) From: j.loverso@opengroup.org To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: kern/3419: __attribute__((__unused__)) doesn't work Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3419 >Category: kern >Synopsis: __attribute__((__unused__)) doesn't work >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 29 12:50:01 PDT 1997 >Last-Modified: >Originator: John LoVerso >Organization: Open Group Research Inst >Release: 2.2.1 >Environment: FreeBSD freebase.osf.org 2.2.1-RELEASE FreeBSD 2.2.1-RELEASE #0: Thu Mar 27 08:40:39 EST 1997 loverso@freebase.osf.org:/usr/src/sys/compile/USEFUL+snd i386 >Description: The system comes with GCC 2.7.2.1. /usr/include/sys/cdefs.h says: #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3 #define __dead #define __dead2 __attribute__((__noreturn__)) #define __pure #define __pure2 __attribute__((__const__)) #define __unused __attribute__((__unused__)) #endif However,I tried to compile Berk DB 2.0. It has code like this: (starting at line 340) typedef struct _hoffpage { u_int8_t type; /* 00: Page type and delete flag. */ u_int8_t __unused[3]; /* 01-03: Padding, unused. */ When it gets compiled, it complains: ../dist/../include/db_page.h:342: parse error before `[' ../dist/../include/db_page.h:342: warning: no semicolon at end of struct or union It appears that __attribute__((__unused__)) doesn't work. I'm not sure which catagory this bug is in. Is it kern? (/usr/include/sys/cdef.h) Is it GNU (gcc). Is it misc? >How-To-Repeat: Try to compile DB 2.0 fetch ftp://ftp.sleepycat.com/pub/db.tar.gz tar zxvf db.tar.gz cd db-2.0.4/build.unix ../dist/configure make >Fix: Fix GCC? Fix /usr/include/sys/cdefs.h >Audit-Trail: >Unformatted: