1 2024-01-19 Jason Merrill <jason@redhat.com>
4 * pt.cc (decl_template_info): New fn.
5 (get_template_info): Use it.
7 2024-01-19 Jason Merrill <jason@redhat.com>
14 * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New.
15 * pt.cc (expand_integer_pack): Remove 111357 workaround.
16 (maybe_convert_nontype_argument): Add force parm.
17 (convert_template_argument): Handle alias template args
19 (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG.
20 * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype.
22 2024-01-18 Marek Polacek <polacek@redhat.com>
25 * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to
26 NULL_TREE when emitting an error.
28 2024-01-17 Nathaniel Shead <nathanieloshead@gmail.com>
31 * module.cc (trees_in::read_function_def): Don't overwrite
34 2024-01-17 Patrick Palka <ppalka@redhat.com>
38 * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress
39 DECL_ARTIFICIAL rejection test for class NTTP objects.
41 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
44 * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT.
45 (c_parse_final_cleanups): Suppress warning for no definition of
46 TLS wrapper functions in header modules.
47 * module.cc (trees_out::lang_decl_vals): Write wrapped variable
48 for TLS wrapper functions.
49 (trees_in::lang_decl_vals): Read it.
50 (trees_out::decl_value): Write TLS model for thread-local vars.
51 (trees_in::decl_value): Read it for new decls. Remember to emit
52 definitions of TLS wrapper functions later.
54 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
56 * name-lookup.h (enum scope_kind): Add 'sk_count'.
57 * name-lookup.cc (cp_binding_level_descriptor): Add missing
58 scope kinds. Add assertion that the list is up to date. Fix
59 handling of explicit_spec_p.
61 2024-01-16 Marek Polacek <polacek@redhat.com>
63 * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic
66 2024-01-16 Marek Polacek <polacek@redhat.com>
69 * decl.cc (grokdeclarator) <case cdk_function>: Clear
70 is_xobj_member_function in case of an error.
72 2024-01-16 waffl3x <waffl3x@protonmail.com>
75 * parser.cc (cp_parser_parameter_declaration): Reject packs
78 2024-01-15 Marek Polacek <polacek@redhat.com>
81 * parser.cc (cp_parser_template_type_arg): Add auto checking.
83 2024-01-15 Patrick Palka <ppalka@redhat.com>
85 * parser.cc (cp_parser_check_access_in_redeclaration): Don't
86 check access for a partial or explicit specialization.
87 * pt.cc (maybe_new_partial_specialization): Don't set TREE_PRIVATE
88 or TREE_PROTECTED on the newly created partial specialization.
90 2024-01-15 Patrick Palka <ppalka@redhat.com>
93 * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC
94 to the newly created partial specialization.
96 2024-01-15 Patrick Palka <ppalka@redhat.com>
99 * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
100 false in a template context.
102 2024-01-13 Jakub Jelinek <jakub@redhat.com>
104 * mangle.cc (write_nested_name): Mangle explicit object
105 member functions with H as per
106 https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal.
108 2024-01-12 Jason Merrill <jason@redhat.com>
111 * name-lookup.cc (lookup_elaborated_type): Look for bindings
112 in the global namespace in the ABI namespace.
114 2024-01-12 Jason Merrill <jason@redhat.com>
116 * call.cc (reversed_match): New.
117 (enum class pmatch): New enum.
118 (cand_parms_match): Add match_kind parm.
119 (object_parms_correspond): Add fn parms.
121 * class.cc (xobj_iobj_parameters_correspond): Rename to...
122 (iobj_parm_corresponds_to): ...this. Take the other
123 type instead of a second function.
124 (object_parms_correspond): Adjust.
125 * cp-tree.h (iobj_parm_corresponds_to): Declare.
127 2024-01-11 Jason Merrill <jason@redhat.com>
130 * class.cc (xobj_iobj_parameters_correspond): Add context parm.
131 (object_parms_correspond): Factor out of...
132 (add_method): ...here.
133 * method.cc (defaulted_late_check): Use it.
134 * call.cc (class_of_implicit_object): New.
135 (object_parms_correspond): Overload taking two candidates.
136 (cand_parms_match): Use it.
137 (joust): Check reversed before comparing constraints.
138 * cp-tree.h (object_parms_correspond): Declare.
140 2024-01-10 Tamar Christina <tamar.christina@arm.com>
142 * parser.cc (cp_parser_pragma): Initialize to false.
144 2024-01-09 Jason Merrill <jason@redhat.com>
146 * semantics.cc (is_object_parameter): New.
147 * cp-tree.h (is_object_parameter): Declare.
148 * call.cc (maybe_warn_class_memaccess): Use it.
149 * search.cc (field_access_p): Use it.
150 (class_of_object_parm): New.
151 (field_accessor_p): Adjust for explicit object parms.
153 2024-01-09 Jason Merrill <jason@redhat.com>
155 * call.cc (build_over_call): Refactor handle_arg lambda.
156 * class.cc (xobj_iobj_parameters_correspond): Fix FIXME.
157 * method.cc (defaulted_late_check): Adjust comments.
159 2024-01-09 waffl3x <waffl3x@protonmail.com>
163 C++23 P0847R7 (deducing this) - CWG2586.
164 * decl.cc (copy_fn_p): Accept xobj copy assignment functions.
165 (move_signature_fn_p): Accept xobj move assignment functions.
166 * method.cc (do_build_copy_assign): Handle defaulted xobj member
168 (defaulted_late_check): Comment.
169 (defaultable_fn_check): Comment.
171 2024-01-09 waffl3x <waffl3x@protonmail.com>
175 C++23 P0847R7 (deducing this) - xobj lambdas.
176 * lambda.cc (build_capture_proxy): Don't fold direct object types.
177 * parser.cc (cp_parser_lambda_declarator_opt): Handle xobj lambdas,
178 diagnostics. Comments also updated.
179 * pt.cc (tsubst_function_decl): Handle xobj lambdas. Check object
180 type of xobj lambda call operator, diagnose incorrect types.
181 (tsubst_lambda_expr): Update comment.
182 * semantics.cc (finish_decltype_type): Also consider by-value object
183 parameter qualifications.
185 2024-01-09 waffl3x <waffl3x@protonmail.com>
189 C++23 P0847R7 (deducing this) - diagnostics.
190 * class.cc (resolve_address_of_overloaded_function): Diagnostics.
191 * cp-tree.h (TFF_XOBJ_FUNC): Define.
192 * decl.cc (grokfndecl): Diagnostics.
193 (grokdeclarator): Diagnostics.
194 * error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC.
195 (dump_lambda_function): Formatting for xobj lambda.
196 (dump_function_decl): Pass TFF_XOBJ_FUNC.
197 (dump_parameters): Formatting for xobj member functions.
198 (function_category): Formatting for xobj member functions.
199 * parser.cc (cp_parser_decl_specifier_seq): Diagnostics.
200 (cp_parser_parameter_declaration): Diagnostics.
201 * search.cc (look_for_overrides_here): Make xobj member functions
203 (look_for_overrides_r): Reject an overriding xobj member function
205 * semantics.cc (finish_this_expr): Diagnostics.
206 * typeck.cc (cp_build_addr_expr_1): Diagnostics.
208 2024-01-09 waffl3x <waffl3x@protonmail.com>
212 C++23 P0847R7 (deducing this) - initial functionality.
213 * class.cc (xobj_iobj_parameters_correspond): New function, checks
214 for corresponding object parameters between xobj and iobj member
216 (add_method): Handle object parameters of xobj member functions, use
217 xobj_iobj_parameters_correspond.
218 * call.cc (build_over_call): Refactor, handle xobj member functions.
219 (cand_parms_match): Handle object parameters of xobj and iobj member
220 functions, use xobj_iobj_parameters_correspond.
221 * cp-tree.h (enum cp_decl_spec): Add ds_this, add comments.
222 * decl.cc (grokfndecl): Add xobj_func_p parameter. For xobj member
223 functions, Set xobj_flag, don't set static_function flag.
224 (grokdeclarator): Handle xobj member functions, tell grokfndecl.
225 (grok_op_properties): Don't error for xobj operators.
226 * parser.cc (cp_parser_decl_specifier_seq): Handle this specifier.
227 (cp_parser_parameter_declaration): Set default argument to
228 "this_identifier" for xobj parameters.
229 (set_and_check_decl_spec_loc): Add "this", add comments.
230 * tree.cc (build_min_non_dep_op_overload): Handle xobj operators.
231 * typeck.cc (cp_build_addr_expr_1): Handle address-of xobj member
234 2024-01-09 waffl3x <waffl3x@protonmail.com>
235 Jason Merrill <jason@redhat.com>
238 * cp-tree.h (struct lang_decl_fn): New data member.
239 (DECL_NONSTATIC_MEMBER_FUNCTION_P): Poison.
240 (DECL_IOBJ_MEMBER_FUNCTION_P): Define.
241 (DECL_FUNCTION_XOBJ_FLAG): Define.
242 (DECL_XOBJ_MEMBER_FUNCTION_P): Define.
243 (DECL_OBJECT_MEMBER_FUNCTION_P): Define.
244 (DECL_FUNCTION_MEMBER_P): Don't use
245 DECL_NONSTATIC_MEMBER_FUNCTION_P.
246 (DECL_CONST_MEMFUNC_P): Likewise.
247 (DECL_VOLATILE_MEMFUNC_P): Likewise.
248 (DECL_NONSTATIC_MEMBER_P): Likewise.
249 * module.cc (trees_out::lang_decl_bools): Handle xobj_flag.
250 (trees_in::lang_decl_bools): Handle xobj_flag.
251 * call.cc (build_this_conversion)
252 (add_function_candidate)
253 (add_template_candidate_real)
255 (maybe_warn_class_memaccess)
258 (do_warn_dangling_reference)
259 * class.cc (finalize_literal_type_property)
261 (resolve_address_of_overloaded_function)
262 * constexpr.cc (is_valid_constexpr_fn)
263 (cxx_bind_parameters_in_call)
264 * contracts.cc (build_contract_condition_function)
265 * cp-objcp-common.cc (cp_decl_dwarf_attribute)
266 * cxx-pretty-print.cc (cxx_pretty_printer::postfix_expression)
267 (cxx_pretty_printer::declaration_specifiers)
268 (cxx_pretty_printer::direct_declarator)
269 * decl.cc (cp_finish_decl)
270 (grok_special_member_properties)
271 (start_preparsed_function)
272 (record_key_method_defined)
273 * decl2.cc (cp_handle_deprecated_or_unavailable)
274 * init.cc (find_uninit_fields_r)
276 * lambda.cc (lambda_expr_this_capture)
277 (maybe_generic_this_capture)
278 (nonlambda_method_basetype)
279 * mangle.cc (write_nested_name)
280 * method.cc (early_check_defaulted_comparison)
281 (skip_artificial_parms_for)
282 (num_artificial_parms_for)
283 * pt.cc (is_specialization_of_friend)
284 (determine_specialization)
285 (copy_default_args_to_explicit_spec)
286 (check_explicit_specialization)
287 (tsubst_contract_attribute)
288 (check_non_deducible_conversions)
289 (more_specialized_fn)
290 (maybe_instantiate_noexcept)
291 (register_parameter_specializations)
292 (value_dependent_expression_p)
293 * search.cc (shared_member_p)
296 * semantics.cc (finish_omp_declare_simd_methods)
297 * tree.cc (lvalue_kind)
298 * typeck.cc (invalid_nonstatic_memfn_p): Don't use
299 DECL_NONSTATIC_MEMBER_FUNCTION_P.
301 2024-01-09 Julian Brown <julian@codesourcery.com>
303 * constexpr.cc (potential_consant_expression_1): Handle
305 * cp-tree.h (grok_omp_array_section, build_omp_array_section): Add
307 * decl2.cc (grok_omp_array_section): New function.
308 * error.cc (dump_expr): Handle OMP_ARRAY_SECTION.
309 * parser.cc (cp_parser_new): Initialize parser->omp_array_section_p.
310 (cp_parser_statement_expr): Disallow array sections.
311 (cp_parser_postfix_open_square_expression): Support OMP_ARRAY_SECTION
313 (cp_parser_parenthesized_expression_list, cp_parser_lambda_expression,
314 cp_parser_braced_list): Disallow array sections.
315 (cp_parser_omp_var_list_no_open): Remove ALLOW_DEREF parameter, add
316 MAP_LVALUE in its place. Support generalised lvalue parsing for
317 OpenMP map, to and from clauses. Use OMP_ARRAY_SECTION
318 code instead of TREE_LIST to represent OpenMP array sections.
319 (cp_parser_omp_var_list): Remove ALLOW_DEREF parameter, add MAP_LVALUE.
320 Pass to cp_parser_omp_var_list_no_open.
321 (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list.
322 (cp_parser_omp_clause_map): Add sk_omp scope around
323 cp_parser_omp_var_list_no_open call.
324 * parser.h (cp_parser): Add omp_array_section_p field.
325 * pt.cc (tsubst, tsubst_copy, tsubst_omp_clause_decl,
326 tsubst_copy_and_build): Add OMP_ARRAY_SECTION support.
327 * semantics.cc (handle_omp_array_sections_1, handle_omp_array_sections,
328 cp_oacc_check_attachments, finish_omp_clauses): Use OMP_ARRAY_SECTION
329 instead of TREE_LIST where appropriate. Handle more types of map
331 * typeck.cc (build_omp_array_section): New function.
333 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
335 * module.cc (trees_out::write_var_def): Only write initializers
338 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
341 * module.cc (depset::hash::add_binding_entity): Don't skip names
342 in the GMF if they've been exported with a using declaration.
344 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
347 * parser.cc (cp_parser_module_name): Rewrite to handle
348 module-names and module-partitions independently.
349 (cp_parser_module_partition): New function.
350 (cp_parser_module_declaration): Parse module partitions
351 explicitly. Don't change state if parsing module decl failed.
352 (cp_parser_import_declaration): Handle different kinds of
353 import-declarations locally.
355 2024-01-03 Patrick Palka <ppalka@redhat.com>
358 * call.cc (reference_binding): Still try a conversion via a
359 temporary if a direct conversion was bad.
361 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
363 * parser.cc (cp_parser_omp_clause_name): Move handling of indirect
364 clause to correspond to alphabetical order.
367 Copyright (C) 2024 Free Software Foundation, Inc.
369 Copying and distribution of this file, with or without modification,
370 are permitted in any medium without royalty provided the copyright
371 notice and this notice are preserved.