]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Daily bump.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
b168441c
GA
12022-06-02 Marek Polacek <polacek@redhat.com>
2
3 * constexpr.cc (potential_constant_expression_1): Treat
4 {,VEC_}NEW_EXPR and {,VEC_}DELETE_EXPRas potentially constant in C++20.
5
62022-06-02 Marek Polacek <polacek@redhat.com>
7
8 PR c++/105803
9 * pt.cc (value_dependent_expression_p): Handle {,VEC_}NEW_EXPR
10 in the switch.
11
122022-06-02 David Malcolm <dmalcolm@redhat.com>
13
14 * cp-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
15 (cp_get_sarif_source_language): New.
16
172022-06-02 Jason Merrill <jason@redhat.com>
18
19 PR c++/105795
20 * constexpr.cc (init_subob_ctx): Clear ctx->ctor for empty subob.
21 (cxx_eval_store_expression): Likewise.
22 (cxx_eval_bare_aggregate): Handle null ctx->ctor.
23
242022-06-02 Jason Merrill <jason@redhat.com>
25
26 PR c++/105795
27 * constexpr.cc (cxx_eval_bare_aggregate): Always call
28 init_subob_ctx.
29
3164de6a
GA
302022-06-01 Jason Merrill <jason@redhat.com>
31
32 PR c++/105734
33 * parser.cc (cp_parser_postfix_dot_deref_expression): Use typeof
34 if the expression has auto type.
35
362022-06-01 Jason Merrill <jason@redhat.com>
37
38 PR c++/105779
39 * call.cc (resolve_args): Call mark_single_function here.
40 * pt.cc (unify_one_argument): Not here.
41
422022-06-01 Nathan Sidwell <nathan@acm.org>
43
44 * decl2.cc (fix_temporary_vars_context_r): Use data argument
45 for new context.
46 (one_static_initialization_or_destruction): Adjust tree walk
47 call. Refactor guard generation.
48
492022-06-01 Nathan Sidwell <nathan@acm.org>
50
51 * decl2.cc (ssdf_decl): Delete global.
52 (start_static_storage_duration_function): Use some RAII.
53 (do_static_initialization_or_destruction): Likewise.
54 (c_parse_final_cleanups): Likewise. Avoid rechecking 'vars'.
55
562022-06-01 Nathan Sidwell <nathan@acm.org>
57
58 * decl2.cc (start_objects): Replace 'method_type' parameter
59 with 'initp' boolean, rename and retype 'priority' parameter.
60 (finish_objects): Likewise. Do not expand here.
61 (one_static_initialization_or_destruction): Move 'initp'
62 parameter first.
63 (do_static_initialization_or_destruction): Likewise.
64 (generate_ctor_or_dtor_function): Rename 'initp' parameter.
65 Adjust start_objects/finish_obects calls and expand here.
66 (generate_ctor_and_dtor_functions_for_priority): Adjust calls.
67 (c_parse_final_cleanups): Likewise.
68 (vtv_start_verification_constructor_init): Adjust.
69 (vtv_finish_verification_constructor_init): Use finish_objects.
70
820ead45
GA
712022-05-31 Patrick Palka <ppalka@redhat.com>
72
73 PR c++/105758
74 * call.cc (build_over_call): Use z_candidate::conversion_path
75 and ::access_path instead of TYPE_BINFO when building the
76 BASELINK for the templated form.
77
782022-05-31 Patrick Palka <ppalka@redhat.com>
79
80 * parser.cc: Use auto_timevar instead of timevar_push/pop.
81 Remove wrapper functions.
82 * pt.cc: Likewise.
83
842022-05-31 Patrick Palka <ppalka@redhat.com>
85
86 * cp-tree.h (cp_build_qualified_type_real): Rename to ...
87 (cp_build_qualified_type): ... this. Give its last parameter
88 a default argument. Remove macro of the same name.
89 * decl.cc (grokdeclarator): Adjust accordingly.
90 * pt.cc (tsubst_aggr_type): Likewise.
91 (rebuild_function_or_method_type): Likewise.
92 (tsubst): Likewise.
93 (maybe_dependent_member_ref): Likewise.
94 (unify): Likewise.
95 * tree.cc (cp_build_qualified_type_real): Rename to ...
96 (cp_build_qualified_type): ... this. Adjust accordingly.
97
982022-05-31 Jason Merrill <jason@redhat.com>
99
100 * Make-lang.in (c++.tags): Just look at *.cc.
101
1022022-05-31 Patrick Palka <ppalka@redhat.com>
103
104 * cp-tree.h (comp_template_args): Change return type to bool.
105 * pt.cc (comp_template_args): Document default arguments.
106 Change return type to bool and adjust returns accordingly.
107
1082022-05-31 Patrick Palka <ppalka@redhat.com>
109
110 * decl.cc (grokvardecl): Use current_template_constraints.
111 (grokdeclarator): Likewise.
112 (xref_tag): Likewise.
113 * semantics.cc (finish_template_template_parm): Likewise.
114
1152022-05-31 Jakub Jelinek <jakub@redhat.com>
116
117 * parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
118 clauses.
119
0f4df800
GA
1202022-05-30 Marek Polacek <polacek@redhat.com>
121
122 PR c++/99080
123 * pt.cc (type_dependent_expression_p): Assert !TYPE_P.
124 * semantics.cc (finish_id_expression_1): Handle UNBOUND_CLASS_TEMPLATE
125 specifically.
126
37b3b5da
GA
1272022-05-28 Jakub Jelinek <jakub@redhat.com>
128
129 * parser.cc (handle_omp_declare_target_clause): If OMP_CLAUSE_LINK was
130 seen first, use "%<to%>" or "%<enter%>" depending on
131 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
132 "%<to%> or %<enter%>" wording.
133
1342022-05-28 Jason Merrill <jason@redhat.com>
135
136 PR c++/105652
137 * pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
138 instantiate into a class-scope lambda.
139
d9176e64
GA
1402022-05-27 Marek Polacek <polacek@redhat.com>
141
142 PR c++/105725
143 * parser.cc (class_decl_loc_t::add): Check CLASS_TYPE_P.
144
1452022-05-27 Jakub Jelinek <jakub@redhat.com>
146
147 * parser.cc (cp_parser_omp_clause_name): Parse enter clause.
148 (cp_parser_omp_all_clauses): For to clause on declare target, use
149 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
150 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
151 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
152 (cp_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
153 OMP_CLAUSE_TO_DECLARE.
154 * semantics.cc (finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
155 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
156 name in diagnostics instead of
157 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
158
b2cb88fb
GA
1592022-05-26 Marek Polacek <polacek@redhat.com>
160
161 PR c++/105569
162 * typeck.cc (warn_for_null_address): Improve the warning when
163 the POINTER_PLUS_EXPR's base is of reference type.
164
1652022-05-26 Patrick Palka <ppalka@redhat.com>
166
167 PR c++/96363
168 * decl.cc (shadow_tag): Use the return value of
169 maybe_process_partial_specialization.
170 * parser.cc (cp_parser_single_declaration): Call shadow_tag
171 before associate_classtype_constraints.
172 * pt.cc (maybe_new_partial_specialization): Change return type
173 to bool. Take 'type' argument by mutable reference. Set 'type'
174 to point to the correct constrained specialization when
175 appropriate.
176 (maybe_process_partial_specialization): Adjust accordingly.
177
3dff965c
GA
1782022-05-25 Marek Polacek <polacek@redhat.com>
179
180 PR c++/96637
181 * cp-tree.h (attr_chainon): Declare.
182 * decl.cc (start_decl): Use attr_chainon.
183 (grokdeclarator): Likewise.
184 * parser.cc (cp_parser_statement): No longer static.
185
1862022-05-25 Jason Merrill <jason@redhat.com>
187
188 PR c++/105655
189 * pt.cc (build_template_decl): Add assert.
190 (tsubst_function_decl): Don't return a template.
191
1922022-05-25 Jason Merrill <jason@redhat.com>
193
194 PR c++/105623
195 * decl2.cc (mark_used): Copy type from fn to BASELINK.
196 * pt.cc (unify_one_argument): Call mark_single_function.
197
1982022-05-25 Jason Merrill <jason@redhat.com>
199
200 * constexpr.cc (cxx_eval_call_expression): Check for
201 heap vars in the result.
202
2032022-05-25 Jason Merrill <jason@redhat.com>
204
205 * constexpr.cc (maybe_constant_init_1): Only pass false for
206 strict when initializing a variable of static duration.
207
2082022-05-25 Marek Polacek <polacek@redhat.com>
209
210 PR c++/100252
211 * typeck2.cc (potential_prvalue_result_of): New.
212 (replace_placeholders_for_class_temp_r): New.
213 (digest_nsdmi_init): Call it.
214
768f49a2
GA
2152022-05-24 Jason Merrill <jason@redhat.com>
216
217 * constexpr.cc (cxx_fold_indirect_ref): Add default arg.
218 (cxx_eval_call_expression): Call it.
219 (cxx_fold_indirect_ref_1): Handle null empty_base.
220
2212022-05-24 Jason Merrill <jason@redhat.com>
222
223 * constexpr.cc (enum value_cat): New. Change all 'lval' parameters
224 from int to value_cat. Change most false to vc_prvalue, most true
225 to vc_glvalue, cases where the return value is ignored to
226 vc_discard.
227 (cxx_eval_statement_list): Only vc_prvalue for stmt-expr result.
228 (cxx_eval_store_expression): Only build _REF for vc_glvalue.
229 (cxx_eval_array_reference, cxx_eval_component_reference)
230 (cxx_eval_indirect_ref, cxx_eval_constant_expression): Likewise.
231
2322022-05-24 Jason Merrill <jason@redhat.com>
233
234 PR c++/105622
235 * constexpr.cc (cxx_eval_store_expression): Adjust assert.
236 Use initialized_type.
237
2382022-05-24 Patrick Palka <ppalka@redhat.com>
239
240 * cp-tree.h (any_template_arguments_need_structural_equality_p):
241 Declare.
242 * pt.cc (struct ctp_hasher): Define.
243 (ctp_table): Define.
244 (canonical_type_parameter): Use it.
245 (process_template_parm): Set TYPE_CANONICAL for
246 TEMPLATE_TEMPLATE_PARM too.
247 (lookup_template_class_1): Remove now outdated comment for the
248 any_template_arguments_need_structural_equality_p test.
249 (tsubst) <case TEMPLATE_TEMPLATE_PARM, etc>: Don't specifically
250 clear TYPE_CANONICAL for ttps. Set TYPE_CANONICAL on the
251 substituted type later.
252 (any_template_arguments_need_structural_equality_p): Return
253 true for any_targ_node. Don't return true just because a
254 template argument uses structural equality. Add comment for
255 the PARM_DECL special case.
256 (rewrite_template_parm): Set TYPE_CANONICAL on the rewritten
257 parm's type later.
258 * tree.cc (bind_template_template_parm): Set TYPE_CANONICAL
259 when safe to do so.
260 * typeck.cc (structural_comptypes) [check_alias]: Increment
261 processing_template_decl before checking
262 dependent_alias_template_spec_p.
263
2642022-05-24 Jakub Jelinek <jakub@redhat.com>
265
266 PR c/105378
267 * parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
268
57f2ce6a
GA
2692022-05-20 David Malcolm <dmalcolm@redhat.com>
270
271 * cxx-pretty-print.h: Replace uses of "FINAL" and "OVERRIDE" with
272 "final" and "override".
273 * error.cc: Likewise.
274
1cda629f
GA
2752022-05-18 Marek Polacek <polacek@redhat.com>
276
277 PR c++/105634
278 * call.cc (maybe_warn_class_memaccess): Avoid % by zero.
279
3d9439b1
GA
2802022-05-17 Jason Merrill <jason@redhat.com>
281
282 PR c++/102307
283 * decl.cc (check_initializer): Use build_cplus_new in case of
284 constexpr failure.
285
2862022-05-17 Jakub Jelinek <jakub@redhat.com>
287
288 * parser.cc (cp_parser_omp_clause_depend): Parse
289 inoutset depend-kind.
290 (cp_parser_omp_depobj): Likewise.
291 * cxx-pretty-print.cc (cxx_pretty_printer::statement): Handle
292 OMP_CLAUSE_DEPEND_INOUTSET.
293
702bd11f
GA
2942022-05-16 Martin Liska <mliska@suse.cz>
295
296 * module.cc (depset::entity_kind_name): Use ARRAY_SIZE.
297 * name-lookup.cc (get_std_name_hint): Likewise.
298 * parser.cc (cp_parser_new): Likewise.
299
3002022-05-16 Marcel Vollweiler <marcel@codesourcery.com>
301
302 * pt.cc (tsubst_omp_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR.
303 * semantics.cc (finish_omp_clauses): Added template decl processing.
304
ac6a32f6
GA
3052022-05-15 Jason Merrill <jason@redhat.com>
306
307 PR c++/100502
308 PR c++/58993
309 * friend.cc (is_friend): Hidden friends count as members.
310 * search.cc (friend_accessible_p): Likewise.
311
3122022-05-15 Jason Merrill <jason@redhat.com>
313
314 * parser.cc (cp_parser_template_name): Look through
315 injected-class-name.
316
3172022-05-15 Jason Merrill <jason@redhat.com>
318
319 PR c++/105589
320 PR c++/105191
321 PR c++/92385
322 * init.cc (build_value_init): Handle class in template.
323
9df4ffe4
GA
3242022-05-13 Nathan Sidwell <nathan@acm.org>
325
326 * mangle.cc (maybe_write_module): Check external linkage.
327
3282022-05-13 Richard Biener <rguenther@suse.de>
329
330 * constexpr.cc: Remove gimple-fold.h include.
331
49ace834
GA
3322022-05-12 Patrick Palka <ppalka@redhat.com>
333
334 * cp-tree.h (TMPL_ARGS_LEVEL): Assert LEVEL is 1 when
335 TMPL_ARGS_HAVE_MULTIPLE_LEVELS is false.
336 * pt.cc (try_class_unification): Correctly copy multidimensional
337 targs. Free the copy of targs.
338 (unify_pack_expansion): Fix level comparison.
339
3402022-05-12 Nathan Sidwell <nathan@acm.org>
341
342 * parser.cc (cp_parser_linkage_specification): Implement
343 global module attachment semantics.
344
3452022-05-12 Jakub Jelinek <jakub@redhat.com>
346
347 * lex.cc (init_reswords): Register omp_all_memory as keyword
348 if flag_openmp.
349 * parser.cc (cp_parser_primary_expression): Diagnose uses of
350 omp_all_memory in postfix expressions.
351 (cp_parser_omp_var_list_no_open): Handle omp_all_memory in depend
352 clause.
353 * semantics.cc (finish_omp_clauses): Handle omp_all_memory
354 keyword in depend clause as null_pointer_node, diagnose invalid
355 uses.
356 * pt.cc (tsubst_omp_clause_decl): Pass through omp_all_memory.
357
d0d513b5
GA
3582022-05-11 Patrick Palka <ppalka@redhat.com>
359
360 * constraint.cc (tsubst_parameter_mapping): Convert loop over
361 TREE_VEC into a range-based for loop using tree_vec_range.
362 * pt.cc (iterative_hash_template_arg): Likewise.
363 (template_parms_level_to_args): Likewise.
364 (deducible_template_args): Likewise.
365 (check_undeduced_parms): Likewise.
366 (dependent_type_p_r): Likewise.
367 (value_dependent_expression_p) <case NONTYPE_ARGUMENT_PACK>:
368 Likewise.
369 (dependent_template_arg_p): Likewise.
370 * tree.cc (cp_walk_subtrees) <case NONTYPE_ARGUMENT_PACK>:
371 Likewise.
372
3732022-05-11 Jason Merrill <jason@redhat.com>
374
375 PR c++/105541
376 * cp-tree.h (TMPL_ARGS_DEPTH): 0 for null args.
377 * parser.cc (cp_parser_enclosed_template_argument_list):
378 Use 0-length TREE_VEC for <>.
379
3802022-05-11 Jason Merrill <jason@redhat.com>
381
382 PR bootstrap/105567
383 * typeck.cc (check_return_expr): Don't mess with ctor return value
384 while parsing a template.
385
3862022-05-11 Nathan Sidwell <nathan@acm.org>
387
388 * cp-tree.h (DECL_MODULE_ATTACH_P): New.
389 (struct lang_decl_base): Add module_attach_p flag.
390 * decl.cc (duplicate_decls): Rework module redeclaration
391 checking.
392 * module.cc (trees_out::lang_decl_bools): Write attach flag.
393 (trees_in::lang_decl_bools): ... and read it back.
394 (trees_out::decl_value): Rework module attachment handling.
395 (trees_in::decl_value): Rename local var to reflect meaning.
396 (trees_in::key_mergeable): Likewise.
397 (get_originating_module): Use DECL_MODULE_ATTACH_P. No need
398 to special-case mangling.
399 (module_may_redeclare): Reimplement.
400 (set_originating_module): Deal with attachment.
401 * name-lookup.cc (maybe_record_mergeable_decl): Deal with
402 attachment.
403 (mergeable_namespace_slots): Likewise.
404 (do_nonmember_using_decl): Likewise.
405 * name-lookup.h (mergeable_namespace_slots): Adjust parm
406 meaning.
407 * ptree.cc (cxx_print_decl): Adjust purview & attach printing.
408
4092022-05-11 Martin Liska <mliska@suse.cz>
410
411 PR target/105355
412 * lang-specs.h: Use Separate syntax.
413
e8778989
GA
4142022-05-10 Patrick Palka <ppalka@redhat.com>
415
416 * coroutines.cc (instantiate_coro_traits): Adjust accordingly.
417 * cp-tree.def: Remove mention of SET_PACK_EXPANSION_PATTERN.
418 * cp-tree.h (SET_PACK_EXPANSION_PATTERN): Remove.
419 (SET_ARGUMENT_PACK_ARGS): Remove.
420 * module.cc (trees_in::tree_node): Adjust accordingly.
421 * parser.cc (make_char_string_pack): Likewise.
422 (make_string_pack): Likewise.
423 * pt.cc (make_pack_expansion): Likewise.
424 (template_parm_to_arg): Likewise.
425 (coerce_template_parameter_pack): Likewise.
426 (extract_fnparm_pack): Likewise.
427 (extract_locals_r): Likewise.
428 (make_argument_pack): Likewise.
429 (tsubst_argument_pack): Likewise.
430 (lookup_init_capture_pack): Likewise.
431 (type_unification_real): Likewise.
432 (unify_pack_expansion): Likewise.
433 (tsubst_initializer_list): Likewise.
434
4352022-05-10 Patrick Palka <ppalka@redhat.com>
436
437 * cp-tree.h (PACK_EXPANSION_CHECK): Define.
438 (PACK_EXPANSION_PATTERN): Use PACK_EXPANSION_CHECK.
439 (SET_PACK_EXPANSION_PATTERN): Likewise.
440 (PACK_EXPANSION_PARAMETER_PACKS): Likewise.
441 (PACK_EXPANSION_EXTRA_ARGS): Likewise.
442 (PACK_EXPANSION_LOCAL_P): Likewise.
443 (PACK_EXPANSION_SIZEOF_P): Likewise.
444 (PACK_EXPANSION_AUTO_P): Likewise.
445 (PACK_EXPANSION_FORCE_EXTRA_ARGS_P): Likewise.
446 (ARGUMENT_PACK_CHECK): Define.
447 (ARGUMENT_PACK_ARGS): Use ARGUMENT_PACK_CHECK.
448 (SET_ARGUMENT_PACK_ARGS): Likewise.
449 * parser.cc (cp_parser_sizeof_pack): Check for error_mark_node
450 before setting PACK_EXPANSION_SIZEOF_P.
451
4522022-05-10 Nathan Sidwell <nathan@acm.org>
453
454 * cp-tree.h (enum module_kind_bits): Disambiguate purview,
455 attach, named module vs header-unit.
456 (global_purview_p, not_module_p): Delete.
457 (named_module_p): New.
458 (header_module_p, module_purview_p): Adjust.
459 (module_attach_p, named_module_purview_p): New.
460 * decl.cc (duplicate_decls): Adjust.
461 * module.cc (declare_module, preprocessed_module): Adjust.
462 * name-lookup.cc (init_global_partition): Adjust.
463 (get_fixed_binding_slot, pushdecl): Adjust.
464 * parser.cc (cp_parser_module_declaration): Adjust.
465 (cp_parser_import_declaration, cp_parser_declaration): Adjust.
466
4672022-05-10 Jason Merrill <jason@redhat.com>
468
469 PR c++/105529
470 * decl.cc (maybe_return_this): Replace...
471 (finish_constructor_body, finish_destructor_body): ...these.
472 (finish_function_body): Call it.
473 * optimize.cc (build_delete_destructor_body): Call it.
474 * cp-tree.h (maybe_return_this): Declare.
475
bd022ff9
GA
4762022-05-09 Marek Polacek <polacek@redhat.com>
477
478 PR c++/103539
479 * parser.cc (cp_parser_statement): Constify the in_compound parameter.
480 Create a modifiable copy. Allow labels at the end of compound
481 statements.
482
4832022-05-09 Patrick Palka <ppalka@redhat.com>
484
485 PR c++/105491
486 * call.cc (field_in_pset): Adjust after next_initializable_field
487 renaming.
488 (build_aggr_conv): Likewise.
489 (convert_like_internal): Likewise.
490 (type_has_extended_temps): Likewise.
491 * class.cc (default_init_uninitialized_part): Likewise.
492 (finish_struct): Likewise.
493 * constexpr.cc (cx_check_missing_mem_inits): Likewise.
494 (reduced_constant_expression_p): Use next_subobject_field
495 instead.
496 * cp-gimplify.cc (get_source_location_impl_type): Adjust after
497 next_initializable_field renaming.
498 (fold_builtin_source_location): Likewise.
499 * cp-tree.h (next_initializable_field): Rename to ...
500 (next_aggregate_field): ... this.
501 (next_subobject_field): Declare.
502 * decl.cc (next_aggregate_field): Renamed from ...
503 (next_initializable_field): ... this. Skip over vptr fields
504 again.
505 (next_subobject_field): Define.
506 (reshape_init_class): Adjust after next_initializable_field
507 renaming.
508 * init.cc (build_value_init_noctor): Likewise.
509 (emit_mem_initializers): Likewise.
510 * lambda.cc (build_capture_proxy): Likewise.
511 * method.cc (build_comparison_op): Likewise.
512 * pt.cc (maybe_aggr_guide): Likewise.
513 * tree.cc (structural_type_p): Likewise.
514 * typeck2.cc (split_nonconstant_init_1): Likewise.
515 (digest_init_r): Likewise.
516
5172022-05-09 Nathan Sidwell <nathan@acm.org>
518
519 * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Renamed from
520 DECL_MODULE_ATTACHMENTS_P.
521 (struct lane_decl_base): Rename module_attached_p to
522 module_keyed_decls_p.
523 (maybe_key_decl): Renamed from maybe_attach_decl.
524 * lambda.cc (record_lambda_scope): Adjust.
525 * lex.cc (cxx_dup_lang_specific_decl): Adjust.
526 * module.cc (keyed_map_t, keyed_table): Renamed from attached_map_t,
527 attached_table.
528 (enum merge_kind): Rename MK_attached to MK_keyed.
529 (trees_out::lang_decl_bools): Adjust.
530 (trees_in::lang_decl_bools): Adjust.
531 (trees_in::decl_value): Adjust.
532 (trees_out::get_merge_kind): Adjust.
533 (trees_out::key_mergeable): Adjust.
534 (trees_in::key_mergeable): Adjust.
535 (maybe_key_decl): Rename from maybe_attach_decl.
536 (direct_import): Adjust.
537 (fini_modules): Adjust.
538
5392022-05-09 Martin Liska <mliska@suse.cz>
540
541 * cp-gimplify.cc (cp_genericize_r): Use {,UN}LIKELY
542 macros.
543 * parser.cc (cp_finalize_omp_declare_simd): Likewise.
544 (cp_finalize_oacc_routine): Likewise.
545
a1947c92
GA
5462022-05-07 Marek Polacek <polacek@redhat.com>
547
548 PR c++/101833
549 PR c++/47634
550 * tree.cc (maybe_adjust_arg_pos_for_attribute): New.
551
ea3fbfda
GA
5522022-05-06 Jason Merrill <jason@redhat.com>
553
554 * error.cc (decl_to_string): Add show_color parameter.
555 (subst_to_string): Likewise.
556 (cp_printer): Pass it.
557 (type_to_string): Set pp_show_color.
558 (dump_function_name): Use "fnname" color.
559 (dump_template_bindings): Use "targs" color.
560 (struct colorize_guard): New.
561 (reinit_cxx_pp): Clear pp_show_color.
562
5632022-05-06 Jason Merrill <jason@redhat.com>
564
565 PR c++/105245
566 PR c++/100111
567 * constexpr.cc (cxx_eval_store_expression): Reorganize empty base
568 handling.
569
ab869e7f
GA
5702022-05-05 Marek Polacek <polacek@redhat.com>
571
572 PR c++/64679
573 * parser.cc (cp_parser_parameter_declaration_clause): Maintain
574 a vector of parameters that haven't been pushed yet. Push them at the
575 end of a valid parameter-declaration-clause.
576 (cp_parser_parameter_declaration_list): Take a new auto_vec parameter.
577 Do not pushdecl while parsing tentatively when pushdecl-ing a parameter
578 would result in a hard error.
579 (cp_parser_cache_defarg): Adjust the call to
580 cp_parser_parameter_declaration_list.
581
5822022-05-05 Richard Biener <rguenther@suse.de>
583
584 * module.cc (trees_in::core_vals): Remove separate allocation
585 for REAL_CST.
586
3e7db517
GA
5872022-05-04 Jason Merrill <jason@redhat.com>
588
589 PR c++/104470
590 * pt.cc (maybe_dependent_member_ref): Handle types.
591 (tsubst, tsubst_copy): Use it.
592 (tsubst_aggr_type, instantiate_alias_template): Don't handle
593 tf_dguide here.
594
5952022-05-04 Patrick Palka <ppalka@redhat.com>
596
597 PR c++/105476
598 * pt.cc (maybe_aggr_guide): Set processing_template_decl when
599 partially instantiating the guide's parameter list.
600
6012022-05-04 Marek Polacek <polacek@redhat.com>
602
603 PR c++/64679
604 * parser.cc (cp_parser_init_declarator): Properly handle a series of
605 operator() calls, they are not part of an init-declarator.
606
6072022-05-04 Jason Merrill <jason@redhat.com>
608
609 * decl.cc (reshape_init): Shortcut already-reshaped init.
610 (reshape_init_class): Assert not getting one here.
611
6122022-05-04 Jason Merrill <jason@redhat.com>
613
614 * error.cc (cp_print_error_function): Use %qD.
615 (function_category): Use %qD.
616
6172022-05-04 Marek Polacek <polacek@redhat.com>
618
619 PR c++/105436
620 * parser.cc (cp_parser_next_token_ends_template_argument_p): Don't
621 return true for CPP_GREATER_EQ.
622
6232022-05-04 Jason Merrill <jason@redhat.com>
624
625 * cp-tree.h (struct language_function): Remove x_cdtor_label.
626 (cdtor_label, LABEL_DECL_CDTOR): Remove.
627 * constexpr.cc (returns): Don't check LABEL_DECL_CDTOR.
628 (cxx_eval_constant_expression): Don't call returns.
629 * decl.cc (check_goto): Don't check cdtor_label.
630 (start_preparsed_function): And don't set it.
631 (finish_constructor_body, finish_destructor_body): Remove.
632 (finish_function_body): Don't call them.
633 * typeck.cc (check_return_expr): Handle cdtor_returns_this here.
634 * semantics.cc (finish_return_stmt): Not here.
635
6362022-05-04 Jakub Jelinek <jakub@redhat.com>
637
638 * lambda.cc: Include decl.h.
639 (maybe_add_lambda_conv_op): Temporarily override deprecated_state to
640 UNAVAILABLE_DEPRECATED_SUPPRESS.
641
e66af28d
GA
6422022-05-03 Patrick Palka <ppalka@redhat.com>
643
644 PR c++/105351
645 * cp-tree.h (finish_non_static_data_member): Add defaulted
646 complain parameter.
647 * pt.cc (tsubst_copy_and_build): Pass complain to
648 finish_non_static_data_member.
649 * semantics.cc (finish_non_static_data_member): Respect complain
650 parameter.
651 (finish_qualified_id_expr): Pass complain to
652 finish_non_static_data_member.
653
6259d8aa
GA
6542022-05-02 Jason Merrill <jason@redhat.com>
655
656 * pt.cc (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Copy location.
657 (do_auto_deduction): Use expr location.
658
6592022-05-02 Jason Merrill <jason@redhat.com>
660
661 * class.cc (maybe_note_name_used_in_class): Note in all enclosing
662 classes. Remember location of use.
663 (note_name_declared_in_class): Adjust.
664
6652022-05-02 Marek Polacek <polacek@redhat.com>
666
667 * cp-tree.h (uses_template_parms): Adjust declaration.
668 * pt.cc (uses_template_parms): Return bool. Use a RAII sentinel.
669
6702022-05-02 Richard Biener <rguenther@suse.de>
671
672 * constexpr.cc (fold_simple_1): Use CASE_CONVERT.
673 * cp-gimplify.cc (cp_fold): Likewise.
674 * pt.cc (tsubst_copy): Likewise.
675
66d1e440
GA
6762022-04-29 Jason Merrill <jason@redhat.com>
677
678 PR c++/91618
679 PR c++/96604
680 * friend.cc (do_friend): Call check_explicit_specialization here.
681 * decl.cc (grokdeclarator): Not here.
682 * decl2.cc (check_classfn): Or here.
683
6842022-04-29 Jason Merrill <jason@redhat.com>
685
686 PR c++/104470
687 * cp-tree.h (enum tsubst_flags): Add tf_dguide.
688 * pt.cc (tsubst_aggr_type): Check it.
689 (tsubst_baselink, tsubst_copy): Check it.
690 (maybe_dependent_member_ref): Check it.
691 (instantiate_alias_template): Handle it.
692 (build_deduction_guide): Set it.
693
6942022-04-29 Jason Merrill <jason@redhat.com>
695
696 PR c++/82980
697 * lambda.cc (type_deducible_expression_p): Allow more types.
698
6992022-04-29 Jason Merrill <jason@redhat.com>
700
701 * decl.cc (cp_finish_decl): Only consider auto for vars.
702
7032022-04-29 Marek Polacek <polacek@redhat.com>
704
705 PR c++/67048
706 * parser.cc (cp_parser_enum_specifier): Warn about empty unnamed enum
707 only when it's followed by a semicolon.
708
7092022-04-29 Jason Merrill <jason@redhat.com>
710
711 PR c++/80351
712 * decl.cc (cp_finish_decl): Check completeness of deduced type.
713
7142022-04-29 Jason Merrill <jason@redhat.com>
715
716 PR c++/102987
717 * error.cc (dump_decl) [USING_DECL]: Respect flags.
718
7192022-04-29 Jason Merrill <jason@redhat.com>
720
721 * error.cc (dump_decl): Check TFF_UNQUALIFIED_NAME.
722
7232022-04-29 Jakub Jelinek <jakub@redhat.com>
724
725 PR c++/104319
726 * parser.cc (cp_parser_template_argument): Treat >= like C++98 >>
727 after a type id by setting maybe_type_id and aborting tentative
728 parse.
729 (cp_parser_enclosed_template_argument_list): Handle
730 CPP_GREATER_EQ like misspelled CPP_GREATER CPP_RQ and
731 CPP_RSHIFT_EQ like misspelled CPP_GREATER CPP_GREATER_EQ
732 or CPP_RSHIFT CPP_EQ or CPP_GREATER CPP_GREATER CPP_EQ.
733 (cp_parser_next_token_ends_template_argument_p): Return true
734 also for CPP_GREATER_EQ and CPP_RSHIFT_EQ.
735
7362022-04-29 Iain Sandoe <iain@sandoe.co.uk>
737
738 PR c++/105426
739 * coroutines.cc (register_local_var_uses): Allow promotion of unnamed
740 temporaries to coroutine frame copies.
741
7422022-04-29 Jason Merrill <jason@redhat.com>
743
744 * semantics.cc (check_trait_type): Don't check completeness
745 of element type of array of unknown bound.
746
7472022-04-29 Jason Merrill <jason@redhat.com>
748
749 PR c++/102651
750 PR c++/49387
751 * rtti.cc (get_tinfo_decl_direct): Don't complete_type.
752 (emit_tinfo_decl): Update tdesc type if needed.
753
7542022-04-29 Zhao Wei Liew <zhaoweiliew@gmail.com>
755
756 PR c++/25689
757 * call.cc (extract_call_expr): Return a NULL_TREE on failure
758 instead of asserting.
759 (build_new_method_call): Suppress -Wparentheses diagnostic for
760 MODIFY_EXPR.
761 * semantics.cc (is_assignment_op_expr_p): Add function to check
762 if an expression is a call to an op= operator expression.
763 (maybe_convert_cond): Handle the case of a op= operator expression
764 for the -Wparentheses diagnostic.
765
6b6f53d8
GA
7662022-04-28 Patrick Palka <ppalka@redhat.com>
767
768 PR c++/105425
769 * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Treat
770 DEPENDENT_OPERATOR_TYPE like an empty type.
771
7722022-04-28 Iain Sandoe <iain@sandoe.co.uk>
773
774 PR c++/104051
775 * coroutines.cc (coro_diagnose_throwing_final_aw_expr): Handle
776 non-target expression inputs.
777
7782022-04-28 Iain Sandoe <iain@sandoe.co.uk>
779
780 PR c++/105301
781 * coroutines.cc (coro_promise_type_found_p): Account for possible
782 mutliple overloads of the promise return_value() method.
783
7842022-04-28 Iain Sandoe <iain@sandoe.co.uk>
785
786 PR c++/105287
787 * coroutines.cc (maybe_promote_temps): Ensure generated temporaries
788 are added to the bind expr.
789 (add_var_to_bind): Fix local var naming to use portable punctuation.
790 (register_local_var_uses): Do not add synthetic names to unnamed
791 temporaries.
792
7932022-04-28 Nathan Sidwell <nathan@acm.org>
794 Iain Sandoe <iain@sandoe.co.uk>
795
796 PR c++/103868
797 * coroutines.cc (finish_co_await_expr): Do not process non-dependent
798 coroutine expressions at template definition time.
799 (finish_co_yield_expr): Likewise.
800 (finish_co_return_stmt): Likewise.
801
8022022-04-28 Marek Polacek <polacek@redhat.com>
803
804 PR c++/90107
805 * parser.cc (cp_parser_class_specifier_1): Accept :: after a class
806 definition.
807
ba949a6a
GA
8082022-04-27 Jason Merrill <jason@redhat.com>
809
810 * tree.cc (strip_typedefs): Add default argument comments.
811
8122022-04-27 Marek Polacek <polacek@redhat.com>
813
814 PR c++/105398
815 * pt.cc (uses_template_parms): Return false for any NAMESPACE_DECL.
816
01ad093b
GA
8172022-04-26 Jason Merrill <jason@redhat.com>
818
819 PR c++/102629
820 * pt.cc (gen_elem_of_pack_expansion_instantiation): Clear
821 TEMPLATE_TYPE_PARAMETER_PACK on auto.
822
8232022-04-26 Patrick Palka <ppalka@redhat.com>
824
825 PR c++/105386
826 * semantics.cc (finish_decltype_type): Pass tf_decltype to
827 instantiate_non_dependent_expr_sfinae.
828
8292022-04-26 Jason Merrill <jason@redhat.com>
830
831 PR c++/104624
832 * pt.cc (check_for_bare_parameter_packs): Check for lambda
833 function parameter pack.
834
8352022-04-26 Patrick Palka <ppalka@redhat.com>
836
837 PR c++/105289
838 PR c++/86193
839 * pt.cc (process_partial_specialization): Downgrade "partial
840 specialization isn't more specialized" diagnostic from permerror
841 to an on-by-default pedwarn.
842 (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the
843 NTTP type a second time, use the original type not the
844 substituted type.
845
98de0da6
GA
8462022-04-25 Marek Polacek <polacek@redhat.com>
847
848 PR c++/105353
849 * typeck.cc (build_x_shufflevector): Use
850 instantiation_dependent_expression_p except for the first two
851 arguments.
852
c1a9cf67
GA
8532022-04-21 Marek Polacek <polacek@redhat.com>
854
855 * constexpr.cc (cxx_eval_logical_expression): Remove unused
856 parameter.
857 (cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>,
858 <case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression.
859
8602022-04-21 Marek Polacek <polacek@redhat.com>
861
862 PR c++/105321
863 * constexpr.cc (cxx_eval_logical_expression): Always pass false for lval
864 to cxx_eval_constant_expression.
865
29a25a60
GA
8662022-04-20 Ed Catmur <ed@catmur.uk>
867
868 PR c++/104996
869 * call.cc (compare_ics): When comparing list-initialization
870 sequences, do not return early.
871
d1d57187
GA
8722022-04-19 Jakub Jelinek <jakub@redhat.com>
873
874 PR c++/105256
875 * typeck2.cc (process_init_constructor_array,
876 process_init_constructor_record, process_init_constructor_union): Move
877 CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag from CONSTRUCTOR elements to the
878 containing CONSTRUCTOR.
879
587953f0
GA
8802022-04-15 Marek Polacek <polacek@redhat.com>
881
882 PR c++/105268
883 * parser.cc (cp_parser_placeholder_type_specifier): Return
884 error_mark_node when trying to build up a constrained parameter in
885 a default argument.
886
8872022-04-15 Jason Merrill <jason@redhat.com>
888
889 PR c++/102804
890 * decl.cc (grokdeclarator): Drop typedef used with 'unsigned'.
891
8922022-04-15 Jason Merrill <jason@redhat.com>
893
894 PR c++/102987
895 * error.cc (dump_expr): Handle USING_DECL.
896 [VIEW_CONVERT_EXPR]: Just look through location wrapper.
897
031bd52e
GA
8982022-04-14 Jason Merrill <jason@redhat.com>
899
900 PR c++/104646
901 * constexpr.cc (maybe_save_constexpr_fundef): Don't do extra
902 checks for defaulted ctors.
903
9042022-04-14 Jason Merrill <jason@redhat.com>
905
906 PR c++/82980
907 * lambda.cc (type_deducible_expression_p): New.
908 (lambda_capture_field_type): Check it.
909
9102022-04-14 Jason Merrill <jason@redhat.com>
911
912 PR c++/65211
913 * pt.cc (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN.
914
9152022-04-14 Jason Merrill <jason@redhat.com>
916
917 PR c++/97219
918 * name-lookup.cc (dependent_local_decl_p): New.
919 * cp-tree.h (dependent_local_decl_p): Declare.
920 * semantics.cc (finish_call_expr): Use it.
921 * pt.cc (tsubst_arg_types): Also substitute default args
922 for local externs.
923
9242022-04-14 Jason Merrill <jason@redhat.com>
925
926 PR c++/101698
927 * pt.cc (tsubst_baselink): Also check dependent optype.
928
9292022-04-14 Jason Merrill <jason@redhat.com>
930
931 PR c++/101442
932 * decl.cc (cp_finish_decl): Don't pass decl to push_cleanup.
933 * init.cc (perform_member_init): Likewise.
934 * semantics.cc (push_cleanup): Adjust comment.
935
247bbed1
GA
9362022-04-13 Jason Merrill <jason@redhat.com>
937
938 PR c++/105245
939 PR c++/100111
940 * constexpr.cc (cxx_eval_store_expression): Build a CONSTRUCTOR
941 as needed in empty base handling.
942
9432022-04-13 Jakub Jelinek <jakub@redhat.com>
944
945 PR c++/105233
946 * decl2.cc (cp_check_const_attributes): For aligned attribute
947 pass manifestly_const_eval=true to fold_non_dependent_expr.
948
9492022-04-13 Marek Polacek <polacek@redhat.com>
950
951 PR c++/97296
952 * call.cc (direct_reference_binding): strip_top_quals when creating
953 a ck_qual.
954
504dae1d
GA
9552022-04-12 Jason Merrill <jason@redhat.com>
956
957 PR c++/104669
958 * decl.cc (decls_match): Compare versions even if not recording.
959 (duplicate_decls): Propagate attributes to alias.
960 * decl2.cc (find_last_decl): Give up if versioned.
961
9622022-04-12 Jason Merrill <jason@redhat.com>
963
964 PR c++/102071
965 * init.cc (build_new_1): Check array_p for alignment.
966
9672022-04-12 Patrick Palka <ppalka@redhat.com>
968
969 PR c++/103105
970 * pt.cc (build_extra_args): Call preserve_args.
971
9722022-04-12 Jason Merrill <jason@redhat.com>
973
974 PR c++/104142
975 * decl.cc (check_initializer): Check TREE_SIDE_EFFECTS.
976
9772022-04-12 Jason Merrill <jason@redhat.com>
978
979 PR c++/105223
980 PR c++/92918
981 * class.cc (finish_struct): Always using op=.
982
da066c42
GA
9832022-04-11 Jason Merrill <jason@redhat.com>
984
985 PR c++/98249
986 * call.cc (build_operator_new_call): Just look in ::.
987
9882022-04-11 Alexandre Oliva <oliva@adacore.com>
989
990 * constexpr.cc (cxx_eval_call_expression): Disregard dtor
991 result.
992
9932022-04-11 Alexandre Oliva <oliva@adacore.com>
994
995 * semantics.cc (set_cleanup_locs): Propagate locus to call
996 wrapped in cast-to-void.
997
9982022-04-11 Jason Merrill <jason@redhat.com>
999
1000 PR c++/100370
1001 * init.cc (warn_placement_new_too_small): Check deref.
1002
71cac7de
GA
10032022-04-09 Jason Merrill <jason@redhat.com>
1004
1005 PR c++/105191
1006 PR c++/92385
1007 * tree.cc (build_vec_init_elt): Do {}-init for aggregates.
1008 * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init
1009 for non-aggregate types.
1010 (build_vec_init_expr): Also check constancy of explicit
1011 initializer elements.
1012
10132022-04-09 Jason Merrill <jason@redhat.com>
1014
1015 PR c++/91618
1016 PR c++/96604
1017 * name-lookup.cc (set_decl_namespace): Set
1018 DECL_IMPLICIT_INSTANTIATION if no non-template match.
1019 * pt.cc (check_explicit_specialization): Check it.
1020 * decl2.cc (check_classfn): Call it.
1021
df00d103
GA
10222022-04-07 Patrick Palka <ppalka@redhat.com>
1023
1024 PR c++/99479
1025 * name-lookup.cc (name_lookup::using_queue): Change to an
1026 auto_vec (with 16 elements of internal storage).
1027 (name_lookup::queue_namespace): Change return type to void,
1028 take queue parameter by reference and adjust function body
1029 accordingly.
1030 (name_lookup::do_queue_usings): Inline into ...
1031 (name_lookup::queue_usings): ... here. As in queue_namespace.
1032 (name_lookup::search_unqualified): Don't make queue static,
1033 remove length variable, and adjust function body accordingly.
1034
10352022-04-07 Jakub Jelinek <jakub@redhat.com>
1036
1037 PR tree-optimization/102586
1038 * cp-objcp-common.h (cp_classtype_as_base): Declare.
1039 (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine.
1040 * cp-objcp-common.cc (cp_classtype_as_base): New function.
1041
10422022-04-07 Jason Merrill <jason@redhat.com>
1043
1044 PR c++/101051
1045 * decl.cc (grokdeclarator): Reject conversion with trailing return
1046 sooner.
1047
10482022-04-07 Jason Merrill <jason@redhat.com>
1049
1050 PR c++/101717
1051 * lambda.cc (lambda_expr_this_capture): Check all enclosing
1052 lambdas for completeness.
1053
10542022-04-07 Jason Merrill <jason@redhat.com>
1055
1056 PR c++/105187
1057 * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for
1058 vectors.
1059
80eb8ec6
GA
10602022-04-06 Jakub Jelinek <jakub@redhat.com>
1061
1062 PR c++/104668
1063 * decl2.cc (splice_template_attributes): Return NULL if *p is
1064 error_mark_node.
1065 (cplus_decl_attributes): Return early if attributes is
1066 error_mark_node. Don't check that later.
1067
10682022-04-06 Patrick Palka <ppalka@redhat.com>
1069
1070 PR c++/105143
1071 * pt.cc (do_class_deduction): Check complain before attempting
1072 to issue a -Wctad-maybe-unsupported warning.
1073
10742022-04-06 Jason Merrill <jason@redhat.com>
1075
1076 PR c++/104702
1077 * init.cc (build_vec_init): Use a reference for the result.
1078
10792022-04-06 Jason Merrill <jason@redhat.com>
1080
1081 PR c++/100608
1082 * name-lookup.cc (check_local_shadow): Use -Wshadow=local
1083 if exactly one of 'old' and 'decl' is a type.
1084
9d84ed68
GA
10852022-04-05 Jason Merrill <jason@redhat.com>
1086
1087 PR c++/103852
1088 DR 1286
1089 * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17.
1090
10912022-04-05 Jason Merrill <jason@redhat.com>
1092
1093 PR c++/101677
1094 * name-lookup.h (struct cp_binding_level): Add requires_expression
1095 bit-field.
1096 * parser.cc (cp_parser_requires_expression): Set it.
1097 (synthesize_implicit_template_parm): Check it.
1098
5e09bb1b
GA
10992022-04-04 Jason Merrill <jason@redhat.com>
1100
1101 PR c++/101894
1102 * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT.
1103
11042022-04-04 Jason Merrill <jason@redhat.com>
1105
1106 PR c++/103852
1107 DR 1286
1108 * pt.cc (get_underlying_template): Compare default template args.
1109
8af4270d
GA
11102022-04-03 Benno Evers <benno.evers@tenzir.com>
1111 Iain Sandoe <iain@sandoe.co.uk>
1112
1113 PR c++/103328
1114 * coroutines.cc (morph_fn_to_coro): Reset
1115 current_binding_level->blocks.
1116
447ac3c5
ML
11172022-04-01 Jason Merrill <jason@redhat.com>
1118
1119 Revert:
1120 2022-03-31 Jason Merrill <jason@redhat.com>
1121
1122 PR c++/96645
1123 * parser.cc (cp_parser_early_parsing_nsdmi): New.
1124 (cp_parser_member_declaration): Call it.
1125
11262022-04-01 Jason Merrill <jason@redhat.com>
1127
1128 Revert:
1129 2022-03-24 Jason Merrill <jason@redhat.com>
1130
1131 PR c++/96645
1132 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
1133 * class.cc (type_has_default_ctor_to_be_synthesized): New.
1134 (type_has_non_user_provided_default_constructor_1): Support it.
1135 (type_has_non_user_provided_default_constructor): Now a wrapper.
1136 * method.cc (complain_about_unparsed_dmi): New.
1137 (constructible_expr): Call it.
1138
8af4270d
GA
11392022-04-01 Patrick Palka <ppalka@redhat.com>
1140
1141 PR c++/105110
1142 * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from
1143 the argument type of an NTTP before deducing from it.
1144
57ad4462
GA
11452022-03-31 Jason Merrill <jason@redhat.com>
1146
1147 PR c++/96645
1148 * parser.cc (cp_parser_early_parsing_nsdmi): New.
1149 (cp_parser_member_declaration): Call it.
1150
150ab50f
GA
11512022-03-30 Patrick Palka <ppalka@redhat.com>
1152
1153 PR c++/100474
1154 * constraint.cc (diagnose_trait_expr): Handle all remaining
1155 traits appropriately. Remove default case.
1156
11572022-03-30 Marek Polacek <polacek@redhat.com>
1158
1159 PR c++/93280
1160 PR c++/104583
1161 * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor.
1162
11632022-03-30 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c++/105092
1166 * pt.cc (tsubst_omp_clause_decl): When handling iterators, set
1167 DECL_CONTEXT of the iterator var to current_function_decl and
1168 call pushdecl.
1169
11702022-03-30 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR c++/105061
1173 * parser.cc (cp_parser_template_introduction): If member_p, temporarily
1174 clear parser->colon_corrects_to_scope_p around tentative parsing of
1175 nested name specifier.
1176
aab0127d
GA
11772022-03-28 Jason Merrill <jason@redhat.com>
1178
1179 * pt.cc (determine_specialization): Add comment.
1180
11812022-03-28 Patrick Palka <ppalka@redhat.com>
1182
1183 PR c++/105067
1184 * pt.cc (finish_concept_definition): Check that a concept is
1185 declared with exactly one template parameter list.
1186
11872022-03-28 Patrick Palka <ppalka@redhat.com>
1188
1189 PR c++/105064
1190 * constraint.cc (maybe_substitute_reqs_for): Don't assume
1191 DECL_TEMPLATE_INFO is available.
1192
11932022-03-28 Jason Merrill <jason@redhat.com>
1194
1195 PR c++/105003
1196 PR c++/104008
1197 PR c++/102869
1198 * pt.cc (complex_alias_template_r): walk_tree callback, replacing
1199 uses_all_template_parms_r, complex_pack_expansion_r.
1200 (complex_alias_template_p): Adjust.
1201 * tree.cc (strip_typedefs): Revert r12-7710 change.
1202
12032022-03-28 Jason Merrill <jason@redhat.com>
1204
1205 PR c++/102071
1206 * init.cc (build_new_1): Include cookie in alignment. Omit
1207 constexpr wrapper from alloc_call.
1208
12092022-03-28 Jason Merrill <jason@redhat.com>
1210
1211 PR c++/103291
1212 * name-lookup.cc (push_local_extern_decl_alias): Call
1213 determine_visibility.
1214
12152022-03-28 Jason Merrill <jason@redhat.com>
1216
1217 PR c++/102123
1218 * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting
1219 a type template reference.
1220
12212022-03-28 Jason Merrill <jason@redhat.com>
1222
1223 PR c++/103968
1224 * pt.cc (value_dependent_expression_p): Check
1225 has_value_dependent_address for conversion to reference.
1226
12272022-03-28 Jason Merrill <jason@redhat.com>
1228
1229 PR c++/103943
1230 * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from
1231 tsubst_baselink.
1232 (instantiation_dependent_scope_ref_p): Check dependent_scope_p.
1233
12342022-03-28 Jason Merrill <jason@redhat.com>
1235
1236 PR c++/102045
1237 * call.cc (make_base_init_ok): Call make_used.
1238
12392022-03-28 Jason Merrill <jason@redhat.com>
1240
1241 PR c++/104847
1242 * mangle.cc (write_expression): Don't write a union designator when
1243 undigested.
1244
12452022-03-28 Jason Merrill <jason@redhat.com>
1246
1247 PR c++/99445
1248 PR c++/103769
1249 * tree.cc (strip_typedefs): Use build_distinct_type_copy.
1250
d2906412
GA
12512022-03-26 Patrick Palka <ppalka@redhat.com>
1252
1253 PR c++/105050
1254 * constexpr.cc (potential_constant_expression_1) <case IF_STMT>:
1255 Clarify error message when a if-stmt is non-constant because its
1256 branches are non-constant.
1257
12582022-03-26 Patrick Palka <ppalka@redhat.com>
1259
1260 PR c++/103455
1261 * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test
1262 CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P.
1263
31e989a2
GA
12642022-03-26 Jakub Jelinek <jakub@redhat.com>
1265
1266 * parser.cc (cp_parser_postfix_expression)
1267 <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't
1268 return cp_build_{vec,convert,bit_cast} result right away, instead
1269 set postfix_expression to it and break.
1270
12712022-03-25 Marek Polacek <polacek@redhat.com>
1272
1273 PR c++/104944
1274 * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void).
1275 (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with
1276 complain == true.
1277
6fc4a993
GA
12782022-03-24 Marek Polacek <polacek@redhat.com>
1279
1280 PR c++/104284
1281 * decl.cc (check_initializer): Don't call build_aggr_init in
1282 a template.
1283
12842022-03-24 Jason Merrill <jason@redhat.com>
1285
1286 PR c++/96645
1287 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
1288 * class.cc (type_has_default_ctor_to_be_synthesized): New.
1289 (type_has_non_user_provided_default_constructor_1): Support it.
1290 (type_has_non_user_provided_default_constructor): Now a wrapper.
1291 * method.cc (complain_about_unparsed_dmi): New.
1292 (constructible_expr): Call it.
1293
12942022-03-24 Marek Polacek <polacek@redhat.com>
1295
1296 PR c++/102990
1297 * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs.
1298
12992022-03-24 Patrick Palka <ppalka@redhat.com>
1300
1301 PR c++/104620
1302 * call.cc (build_over_call): Use cxx_constant_value_sfinae
1303 instead of cxx_constant_value to evaluate a consteval call.
1304 * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter
1305 and pass it to cxx_eval_outermost_constant_expr.
1306 * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter.
1307 * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to
1308 cxx_constant_value_sfinae.
1309
13102022-03-24 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c++/104994
1313 * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing
1314 through extern thread_local declarations. Change wording from
1315 declaration to definition.
1316 (potential_constant_expression_1): Don't diagnose extern thread_local
1317 declarations. Change wording from declared to defined.
1318 * decl.cc (start_decl): Likewise.
1319
d1ca63a1
GA
13202022-03-23 Jason Merrill <jason@redhat.com>
1321
1322 PR c++/103337
1323 * decl.cc (reshape_single_init): New.
1324 (reshape_init_class): Use it.
1325
13262022-03-23 Jason Merrill <jason@redhat.com>
1327
1328 PR c++/105006
1329 * name-lookup.cc (lookup_using_decl): Check that scope is
1330 a dependent type before looking for dependent using.
1331
13322022-03-23 Jason Merrill <jason@redhat.com>
1333
1334 PR c++/105006
1335 * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup
1336 finds a dependent using.
1337
d156bb87
GA
13382022-03-21 Jason Merrill <jason@redhat.com>
1339
1340 PR c++/58646
1341 * init.cc (build_vec_init): Check for vla element type.
1342
13432022-03-21 Jason Merrill <jason@redhat.com>
1344
1345 PR c++/103337
1346 PR c++/102740
1347 PR c++/103299
1348 PR c++/102538
1349 * decl.cc (reshape_init_class): Avoid looking for designator
1350 after we found it.
1351 (reshape_init_r): Keep looking for designator.
1352
13532022-03-21 Jason Merrill <jason@redhat.com>
1354
1355 PR c++/101767
1356 * decl.cc (reshape_init_class): Back out of anon struct
1357 if a designator doesn't match.
1358
8ca61ad1
GA
13592022-03-18 Jason Merrill <jason@redhat.com>
1360
1361 PR c++/92918
1362 PR c++/104476
1363 * class.cc (add_method): Avoid adding the same used function twice.
1364 (handle_using_decl): Don't add_method.
1365 (finish_struct): Don't using op= if we have one already.
1366 (maybe_push_used_methods): New.
1367 * semantics.cc (finish_member_declaration): Call it.
1368 * name-lookup.cc (diagnose_name_conflict): No longer static.
1369 (push_class_level_binding): Revert 92918 patch, limit
1370 to dependent using.
1371 * cp-tree.h: Adjust.
1372
13732022-03-18 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR c++/104568
1376 * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE
1377 argument and its handling, instead add ITYPE2 argument. Only
1378 support COOKIE_SIZE != NULL.
1379 (build_new_1): If size is 0, change it to 0 * outer_nelts if
1380 outer_nelts is non-NULL. Pass type rather than elt_type to
1381 maybe_wrap_new_for_constexpr.
1382 * constexpr.cc (build_new_constexpr_heap_type): New function.
1383 (cxx_eval_constant_expression) <case CONVERT_EXPR>:
1384 If elt_size is zero sized type, try to recover outer_nelts from
1385 the size argument to operator new/new[] and pass that as
1386 arg_size to build_new_constexpr_heap_type. Pass ctx,
1387 non_constant_p and overflow_p to that call too.
1388
13892022-03-18 Marek Polacek <polacek@redhat.com>
1390
1391 PR c++/104008
1392 * tree.cc (strip_typedefs): Don't strip an alias template when
1393 doing so would result in losing a parameter pack.
1394
9fc8f278
GA
13952022-03-16 Patrick Palka <ppalka@redhat.com>
1396
1397 * search.cc (lookup_member): Simplify by handling all values
1398 of protect together in the ambiguous case. Don't modify protect.
1399
14002022-03-16 Patrick Palka <ppalka@redhat.com>
1401
1402 PR c++/96780
1403 * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to
1404 std::move/forward and other cast-like functions into simple
1405 casts.
1406
14d2ac82
GA
14072022-03-15 Patrick Palka <ppalka@redhat.com>
1408
1409 PR c++/103177
1410 * search.cc (lookup_field_info::errstr): Remove this data
1411 member.
1412 (lookup_field_r): Don't set errstr.
1413 (lookup_member): Check ambiguity before checking access.
1414 Simplify accordingly after errstr removal. Exit early upon
1415 error or empty result.
1416
14172022-03-15 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c++/104623
1420 * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens.
1421
510613e7
GA
14222022-03-14 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR tree-optimization/102586
1425 * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where
1426 first argument's type is pointer to non-trivially-copyable type unless
1427 it is address of a variable or parameter.
1428
57eeedda
GA
14292022-03-12 Patrick Palka <ppalka@redhat.com>
1430
1431 PR c++/104641
1432 * cp-tree.h (tsubst_flags::tf_tst_ok): New flag.
1433 * decl.cc (make_typename_type): Allow a typename-specifier to
1434 resolve to a template when tf_tst_ok, in which case return
1435 a CTAD placeholder for the template.
1436 * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when
1437 substituting the type.
1438 (tsubst): Clear tf_tst_ok and remember if it was set.
1439 <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type
1440 appropriately.
1441 (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting
1442 the type.
1443 (tsubst_copy_and_build) <case CAST_EXPR>: Likewise.
1444 <case CONSTRUCTOR>: Likewise.
1445
14462022-03-12 Patrick Palka <ppalka@redhat.com>
1447
1448 PR c++/104622
1449 * call.cc (missing_conversion_p): Define.
1450 (add_candidates): Use it.
1451 * pt.cc (check_non_deducible_conversion): Change type of strict
1452 parameter to unification_kind_t and directly test for DEDUCE_CALL.
1453
14542022-03-12 Patrick Palka <ppalka@redhat.com>
1455
1456 PR c++/104527
1457 * constraint.cc (normalize_atom): Set
1458 ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately.
1459 (get_mapped_args): Make static, adjust parameters. Always
1460 return a vector whose depth corresponds to the template depth of
1461 the context of the atomic constraint expression. Micro-optimize
1462 by passing false as exact to safe_grow_cleared and by collapsing
1463 a multi-level depth-one argument vector.
1464 (satisfy_atom): Adjust call to get_mapped_args and
1465 diagnose_atomic_constraint.
1466 (diagnose_atomic_constraint): Replace map parameter with an args
1467 parameter.
1468 * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define.
1469 (get_mapped_args): Remove declaration.
1470
14712022-03-12 Patrick Palka <ppalka@redhat.com>
1472 Jason Merrill <jason@redhat.com>
1473
1474 PR c++/98644
1475 * constexpr.cc (mark_non_constant): Define, split out from ...
1476 (cxx_eval_outermost_constant_expr): ... here.
1477 (maybe_constant_value): Use it.
1478
14792022-03-12 Patrick Palka <ppalka@redhat.com>
1480
1481 * semantics.cc (finish_unary_fold_expr): Use input_location
1482 instead of UNKNOWN_LOCATION.
1483 (finish_binary_fold_expr): Likewise.
1484
14852022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1486
1487 PR other/65095
1488 * semantics.cc (handle_omp_array_sections_1)
1489 (cp_oacc_check_attachments): Call 'user_omp_clause_code_name'
1490 instead of 'c_omp_map_clause_name'.
1491
5e28be89
GA
14922022-03-10 Marek Polacek <polacek@redhat.com>
1493
1494 PR c++/104608
1495 * parser.cc (cp_parser_template_name): Repeat lookup of
1496 TYPE_DECLs.
1497
14982022-03-10 Marek Polacek <polacek@redhat.com>
1499
1500 PR c++/104752
1501 * semantics.cc (finish_compound_literal): Disallow auto{x} for
1502 is_constrained_auto.
1503 * typeck2.cc (build_functional_cast_1): Likewise.
1504
15052022-03-10 Marek Polacek <polacek@redhat.com>
1506
1507 PR c++/104846
1508 * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving
1509 data member errors.
1510
15112022-03-10 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR c++/103460
1514 * decl.cc (grok_op_properties): Allow variadic operator[] for
1515 C++23.
1516
15172022-03-10 Roger Sayle <roger@nextmovesoftware.com>
1518
1519 PR c++/95999
1520 * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST
1521 consider it to be zero (i.e. treat it like error_mark_node).
1522 (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST,
1523 set VALUE to error_mark_node.
1524
15252022-03-10 Roger Sayle <roger@nextmovesoftware.com>
1526
1527 PR c++/39751
1528 * parser.cc (cp_parser_late_parsing_for_member): Confirm the token
1529 stream hasn't been purged before processing DECL_PENDING_INLINE.
1530
8cc4f9cd
GA
15312022-03-09 Patrick Palka <ppalka@redhat.com>
1532
1533 PR c++/104823
1534 * except.cc (build_noexcept_spec): Strengthen dependence check
1535 to instantiation_dependent_expression_p.
1536 * parser.cc (cp_parser_parenthesized_expression_list_elt):
1537 Remove fold_expr_p parameter, and don't call
1538 instantiate_non_dependent_expr.
1539 (cp_parser_parenthesized_expression_list): Adjust accordingly.
1540 * pt.cc (expand_integer_pack): Strengthen dependence check
1541 to instantiation_dependent_expression_p.
1542 (instantiate_non_dependent_expr_internal): Adjust comment.
1543 (instantiate_non_dependent_expr_sfinae): Likewise. Drop
1544 the potentially-constant check, and relax and turn the
1545 dependence check into a checking assert.
1546 (instantiate_non_dependent_or_null): Adjust comment.
1547 * semantics.cc (finish_decltype_type): Keep
1548 processing_template_decl cleared after calling
1549 instantiate_non_dependent_expr_sfinae.
1550
15512022-03-09 Patrick Palka <ppalka@redhat.com>
1552
1553 PR c++/102137
1554 PR c++/87820
1555 * cp-tree.h (is_copy_initialization): Declare.
1556 * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING
1557 when is_copy_initialization is true.
1558 * init.cc (build_aggr_init): Split out copy-initialization
1559 check into ...
1560 (is_copy_initialization): ... here.
1561 * pt.cc (instantiate_decl): Pass 0 instead of
1562 LOOKUP_ONLYCONVERTING as flags to cp_finish_decl.
1563
15642022-03-09 Patrick Palka <ppalka@redhat.com>
1565
1566 PR c++/65396
1567 * cp-tree.h (merge_default_template_args): Declare.
1568 * decl.cc (merge_default_template_args): Define, factored out
1569 from redeclare_class_template.
1570 (duplicate_decls): Use it when merging member function template
1571 and free function declarations.
1572 * pt.cc (redeclare_class_template): Factor out default argument
1573 merging logic into merge_default_template_args. Improve location
1574 of a note when there's a template parameter kind mismatch.
1575
15762022-03-09 Jakub Jelinek <jakub@redhat.com>
1577
1578 PR c/104711
1579 * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS
1580 instead of TYPE_UNSIGNED.
1581 * typeck.cc (cp_build_binary_op): Don't emit
1582 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1583
8d038a84
GA
15842022-03-08 Roger Sayle <roger@nextmovesoftware.com>
1585
1586 PR c++/96440
1587 * decl.cc (start_decl): Defend against prefix_attributes being
1588 error_mark_node.
1589
15902022-03-08 Roger Sayle <roger@nextmovesoftware.com>
1591
1592 PR c++/96437
1593 * parser.cc (synthesize_implicit_template_parm): Check that
1594 TREE_VALUE (new_parm) isn't error_mark_node before setting its
1595 DECL_VIRTUAL_P.
1596
15972022-03-08 Roger Sayle <roger@nextmovesoftware.com>
1598
1599 PR c++/96329
1600 * parser.cc (cp_parser_linkage_specification): Treat the case where
1601 linkage is error_mark_node as "invalid linkage-specification".
1602
16032022-03-08 Marek Polacek <polacek@redhat.com>
1604
1605 PR c++/104108
1606 * pt.cc (convert_nontype_argument): Recompute
1607 value_dependent_expression_p after build_converted_constant_expr.
1608
16092022-03-08 Marek Polacek <polacek@redhat.com>
1610
1611 * decl2.cc (is_late_template_attribute): Do not defer attribute
1612 unavailable.
1613 * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE.
1614
16152022-03-08 Jakub Jelinek <jakub@redhat.com>
1616
1617 PR c++/104806
1618 * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
1619 identifiers with space at the end.
1620
e6533e2e
GA
16212022-03-07 Jason Merrill <jason@redhat.com>
1622
1623 PR c++/104618
1624 * decl2.cc (mark_single_function): Look through parens and location
1625 wrapper.
1626 * typeck.cc (cp_build_addr_expr_1): Not here.
1627
16282022-03-07 Jakub Jelinek <jakub@redhat.com>
1629
1630 * parser.cc (cp_parser_omp_clause_map): Add missing space in string
1631 literal.
1632
16332022-03-07 Jakub Jelinek <jakub@redhat.com>
1634
1635 * cvt.cc: Fix up duplicated word issue in a comment.
1636 * pt.cc: Likewise.
1637 * module.cc: Likewise.
1638 * coroutines.cc: Likewise.
1639
8d96e14c
GA
16402022-03-04 Nathan Sidwell <nathan@acm.org>
1641
1642 * mangle.cc (is_std_substitution): Check global module.
1643 (is_std_substitution_char): Return bool.
1644
16452022-03-04 Nathan Sidwell <nathan@acm.org>
1646
1647 * cp-tree.h (mangle_identifier): Replace with ...
1648 (mangle_module_component): ... this.
1649 * mangle.cc (dump_substitution_candidates): Adjust.
1650 (add_substitution): Likewise.
1651 (find_substitution): Likewise.
1652 (unmangled_name_p): Likewise.
1653 (mangle_module_substitution): Reimplement.
1654 (mangle_module_component): New.
1655 (write_module, maybe_write_module): Adjust.
1656 (write_name): Drop modules here.
1657 (write_unqualified): Do them here instead.
1658 (mangle_global_init): Adjust.
1659 * module.cc (module_state::mangle): Adjust.
1660 (mangle_module): Likewise.
1661 (get_originating_module): Adjust.
1662
a35f1697
GA
16632022-02-28 Marek Polacek <polacek@redhat.com>
1664
1665 PR c++/104682
1666 * cp-tree.h (build_enumerator): Adjust.
1667 * decl.cc (finish_enum): Make it return the new decl.
1668 * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE.
1669
16702022-02-28 Marek Polacek <polacek@redhat.com>
1671
1672 PR c++/104667
1673 * decl2.cc (is_late_template_attribute): Cope with a decl without
1674 a type.
1675
88c1b038
GA
16762022-02-27 Jason Merrill <jason@redhat.com>
1677
1678 PR c++/104618
1679 * typeck.cc (cp_build_addr_expr_1): Also
1680 maybe_undo_parenthesized_ref.
1681
756a6185
GA
16822022-02-24 Martin Liska <mliska@suse.cz>
1683
1684 * pt.cc (defarg_insts_for): Use braces for subobject.
1685
5a9ba3f2
GA
16862022-02-18 Patrick Palka <ppalka@redhat.com>
1687
1688 PR c++/94944
1689 * pt.cc (maybe_instantiate_noexcept): For non-static member
1690 functions, set current_class_ptr/ref to the specialized 'this'
1691 instead.
1692
0bdb0498
GA
16932022-02-17 Jason Merrill <jason@redhat.com>
1694
1695 PR c++/104539
1696 * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT.
1697
16982022-02-17 Jason Merrill <jason@redhat.com>
1699
1700 PR c++/90451
1701 * decl2.cc (mark_single_function): New.
1702 * cp-tree.h: Declare it.
1703 * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF.
1704 * semantics.cc (finish_qualified_id_expr): Not here.
1705 (finish_id_expression_1): Or here.
1706 (finish_decltype_type): Call mark_single_function.
1707 * cvt.cc (convert_to_void): And here.
1708 * pt.cc (convert_nontype_argument): And here.
1709 * init.cc (build_offset_ref): Adjust assert.
1710
17112022-02-17 Patrick Palka <ppalka@redhat.com>
1712
1713 PR c++/104565
1714 * semantics.cc (finish_compound_literal): Don't perform
1715 non-dependent expr folding before calling check_narrowing.
1716
cb3afcd2
GA
17172022-02-16 Patrick Palka <ppalka@redhat.com>
1718
1719 PR c++/104507
1720 * constexpr.cc (potential_constant_expression_1)
1721 <case NON_DEPENDENT_EXPR>: Return false instead of recursing.
1722 Assert tf_error isn't set.
1723
875e493b
GA
17242022-02-15 Jason Merrill <jason@redhat.com>
1725
1726 PR c++/104107
1727 PR c++/95036
1728 * pt.cc (coerce_template_template_parms): Take full parms.
1729 Avoid adding too much of outer_args.
1730 (coerce_template_template_parm): Adjust.
1731 (template_template_parm_bindings_ok_p): Adjust.
1732 (convert_template_argument): Adjust.
1733
1f8a09d2
GA
17342022-02-14 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR c++/104513
1737 * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>:
1738 Don't punt if returns (target).
1739
e8d68f0a
GA
17402022-02-11 Jakub Jelinek <jakub@redhat.com>
1741
1742 PR c++/104472
1743 * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>:
1744 Only return fold_const_call result if it is non-NULL. Otherwise
1745 fall through into the default: case to return t, set *non_constant_p
1746 and emit diagnostics if needed.
1747
a645583d
GA
17482022-02-10 Jason Merrill <jason@redhat.com>
1749
1750 * module.cc (depset::hash::add_specializations): Use
1751 STRIP_TEMPLATE.
1752
17532022-02-10 Tobias Burnus <tobias@codesourcery.com>
1754
1755 PR c++/102204
1756 * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual
1757 members as those are permitted since OpenMP 5.0.
1758
17592022-02-10 Patrick Palka <ppalka@redhat.com>
1760
1761 * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
1762 better.
1763
17642022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1765
1766 * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
1767 (cp_parser_omp_var_list_no_open): Handle array sections.
1768 (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1769 case.
1770 (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
1771 * semantics.cc (handle_omp_array_sections): Handle clause restrictions.
1772 (finish_omp_clauses): Handle array sections.
1773
3adf509f
GA
17742022-02-09 Patrick Palka <ppalka@redhat.com>
1775
1776 PR c++/104432
1777 * call.cc (build_new_method_call): When a non-dependent call
1778 resolves to a specialization of a member template, always build
1779 the pruned overload set using the member template, not the
1780 specialization.
1781 * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify
1782 and correct how members from the new lookup set are matched to
1783 those from the old one.
1784 (tsubst_baselink): Pass binfo_type as newtype to
1785 filter_memfn_lookup.
1786
17872022-02-09 Jason Merrill <jason@redhat.com>
1788
1789 PR c++/103752
1790 * module.cc (trees_out::core_vals): Stream explicit specifier.
1791 (trees_in::core_vals): Likewise.
1792 * pt.cc (store_explicit_specifier): No longer static.
1793 (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
1794 * cp-tree.h (lookup_explicit_specifier): Declare.
1795
17962022-02-09 Jason Merrill <jason@redhat.com>
1797
1798 PR c++/96876
1799 * typeck2.cc (split_nonconstant_init_1): Push cleanups for
1800 preceding members with constant initialization.
1801 (maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
1802
2a2fda2d
GA
18032022-02-08 Jakub Jelinek <jakub@redhat.com>
1804
1805 PR c++/104379
1806 * name-lookup.cc (check_local_shadow): When diagnosing shadowing
1807 of a member or global declaration, add warning suppression for
1808 the decl and don't warn again on it.
1809
18102022-02-08 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c++/104403
1813 * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs
1814 of TREE_STATIC vars may only appear in -std=c++23.
1815
18162022-02-08 Patrick Palka <ppalka@redhat.com>
1817
1818 PR c++/80951
1819 * pt.cc (uses_deducible_template_parms): Consider the
1820 noexcept-spec of a function type.
1821
18222022-02-08 Patrick Palka <ppalka@redhat.com>
1823
1824 PR c++/104410
1825 * constraint.cc (satisfaction_value): Relax assert to accept
1826 cv-qualified bool.
1827
18282022-02-08 Patrick Palka <ppalka@redhat.com>
1829
1830 PR c++/103706
1831 * pt.cc (preserve_args): New function.
1832 (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO.
1833
18342022-02-08 Patrick Palka <ppalka@redhat.com>
1835
1836 PR c++/103706
1837 * constraint.cc (satisfy_declaration_constraints): Use
1838 lambda_regenerating_args instead.
1839 * cp-tree.h (lambda_regenerating_args): Declare.
1840 * pt.cc (lambda_regenerating_args): Define, split out from
1841 satisfy_declaration_constraints.
1842 (do_auto_deduction): Use lambda_regenerating_args to obtain the
1843 full set of outer template arguments for satisfaction when
1844 inside a lambda.
1845
353f8fcc
GA
18462022-02-06 Patrick Palka <ppalka@redhat.com>
1847
1848 PR c++/96242
1849 * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED
1850 fn by calling maybe_synthesize_method instead of relying on
1851 maybe_instantiate_noexcept. Move call to m_i_n after the
1852 DECL_DELETED_FN handling.
1853 * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED
1854 fn synthesis to only those with an implicit noexcept-spec, and
1855 return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards.
1856
18572022-02-06 Jakub Jelinek <jakub@redhat.com>
1858
1859 PR c++/89074
1860 PR c++/104033
1861 * constexpr.cc (cxx_eval_binary_expression): Temporarily set
1862 folding_cxx_constexpr.
1863
661109b0
GA
18642022-02-05 Jason Merrill <jason@redhat.com>
1865
1866 PR c++/104300
1867 PR c++/92385
1868 * cp-tree.h (get_vec_init_expr): New.
1869 (target_expr_needs_replace): New.
1870 * cp-gimplify.cc (cp_gimplify_init_expr): Use it.
1871 (struct cp_fold_data): New.
1872 (cp_fold_r): Only genericize inits at end of fn.
1873 (cp_fold_function): Here.
1874 (cp_fully_fold_init): Not here.
1875 * init.cc (build_vec_init): Use get_vec_init_expr.
1876 * tree.cc (build_vec_init_expr): Likewise.
1877 * typeck2.cc (split_nonconstant_init_1): Likewise.
1878 (process_init_constructor): Wrap VEC_INIT_EXPR in
1879 TARGET_EXPR.
1880
18812022-02-05 Jason Merrill <jason@redhat.com>
1882
1883 * pt.cc (iterative_hash_template_arg): Add comment.
1884
682ede39
GA
18852022-02-03 Patrick Palka <ppalka@redhat.com>
1886
1887 PR c++/104079
1888 * pt.cc (value_dependent_noexcept_spec_p): New predicate split
1889 out from ...
1890 (dependent_type_p_r): ... here.
1891 (instantiation_dependent_r): Use value_dependent_noexcept_spec_p
1892 to consider dependence of a noexcept-spec before C++17.
1893 * tree.cc (fixup_deferred_exception_variants): Clear
1894 TYPE_DEPENDENT_P_VALID.
1895
18962022-02-03 Jason Merrill <jason@redhat.com>
1897
1898 PR c++/104302
1899 * decl.cc (maybe_deduce_size_from_array_init): Give up
1900 on type-dependent init.
1901 (cp_complete_array_type): Only call reshape_init for character
1902 array.
1903
ae7e4af9
GA
19042022-02-01 Jason Merrill <jason@redhat.com>
1905
1906 PR c++/103186
1907 * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
1908 (defarg_insts_for): New.
1909 (tsubst_default_argument): Adjust.
1910
1bb52662
GA
19112022-01-31 Marek Polacek <polacek@redhat.com>
1912
1913 PR c++/102414
1914 PR c++/101874
1915 * decl.cc (create_array_type_for_decl): Use template_placeholder_p.
1916 Sorry on a variable-length array of auto.
1917
19182022-01-31 Marek Polacek <polacek@redhat.com>
1919
1920 PR c++/102434
1921 * class.cc (finish_struct): Don't allow union initializer_list.
1922
19232022-01-31 Patrick Palka <ppalka@redhat.com>
1924
1925 PR c++/104294
1926 * pt.cc (ctor_deduction_guides_for): Correct computation of
1927 outer_args.
1928
19292022-01-31 Patrick Palka <ppalka@redhat.com>
1930
1931 PR c++/104291
1932 * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
1933 walk_subtrees if !include_nondeduced_p. Simplify given that
1934 cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.
1935
f6f2d6cf
GA
19362022-01-28 Patrick Palka <ppalka@redhat.com>
1937 Jason Merrill <jason@redhat.com>
1938
1939 PR c++/92752
1940 * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
1941 unqualified pointer type not the qualified one.
1942
19432022-01-28 Patrick Palka <ppalka@redhat.com>
1944
1945 PR c++/103341
1946 * decl.cc (cp_finish_decl): Pass the template arguments of a
1947 variable template specialization or a templated static data
1948 member to do_auto_deduction when the auto is constrained.
1949
19502022-01-28 Jason Merrill <jason@redhat.com>
1951
1952 PR c++/100198
1953 PR c++/100030
1954 PR c++/100282
1955 * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
1956 pack in lambda.
1957 (cp_parser_class_head): And in class attributes.
1958 * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
1959 in lambda.
1960
99f17e99
GA
19612022-01-27 Jason Merrill <jason@redhat.com>
1962
1963 PR c++/104245
1964 PR c++/51344
1965 * decl2.cc (save_template_attributes): Take late attrs as parm.
1966 (cplus_decl_attributes): Call it after decl_attributes,
1967 splice_template_attributes before.
1968
19692022-01-27 Patrick Palka <ppalka@redhat.com>
1970
1971 PR c++/99895
1972 * call.cc (build_over_call): For a non-dependent member call,
1973 build up a CALL_EXPR using a COMPONENT_REF callee, as in
1974 build_new_method_call.
1975 * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
1976 * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
1977 after the build_over_call change.
1978
19792022-01-27 Patrick Palka <ppalka@redhat.com>
1980
1981 PR c++/92944
1982 PR c++/103678
1983 * parser.cc (cp_parser_class_head): Update 'type' with the result
1984 of maybe_process_partial_specialization in the
1985 nested_name_specifier branch. Refactor nearby code to accomodate
1986 that maybe_process_partial_specialization returns a _TYPE, not a
1987 TYPE_DECL, and eliminate local variable 'class_type' in passing.
1988
19892022-01-27 Marek Polacek <polacek@redhat.com>
1990
1991 PR c++/101988
1992 * decl.cc (create_array_type_for_decl): Reject forming an array of
1993 placeholder for a deduced class type.
1994
eaa59070
GA
19952022-01-26 Jason Merrill <jason@redhat.com>
1996
1997 PR c++/104206
1998 PR c++/101072
1999 * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
2000
20012022-01-26 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c++/104226
2004 * constexpr.cc (init_subob_ctx): For vector ctors containing
2005 vector elements, ensure appending to the same ctor instead of
2006 creating another one.
2007
20082022-01-26 Marek Polacek <polacek@redhat.com>
2009
2010 PR target/104213
2011 * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
2012 (finish_destructor_body): Likewise.
2013 * optimize.cc (build_delete_destructor_body): Likewise.
2014
20152022-01-26 Jason Merrill <jason@redhat.com>
2016
2017 PR c++/104235
2018 * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
2019
20202022-01-26 Jason Merrill <jason@redhat.com>
2021
2022 PR c++/103057
2023 * pt.cc (tsubst_aggr_type): Call tsubst for alias template
2024 specialization.
2025
e0b8716f
GA
20262022-01-25 Patrick Palka <ppalka@redhat.com>
2027
2028 PR c++/101532
2029 PR c++/104225
2030 * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
2031 on a deleted function.
2032
20332022-01-25 Jason Merrill <jason@redhat.com>
2034
2035 PR c++/59950
2036 * call.cc (build_over_call): Use cp_build_indirect_ref.
2037
bb99171b
GA
20382022-01-24 Patrick Palka <ppalka@redhat.com>
2039
2040 PR c++/104197
2041 * pt.cc (make_auto_1): Use -1 as a placeholder default argument
2042 for level.
2043
20442022-01-24 Patrick Palka <ppalka@redhat.com>
2045
2046 PR c++/104173
2047 * typeck.cc (build_class_member_access_expr): Extend
2048 unary_complex_lvalue result adjustment to preserve all
2049 rvalues, not just xvalues.
2050
0c940703
GA
20512022-01-23 Will Wray <wjwray@gmail.com>
2052
2053 PR c++/55227
2054 * decl.cc (reshape_init_r): Only call has_designator_check when
2055 first_initializer_p or for the inner constructor element.
2056 (cp_complete_array_type): Call reshape_init on braced-init-list.
2057
20582022-01-23 Jason Merrill <jason@redhat.com>
2059
2060 PR c++/104182
2061 * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
2062 has set DECL_INITIAL on a TARGET_EXPR slot.
2063 * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
2064
20652022-01-23 Jason Merrill <jason@redhat.com>
2066
2067 PR c++/101072
2068 * cp-tree.h (build_implicit_conv_flags): Declare.
2069 * call.cc (build_implicit_conv_flags): Split out from...
2070 (perform_implicit_conversion_flags): ...here.
2071 * decl.cc (check_initializer): Use it.
2072 * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
2073 * semantics.cc (finish_compound_literal): Don't treat
2074 scalar values like CONSTRUCTORs.
2075
9dd44357
GA
20762022-01-21 Jason Merrill <jason@redhat.com>
2077
2078 * semantics.cc (find_failing_clause): Return expr if not
2079 decomposable.
2080 (finish_static_assert): Show constant values in failing
2081 comparison.
2082
20832022-01-21 Jason Merrill <jason@redhat.com>
2084
2085 PR c++/104084
2086 PR c++/20040
2087 * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
2088 alloc_expr is a TARGET_EXPR.
2089
20902022-01-21 Marek Polacek <polacek@redhat.com>
2091
2092 PR c++/101715
2093 * tree.cc (fixup_deferred_exception_variants): Remove duplicate
2094 variants after parsing the exception specifications.
2095
20962022-01-21 Jason Merrill <jason@redhat.com>
2097
2098 PR c++/104139
2099 PR c++/103681
2100 * class.cc (end_of_class): Use base_binfo.
2101
5fa55d55
GA
21022022-01-20 Jason Merrill <jason@redhat.com>
2103
2104 PR c++/101405
2105 * decl.cc (reshape_init_class): Reject designator for a member of
2106 another class.
2107
21082022-01-20 Patrick Palka <ppalka@redhat.com>
2109
2110 PR c++/91911
2111 PR c++/103672
2112 * pt.cc (keep_template_parm): Punt on a level 0 template parm.
2113 (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
2114 (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
2115 specially.
2116 (make_auto_1): Add defaulted 'level' parameter.
2117 (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
2118
21192022-01-20 Patrick Palka <ppalka@redhat.com>
2120
2121 * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
2122 function return type even when !funcdecl_p.
2123
21242022-01-20 Martin Liska <mliska@suse.cz>
2125
2126 PR c++/104134
2127 * error.cc (dump_aggr_type): Partially disable the warning.
2128
21292022-01-20 Jason Merrill <jason@redhat.com>
2130
2131 PR c++/102300
2132 * parser.cc (cp_parser_template_name): Use dependent_scope_p.
2133
fe1ad141
GA
21342022-01-19 David Malcolm <dmalcolm@redhat.com>
2135
2136 * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
2137 renaming.
2138 * cp-tree.h (cp_pt_c_tests): Rename to...
2139 (cp_pt_cc_tests): ...this.
2140 (cp_tree_c_tests): Rename to...
2141 (cp_tree_cc_tests): ...this.
2142 * pt.cc (cp_pt_c_tests): Rename to...
2143 (cp_pt_cc_tests): ...this.
2144 * tree.cc (cp_tree_c_tests): Rename to...
2145 (cp_tree_cc_tests): ...this.
2146
21472022-01-19 Jason Merrill <jason@redhat.com>
2148
2149 * parser.cc (saved_token_sentinel::rollback): Use
2150 cp_lexer_previous_token.
2151
7a761ae6
GA
21522022-01-18 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR c++/104055
2155 * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
2156 TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
2157 than get_target_expr_sfinae with tf_no_cleanup, and don't set
2158 TREE_CONSTANT.
2159
21602022-01-18 Jason Merrill <jason@redhat.com>
2161 Jakub Jelinek <jakub@redhat.com>
2162
2163 PR c++/104025
2164 * parser.cc (saved_token_sentinel::rollback): Call
2165 cp_lexer_set_source_position.
2166 (~saved_token_sentinel): Call rollback.
2167
21682022-01-18 Patrick Palka <ppalka@redhat.com>
2169
2170 PR c++/104074
2171 * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
2172 that we return false for DEPENDENT_OPERATOR_TYPE too.
2173
fc829782
GA
21742022-01-17 Martin Liska <mliska@suse.cz>
2175
2176 * Make-lang.in: Rename .c names to .cc.
2177 * config-lang.in: Likewise.
2178 * constexpr.cc (cxx_eval_constant_expression): Likewise.
2179 * coroutines.cc (morph_fn_to_coro): Likewise.
2180 * cp-gimplify.cc (cp_gimplify_expr): Likewise.
2181 * cp-lang.cc (struct lang_hooks): Likewise.
2182 (get_template_argument_pack_elems_folded): Likewise.
2183 * cp-objcp-common.cc (cp_tree_size): Likewise.
2184 (cp_unit_size_without_reusable_padding): Likewise.
2185 (pop_file_scope): Likewise.
2186 (cp_pushdecl): Likewise.
2187 * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
2188 (cxx_simulate_record_decl): Likewise.
2189 * cp-tree.h (struct named_label_entry): Likewise.
2190 (current_function_return_value): Likewise.
2191 (more_aggr_init_expr_args_p): Likewise.
2192 (get_function_version_dispatcher): Likewise.
2193 (common_enclosing_class): Likewise.
2194 (strip_fnptr_conv): Likewise.
2195 (current_decl_namespace): Likewise.
2196 (do_aggregate_paren_init): Likewise.
2197 (cp_check_const_attributes): Likewise.
2198 (qualified_name_lookup_error): Likewise.
2199 (generic_targs_for): Likewise.
2200 (mark_exp_read): Likewise.
2201 (is_global_friend): Likewise.
2202 (maybe_reject_flexarray_init): Likewise.
2203 (module_token_lang): Likewise.
2204 (handle_module_option): Likewise.
2205 (literal_integer_zerop): Likewise.
2206 (build_extra_args): Likewise.
2207 (build_if_nonnull): Likewise.
2208 (maybe_check_overriding_exception_spec): Likewise.
2209 (finish_omp_target_clauses): Likewise.
2210 (maybe_warn_zero_as_null_pointer_constant): Likewise.
2211 (cxx_print_error_function): Likewise.
2212 (decl_in_std_namespace_p): Likewise.
2213 (merge_exception_specifiers): Likewise.
2214 (mangle_module_global_init): Likewise.
2215 (cxx_block_may_fallthru): Likewise.
2216 (fold_builtin_source_location): Likewise.
2217 (enum cp_oracle_request): Likewise.
2218 (subsumes): Likewise.
2219 (cp_finish_injected_record_type): Likewise.
2220 (vtv_build_vtable_verify_fndecl): Likewise.
2221 (cp_tree_c_finish_parsing): Likewise.
2222 * cvt.cc (diagnose_ref_binding): Likewise.
2223 (convert_to_void): Likewise.
2224 (convert_force): Likewise.
2225 (type_promotes_to): Likewise.
2226 * decl.cc (make_unbound_class_template_raw): Likewise.
2227 (cxx_init_decl_processing): Likewise.
2228 (check_class_member_definition_namespace): Likewise.
2229 (cxx_maybe_build_cleanup): Likewise.
2230 * decl2.cc (maybe_emit_vtables): Likewise.
2231 * error.cc (dump_function_name): Likewise.
2232 * init.cc (is_class_type): Likewise.
2233 (build_new_1): Likewise.
2234 * lang-specs.h: Likewise.
2235 * method.cc (make_alias_for_thunk): Likewise.
2236 * module.cc (specialization_add): Likewise.
2237 (module_state::read_cluster): Likewise.
2238 * name-lookup.cc (check_extern_c_conflict): Likewise.
2239 * name-lookup.h (struct cxx_binding): Likewise.
2240 * parser.cc (cp_parser_identifier): Likewise.
2241 * parser.h (struct cp_parser): Likewise.
2242 * pt.cc (has_value_dependent_address): Likewise.
2243 (push_tinst_level_loc): Likewise.
2244 * semantics.cc (finish_omp_clauses): Likewise.
2245 (finish_omp_atomic): Likewise.
2246 * tree.cc (cp_save_expr): Likewise.
2247 (cp_free_lang_data): Likewise.
2248 * typeck.cc (cp_common_type): Likewise.
2249 (strip_array_domain): Likewise.
2250 (rationalize_conditional_expr): Likewise.
2251 (check_return_expr): Likewise.
2252 * vtable-class-hierarchy.cc: Likewise.
2253
22542022-01-17 Martin Liska <mliska@suse.cz>
2255
2256 * call.c: Moved to...
2257 * call.cc: ...here.
2258 * class.c: Moved to...
2259 * class.cc: ...here.
2260 * constexpr.c: Moved to...
2261 * constexpr.cc: ...here.
2262 * cp-gimplify.c: Moved to...
2263 * cp-gimplify.cc: ...here.
2264 * cp-lang.c: Moved to...
2265 * cp-lang.cc: ...here.
2266 * cp-objcp-common.c: Moved to...
2267 * cp-objcp-common.cc: ...here.
2268 * cp-ubsan.c: Moved to...
2269 * cp-ubsan.cc: ...here.
2270 * cvt.c: Moved to...
2271 * cvt.cc: ...here.
2272 * cxx-pretty-print.c: Moved to...
2273 * cxx-pretty-print.cc: ...here.
2274 * decl.c: Moved to...
2275 * decl.cc: ...here.
2276 * decl2.c: Moved to...
2277 * decl2.cc: ...here.
2278 * dump.c: Moved to...
2279 * dump.cc: ...here.
2280 * error.c: Moved to...
2281 * error.cc: ...here.
2282 * except.c: Moved to...
2283 * except.cc: ...here.
2284 * expr.c: Moved to...
2285 * expr.cc: ...here.
2286 * friend.c: Moved to...
2287 * friend.cc: ...here.
2288 * g++spec.c: Moved to...
2289 * g++spec.cc: ...here.
2290 * init.c: Moved to...
2291 * init.cc: ...here.
2292 * lambda.c: Moved to...
2293 * lambda.cc: ...here.
2294 * lex.c: Moved to...
2295 * lex.cc: ...here.
2296 * mangle.c: Moved to...
2297 * mangle.cc: ...here.
2298 * method.c: Moved to...
2299 * method.cc: ...here.
2300 * name-lookup.c: Moved to...
2301 * name-lookup.cc: ...here.
2302 * optimize.c: Moved to...
2303 * optimize.cc: ...here.
2304 * parser.c: Moved to...
2305 * parser.cc: ...here.
2306 * pt.c: Moved to...
2307 * pt.cc: ...here.
2308 * ptree.c: Moved to...
2309 * ptree.cc: ...here.
2310 * rtti.c: Moved to...
2311 * rtti.cc: ...here.
2312 * search.c: Moved to...
2313 * search.cc: ...here.
2314 * semantics.c: Moved to...
2315 * semantics.cc: ...here.
2316 * tree.c: Moved to...
2317 * tree.cc: ...here.
2318 * typeck.c: Moved to...
2319 * typeck.cc: ...here.
2320 * typeck2.c: Moved to...
2321 * typeck2.cc: ...here.
2322 * vtable-class-hierarchy.c: Moved to...
2323 * vtable-class-hierarchy.cc: ...here.
2324
23252022-01-17 Jakub Jelinek <jakub@redhat.com>
2326
2327 PR c++/104031
2328 * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
2329 TARGET_EXPR_SLOT to current_function_decl if it was NULL.
2330
23312022-01-17 Andrew Stubbs <ams@codesourcery.com>
2332
2333 * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
2334
617db51d
GA
23352022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
2336
2337 PR c++/103705
2338 * semantics.c (finish_omp_clauses): Also continue peeling off of
2339 outer node for ARRAY_REFs.
2340
23412022-01-14 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR c++/103991
2344 * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
2345 IF_STMT_CONSTEXPR_P with constant false or true condition only
2346 check if the taken clause may fall through.
2347 * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
2348 to r12-5638^ behavior if then_ block can't fall through. For
2349 constexpr if, revert to r12-5638^ behavior.
2350
ad3f0d08
GA
23512022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
2352 Jason Merrill <jason@redhat.com>
2353
2354 PR c++/70417
2355 * parser.c (cp_parser_id_expression): Handle
2356 -Wmissing-template-keyword.
2357 (struct saved_token_sentinel): Add modes to control what happens
2358 on destruction.
2359 (cp_parser_statement): Adjust.
2360 (cp_parser_skip_entire_template_parameter_list): New function that
2361 skips an entire template parameter list.
2362 (cp_parser_require_end_of_template_parameter_list): Rename old
2363 cp_parser_skip_to_end_of_template_parameter_list.
2364 (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
2365 called from one of the above two functions.
2366 (cp_parser_lambda_declarator_opt)
2367 (cp_parser_explicit_template_declaration)
2368 (cp_parser_enclosed_template_argument_list): Adjust.
2369
02a8a01b
GA
23702022-01-12 Jakub Jelinek <jakub@redhat.com>
2371 Jason Merrill <jason@redhat.com>
2372
2373 PR c++/103480
2374 * tree.c (move): If expr is xvalue_p, just return expr without
2375 build_static_cast.
2376
01a254e3
GA
23772022-01-11 Jakub Jelinek <jakub@redhat.com>
2378
2379 PR c++/101597
2380 * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
2381 OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
2382 * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
2383 OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
2384 obj_type.
2385
23862022-01-11 Patrick Palka <ppalka@redhat.com>
2387
2388 PR c++/103831
2389 * call.c (build_new_method_call): Consider dependent bases only
2390 if 'this' is available.
2391
23922022-01-11 Olivier Hainque <hainque@adacore.com>
2393
2394 * decl.c (cxx_init_decl_processing): Move code possibly
2395 altering flag_weak before code testing it.
2396
d9450aa0
GA
23972022-01-10 Patrick Palka <ppalka@redhat.com>
2398
2399 PR c++/103879
2400 * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
2401 canonicalization step into a local lambda. Strengthen it to
2402 absorb more components at position 0. Use it before both calls
2403 to cxx_fold_indirect_ref_1.
2404
24052022-01-10 Patrick Palka <ppalka@redhat.com>
2406
2407 PR c++/103783
2408 * call.c (cand_parms_match): Skip over 'this' when given one
2409 static and one non-static member function.
2410
24112022-01-10 Jakub Jelinek <jakub@redhat.com>
2412
2413 PR c++/103912
2414 * semantics.c (expand_or_defer_fn): For immediate functions, set
2415 node->body_removed to true and clear analyzed, definition and
2416 force_output.
2417 * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
2418 expand_or_defer_fn.
2419
2848ef14
GA
24202022-01-08 Jakub Jelinek <jakub@redhat.com>
2421
2422 PR c++/89074
2423 * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
2424 (cxx_eval_binary_expression): Use it.
2425
24262022-01-08 Jason Merrill <jason@redhat.com>
2427
2428 PR c++/103946
2429 * init.c (build_vec_init): Remove assert.
2430 * tree.c (build_vec_init_expr): Likewise.
2431
24322022-01-08 Jason Merrill <jason@redhat.com>
2433
2434 PR c++/100588
2435 * call.c (build_op_delete_call): Ignore destroying delete
2436 if alloc_fn.
2437
55e96bf9
GA
24382022-01-07 Jason Merrill <jason@redhat.com>
2439
2440 PR c++/20040
2441 * init.c (build_new_1): Also build pointer cleanup if
2442 TYPE_GETS_DELETE.
2443 * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
2444
24452022-01-07 Jason Merrill <jason@redhat.com>
2446
2447 PR c++/103936
2448 PR c++/65591
2449 * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
2450
24512022-01-07 Jason Merrill <jason@redhat.com>
2452
2453 PR c++/103711
2454 * init.c (perform_target_ctor): Select destructor by in_chrg.
2455
24562022-01-07 Jason Merrill <jason@redhat.com>
2457
2458 PR c++/61611
2459 * except.c (in_nested_catch): New.
2460 (expand_end_catch_block): Check it.
2461
24622022-01-07 Jason Merrill <jason@redhat.com>
2463
2464 PR c++/33799
2465 PR c++/102191
2466 * except.c (maybe_splice_retval_cleanup): Check
2467 current_binding_level.
2468 * semantics.c (do_poplevel): Call it here.
2469 * parser.c (cp_parser_compound_statement): Not here.
2470
24712022-01-07 Jason Merrill <jason@redhat.com>
2472
2473 PR c++/53868
2474 * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
2475 cleanups from set_up_extended_ref_temp.
2476 (wrap_temporary_cleanups): Ignore array cleanups.
2477 (initialize_local_var): Don't check for array here.
2478 * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
2479 * init.c (build_vec_delete_1): Set it.
2480
24812022-01-07 Jason Merrill <jason@redhat.com>
2482
2483 PR c++/66451
2484 * init.c (build_vec_delete_1): Handle throwing dtor.
2485 (build_vec_init): Tell it we're in a cleanup already.
2486
24872022-01-07 Jason Merrill <jason@redhat.com>
2488
2489 * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
2490 (split_nonconstant_init): Adjust.
2491
24922022-01-07 Jason Merrill <jason@redhat.com>
2493
2494 PR c++/66139
2495 PR c++/52320
2496 * constexpr.c (replace_decl): Rename from replace_result_decl.
2497 * cp-tree.h (replace_decl): Declare it.
2498 * cp-gimplify.c (cp_gimplify_init_expr): Call it.
2499 (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
2500 (cp_genericize_init, cp_genericize_init_expr)
2501 (cp_genericize_target_expr): New.
2502 (cp_fold_r): Call them.
2503 * tree.c (build_array_copy): Add a TARGET_EXPR.
2504 * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
2505
25062022-01-07 Jason Merrill <jason@redhat.com>
2507
2508 PR c++/94041
2509 * decl.c (initialize_local_var): Fix comment.
2510 * init.c (build_new_1): Do stabilize array init.
2511 (build_vec_init): Use TARGET_EXPR for cleanup. Initialization
2512 of an element from an explicit initializer is not a
2513 full-expression.
2514 * tree.c (expand_vec_init_expr): Pass flags through.
2515 * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
2516 (split_nonconstant_init): Handle array cleanups.
2517 * cp-tree.h: Adjust.
2518
25192022-01-07 Jason Merrill <jason@redhat.com>
2520
2521 PR c++/94041
2522 * decl.c (check_initializer): Remove obsolete comment.
2523 (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
2524 (initialize_local_var): Change assert to test.
2525 * typeck2.c (maybe_push_temp_cleanup): New.
2526 (split_nonconstant_init_1): Use it.
2527 (split_nonconstant_init): Clear cleanup flags.
2528
25292022-01-07 Jason Merrill <jason@redhat.com>
2530
2531 PR c++/92385
2532 * typeck2.c (PICFLAG_VEC_INIT): New.
2533 (process_init_constructor_array): Set it.
2534 (process_init_constructor): Handle it.
2535 (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
2536 * init.c (build_vec_init): Likewise.
2537 * cp-gimplify.c (cp_gimplify_expr): Factor out...
2538 * tree.c (expand_vec_init_expr): ...this function.
2539 (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
2540 (build_vec_init_expr): Likewise.
2541 * constexpr.c (cxx_eval_vec_init): Likewise.
2542 (reduced_constant_expression_p): Check arrays before C++20.
2543 * cp-tree.h (expand_vec_init_expr): Declare.
2544
25452022-01-07 Jason Merrill <jason@redhat.com>
2546
2547 * init.c (build_new_1): Remove preevaluation code.
2548
0fbefa25
GA
25492022-01-05 Nathan Sidwell <nathan@acm.org>
2550
2551 * pt.c (instantiate_class_template_1): Process attribute((used)) set
2552 in class's context.
2553
25542022-01-05 Nathan Sidwell <nathan@acm.org>
2555
2556 * init.c (build_new_1): Check complain before alignment warning.
2557
7d11b64b
GA
25582022-01-04 Jason Merrill <jason@redhat.com>
2559
2560 * cp-tree.h (class releasing_vec): Add begin/end fns.
2561
25622022-01-04 Jason Merrill <jason@redhat.com>
2563
2564 * init.c: Include -*- C++ -*- on first line.
2565
a4ae8c37
GA
25662022-01-03 Marek Polacek <polacek@redhat.com>
2567
2568 PR c++/103758
2569 * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
2570 with %qD.
2571
25722022-01-03 Marek Polacek <polacek@redhat.com>
2573
2574 * parser.c (make_char_string_pack): Add a cast to const unsigned
2575 char *.
2576
25772022-01-03 Jakub Jelinek <jakub@redhat.com>
2578
2579 PR c++/103600
2580 * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
2581 to DECL_TINFO_P VAR_DECLs.
2582
5da23a13
GA
25832022-01-02 Jason Merrill <jason@redhat.com>
2584
2585 * init.c (build_vec_init): Append the decrement to elt_init.
2586
25872022-01-02 Jason Merrill <jason@redhat.com>
2588
2589 * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
2590
ad41bd84 2591\f
6123f29a 2592Copyright (C) 2022 Free Software Foundation, Inc.
ad41bd84
JM
2593
2594Copying and distribution of this file, with or without modification,
2595are permitted in any medium without royalty provided the copyright
2596notice and this notice are preserved.
This page took 4.644834 seconds and 5 git commands to generate.