--with-gnu-ld uses different x- fiile under aix 4.1
[official-gcc.git] / gcc / gansidecl.h
blob5929f152ad9642686a8afc1662bafa127dba62ba
1 /* ANSI and traditional C compatibility macros.
2 Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* This file mimics some of the support provided by include/ansidecl.h
22 in binutils and gdb releases.
23 ??? Over time the two should be merged into one. */
25 #ifndef __GANSIDECL_H__
26 #define __GANSIDECL_H__
28 #include "ansidecl.h"
30 /* Undef ansidecl.h's "obsolete" version. */
31 #undef PROTO
32 /* These macros are deprecated, use ansidecl.h's PARAMS style instead. */
33 #define PROTO(ARGS) PARAMS(ARGS)
34 #define VPROTO(ARGS) VPARAMS(ARGS)
35 #define PVPROTO(ARGS) PARAMS(ARGS)
37 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
38 # define __attribute__(x)
39 #endif
41 #ifndef ATTRIBUTE_UNUSED_LABEL
42 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93)
43 # define ATTRIBUTE_UNUSED_LABEL
44 # else
45 # define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
46 # endif /* GNUC < 2.93 */
47 #endif /* ATTRIBUTE_UNUSED_LABEL */
49 #ifndef ATTRIBUTE_UNUSED
50 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
51 #endif /* ATTRIBUTE_UNUSED */
53 #ifndef ATTRIBUTE_NORETURN
54 #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
55 #endif /* ATTRIBUTE_NORETURN */
57 #ifndef ATTRIBUTE_PRINTF
58 #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n)))
59 #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
60 #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
61 #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
62 #define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
63 #define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
64 #endif /* ATTRIBUTE_PRINTF */
66 #define GENERIC_PTR PTR
68 #ifndef NULL_PTR
69 #define NULL_PTR ((PTR) 0)
70 #endif
72 #endif /* __GANSIDECL_H__ */