Lines Matching refs:declspecs
4947 get_type_quals (const cp_decl_specifier_seq *declspecs) in get_type_quals() argument
4951 if (decl_spec_seq_has_spec_p (declspecs, ds_const)) in get_type_quals()
4953 if (decl_spec_seq_has_spec_p (declspecs, ds_volatile)) in get_type_quals()
4955 if (decl_spec_seq_has_spec_p (declspecs, ds_restrict)) in get_type_quals()
4967 check_tag_decl (cp_decl_specifier_seq *declspecs, in check_tag_decl() argument
4970 int saw_friend = decl_spec_seq_has_spec_p (declspecs, ds_friend); in check_tag_decl()
4971 int saw_typedef = decl_spec_seq_has_spec_p (declspecs, ds_typedef); in check_tag_decl()
4979 if (declspecs->multiple_types_p) in check_tag_decl()
4980 error_at (smallest_type_location (declspecs), in check_tag_decl()
4982 else if (declspecs->redefined_builtin_type) in check_tag_decl()
4984 location_t loc = declspecs->locations[ds_redefined_builtin_type_spec]; in check_tag_decl()
4987 declspecs->redefined_builtin_type); in check_tag_decl()
4991 if (declspecs->type in check_tag_decl()
4992 && TYPE_P (declspecs->type) in check_tag_decl()
4993 && ((TREE_CODE (declspecs->type) != TYPENAME_TYPE in check_tag_decl()
4994 && MAYBE_CLASS_TYPE_P (declspecs->type)) in check_tag_decl()
4995 || TREE_CODE (declspecs->type) == ENUMERAL_TYPE)) in check_tag_decl()
4996 declared_type = declspecs->type; in check_tag_decl()
4997 else if (declspecs->type == error_mark_node) in check_tag_decl()
5002 error_at (declspecs->locations[ds_type_spec], in check_tag_decl()
5035 error_at (declspecs->locations[ds_typedef], in check_tag_decl()
5049 if (decl_spec_seq_has_spec_p (declspecs, ds_inline)) in check_tag_decl()
5050 error_at (declspecs->locations[ds_inline], in check_tag_decl()
5052 else if (decl_spec_seq_has_spec_p (declspecs, ds_virtual)) in check_tag_decl()
5053 error_at (declspecs->locations[ds_virtual], in check_tag_decl()
5058 error_at (declspecs->locations[ds_friend], in check_tag_decl()
5060 else if (decl_spec_seq_has_spec_p (declspecs, ds_explicit)) in check_tag_decl()
5061 error_at (declspecs->locations[ds_explicit], in check_tag_decl()
5063 else if (declspecs->storage_class) in check_tag_decl()
5064 error_at (declspecs->locations[ds_storage_class], in check_tag_decl()
5067 else if (decl_spec_seq_has_spec_p (declspecs, ds_const)) in check_tag_decl()
5068 error_at (declspecs->locations[ds_const], in check_tag_decl()
5071 else if (decl_spec_seq_has_spec_p (declspecs, ds_volatile)) in check_tag_decl()
5072 error_at (declspecs->locations[ds_volatile], in check_tag_decl()
5075 else if (decl_spec_seq_has_spec_p (declspecs, ds_restrict)) in check_tag_decl()
5076 error_at (declspecs->locations[ds_restrict], in check_tag_decl()
5079 else if (decl_spec_seq_has_spec_p (declspecs, ds_thread)) in check_tag_decl()
5080 error_at (declspecs->locations[ds_thread], in check_tag_decl()
5084 warning_at (declspecs->locations[ds_typedef], 0, in check_tag_decl()
5086 else if (decl_spec_seq_has_spec_p (declspecs, ds_constexpr)) in check_tag_decl()
5087 error_at (declspecs->locations[ds_constexpr], in check_tag_decl()
5089 else if (decl_spec_seq_has_spec_p (declspecs, ds_constinit)) in check_tag_decl()
5090 error_at (declspecs->locations[ds_constinit], in check_tag_decl()
5092 else if (decl_spec_seq_has_spec_p (declspecs, ds_consteval)) in check_tag_decl()
5093 error_at (declspecs->locations[ds_consteval], in check_tag_decl()
5097 if (declspecs->attributes && warn_attributes && declared_type) in check_tag_decl()
5143 shadow_tag (cp_decl_specifier_seq *declspecs) in shadow_tag() argument
5145 tree t = check_tag_decl (declspecs, in shadow_tag()
5166 declspecs, NORMAL, 0, NULL); in shadow_tag()
5224 cp_decl_specifier_seq *declspecs, in start_decl() argument
5245 decl = grokdeclarator (declarator, declspecs, NORMAL, initialized, in start_decl()
5428 if (decl_spec_seq_has_spec_p (declspecs, ds_constinit)) in start_decl()
9445 const cp_decl_specifier_seq *declspecs, in grokfndecl() argument
9589 error_at (declspecs->locations[ds_inline], in grokfndecl()
9665 error_at (declspecs->locations[ds_inline], in grokfndecl()
9668 error_at (declspecs->locations[ds_constexpr], in grokfndecl()
9671 error_at (declspecs->locations[ds_consteval], in grokfndecl()
9900 error_at (declspecs->locations[ds_type_spec], in grokfndecl()
10035 const cp_decl_specifier_seq *declspecs, in grokvardecl() argument
10059 if (declspecs->storage_class == sc_extern) in grokvardecl()
10087 if (declspecs->storage_class == sc_extern) in grokvardecl()
10104 TREE_PUBLIC (decl) = (declspecs->storage_class != sc_static in grokvardecl()
10114 TREE_STATIC (decl) = declspecs->storage_class == sc_static; in grokvardecl()
10118 if (decl_spec_seq_has_spec_p (declspecs, ds_thread)) in grokvardecl()
10126 if (declspecs->gnu_thread_keyword_p) in grokvardecl()
10164 error_at (declspecs->locations[ds_concept], in grokvardecl()
10171 error_at (declspecs->locations[ds_type_spec], in grokvardecl()
10796 smallest_type_location (const cp_decl_specifier_seq *declspecs) in smallest_type_location() argument
10798 int type_quals = get_type_quals (declspecs); in smallest_type_location()
10799 return smallest_type_location (type_quals, declspecs->locations); in smallest_type_location()
11021 cp_decl_specifier_seq *declspecs, in grokdeclarator() argument
11065 int type_quals = get_type_quals (declspecs); in grokdeclarator()
11090 bool typedef_p = decl_spec_seq_has_spec_p (declspecs, ds_typedef); in grokdeclarator()
11091 bool constexpr_p = decl_spec_seq_has_spec_p (declspecs, ds_constexpr); in grokdeclarator()
11092 bool constinit_p = decl_spec_seq_has_spec_p (declspecs, ds_constinit); in grokdeclarator()
11093 bool consteval_p = decl_spec_seq_has_spec_p (declspecs, ds_consteval); in grokdeclarator()
11098 signed_p = decl_spec_seq_has_spec_p (declspecs, ds_signed); in grokdeclarator()
11099 unsigned_p = decl_spec_seq_has_spec_p (declspecs, ds_unsigned); in grokdeclarator()
11100 short_p = decl_spec_seq_has_spec_p (declspecs, ds_short); in grokdeclarator()
11101 long_p = decl_spec_seq_has_spec_p (declspecs, ds_long); in grokdeclarator()
11102 longlong = decl_spec_seq_has_spec_p (declspecs, ds_long_long); in grokdeclarator()
11103 explicit_intN = declspecs->explicit_intN_p; in grokdeclarator()
11104 int_n_alt = declspecs->int_n_alt; in grokdeclarator()
11105 thread_p = decl_spec_seq_has_spec_p (declspecs, ds_thread); in grokdeclarator()
11109 bool concept_p = decl_spec_seq_has_spec_p (declspecs, ds_concept); in grokdeclarator()
11128 declspecs->locations); in grokdeclarator()
11310 && ! (ctype && !declspecs->any_specifiers_p)) in grokdeclarator()
11368 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
11375 error_at (declspecs->locations[ds_concept], in grokdeclarator()
11382 error_at (declspecs->locations[ds_constexpr], in grokdeclarator()
11389 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
11396 error_at (declspecs->locations[ds_constinit], in grokdeclarator()
11405 gcc_rich_location richloc (declspecs->locations[ds_constinit]); in grokdeclarator()
11406 richloc.add_range (declspecs->locations[ds_constexpr]); in grokdeclarator()
11415 if (declspecs->multiple_types_p) in grokdeclarator()
11422 if (declspecs->conflicting_specifiers_p) in grokdeclarator()
11424 error_at (min_location (declspecs->locations[ds_typedef], in grokdeclarator()
11425 declspecs->locations[ds_storage_class]), in grokdeclarator()
11431 type = declspecs->type; in grokdeclarator()
11458 && decl_spec_seq_has_spec_p (declspecs, ds_complex)) in grokdeclarator()
11461 pedwarn (declspecs->locations[ds_complex], OPT_Wpedantic, in grokdeclarator()
11467 explicit_int = declspecs->explicit_int_p; in grokdeclarator()
11468 explicit_char = declspecs->explicit_char_p; in grokdeclarator()
11487 declspecs->locations); in grokdeclarator()
11532 if (! int_n_enabled_p[declspecs->int_n_idx]) in grokdeclarator()
11534 error_at (declspecs->locations[ds_type_spec], in grokdeclarator()
11536 int_n_data[declspecs->int_n_idx].bitsize); in grokdeclarator()
11542 pedwarn (declspecs->locations[ds_type_spec], OPT_Wpedantic, in grokdeclarator()
11544 int_n_data[declspecs->int_n_idx].bitsize, name); in grokdeclarator()
11567 loc = declspecs->locations[ds_unsigned]; in grokdeclarator()
11572 loc = declspecs->locations[ds_signed]; in grokdeclarator()
11577 loc = declspecs->locations[ds_long_long]; in grokdeclarator()
11582 loc = declspecs->locations[ds_long]; in grokdeclarator()
11587 loc = declspecs->locations[ds_short]; in grokdeclarator()
11594 gcc_rich_location richloc (declspecs->locations[ds_signed]); in grokdeclarator()
11595 richloc.add_range (declspecs->locations[ds_unsigned]); in grokdeclarator()
11601 gcc_rich_location richloc (declspecs->locations[ds_long]); in grokdeclarator()
11602 richloc.add_range (declspecs->locations[ds_short]); in grokdeclarator()
11621 else if (declspecs->decltype_p) in grokdeclarator()
11662 type = int_n_trees[declspecs->int_n_idx].unsigned_type; in grokdeclarator()
11679 type = int_n_trees[declspecs->int_n_idx].signed_type; in grokdeclarator()
11687 if (decl_spec_seq_has_spec_p (declspecs, ds_complex)) in grokdeclarator()
11690 error_at (declspecs->locations[ds_complex], in grokdeclarator()
11720 || declspecs->decltype_p) in grokdeclarator()
11737 inlinep = decl_spec_seq_has_spec_p (declspecs, ds_inline); in grokdeclarator()
11738 virtualp = decl_spec_seq_has_spec_p (declspecs, ds_virtual); in grokdeclarator()
11739 explicitp = decl_spec_seq_has_spec_p (declspecs, ds_explicit); in grokdeclarator()
11741 storage_class = declspecs->storage_class; in grokdeclarator()
11749 gcc_rich_location richloc (declspecs->locations[ds_virtual]); in grokdeclarator()
11750 richloc.add_range (declspecs->locations[ds_storage_class]); in grokdeclarator()
11758 gcc_rich_location richloc (declspecs->locations[ds_virtual]); in grokdeclarator()
11759 richloc.add_range (declspecs->locations[ds_constexpr]); in grokdeclarator()
11765 friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend); in grokdeclarator()
11772 error_at (declspecs->locations[ds_typedef], in grokdeclarator()
11778 error_at (min_location (declspecs->locations[ds_thread], in grokdeclarator()
11779 declspecs->locations[ds_storage_class]), in grokdeclarator()
11788 error_at (min_location (declspecs->locations[ds_thread], in grokdeclarator()
11789 declspecs->locations[ds_storage_class]), in grokdeclarator()
11797 error_at (declspecs->locations[ds_concept], in grokdeclarator()
11806 error_at (declspecs->locations[ds_constexpr], in grokdeclarator()
11812 error_at (declspecs->locations[ds_constinit], in grokdeclarator()
11818 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
11828 error_at (declspecs->locations[ds_virtual], in grokdeclarator()
11838 error_at (declspecs->locations[ds_inline], in grokdeclarator()
11841 error_at (declspecs->locations[ds_typedef], in grokdeclarator()
11844 error_at (declspecs->locations[ds_constexpr], "structured " in grokdeclarator()
11847 error_at (declspecs->locations[ds_consteval], "structured " in grokdeclarator()
11850 pedwarn (declspecs->locations[ds_thread], 0, in grokdeclarator()
11853 declspecs->gnu_thread_keyword_p in grokdeclarator()
11856 error_at (declspecs->locations[ds_concept], in grokdeclarator()
11860 warning_at (declspecs->locations[ds_volatile], OPT_Wvolatile, in grokdeclarator()
11903 declspecs->type = type; in grokdeclarator()
11913 declspecs->storage_class = sc_none; in grokdeclarator()
11919 && declspecs->type in grokdeclarator()
11920 && ANON_AGGR_TYPE_P (declspecs->type)) in grokdeclarator()
11932 = min_location (declspecs->locations[ds_thread], in grokdeclarator()
11933 declspecs->locations[ds_storage_class]); in grokdeclarator()
11957 = min_location (declspecs->locations[ds_thread], in grokdeclarator()
11958 declspecs->locations[ds_storage_class]); in grokdeclarator()
11978 error_at (declspecs->locations[ds_storage_class], in grokdeclarator()
11985 if (declspecs->gnu_thread_keyword_p) in grokdeclarator()
11986 pedwarn (declspecs->locations[ds_thread], in grokdeclarator()
11993 storage_class = declspecs->storage_class = sc_static; in grokdeclarator()
11999 error_at (min_location (declspecs->locations[ds_thread], in grokdeclarator()
12000 declspecs->locations[ds_storage_class]), in grokdeclarator()
12029 if (declspecs->std_attributes) in grokdeclarator()
12031 location_t attr_loc = declspecs->locations[ds_std_attribute]; in grokdeclarator()
12122 iloc_sentinel ils (declspecs->locations[ds_type_spec]); in grokdeclarator()
12294 error_at (declspecs->locations[ds_constinit], in grokdeclarator()
12333 error_at (declspecs->locations[ds_storage_class], in grokdeclarator()
12369 permerror (declspecs->locations[ds_virtual], in grokdeclarator()
12385 gcc_rich_location richloc (declspecs->locations[ds_virtual]); in grokdeclarator()
12386 richloc.add_range (declspecs->locations[ds_friend]); in grokdeclarator()
12711 permerror (declspecs->locations[ds_friend], in grokdeclarator()
12819 error_at (declspecs->locations[ds_explicit], in grokdeclarator()
12822 error_at (declspecs->locations[ds_explicit], in grokdeclarator()
12825 error_at (declspecs->locations[ds_explicit], in grokdeclarator()
12833 location_t sloc = declspecs->locations[ds_storage_class]; in grokdeclarator()
12876 bool alias_p = decl_spec_seq_has_spec_p (declspecs, ds_alias); in grokdeclarator()
12911 error_at (declspecs->locations[ds_type_spec], in grokdeclarator()
12914 error_at (declspecs->locations[ds_type_spec], in grokdeclarator()
12961 && declspecs->type_definition_p in grokdeclarator()
12973 declspecs->locations); in grokdeclarator()
13189 declspecs->locations); in grokdeclarator()
13196 location_t tloc = declspecs->locations[ds_type_spec]; in grokdeclarator()
13272 error_at (declspecs->locations[ds_virtual], in grokdeclarator()
13282 error_at (declspecs->locations[ds_virtual], in grokdeclarator()
13310 error_at (declspecs->locations[ds_concept], in grokdeclarator()
13316 error_at (declspecs->locations[ds_constexpr], in grokdeclarator()
13323 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
13338 error_at (declspecs->locations[ds_concept], in grokdeclarator()
13344 error_at (declspecs->locations[ds_concept], in grokdeclarator()
13352 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
13382 declspecs, in grokdeclarator()
13412 if (declspecs->explicit_specifier) in grokdeclarator()
13413 store_explicit_specifier (decl, declspecs->explicit_specifier); in grokdeclarator()
13506 error_at (declspecs->locations[ds_concept], in grokdeclarator()
13517 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
13522 mark_inline_variable (decl, declspecs->locations[ds_inline]); in grokdeclarator()
13537 if (declspecs->gnu_thread_keyword_p) in grokdeclarator()
13545 error_at (declspecs->locations[ds_concept], in grokdeclarator()
13553 error_at (declspecs->locations[ds_constexpr], in grokdeclarator()
13560 error_at (declspecs->locations[ds_constinit], in grokdeclarator()
13567 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
13595 if (declspecs->storage_class == sc_static) in grokdeclarator()
13604 declspecs->locations); in grokdeclarator()
13622 error_at (declspecs->locations[ds_storage_class], in grokdeclarator()
13625 error_at (declspecs->locations[ds_storage_class], in grokdeclarator()
13630 if (declspecs->gnu_thread_keyword_p) in grokdeclarator()
13631 error_at (declspecs->locations[ds_thread], in grokdeclarator()
13635 error_at (declspecs->locations[ds_thread], in grokdeclarator()
13648 || decl_spec_seq_has_spec_p (declspecs, ds_inline)) in grokdeclarator()
13652 pedwarn (declspecs->locations[ds_storage_class], OPT_Wpedantic, in grokdeclarator()
13656 pedwarn (declspecs->locations[ds_inline], OPT_Wpedantic, in grokdeclarator()
13681 error_at (declspecs->locations[ds_consteval], in grokdeclarator()
13691 declspecs, in grokdeclarator()
13725 error_at (declspecs->locations[ds_storage_class], in grokdeclarator()
13743 declspecs, in grokdeclarator()
13757 declspecs->locations); in grokdeclarator()
13764 permerror (declspecs->locations[ds_storage_class], in grokdeclarator()
13798 mark_inline_variable (decl, declspecs->locations[ds_inline]); in grokdeclarator()
13812 location_t loc = declspecs->locations[ds_type_spec]; in grokdeclarator()
16603 start_function (cp_decl_specifier_seq *declspecs, in start_function() argument
16609 decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, &attrs); in start_function()
17351 grokmethod (cp_decl_specifier_seq *declspecs, in grokmethod() argument
17354 tree fndecl = grokdeclarator (declarator, declspecs, MEMFUNCDEF, 0, in grokmethod()