Lines Matching refs:specs

4800 quals_from_declspecs (const struct c_declspecs *specs)  in quals_from_declspecs()  argument
4802 int quals = ((specs->const_p ? TYPE_QUAL_CONST : 0) in quals_from_declspecs()
4803 | (specs->volatile_p ? TYPE_QUAL_VOLATILE : 0) in quals_from_declspecs()
4804 | (specs->restrict_p ? TYPE_QUAL_RESTRICT : 0) in quals_from_declspecs()
4805 | (specs->atomic_p ? TYPE_QUAL_ATOMIC : 0) in quals_from_declspecs()
4806 | (ENCODE_QUAL_ADDR_SPACE (specs->address_space))); in quals_from_declspecs()
4807 gcc_assert (!specs->type in quals_from_declspecs()
4808 && !specs->decl_attr in quals_from_declspecs()
4809 && specs->typespec_word == cts_none in quals_from_declspecs()
4810 && specs->storage_class == csc_none in quals_from_declspecs()
4811 && !specs->typedef_p in quals_from_declspecs()
4812 && !specs->explicit_signed_p in quals_from_declspecs()
4813 && !specs->deprecated_p in quals_from_declspecs()
4814 && !specs->long_p in quals_from_declspecs()
4815 && !specs->long_long_p in quals_from_declspecs()
4816 && !specs->short_p in quals_from_declspecs()
4817 && !specs->signed_p in quals_from_declspecs()
4818 && !specs->unsigned_p in quals_from_declspecs()
4819 && !specs->complex_p in quals_from_declspecs()
4820 && !specs->inline_p in quals_from_declspecs()
4821 && !specs->noreturn_p in quals_from_declspecs()
4822 && !specs->thread_p); in quals_from_declspecs()
4931 tree attrs = type_name->specs->attrs; in groktypename()
4933 type_name->specs->attrs = NULL_TREE; in groktypename()
4935 type = grokdeclarator (type_name->declarator, type_name->specs, TYPENAME, in groktypename()
5591 tree decl = grokdeclarator (parm->declarator, parm->specs, PARM, false, in grokparm()
5610 decl = grokdeclarator (parm->declarator, parm->specs, PARM, false, NULL, in push_parm_decl()
5739 && (type_name->specs->typespec_kind == ctsk_tagdef in check_compound_literal_type()
5740 || type_name->specs->typespec_kind == ctsk_tagfirstref in check_compound_literal_type()
5741 || type_name->specs->typespec_kind == ctsk_tagfirstref_attrs)) in check_compound_literal_type()
10293 build_c_parm (struct c_declspecs *specs, tree attrs, in build_c_parm() argument
10298 ret->specs = specs; in build_c_parm()
10397 struct c_declspecs *specs, addr_space_t as) in declspecs_add_addrspace() argument
10399 specs->non_sc_seen_p = true; in declspecs_add_addrspace()
10400 specs->declspecs_seen_p = true; in declspecs_add_addrspace()
10401 specs->non_std_attrs_seen_p = true; in declspecs_add_addrspace()
10403 if (!ADDR_SPACE_GENERIC_P (specs->address_space) in declspecs_add_addrspace()
10404 && specs->address_space != as) in declspecs_add_addrspace()
10407 c_addr_space_name (specs->address_space)); in declspecs_add_addrspace()
10410 specs->address_space = as; in declspecs_add_addrspace()
10411 specs->locations[cdw_address_space] = location; in declspecs_add_addrspace()
10413 return specs; in declspecs_add_addrspace()
10421 struct c_declspecs *specs, tree qual) in declspecs_add_qual() argument
10425 specs->non_sc_seen_p = true; in declspecs_add_qual()
10426 specs->declspecs_seen_p = true; in declspecs_add_qual()
10427 specs->non_std_attrs_seen_p = true; in declspecs_add_qual()
10435 dupe = specs->const_p; in declspecs_add_qual()
10436 specs->const_p = true; in declspecs_add_qual()
10437 prev_loc = specs->locations[cdw_const]; in declspecs_add_qual()
10438 specs->locations[cdw_const] = loc; in declspecs_add_qual()
10441 dupe = specs->volatile_p; in declspecs_add_qual()
10442 specs->volatile_p = true; in declspecs_add_qual()
10443 prev_loc = specs->locations[cdw_volatile]; in declspecs_add_qual()
10444 specs->locations[cdw_volatile] = loc; in declspecs_add_qual()
10447 dupe = specs->restrict_p; in declspecs_add_qual()
10448 specs->restrict_p = true; in declspecs_add_qual()
10449 prev_loc = specs->locations[cdw_restrict]; in declspecs_add_qual()
10450 specs->locations[cdw_restrict] = loc; in declspecs_add_qual()
10453 dupe = specs->atomic_p; in declspecs_add_qual()
10454 specs->atomic_p = true; in declspecs_add_qual()
10455 prev_loc = specs->locations[cdw_atomic]; in declspecs_add_qual()
10456 specs->locations[cdw_atomic] = loc; in declspecs_add_qual()
10473 return specs; in declspecs_add_qual()
10480 declspecs_add_type (location_t loc, struct c_declspecs *specs, in declspecs_add_type() argument
10484 specs->non_sc_seen_p = true; in declspecs_add_type()
10485 specs->declspecs_seen_p = true; in declspecs_add_type()
10486 specs->non_std_attrs_seen_p = true; in declspecs_add_type()
10487 specs->typespec_kind = spec.kind; in declspecs_add_type()
10489 specs->deprecated_p = true; in declspecs_add_type()
10497 if (specs->type) in declspecs_add_type()
10500 return specs; in declspecs_add_type()
10509 if (specs->long_long_p) in declspecs_add_type()
10514 if (specs->long_p) in declspecs_add_type()
10516 if (specs->typespec_word == cts_double) in declspecs_add_type()
10525 specs->long_long_p = 1; in declspecs_add_type()
10526 specs->locations[cdw_long_long] = loc; in declspecs_add_type()
10529 if (specs->short_p) in declspecs_add_type()
10533 else if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10537 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10541 else if (specs->typespec_word == cts_int_n) in declspecs_add_type()
10545 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10546 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10550 else if (specs->typespec_word == cts_char) in declspecs_add_type()
10554 else if (specs->typespec_word == cts_float) in declspecs_add_type()
10558 else if (specs->typespec_word == cts_floatn_nx) in declspecs_add_type()
10562 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
10563 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
10566 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10570 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10574 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10580 specs->long_p = true; in declspecs_add_type()
10581 specs->locations[cdw_long] = loc; in declspecs_add_type()
10585 dupe = specs->short_p; in declspecs_add_type()
10586 if (specs->long_p) in declspecs_add_type()
10590 else if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10594 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10598 else if (specs->typespec_word == cts_int_n) in declspecs_add_type()
10602 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10603 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10607 else if (specs->typespec_word == cts_char) in declspecs_add_type()
10611 else if (specs->typespec_word == cts_float) in declspecs_add_type()
10615 else if (specs->typespec_word == cts_double) in declspecs_add_type()
10619 else if (specs->typespec_word == cts_floatn_nx) in declspecs_add_type()
10623 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
10624 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
10627 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10631 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10635 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10641 specs->short_p = true; in declspecs_add_type()
10642 specs->locations[cdw_short] = loc; in declspecs_add_type()
10646 dupe = specs->signed_p; in declspecs_add_type()
10647 if (specs->unsigned_p) in declspecs_add_type()
10651 else if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10655 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10659 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10663 else if (specs->typespec_word == cts_float) in declspecs_add_type()
10667 else if (specs->typespec_word == cts_double) in declspecs_add_type()
10671 else if (specs->typespec_word == cts_floatn_nx) in declspecs_add_type()
10675 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
10676 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
10679 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10683 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10687 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10693 specs->signed_p = true; in declspecs_add_type()
10694 specs->locations[cdw_signed] = loc; in declspecs_add_type()
10698 dupe = specs->unsigned_p; in declspecs_add_type()
10699 if (specs->signed_p) in declspecs_add_type()
10703 else if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10707 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10711 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10715 else if (specs->typespec_word == cts_float) in declspecs_add_type()
10719 else if (specs->typespec_word == cts_double) in declspecs_add_type()
10723 else if (specs->typespec_word == cts_floatn_nx) in declspecs_add_type()
10727 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
10728 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
10731 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10735 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10739 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10745 specs->unsigned_p = true; in declspecs_add_type()
10746 specs->locations[cdw_unsigned] = loc; in declspecs_add_type()
10750 dupe = specs->complex_p; in declspecs_add_type()
10754 if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10758 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10762 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10766 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10770 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10774 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10778 else if (specs->typespec_word == cts_fract) in declspecs_add_type()
10782 else if (specs->typespec_word == cts_accum) in declspecs_add_type()
10786 else if (specs->saturating_p) in declspecs_add_type()
10792 specs->complex_p = true; in declspecs_add_type()
10793 specs->locations[cdw_complex] = loc; in declspecs_add_type()
10797 dupe = specs->saturating_p; in declspecs_add_type()
10800 if (specs->typespec_word == cts_int_n) in declspecs_add_type()
10805 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10807 else if (specs->typespec_word == cts_auto_type) in declspecs_add_type()
10811 else if (specs->typespec_word == cts_void) in declspecs_add_type()
10815 else if (specs->typespec_word == cts_bool) in declspecs_add_type()
10819 else if (specs->typespec_word == cts_char) in declspecs_add_type()
10823 else if (specs->typespec_word == cts_int) in declspecs_add_type()
10827 else if (specs->typespec_word == cts_float) in declspecs_add_type()
10831 else if (specs->typespec_word == cts_double) in declspecs_add_type()
10835 else if (specs->typespec_word == cts_floatn_nx) in declspecs_add_type()
10839 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
10840 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
10843 else if (specs->typespec_word == cts_dfloat32) in declspecs_add_type()
10847 else if (specs->typespec_word == cts_dfloat64) in declspecs_add_type()
10851 else if (specs->typespec_word == cts_dfloat128) in declspecs_add_type()
10855 else if (specs->complex_p) in declspecs_add_type()
10861 specs->saturating_p = true; in declspecs_add_type()
10862 specs->locations[cdw_saturating] = loc; in declspecs_add_type()
10872 return specs; in declspecs_add_type()
10880 if (specs->typespec_word != cts_none) in declspecs_add_type()
10884 return specs; in declspecs_add_type()
10889 if (specs->long_p) in declspecs_add_type()
10893 else if (specs->short_p) in declspecs_add_type()
10897 else if (specs->signed_p) in declspecs_add_type()
10901 else if (specs->unsigned_p) in declspecs_add_type()
10905 else if (specs->complex_p) in declspecs_add_type()
10909 else if (specs->saturating_p) in declspecs_add_type()
10915 specs->typespec_word = cts_auto_type; in declspecs_add_type()
10916 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
10918 return specs; in declspecs_add_type()
10923 specs->int_n_idx = i - RID_INT_N_0; in declspecs_add_type()
10931 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10933 if (specs->long_p) in declspecs_add_type()
10937 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10938 else if (specs->saturating_p) in declspecs_add_type()
10942 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10943 else if (specs->short_p) in declspecs_add_type()
10947 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10948 else if (! int_n_enabled_p[specs->int_n_idx]) in declspecs_add_type()
10950 specs->typespec_word = cts_int_n; in declspecs_add_type()
10953 int_n_data[specs->int_n_idx].bitsize); in declspecs_add_type()
10957 specs->typespec_word = cts_int_n; in declspecs_add_type()
10958 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
10960 return specs; in declspecs_add_type()
10962 if (specs->long_p) in declspecs_add_type()
10966 else if (specs->short_p) in declspecs_add_type()
10970 else if (specs->signed_p) in declspecs_add_type()
10974 else if (specs->unsigned_p) in declspecs_add_type()
10978 else if (specs->complex_p) in declspecs_add_type()
10982 else if (specs->saturating_p) in declspecs_add_type()
10988 specs->typespec_word = cts_void; in declspecs_add_type()
10989 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
10991 return specs; in declspecs_add_type()
10996 if (specs->long_p) in declspecs_add_type()
11000 else if (specs->short_p) in declspecs_add_type()
11004 else if (specs->signed_p) in declspecs_add_type()
11008 else if (specs->unsigned_p) in declspecs_add_type()
11012 else if (specs->complex_p) in declspecs_add_type()
11016 else if (specs->saturating_p) in declspecs_add_type()
11022 specs->typespec_word = cts_bool; in declspecs_add_type()
11023 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11025 return specs; in declspecs_add_type()
11027 if (specs->long_p) in declspecs_add_type()
11031 else if (specs->short_p) in declspecs_add_type()
11035 else if (specs->saturating_p) in declspecs_add_type()
11041 specs->typespec_word = cts_char; in declspecs_add_type()
11042 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11044 return specs; in declspecs_add_type()
11046 if (specs->saturating_p) in declspecs_add_type()
11052 specs->typespec_word = cts_int; in declspecs_add_type()
11053 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11055 return specs; in declspecs_add_type()
11057 if (specs->long_p) in declspecs_add_type()
11061 else if (specs->short_p) in declspecs_add_type()
11065 else if (specs->signed_p) in declspecs_add_type()
11069 else if (specs->unsigned_p) in declspecs_add_type()
11073 else if (specs->saturating_p) in declspecs_add_type()
11079 specs->typespec_word = cts_float; in declspecs_add_type()
11080 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11082 return specs; in declspecs_add_type()
11084 if (specs->long_long_p) in declspecs_add_type()
11088 else if (specs->short_p) in declspecs_add_type()
11092 else if (specs->signed_p) in declspecs_add_type()
11096 else if (specs->unsigned_p) in declspecs_add_type()
11100 else if (specs->saturating_p) in declspecs_add_type()
11106 specs->typespec_word = cts_double; in declspecs_add_type()
11107 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11109 return specs; in declspecs_add_type()
11111 specs->floatn_nx_idx = i - RID_FLOATN_NX_FIRST; in declspecs_add_type()
11115 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11116 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11120 if (specs->long_p) in declspecs_add_type()
11124 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11125 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11128 else if (specs->short_p) in declspecs_add_type()
11132 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11133 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11136 else if (specs->signed_p) in declspecs_add_type()
11140 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11141 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11144 else if (specs->unsigned_p) in declspecs_add_type()
11148 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11149 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11152 else if (specs->saturating_p) in declspecs_add_type()
11156 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11157 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11160 else if (FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx) == NULL_TREE) in declspecs_add_type()
11162 specs->typespec_word = cts_floatn_nx; in declspecs_add_type()
11165 floatn_nx_types[specs->floatn_nx_idx].n, in declspecs_add_type()
11166 (floatn_nx_types[specs->floatn_nx_idx].extended in declspecs_add_type()
11172 specs->typespec_word = cts_floatn_nx; in declspecs_add_type()
11173 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11175 return specs; in declspecs_add_type()
11187 if (specs->long_long_p) in declspecs_add_type()
11192 if (specs->long_p) in declspecs_add_type()
11197 else if (specs->short_p) in declspecs_add_type()
11202 else if (specs->signed_p) in declspecs_add_type()
11207 else if (specs->unsigned_p) in declspecs_add_type()
11212 else if (specs->complex_p) in declspecs_add_type()
11217 else if (specs->saturating_p) in declspecs_add_type()
11223 specs->typespec_word = cts_dfloat32; in declspecs_add_type()
11225 specs->typespec_word = cts_dfloat64; in declspecs_add_type()
11227 specs->typespec_word = cts_dfloat128; in declspecs_add_type()
11228 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11237 return specs; in declspecs_add_type()
11246 if (specs->complex_p) in declspecs_add_type()
11252 specs->typespec_word = cts_fract; in declspecs_add_type()
11254 specs->typespec_word = cts_accum; in declspecs_add_type()
11255 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11262 return specs; in declspecs_add_type()
11275 if (specs->type || specs->typespec_word != cts_none in declspecs_add_type()
11276 || specs->long_p || specs->short_p || specs->signed_p in declspecs_add_type()
11277 || specs->unsigned_p || specs->complex_p) in declspecs_add_type()
11285 specs->type = TREE_TYPE (type); in declspecs_add_type()
11286 specs->decl_attr = DECL_ATTRIBUTES (type); in declspecs_add_type()
11287 specs->typedef_p = true; in declspecs_add_type()
11288 specs->explicit_signed_p = C_TYPEDEF_EXPLICITLY_SIGNED (type); in declspecs_add_type()
11289 specs->locations[cdw_typedef] = loc; in declspecs_add_type()
11314 specs->type = TREE_TYPE (t); in declspecs_add_type()
11315 specs->locations[cdw_typespec] = loc; in declspecs_add_type()
11322 specs->typedef_p = true; in declspecs_add_type()
11323 specs->locations[cdw_typedef] = loc; in declspecs_add_type()
11326 if (specs->expr) in declspecs_add_type()
11327 specs->expr = build2 (COMPOUND_EXPR, TREE_TYPE (spec.expr), in declspecs_add_type()
11328 specs->expr, spec.expr); in declspecs_add_type()
11330 specs->expr = spec.expr; in declspecs_add_type()
11331 specs->expr_const_operands &= spec.expr_const_operands; in declspecs_add_type()
11334 specs->type = type; in declspecs_add_type()
11337 return specs; in declspecs_add_type()
11345 struct c_declspecs *specs, in declspecs_add_scspec() argument
11351 specs->declspecs_seen_p = true; in declspecs_add_scspec()
11352 specs->non_std_attrs_seen_p = true; in declspecs_add_scspec()
11356 if (specs->non_sc_seen_p) in declspecs_add_scspec()
11367 specs->inline_p = true; in declspecs_add_scspec()
11368 specs->locations[cdw_inline] = loc; in declspecs_add_scspec()
11373 specs->noreturn_p = true; in declspecs_add_scspec()
11374 specs->locations[cdw_noreturn] = loc; in declspecs_add_scspec()
11377 dupe = specs->thread_p; in declspecs_add_scspec()
11378 if (specs->storage_class == csc_auto) in declspecs_add_scspec()
11380 else if (specs->storage_class == csc_register) in declspecs_add_scspec()
11382 else if (specs->storage_class == csc_typedef) in declspecs_add_scspec()
11386 specs->thread_p = true; in declspecs_add_scspec()
11387 specs->thread_gnu_p = (strcmp (IDENTIFIER_POINTER (scspec), in declspecs_add_scspec()
11393 if (!specs->thread_gnu_p) in declspecs_add_scspec()
11402 specs->locations[cdw_thread] = loc; in declspecs_add_scspec()
11411 if (specs->thread_p && specs->thread_gnu_p) in declspecs_add_scspec()
11420 if (specs->thread_p && specs->thread_gnu_p) in declspecs_add_scspec()
11429 if (n != csc_none && n == specs->storage_class) in declspecs_add_scspec()
11440 if (specs->storage_class != csc_none && n != specs->storage_class) in declspecs_add_scspec()
11446 specs->storage_class = n; in declspecs_add_scspec()
11447 specs->locations[cdw_storage_class] = loc; in declspecs_add_scspec()
11448 if (n != csc_extern && n != csc_static && specs->thread_p) in declspecs_add_scspec()
11451 specs->thread_gnu_p ? "__thread" : "_Thread_local", in declspecs_add_scspec()
11453 specs->thread_p = false; in declspecs_add_scspec()
11457 return specs; in declspecs_add_scspec()
11464 declspecs_add_attrs (location_t loc, struct c_declspecs *specs, tree attrs) in declspecs_add_attrs() argument
11466 specs->attrs = chainon (attrs, specs->attrs); in declspecs_add_attrs()
11467 specs->locations[cdw_attributes] = loc; in declspecs_add_attrs()
11468 specs->declspecs_seen_p = true; in declspecs_add_attrs()
11471 specs->non_std_attrs_seen_p = true; in declspecs_add_attrs()
11472 return specs; in declspecs_add_attrs()
11480 struct c_declspecs *specs, tree align) in declspecs_add_alignas() argument
11482 specs->alignas_p = true; in declspecs_add_alignas()
11483 specs->locations[cdw_alignas] = loc; in declspecs_add_alignas()
11485 return specs; in declspecs_add_alignas()
11491 if (align_log > specs->align_log) in declspecs_add_alignas()
11492 specs->align_log = align_log; in declspecs_add_alignas()
11493 return specs; in declspecs_add_alignas()
11503 finish_declspecs (struct c_declspecs *specs) in finish_declspecs() argument
11507 if (specs->type != NULL_TREE) in finish_declspecs()
11509 gcc_assert (!specs->long_p && !specs->long_long_p && !specs->short_p in finish_declspecs()
11510 && !specs->signed_p && !specs->unsigned_p in finish_declspecs()
11511 && !specs->complex_p); in finish_declspecs()
11514 if (TREE_CODE (specs->type) == ERROR_MARK) in finish_declspecs()
11515 specs->type = integer_type_node; in finish_declspecs()
11524 if (specs->typespec_word == cts_none) in finish_declspecs()
11526 if (specs->saturating_p) in finish_declspecs()
11528 error_at (specs->locations[cdw_saturating], in finish_declspecs()
11531 error_at (specs->locations[cdw_saturating], in finish_declspecs()
11533 specs->typespec_word = cts_fract; in finish_declspecs()
11535 else if (specs->long_p || specs->short_p in finish_declspecs()
11536 || specs->signed_p || specs->unsigned_p) in finish_declspecs()
11538 specs->typespec_word = cts_int; in finish_declspecs()
11540 else if (specs->complex_p) in finish_declspecs()
11542 specs->typespec_word = cts_double; in finish_declspecs()
11543 pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, in finish_declspecs()
11549 specs->typespec_word = cts_int; in finish_declspecs()
11550 specs->default_int_p = true; in finish_declspecs()
11560 specs->explicit_signed_p = specs->signed_p; in finish_declspecs()
11563 switch (specs->typespec_word) in finish_declspecs()
11566 gcc_assert (!specs->long_p && !specs->short_p in finish_declspecs()
11567 && !specs->signed_p && !specs->unsigned_p in finish_declspecs()
11568 && !specs->complex_p); in finish_declspecs()
11570 if (specs->postfix_attrs) in finish_declspecs()
11574 gcc_assert (!specs->long_p && !specs->short_p in finish_declspecs()
11575 && !specs->signed_p && !specs->unsigned_p in finish_declspecs()
11576 && !specs->complex_p); in finish_declspecs()
11577 specs->type = void_type_node; in finish_declspecs()
11580 gcc_assert (!specs->long_p && !specs->short_p in finish_declspecs()
11581 && !specs->signed_p && !specs->unsigned_p in finish_declspecs()
11582 && !specs->complex_p); in finish_declspecs()
11583 specs->type = boolean_type_node; in finish_declspecs()
11586 gcc_assert (!specs->long_p && !specs->short_p); in finish_declspecs()
11587 gcc_assert (!(specs->signed_p && specs->unsigned_p)); in finish_declspecs()
11588 if (specs->signed_p) in finish_declspecs()
11589 specs->type = signed_char_type_node; in finish_declspecs()
11590 else if (specs->unsigned_p) in finish_declspecs()
11591 specs->type = unsigned_char_type_node; in finish_declspecs()
11593 specs->type = char_type_node; in finish_declspecs()
11594 if (specs->complex_p) in finish_declspecs()
11596 pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, in finish_declspecs()
11598 specs->type = build_complex_type (specs->type); in finish_declspecs()
11602 gcc_assert (!specs->long_p && !specs->short_p && !specs->long_long_p); in finish_declspecs()
11603 gcc_assert (!(specs->signed_p && specs->unsigned_p)); in finish_declspecs()
11604 if (! int_n_enabled_p[specs->int_n_idx]) in finish_declspecs()
11605 specs->type = integer_type_node; in finish_declspecs()
11607 specs->type = (specs->unsigned_p in finish_declspecs()
11608 ? int_n_trees[specs->int_n_idx].unsigned_type in finish_declspecs()
11609 : int_n_trees[specs->int_n_idx].signed_type); in finish_declspecs()
11610 if (specs->complex_p) in finish_declspecs()
11612 pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, in finish_declspecs()
11614 specs->type = build_complex_type (specs->type); in finish_declspecs()
11618 gcc_assert (!(specs->long_p && specs->short_p)); in finish_declspecs()
11619 gcc_assert (!(specs->signed_p && specs->unsigned_p)); in finish_declspecs()
11620 if (specs->long_long_p) in finish_declspecs()
11621 specs->type = (specs->unsigned_p in finish_declspecs()
11624 else if (specs->long_p) in finish_declspecs()
11625 specs->type = (specs->unsigned_p in finish_declspecs()
11628 else if (specs->short_p) in finish_declspecs()
11629 specs->type = (specs->unsigned_p in finish_declspecs()
11633 specs->type = (specs->unsigned_p in finish_declspecs()
11636 if (specs->complex_p) in finish_declspecs()
11638 pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, in finish_declspecs()
11640 specs->type = build_complex_type (specs->type); in finish_declspecs()
11644 gcc_assert (!specs->long_p && !specs->short_p in finish_declspecs()
11645 && !specs->signed_p && !specs->unsigned_p); in finish_declspecs()
11646 specs->type = (specs->complex_p in finish_declspecs()
11651 gcc_assert (!specs->long_long_p && !specs->short_p in finish_declspecs()
11652 && !specs->signed_p && !specs->unsigned_p); in finish_declspecs()
11653 if (specs->long_p) in finish_declspecs()
11655 specs->type = (specs->complex_p in finish_declspecs()
11661 specs->type = (specs->complex_p in finish_declspecs()
11667 gcc_assert (!specs->long_p && !specs->short_p in finish_declspecs()
11668 && !specs->signed_p && !specs->unsigned_p); in finish_declspecs()
11669 if (FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx) == NULL_TREE) in finish_declspecs()
11670 specs->type = integer_type_node; in finish_declspecs()
11671 else if (specs->complex_p) in finish_declspecs()
11672 specs->type = COMPLEX_FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx); in finish_declspecs()
11674 specs->type = FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx); in finish_declspecs()
11679 gcc_assert (!specs->long_p && !specs->long_long_p && !specs->short_p in finish_declspecs()
11680 && !specs->signed_p && !specs->unsigned_p && !specs->complex_p); in finish_declspecs()
11682 specs->type = integer_type_node; in finish_declspecs()
11683 else if (specs->typespec_word == cts_dfloat32) in finish_declspecs()
11684 specs->type = dfloat32_type_node; in finish_declspecs()
11685 else if (specs->typespec_word == cts_dfloat64) in finish_declspecs()
11686 specs->type = dfloat64_type_node; in finish_declspecs()
11688 specs->type = dfloat128_type_node; in finish_declspecs()
11691 gcc_assert (!specs->complex_p); in finish_declspecs()
11693 specs->type = integer_type_node; in finish_declspecs()
11694 else if (specs->saturating_p) in finish_declspecs()
11696 if (specs->long_long_p) in finish_declspecs()
11697 specs->type = specs->unsigned_p in finish_declspecs()
11700 else if (specs->long_p) in finish_declspecs()
11701 specs->type = specs->unsigned_p in finish_declspecs()
11704 else if (specs->short_p) in finish_declspecs()
11705 specs->type = specs->unsigned_p in finish_declspecs()
11709 specs->type = specs->unsigned_p in finish_declspecs()
11715 if (specs->long_long_p) in finish_declspecs()
11716 specs->type = specs->unsigned_p in finish_declspecs()
11719 else if (specs->long_p) in finish_declspecs()
11720 specs->type = specs->unsigned_p in finish_declspecs()
11723 else if (specs->short_p) in finish_declspecs()
11724 specs->type = specs->unsigned_p in finish_declspecs()
11728 specs->type = specs->unsigned_p in finish_declspecs()
11734 gcc_assert (!specs->complex_p); in finish_declspecs()
11736 specs->type = integer_type_node; in finish_declspecs()
11737 else if (specs->saturating_p) in finish_declspecs()
11739 if (specs->long_long_p) in finish_declspecs()
11740 specs->type = specs->unsigned_p in finish_declspecs()
11743 else if (specs->long_p) in finish_declspecs()
11744 specs->type = specs->unsigned_p in finish_declspecs()
11747 else if (specs->short_p) in finish_declspecs()
11748 specs->type = specs->unsigned_p in finish_declspecs()
11752 specs->type = specs->unsigned_p in finish_declspecs()
11758 if (specs->long_long_p) in finish_declspecs()
11759 specs->type = specs->unsigned_p in finish_declspecs()
11762 else if (specs->long_p) in finish_declspecs()
11763 specs->type = specs->unsigned_p in finish_declspecs()
11766 else if (specs->short_p) in finish_declspecs()
11767 specs->type = specs->unsigned_p in finish_declspecs()
11771 specs->type = specs->unsigned_p in finish_declspecs()
11780 if (specs->type != NULL) in finish_declspecs()
11782 specs->postfix_attrs = c_warn_type_attributes (specs->postfix_attrs); in finish_declspecs()
11783 decl_attributes (&specs->type, specs->postfix_attrs, 0); in finish_declspecs()
11784 specs->postfix_attrs = NULL_TREE; in finish_declspecs()
11787 return specs; in finish_declspecs()