From b30bce6b52996616cb627a68222fbf5d8be9d4b9 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 10 Oct 1999 13:02:41 +0000 Subject: ansidecl.h (HAVE_GCC_VERSION): New macro. include: * ansidecl.h (HAVE_GCC_VERSION): New macro. Use instead of explicitly testing __GNUC__ and __GNUC_MINOR__. (ATTRIBUTE_PRINTF): Use `__format__', not `format'. gcc: * cppinit.c: Use HAVE_GCC_VERSION instead of explicitly testing __GNUC__ and __GNUC_MINOR__. * gansidecl.h: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * toplev.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * varray.c: Likewise. * varray.h: Likewise. cp: * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing __GNUC__ and __GNUC_MINOR__. f: * proj.h: Use HAVE_GCC_VERSION instead of explicitly testing __GNUC__ and __GNUC_MINOR__. Don't define BUILT_WITH_270. Define macro UNUSED in terms of ATTRIBUTE_UNUSED. From-SVN: r29890 --- gcc/f/proj.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'gcc/f/proj.h') diff --git a/gcc/f/proj.h b/gcc/f/proj.h index 47fc2f9..96bb44a 100644 --- a/gcc/f/proj.h +++ b/gcc/f/proj.h @@ -31,18 +31,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #endif #include "system.j" -#if !defined (__GNUC__) || (__GNUC__ < 2) +#if ! HAVE_GCC_VERSION(2,0) #error "You have to use gcc 2.x to build g77 (might be fixed in g77-0.6)." #endif -#ifndef BUILT_WITH_270 -#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -#define BUILT_WITH_270 1 -#else -#define BUILT_WITH_270 0 -#endif -#endif /* !defined (BUILT_WITH_270) */ - /* Include files everyone gets. is needed for assert(). is needed for offsetof, but technically also NULL, size_t, ptrdiff_t, and so on. */ @@ -69,11 +61,7 @@ typedef enum #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) #ifndef UNUSED /* Compile with -DUNUSED= if cc doesn't support this. */ -#if BUILT_WITH_270 -#define UNUSED __attribute__ ((unused)) -#else /* !BUILT_WITH_270 */ -#define UNUSED -#endif /* !BUILT_WITH_270 */ +#define UNUSED ATTRIBUTE_UNUSED #endif /* !defined (UNUSED) */ #ifndef dmpout -- cgit v1.1