This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
include/ansidecl patch from binutils
- To: gcc-patches at gcc dot gnu dot org
- Subject: include/ansidecl patch from binutils
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 26 Jul 1999 13:21:25 -0600
- Reply-To: law at cygnus dot com
Sucking in another patch from binutils:
Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/include/ChangeLog,v
retrieving revision 1.16
diff -c -3 -p -r1.16 ChangeLog
*** ChangeLog 1999/04/07 04:24:18 1.16
--- ChangeLog 1999/07/26 19:06:03
***************
*** 1,3 ****
--- 1,7 ----
+ 1999-07-11 Ian Lance Taylor <ian@zembu.com>
+
+ * ansidecl.h: Copy attribute support macros from egcs.
+
1999-04-02 Mark Mitchell <mark@codesourcery.com>
* splay-tree.h (splay_tree_compare_pointers): Declare.
Index: ansidecl.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/include/ansidecl.h,v
retrieving revision 1.2
diff -c -3 -p -r1.2 ansidecl.h
*** ansidecl.h 1998/11/08 14:45:37 1.2
--- ansidecl.h 1999/07/26 19:06:03
***************
*** 1,5 ****
/* ANSI and traditional C compatability macros
! Copyright 1991, 1992, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
--- 1,5 ----
/* ANSI and traditional C compatability macros
! Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
*************** Foundation, Inc., 59 Temple Place - Suit
*** 159,163 ****
--- 159,196 ----
#endif /* ! IN_GCC */
#endif /* ANSI C. */
+
+ /* Define macros for some gcc attributes. This permits us to use the
+ macros freely, and know that they will come into play for the
+ version of gcc in which they are supported. */
+
+ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+ # define __attribute__(x)
+ #endif
+
+ #ifndef ATTRIBUTE_UNUSED_LABEL
+ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93)
+ # define ATTRIBUTE_UNUSED_LABEL
+ # else
+ # define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+ # endif /* GNUC < 2.93 */
+ #endif /* ATTRIBUTE_UNUSED_LABEL */
+
+ #ifndef ATTRIBUTE_UNUSED
+ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+ #endif /* ATTRIBUTE_UNUSED */
+
+ #ifndef ATTRIBUTE_NORETURN
+ #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+ #endif /* ATTRIBUTE_NORETURN */
+
+ #ifndef ATTRIBUTE_PRINTF
+ #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n)))
+ #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
+ #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
+ #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+ #define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+ #define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
+ #endif /* ATTRIBUTE_PRINTF */
#endif /* ansidecl.h */