va_list: ppc
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Tue Aug 31 22:41:00 GMT 1999
At 12:47 06.08.99 , Franz Sirl wrote:
Only one nit, I changed it in both va_start and va_arg, but now I get:
>varargs3.c: In function `vvafunc':
>varargs3.c:10: first argument to `__builtin_va_arg' not of type `va_list'
>varargs3.c:12: first argument to `__builtin_va_arg' not of type `va_list'
Some more info about that one:
(gdb) r varargs3.i -quiet -dumpbase varargs3.c -version -o varargs3.s
Starting program: /home/fsirl/obj/gccm/gcc/cc1 varargs3.i -quiet -dumpbase
varargs3.c -version -o varargs3.s
GNU C version 2.96 19990810 (experimental) (ppc-redhat-linux) compiled by
GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
Breakpoint 1, expand_builtin_va_arg (valist=0x1af4148, type=0x1adeff8) at
../../../cvsx/gccm/gcc/builtins.c:1977
1977 if (TYPE_MAIN_VARIANT (TREE_TYPE (valist))
(gdb) l
1972 expand_builtin_va_arg (valist, type)
1973 tree valist, type;
1974 {
1975 rtx addr, result;
1976
1977 if (TYPE_MAIN_VARIANT (TREE_TYPE (valist))
1978 != TYPE_MAIN_VARIANT (va_list_type_node))
1979 {
1980 error ("first argument to `__builtin_va_arg' not of type
`va_list'");
1981 addr = const0_rtx;
(gdb) p debug_tree(valist)
<parm_decl 0x1af4148 ap
type <pointer_type 0x1ae49b8
type <record_type 0x1ae4518 allocated from permanent_obstack
permanent BLK
size <integer_cst 0x1ae4918 constant permanent 96>
align 32 symtab 0 alias set -1 fields <field_decl 0x1ae4640 gpr>
pointer_to_this <pointer_type 0x1ae49b8>>
allocated from permanent_obstack
unsigned permanent SI
size <integer_cst 0x1addc40 constant permanent 32>
align 32 symtab 0 alias set -1>
allocated from permanent_obstack
unsigned used permanent SI file varargs3.c line 4 size <integer_cst
0x1addc40 32>
align 32 context <function_decl 0x1af42d0 vvafunc>
result <array_type 0x1af3d30 va_list type <record_type 0x1ae4518>
allocated from permanent_obstack
permanent BLK
size <integer_cst 0x1ae4aa0 constant permanent 96>
align 32 symtab 0 alias set -1
domain <integer_type 0x1ae4948 allocated from permanent_obstack
permanent SI size <integer_cst 0x1addc40 32>
align 32 symtab 0 alias set -1 precision 32
min <integer_cst 0x1ae3d40 constant permanent 0> max
<integer_cst 0x1ae3d40 0>>> initial <pointer_type 0x1ae49b8>
(mem/f:SI (plus:SI (reg:SI 78 virtual-stack-vars)
(const_int 8 [0x8])) 0)
incoming-rtl (reg:SI 5 r5)>
$1 = void
(gdb) p debug_tree(va_list_type_node)
<array_type 0x1ae4a18 __builtin_va_list
type <record_type 0x1ae4518 allocated from permanent_obstack
permanent BLK
size <integer_cst 0x1ae4918 constant permanent 96>
align 32 symtab 0 alias set -1
fields <field_decl 0x1ae4640 gpr type <integer_type 0x1ae4578>
allocated from permanent_obstack
unsigned permanent QI file <built-in> line 0
size <integer_cst 0x1adddf8 constant permanent 8>
align 8
bitpos <integer_cst 0x1ae48a0 constant permanent 0> context
<record_type 0x1ae4518> arguments <integer_cst 0x1ae48a0 0> chain
<field_decl 0x1ae46e0 fpr>>
pointer_to_this <pointer_type 0x1ae49b8>>
allocated from permanent_obstack
permanent BLK
size <integer_cst 0x1ae4aa0 type <integer_type 0x1ae20d8 unsigned int>
constant permanent 96>
align 32 symtab 0 alias set -1
domain <integer_type 0x1ae4948 allocated from permanent_obstack
permanent SI
size <integer_cst 0x1addc40 constant permanent 32>
align 32 symtab 0 alias set -1 precision 32
min <integer_cst 0x1ae3d40 constant permanent 0> max <integer_cst
0x1ae3d40 0>>
pointer_to_this <pointer_type 0x1ae4b80>>
$2 = void
Franz.
More information about the Gcc-patches
mailing list