Fixed lots of warnings from gcc-2.7.x about "left-hand operand of

comma expression has no effect" in the MAKE_SET() macro.  This also
fixes compiling with -O3 (which removes static functions unless
there is a suitable reference to them).  Declaring all the static
symbols as __unused would also fix the warning, but would be bogus
(they are used) and wouldn't fix -O3.  However, the dummy pointers
for the references waste about 1.5K text and 20K symbol space for
GENERIC.  This wastage hasn't changed - the dummy pointers are just
nonzero now.
This commit is contained in:
Bruce Evans 1996-09-20 14:36:14 +00:00
parent b32992bc3f
commit a1971699ac
1 changed files with 2 additions and 3 deletions

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
* $Id: kernel.h,v 1.20 1996/06/23 17:40:47 bde Exp $
* $Id: kernel.h,v 1.21 1996/09/03 22:52:26 bde Exp $
*/
#ifndef _SYS_KERNEL_H_
@ -81,8 +81,7 @@ extern long timedelta;
* can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
*/
#define MAKE_SET(set, sym, type) \
static void *const __set_##set##_sym_##sym = \
(&__set_##set##_sym_##sym, &sym, 0); \
static void const * const __set_##set##_sym_##sym = &sym; \
asm(".stabs \"_" #set "\", " #type ", 0, 0, _" #sym)
#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)