gcc源代码分析,grokparms ()函数分析

      arg_types = grokparms (TREE_OPERAND (declarator, 1),
                 funcdef_flag
                 /* Say it's a definition
                    only for the CALL_EXPR
                    closest to the identifier.  */

                 && TREE_CODE (TREE_OPERAND (declarator, 0)) == IDENTIFIER_NODE);


 <tree_list 956b0 permanent
    purpose <parm_decl 941c0
        type <pointer_type 9117c type <integer_type 91130* char>
            permanent unsigned SI
            size <integer_cst 8254c literal permanent 4
            align 32 size_unit 8 sep_unit 32 symtab 0
            chain <function_type 912c0>
        unsigned SI file /usr/include/stdio.h line 214 size <integer_cst 8254c 4>
        align 32 size_unit 8 offset 0 arguments <pointer_type 9117c>
    chain <tree_list 95698 permanent value <pointer_type 9117c> chain <tree_list 95698>
after grokparms
 <tree_list 95698 permanent
    value <pointer_type 9117c
        type <integer_type 91130 char readonly permanent QI
            size <integer_cst 82638 literal permanent 1
            align 8 size_unit 8 sep_unit 8 symtab 0
            sep <integer_cst 82608 literal permanent -128 precision 8 min <integer_cst 82608 -128>
            max <integer_cst 82620 literal permanent 127
            pointer_to_this <pointer_type 9117c>
        permanent unsigned SI
        size <integer_cst 8254c literal permanent 4
        align 32 size_unit 8 sep_unit 32 symtab 0
        chain <function_type 912c0>

grokparms ()函数和get_parm_info ()函数密切相关!

http://blog.csdn.net/oldlinux/article/details/42740103

中的关键的3个tree再拷贝过来一起分析!


in get_parm_info
 <parm_decl 941c0
    type <pointer_type 9117c
        type <integer_type 91130 char readonly permanent QI
            size <integer_cst 82638 literal permanent 1
            align 8 size_unit 8 sep_unit 8 symtab 0
            sep <integer_cst 82608 literal permanent -128 precision 8 min <integer_cst 82608 -128>
            max <integer_cst 82620 literal permanent 127
            pointer_to_this <pointer_type 9117c>
        permanent unsigned SI
        size <integer_cst 8254c literal permanent 4
        align 32 size_unit 8 sep_unit 32 symtab 0
        chain <function_type 912c0>
    unsigned SI file /usr/include/stdio.h line 214 size <integer_cst 8254c 4>
    align 32 size_unit 8 offset 0 arguments <pointer_type 9117c>
saveable_tree_cons
 <tree_list 95698 permanent
    value <pointer_type 9117c
        type <integer_type 91130 char readonly permanent QI
            size <integer_cst 82638 literal permanent 1
            align 8 size_unit 8 sep_unit 8 symtab 0
            sep <integer_cst 82608 literal permanent -128 precision 8 min <integer_cst 82608 -128>
            max <integer_cst 82620 literal permanent 127
            pointer_to_this <pointer_type 9117c>
        permanent unsigned SI
        size <integer_cst 8254c literal permanent 4
        align 32 size_unit 8 sep_unit 32 symtab 0
        chain <function_type 912c0>
saveable_tree_cons
 <tree_list 956b0 permanent
    purpose <parm_decl 941c0
        type <pointer_type 9117c type <integer_type 91130* char>
            permanent unsigned SI
            size <integer_cst 8254c literal permanent 4
            align 32 size_unit 8 sep_unit 32 symtab 0
            chain <function_type 912c0>
        unsigned SI file /usr/include/stdio.h line 214 size <integer_cst 8254c 4>
        align 32 size_unit 8 offset 0 arguments <pointer_type 9117c>
    chain <tree_list 95698 permanent value <pointer_type 9117c> chain <tree_list 95698>



你可能感兴趣的:(gcc,源代码,分析)