1*ee67461eSJoseph Mingrone /* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ 2*ee67461eSJoseph Mingrone /* 3*ee67461eSJoseph Mingrone * Copyright (c) 1993, 1994, 1995, 1996, 1997 4*ee67461eSJoseph Mingrone * The Regents of the University of California. All rights reserved. 5*ee67461eSJoseph Mingrone * 6*ee67461eSJoseph Mingrone * Redistribution and use in source and binary forms, with or without 7*ee67461eSJoseph Mingrone * modification, are permitted provided that the following conditions 8*ee67461eSJoseph Mingrone * are met: 9*ee67461eSJoseph Mingrone * 1. Redistributions of source code must retain the above copyright 10*ee67461eSJoseph Mingrone * notice, this list of conditions and the following disclaimer. 11*ee67461eSJoseph Mingrone * 2. Redistributions in binary form must reproduce the above copyright 12*ee67461eSJoseph Mingrone * notice, this list of conditions and the following disclaimer in the 13*ee67461eSJoseph Mingrone * documentation and/or other materials provided with the distribution. 14*ee67461eSJoseph Mingrone * 3. All advertising materials mentioning features or use of this software 15*ee67461eSJoseph Mingrone * must display the following acknowledgement: 16*ee67461eSJoseph Mingrone * This product includes software developed by the Computer Systems 17*ee67461eSJoseph Mingrone * Engineering Group at Lawrence Berkeley Laboratory. 18*ee67461eSJoseph Mingrone * 4. Neither the name of the University nor of the Laboratory may be used 19*ee67461eSJoseph Mingrone * to endorse or promote products derived from this software without 20*ee67461eSJoseph Mingrone * specific prior written permission. 21*ee67461eSJoseph Mingrone * 22*ee67461eSJoseph Mingrone * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*ee67461eSJoseph Mingrone * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*ee67461eSJoseph Mingrone * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*ee67461eSJoseph Mingrone * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*ee67461eSJoseph Mingrone * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*ee67461eSJoseph Mingrone * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*ee67461eSJoseph Mingrone * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*ee67461eSJoseph Mingrone * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*ee67461eSJoseph Mingrone * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*ee67461eSJoseph Mingrone * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*ee67461eSJoseph Mingrone * SUCH DAMAGE. 33*ee67461eSJoseph Mingrone */ 34*ee67461eSJoseph Mingrone 35*ee67461eSJoseph Mingrone #ifndef varattrs_h 36*ee67461eSJoseph Mingrone #define varattrs_h 37*ee67461eSJoseph Mingrone 38*ee67461eSJoseph Mingrone #include "compiler-tests.h" 39*ee67461eSJoseph Mingrone 40*ee67461eSJoseph Mingrone /* 41*ee67461eSJoseph Mingrone * Attributes to apply to variables, using various compiler-specific 42*ee67461eSJoseph Mingrone * extensions. 43*ee67461eSJoseph Mingrone */ 44*ee67461eSJoseph Mingrone 45*ee67461eSJoseph Mingrone #if __has_attribute(unused) \ 46*ee67461eSJoseph Mingrone || ND_IS_AT_LEAST_GNUC_VERSION(2,0) 47*ee67461eSJoseph Mingrone /* 48*ee67461eSJoseph Mingrone * Compiler with support for __attribute__((unused)), or GCC 2.0 and 49*ee67461eSJoseph Mingrone * later, so it supports __attribute__((unused)). 50*ee67461eSJoseph Mingrone */ 51*ee67461eSJoseph Mingrone #define _U_ __attribute__((unused)) 52*ee67461eSJoseph Mingrone #else 53*ee67461eSJoseph Mingrone /* 54*ee67461eSJoseph Mingrone * We don't know of any way to mark a variable as unused. 55*ee67461eSJoseph Mingrone */ 56*ee67461eSJoseph Mingrone #define _U_ 57*ee67461eSJoseph Mingrone #endif 58*ee67461eSJoseph Mingrone 59*ee67461eSJoseph Mingrone #endif 60