Mercurial > hg > CbC > CbC_gcc
diff gcc/c/c-decl.c @ 113:bdf41c9fa0b7
remove RECTYPE
author | mir3636 |
---|---|
date | Fri, 17 Nov 2017 06:33:55 +0900 |
parents | ab0bcb71f44d |
children | d34655255c78 |
line wrap: on
line diff
--- a/gcc/c/c-decl.c Fri Nov 10 19:46:38 2017 +0900 +++ b/gcc/c/c-decl.c Fri Nov 17 06:33:55 2017 +0900 @@ -5872,15 +5872,6 @@ } } -#ifndef noCbC - if ( declspecs->typespec_word == cts_CbC_rec ) - { - // IS_RECTYPE(type) = 1; - // type = build_code_segment_type (type, NULL_TREE); - IS_RECTYPE(type) = 1; - } -#endif - /* Now figure out the structure of the declarator proper. Descend through it, creating more complex types, until we reach the declared identifier (or NULL_TREE, in an absolute declarator). @@ -6478,12 +6469,6 @@ type = c_build_pointer_type (type); -#ifndef noCbC - if ( declspecs->typespec_word == cts_CbC_rec ){ - IS_RECTYPE(type) = 1; - } -#endif - /* Process type qualifiers (such as const or volatile) that were given inside the `*'. */ type_quals = declarator->u.pointer_quals; @@ -8619,15 +8604,8 @@ static void cbc_set_codesegment(tree fndecl){ tree args; tree *nextp; -// tree itype; -// tree icst; -// tree padding_array; -// tree list; int padding_size = CbC_STACK_SIZE; - //CbC_IS_CODE_SEGMENT(TREE_TYPE(fndecl)) = 1; - //CbC_IS_CODE_SEGMENT(fndecl) = 1; - nextp = & TYPE_ARG_TYPES (TREE_TYPE (fndecl)); for (args = TYPE_ARG_TYPES (TREE_TYPE (fndecl)); args; args = TREE_CHAIN (args)) @@ -8715,28 +8693,6 @@ if ( declspecs->typespec_word == cts_CbC_code ) { cbc_set_codesegment(decl1); - //CbC_IS_CODE_SEGMENT(TREE_TYPE(decl1)) = 1; - - - /* implementation of rectype */ - tree func_tree = TREE_TYPE(decl1); - // parm is PARM_DECL - tree parm = declarator->u.arg_info->parms; - while (parm) { - tree tmptype = parm; - if (!IS_RECTYPE(TREE_TYPE(tmptype))) { - parm = TREE_CHAIN(parm); - continue; - } - tree t = TREE_TYPE(tmptype); - while (TREE_CODE(t) == POINTER_TYPE) { - tmptype = t; - t= TREE_TYPE(tmptype); - } - TREE_TYPE(tmptype) = func_tree; - parm = TREE_CHAIN(parm); - } - } #endif @@ -10087,10 +10043,6 @@ error_at (loc, ("both %<long%> and %<void%> in " "declaration specifiers")); - else if (specs->typespec_word == cts_CbC_rec) - error_at (loc, - ("both %<long%> and %<void%> in " - "declaration specifiers")); #endif else if (specs->typespec_word == cts_int_n) error_at (loc, @@ -10154,10 +10106,6 @@ error_at (loc, ("both %<short%> and %<void%> in " "declaration specifiers")); - else if (specs->typespec_word == cts_CbC_rec) - error_at (loc, - ("both %<short%> and %<void%> in " - "declaration specifiers")); #endif else if (specs->typespec_word == cts_int_n) error_at (loc, @@ -10225,10 +10173,6 @@ error_at (loc, ("both %<signed%> and %<void%> in " "declaration specifiers")); - else if (specs->typespec_word == cts_CbC_rec) - error_at (loc, - ("both %<signed%> and %<void%> in " - "declaration specifiers")); #endif else if (specs->typespec_word == cts_bool) error_at (loc, @@ -10287,10 +10231,6 @@ error_at (loc, ("both %<unsigned%> and %<void%> in " "declaration specifiers")); - else if (specs->typespec_word == cts_CbC_rec) - error_at (loc, - ("both %<unsigned%> and %<void%> in " - "declaration specifiers")); #endif else if (specs->typespec_word == cts_bool) error_at (loc, @@ -10348,10 +10288,6 @@ error_at (loc, ("both %<complex%> and %<void%> in " "declaration specifiers")); - else if (specs->typespec_word == cts_CbC_rec) - error_at (loc, - ("both %<complex%> and %<void%> in " - "declaration specifiers")); #endif else if (specs->typespec_word == cts_bool) @@ -10605,30 +10541,6 @@ else specs->typespec_word = cts_CbC_code; return specs; - case RID_CbC_REC: - if (specs->long_p) - error_at (loc, - ("both %<long%> and %<_Bool%> in " - "declaration specifiers")); - else if (specs->short_p) - error_at (loc, - ("both %<short%> and %<_Bool%> in " - "declaration specifiers")); - else if (specs->signed_p) - error_at (loc, - ("both %<signed%> and %<_Bool%> in " - "declaration specifiers")); - else if (specs->unsigned_p) - error_at (loc, - ("both %<unsigned%> and %<_Bool%> in " - "declaration specifiers")); - else if (specs->complex_p) - error_at (loc, - ("both %<complex%> and %<_Bool%> in " - "declaration specifiers")); - else - specs->typespec_word = cts_CbC_rec; - return specs; #endif case RID_BOOL: if (!in_system_header_at (loc)) @@ -11204,7 +11116,6 @@ case cts_void: #ifndef noCbC case cts_CbC_code: - case cts_CbC_rec: #endif gcc_assert (!specs->long_p && !specs->short_p && !specs->signed_p && !specs->unsigned_p