* decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
[official-gcc.git] / gcc / ginclude / va-clipper.h
blob213afca93f020b212c69d5feb7d290b93bc9857b
1 /* GNU C varargs and stdargs support for Clipper. */
3 /* Define __gnuc_va_list. */
5 #ifndef __GNUC_VA_LIST
6 #define __GNUC_VA_LIST
8 typedef struct
10 int __va_ap; /* pointer to stack args */
11 void *__va_reg[4]; /* pointer to r0,f0,r1,f1 */
12 int __va_num; /* number of args processed */
13 } __gnuc_va_list;
14 #endif /* not __GNUC_VA_LIST */
17 #if defined (_STDARG_H) || defined (_VARARGS_H)
18 typedef __gnuc_va_list va_list;
19 #define __va_list __gnuc_va_list /* acc compatibility */
21 #define _VA_LIST
22 #define _VA_LIST_
23 #define _SYS_INT_STDARG_H /* acc compatibility */
25 /* Call __builtin_next_arg even though we aren't using its value, so that
26 we can verify that LASTARG is correct. */
27 #ifdef _STDARG_H
28 #define va_start(AP,LASTARG) \
29 (__builtin_next_arg (LASTARG), \
30 (AP) = *(va_list *)__builtin_saveregs(), \
31 (AP).__va_num = __builtin_args_info (0), \
32 (AP).__va_ap += __builtin_args_info (1))
33 #else
34 #define va_alist __builtin_va_alist
35 /* The ... causes current_function_varargs to be set in cc1. */
36 #define va_dcl va_list __builtin_va_alist; ...
37 #define va_start(AP) \
38 ((AP) = *(va_list *)__builtin_saveregs(), \
39 (AP).__va_num = __builtin_args_info (0))
40 #endif /* _STDARG_H */
42 /* round to alignment of `type' but keep a least integer alignment */
43 #define __va_round(AP,TYPE) \
44 ((AP).__va_ap = ((AP).__va_ap + __alignof__ (TYPE) - 1 ) & \
45 ~(__alignof__ (TYPE) - 1), \
46 ((AP).__va_ap = ((AP).__va_ap + sizeof (int) - 1) & ~(sizeof (int) - 1)))
48 #define va_arg(AP, TYPE) \
49 (*((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12 \
50 ? (__builtin_classify_type (* (TYPE *)0) == 8 \
51 ? ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1]) \
52 : ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ])) \
53 : ((AP).__va_num++, __va_round (AP,TYPE), ((TYPE *)((AP).__va_ap))++)))
55 #define va_end(AP) ((void) 0)
57 /* Copy __gnuc_va_list into another variable of this type. */
58 #define __va_copy(dest, src) (dest) = (src)
60 #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */