1 /* GCC attributes. 2 Copyright 2004 Brian R. Gaeke. 3 4 This file is part of VMIPS. 5 6 VMIPS is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by the 8 Free Software Foundation; either version 2 of the License, or (at your 9 option) any later version. 10 11 VMIPS is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with VMIPS; if not, write to the Free Software Foundation, Inc., 18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 19 20 #ifndef _GCCATTR_H_ 21 #define _GCCATTR_H_ 22 23 /* First of all, pull in answers from autoconfiguration system. */ 24 #include "config.h" 25 26 /* Check whether we can use __attribute__. */ 27 #if HAVE_ATTRIBUTE_FORMAT 28 # define __ATTRIBUTE_FORMAT__(archetype, string_index, first_to_check) \ 29 __attribute__((format(archetype, string_index, first_to_check))) 30 #else 31 # define __ATTRIBUTE_FORMAT__(archetype, string_index, first_to_check) 32 #endif 33 #if HAVE_ATTRIBUTE_NORETURN 34 # define __ATTRIBUTE_NORETURN__ __attribute__((noreturn)) 35 #else 36 # define __ATTRIBUTE_NORETURN__ 37 #endif 38 39 #endif /* _GCCATTR_H_ */ 40