Mercurial > hg > CbC > CbC_gcc
comparison gcc/c-parser.c @ 106:85047c4f1ca4
add CbC-examples/rectypeTest
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 13 Jun 2012 17:18:58 +0900 |
parents | b3cfc7733d3f |
children | a3a2f64cf8f4 |
comparison
equal
deleted
inserted
replaced
105:b3cfc7733d3f | 106:85047c4f1ca4 |
---|---|
2170 tree value; | 2170 tree value; |
2171 struct c_typespec ret; | 2171 struct c_typespec ret; |
2172 value = make_node (IDENTIFIER_NODE); | 2172 value = make_node (IDENTIFIER_NODE); |
2173 ret = parser_xref_tag (loc, code, value); | 2173 ret = parser_xref_tag (loc, code, value); |
2174 | 2174 |
2175 // ret.spec->base.lang_flag_3 = 1; | |
2176 IS_SELFTYPE (ret.spec) = 1; | 2175 IS_SELFTYPE (ret.spec) = 1; |
2177 declspecs_add_type (loc, specs, ret); | 2176 declspecs_add_type (loc, specs, ret); |
2178 c_parser_consume_token (parser); | 2177 c_parser_consume_token (parser); |
2179 break; | 2178 break; |
2180 #endif | 2179 #endif |
2519 if(TREE_CODE(decls) == FIELD_DECL && TREE_CODE(type) == RECORD_TYPE) { | 2518 if(TREE_CODE(decls) == FIELD_DECL && TREE_CODE(type) == RECORD_TYPE) { |
2520 tree tmptype = decls; | 2519 tree tmptype = decls; |
2521 while(TREE_CODE (TREE_TYPE (tmptype)) == POINTER_TYPE) | 2520 while(TREE_CODE (TREE_TYPE (tmptype)) == POINTER_TYPE) |
2522 tmptype = TREE_TYPE(tmptype); | 2521 tmptype = TREE_TYPE(tmptype); |
2523 if(IS_SELFTYPE ( TREE_TYPE (tmptype))) TREE_TYPE(tmptype) = type; | 2522 if(IS_SELFTYPE ( TREE_TYPE (tmptype))) TREE_TYPE(tmptype) = type; |
2523 if(IS_RECTYPE ( TREE_TYPE (tmptype))) TREE_TYPE(tmptype) = type; | |
2524 } | 2524 } |
2525 | 2525 |
2526 #endif | 2526 #endif |
2527 | 2527 |
2528 contents = chainon (decls, contents); | 2528 contents = chainon (decls, contents); |