Mercurial > hg > CbC > CbC_gcc
comparison gcc/c/c-parser.c @ 115:4cb7a319550d
fix c-parser.c
author | mir3636 |
---|---|
date | Tue, 28 Nov 2017 19:31:15 +0900 |
parents | e234ee7b7292 |
children | fd00160c1b76 |
comparison
equal
deleted
inserted
replaced
114:e234ee7b7292 | 115:4cb7a319550d |
---|---|
8058 //tree ident; | 8058 //tree ident; |
8059 struct c_arg_info *args; | 8059 struct c_arg_info *args; |
8060 struct c_declspecs *specs; | 8060 struct c_declspecs *specs; |
8061 struct c_typespec t; | 8061 struct c_typespec t; |
8062 { | 8062 { |
8063 tree expr; | |
8064 push_scope (); | 8063 push_scope (); |
8065 declare_parm_level (); | 8064 declare_parm_level (); |
8066 /*tree retval_type = TREE_TYPE(retval_decl);*/ | 8065 /*tree retval_type = TREE_TYPE(retval_decl);*/ |
8067 | 8066 |
8068 _retval_decl = build_decl (loc, PARM_DECL, get_identifier ("_retval"), TREE_TYPE(retval_decl)); | 8067 _retval_decl = build_decl (loc, PARM_DECL, get_identifier ("_retval"), TREE_TYPE(retval_decl)); |
8075 DECL_SOURCE_LOCATION (_envp_decl) = loc; | 8074 DECL_SOURCE_LOCATION (_envp_decl) = loc; |
8076 DECL_ARTIFICIAL (_envp_decl) = 1; | 8075 DECL_ARTIFICIAL (_envp_decl) = 1; |
8077 DECL_ARG_TYPE (_envp_decl) = ptr_type_node; | 8076 DECL_ARG_TYPE (_envp_decl) = ptr_type_node; |
8078 pushdecl (_envp_decl); | 8077 pushdecl (_envp_decl); |
8079 finish_decl (_envp_decl, loc, NULL_TREE, NULL_TREE, NULL_TREE); | 8078 finish_decl (_envp_decl, loc, NULL_TREE, NULL_TREE, NULL_TREE); |
8080 struct c_declarator declarator; | 8079 |
8081 struct c_parm* parm; | 8080 args = get_parm_info(false, NULL); |
8082 struct c_declspecs *specs_parm = build_null_declspecs(); | |
8083 declspecs_add_type (loc, specs_parm, TREE_TYPE(retval_decl)); | |
8084 finish_declspecs (specs_parm); | |
8085 parm = build_c_parm (specs_parm, NULL_TREE, | |
8086 &declarator, loc); | |
8087 | |
8088 args = get_parm_info(false, expr); | |
8089 pop_scope(); | 8081 pop_scope(); |
8090 } | 8082 } |
8091 | 8083 |
8092 t.kind = ctsk_resword; | 8084 t.kind = ctsk_resword; |
8093 t.spec = get_identifier("void"); | 8085 t.spec = get_identifier("void"); |