Date: Tue, 29 Apr 1997 12:40:05 -0700 (PDT) From: j.loverso@opengroup.org To: freebsd-gnats-submit@freebsd.org Subject: kern/3419: __attribute__((__unused__)) doesn't work Message-ID: <199704291940.MAA05042@hub.freebsd.org> Resent-Message-ID: <199704291950.MAA05586@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704291940.MAA05042>