]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
05ec629f
GA
12021-04-23 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/98767
4 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
5 Adjust parameter list loop to iterate over 'types' instead of
6 'args'. Output the trailing '...' for a variadic function.
7 Remove PARM_DECL support.
8 (pp_cxx_requires_expr): Pretty print the parameter list directly
9 instead of going through pp_cxx_parameter_declaration_clause.
10
112021-04-23 Patrick Palka <ppalka@redhat.com>
12
13 DR 2374
14 * decl.c (is_direct_enum_init): Check the implicit
15 convertibility requirement added by CWG 2374.
16
172021-04-23 Martin Liska <mliska@suse.cz>
18
19 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
20 * lex.c (init_operators): Remove run-time check.
21
e3948473
GA
222021-04-22 Marek Polacek <polacek@redhat.com>
23
24 PR c++/100161
25 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
26 op1 separately for value- or type-dependence.
27
c1ef0c92
GA
282021-04-21 Marek Polacek <polacek@redhat.com>
29
30 PR c++/96380
31 * parser.c (cp_parser_enum_specifier): Don't allow defining
32 types in enum-base.
33
342021-04-21 Martin Liska <mliska@suse.cz>
35
36 Revert:
37 2021-04-21 Martin Liska <mliska@suse.cz>
38
39 * error.c (dump_decl): Use flags in dump_generic_node call.
40
412021-04-21 Martin Liska <mliska@suse.cz>
42
43 * error.c (dump_decl): Use flags in dump_generic_node call.
44
452021-04-21 Martin Liska <mliska@suse.cz>
46
47 * error.c (dump_decl): Support anonymous labels.
48
be8aad8d
GA
492021-04-20 Jason Merrill <jason@redhat.com>
50
51 PR c++/100109
52 * pt.c (find_parameter_packs_r): Look into enum initializers.
53
6e81e015
GA
542021-04-19 Marek Polacek <polacek@redhat.com>
55
56 PR c++/97536
57 * decl.c (grokvardecl): Given an error when a concept is not defined
58 at namespace scope.
59
8ae884c0
GA
602021-04-16 Jakub Jelinek <jakub@redhat.com>
61
62 PR c++/100111
63 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
64 for empty classes into *valp when types don't match even when *valp
65 is NULL.
66
672021-04-16 Marek Polacek <polacek@redhat.com>
68
69 PR c++/99803
70 * decl.c (make_typename_type): Give an error and return when
71 name is is_overloaded_fn.
72 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
73 before calling make_typename_type.
74
752021-04-16 Patrick Palka <ppalka@redhat.com>
76
77 PR c++/99700
78 * constexpr.c (reduced_constant_expression_p): For array
79 CONSTRUCTORs, use a dedicated loop that additionally verifies
80 the CONSTRUCTOR spans the entire array.
81
822021-04-16 Jakub Jelinek <jakub@redhat.com>
83
84 PR c++/99850
85 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
86 If lambda_p, return pce_ok instead of pce_maybe_postfix.
87
882021-04-16 Jakub Jelinek <jakub@redhat.com>
89
90 PR c++/99833
91 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
92 binding, add to data.internal also all corresponding structured
93 binding decls.
94
952021-04-16 Jason Merrill <jason@redhat.com>
96
97 PR c++/100079
98 * cp-tree.h (first_field): Declare.
99 * mangle.c (range_expr_nelts): New.
100 (write_expression): Improve class NTTP mangling.
101 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
102 * tree.c (zero_init_expr_p): Improve class NTTP handling.
103 * decl.c: Adjust comment.
104
ee351f7f
GA
1052021-04-15 Jason Merrill <jason@redhat.com>
106
107 PR c++/80456
108 * call.c (build_new_method_call_1): Check again for side-effects
109 with a volatile object.
110
1112021-04-15 Jason Merrill <jason@redhat.com>
112
113 PR c++/100101
114 PR c++/99583
115 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
116 TYPE_RAISES_EXCEPTIONS here.
117 * tree.c (cp_walk_subtrees): Not here.
118
1192021-04-15 Jason Merrill <jason@redhat.com>
120
121 PR c++/100091
122 PR c++/99478
123 * parser.c (cp_parser_default_type_template_argument): Set
124 parser->local_variables_forbidden_p.
125
1262021-04-15 Richard Sandiford <richard.sandiford@arm.com>
127
128 PR c++/98852
129 * typeck.c (merge_type_attributes_from): New function.
130 (cp_common_type): Use it for vector types.
131
df3b1289
GA
1322021-04-14 Jason Merrill <jason@redhat.com>
133
134 PR c++/100078
135 PR c++/93085
136 * pt.c (uses_outer_template_parms): Also look at default
137 template argument.
138
1392021-04-14 Jason Merrill <jason@redhat.com>
140
141 PR c++/93314
142 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
143 for a non-static data member in a constant-expression.
144
1452021-04-14 Patrick Palka <ppalka@redhat.com>
146
147 PR c++/83476
148 PR c++/99885
149 * pt.c (deducible_expression): Look through implicit
150 INDIRECT_REFs as well.
151
1522021-04-14 Jason Merrill <jason@redhat.com>
153
154 PR c++/99478
155 * parser.c (cp_parser_lambda_expression): Reject lambda
156 in template parameter type.
157
1582021-04-14 Jason Merrill <jason@redhat.com>
159
160 PR c++/90674
161 * decl.c (duplicate_decls): Don't propagate
162 DECL_INITIALIZED_IN_CLASS_P to a specialization.
163
1642021-04-14 Jason Merrill <jason@redhat.com>
165
166 PR c++/88742
167 PR c++/49951
168 PR c++/58123
169 * semantics.c (set_cleanup_locs): New.
170 (do_poplevel): Call it.
171 * parser.c (cp_parser_compound_statement): Consume the }
172 before finish_compound_stmt.
173
6d0d35d5
GA
1742021-04-13 Jason Merrill <jason@redhat.com>
175
176 PR c++/100032
177 * pt.c (get_underlying_template): Compare TYPE_QUALS.
178
1792021-04-13 Jason Merrill <jason@redhat.com>
180
181 PR c++/100054
182 PR c++/90479
183 * init.c (get_nsdmi): Do more context adjustment for local classes.
184
1852021-04-13 Patrick Palka <ppalka@redhat.com>
186
187 PR c++/99008
188 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
189 rather than issuing a pedwarn.
190 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
191 for consistent diagnostics.
192
1932021-04-13 Jason Merrill <jason@redhat.com>
194
195 PR c++/91933
196 * class.c (build_base_path): Shortcut simple non-pointer case.
197
1982021-04-13 Eric Botcazou <ebotcazou@adacore.com>
199
200 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
201 of the linemap.
202 (module_state::write_location): Likewise.
203
2042021-04-13 Patrick Palka <ppalka@redhat.com>
205
206 PR c++/97134
207 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
208 when checking if the initializer is an equivalent class
209 placeholder template parameter.
210
2112021-04-13 Patrick Palka <ppalka@redhat.com>
212
213 PR c++/99961
214 PR c++/99994
215 * constraint.cc (satisfy_normalized_constraints): Set
216 cp_unevaluated.
217 * parser.c (cp_parser_concept_definition): Likewise.
218 (cp_parser_requires_clause_opt): Likewise.
219
287ad814
GA
2202021-04-12 Jason Merrill <jason@redhat.com>
221
222 PR c++/93085
223 * pt.c (uses_outer_template_parms): Handle non-type and template
224 template parameters specifically.
225
a0ecde22
GA
2262021-04-11 Jason Merrill <jason@redhat.com>
227
228 PR c++/97974
229 * decl.c (fixup_anonymous_aggr): Prune all functions from
230 CLASSTYPE_MEMBER_VEC.
231
1d54b138
GA
2322021-04-10 Jason Merrill <jason@redhat.com>
233
234 PR c++/98800
235 PR c++/97399
236 * parser.c (cp_parser_direct_declarator): Don't
237 inject_this_parameter if static_p.
238 (cp_parser_omp_var_list_no_open): Parse 'this' even if
239 current_class_ptr isn't set for a better diagnostic.
240
2412021-04-10 Jason Merrill <jason@redhat.com>
242
243 PR c++/99180
244 PR c++/93295
245 PR c++/93867
246 PR c++/99118
247 PR c++/96873
248 * pt.c (alias_ctad_tweaks): Handle failure better.
249
2502021-04-10 Jason Merrill <jason@redhat.com>
251
252 PR c++/100006
253 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
254
3115aba8
GA
2552021-04-09 Patrick Palka <ppalka@redhat.com>
256
257 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
258 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
259 (LAMBDA_EXPR_REGEN_INFO): ... this.
260 (tree_lambda_expr::regenerated_from)
261 (tree_lambda_expr::regenerating_targs): Replace these with ...
262 (tree_lambda_expr::regen_info): ... this.
263 * constraint.cc (satisfy_declaration_constraints): Adjust
264 accordingly.
265 * lambda.c (build_lambda_expr): Likewise.
266 * pt.c (regenerated_lambda_fn_p): Likewise.
267 (most_general_lambda): Likewise.
268 (tsubst_lambda_expr): Likewise.
269
2702021-04-09 Marek Polacek <polacek@redhat.com>
271
272 PR c++/99806
273 * parser.c (cp_parser_member_declaration): Call
274 cp_parser_save_default_args even for function templates. Use
275 STRIP_TEMPLATE on the declaration we're passing.
276
019a9220
GA
2772021-04-08 Patrick Palka <ppalka@redhat.com>
278
279 PR c++/99874
280 * constraint.cc (get_normalized_constraints_from_decl): Handle
281 regenerated lambdas.
282 (satisfy_declaration_constraints): Likewise. Check for
283 dependent args later.
284 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
285 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
286 (LAMBDA_EXPR_REGENERATING_TARGS): New.
287 (tree_lambda_expr::regenerated_from): New data member.
288 (tree_lambda_expr::regenerating_targs): New data member.
289 (add_to_template_args): Declare.
290 (regenerated_lambda_fn_p): Likewise.
291 (most_general_lambda): Likewise.
292 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
293 and LAMBDA_EXPR_REGENERATING_TARGS.
294 * pt.c (add_to_template_args): No longer static.
295 (tsubst_function_decl): Unconditionally propagate constraints on
296 the substituted function decl.
297 (instantiated_lambda_fn_p): Rename to ...
298 (regenerated_lambda_fn_p): ... this. Check
299 LAMBDA_EXPR_REGENERATED_FROM instead of
300 LAMBDA_EXPR_INSTANTIATED.
301 (most_general_lambda): Define.
302 (enclosing_instantiation_of): Adjust after renaming
303 instantiated_lambda_fn_p.
304 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
305 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
306 Don't substitute or set constraints on the regenerated lambda.
307
3082021-04-08 Patrick Palka <ppalka@redhat.com>
309
310 PR c++/97679
311 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
312 them into the propagated constraints.
313
3142021-04-08 Jason Merrill <jason@redhat.com>
315
316 PR c++/91849
317 * call.c (convert_like_internal): Improve reference diagnostic.
318
3192021-04-08 Jakub Jelinek <jakub@redhat.com>
320
321 PR c++/99859
322 * constexpr.c (addr_of_non_const_var): New function.
323 (cxx_bind_parameters_in_call): Set *non_constant_args to true
324 even if cp_walk_tree on arg with addr_of_non_const_var callback
325 returns true.
326
3272021-04-08 Jason Merrill <jason@redhat.com>
328
329 PR c++/94529
330 * pt.c (determine_specialization): Improve diagnostic.
331
3322021-04-08 Marek Polacek <polacek@redhat.com>
333
334 PR c++/99844
335 * decl.c (build_explicit_specifier): Call
336 check_for_bare_parameter_packs.
337 * except.c (build_noexcept_spec): Likewise.
338
299859c2
GA
3392021-04-07 Jason Merrill <jason@redhat.com>
340
341 PR c++/41723
342 * parser.c (cp_parser_class_name): Check dependent_scope_p.
343
3442021-04-07 Jason Merrill <jason@redhat.com>
345
346 PR c++/52625
347 * pt.c (maybe_process_partial_specialization): Check
348 DECL_SELF_REFERENCE_P.
349
3502021-04-07 Jason Merrill <jason@redhat.com>
351
352 PR c++/92918
353 * name-lookup.c (push_class_level_binding_1): Do overload a new
354 function with a previous using-declaration.
355
8cac6af6
GA
3562021-04-06 Jason Merrill <jason@redhat.com>
357
358 PR c++/96673
359 * init.c (get_nsdmi): Don't defer access checking.
360
3612021-04-06 Jason Merrill <jason@redhat.com>
362
363 PR c++/99901
364 * decl.c (cp_finish_decl): mark_needed an implicitly inline
365 static data member with an out-of-class redeclaration.
366
3672021-04-06 Jason Merrill <jason@redhat.com>
368
369 PR c++/91241
370 * mangle.c (write_compact_number): Add sanity check.
371 (write_local_name): Use list_length for parm number.
372
3732021-04-06 Patrick Palka <ppalka@redhat.com>
374
375 PR c++/99899
376 * pt.c (do_auto_deduction): Don't exit early when deducing the
377 array type of a structured binding. Also handle adc_decomp_type
378 during constraint checking.
379
b1da9916
GA
3802021-04-05 Jason Merrill <jason@redhat.com>
381
382 PR c++/96311
383 * typeck.c (check_return_expr): Call mark_exp_read in dependent
384 case.
385
3862021-04-05 Jason Merrill <jason@redhat.com>
387
388 PR c++/98440
389 * typeck.c (build_reinterpret_cast_1): Don't perform
390 temporary materialization.
391
3922021-04-05 Jason Merrill <jason@redhat.com>
393
394 PR c++/95317
395 * pt.c (lookup_template_class_1): Do tsubst_enum when
396 tsubsting a generic lambda.
397
3982021-04-05 Jason Merrill <jason@redhat.com>
399
400 PR c++/95870
401 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
402 there is no enclosing non-lambda function.
403
4042021-04-05 Nathan Sidwell <nathan@acm.org>
405
406 PR c++/99380
407 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
408 query export when not needed.
409 (preprocess_module, preprocessed_module): Adjust.
410
4112021-04-05 Jason Merrill <jason@redhat.com>
412
413 PR c++/99066
414 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
415
4162021-04-05 Jason Merrill <jason@redhat.com>
417
418 PR c++/99201
419 * pt.c (class el_data): Add visited field.
420 (extract_local_specs): Pass it to cp_walk_tree.
421 (extract_locals_r): Walk into the body of a lambda.
422
4232021-04-05 Jason Merrill <jason@redhat.com>
424
425 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
426 template result.
427
91472884
GA
4282021-04-04 Jason Merrill <jason@redhat.com>
429
430 PR c++/99643
431 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
432
c0756c4e
GA
4332021-04-03 Marek Polacek <polacek@redhat.com>
434
435 PR c++/91416
436 * parser.c: Create a GC root for attributes in a decl specifier.
437 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
438
4392021-04-03 Jason Merrill <jason@redhat.com>
440
441 PR c++/91217
442 * pt.c (tsubst_lambda_expr): Skip the body block from
443 DECL_SAVED_TREE.
444
4452021-04-03 Jason Merrill <jason@redhat.com>
446
447 PR c++/90664
448 * cvt.c (can_convert_qual): Check fnptr_conv_p.
449
4502021-04-03 Jason Merrill <jason@redhat.com>
451
452 PR c++/97900
453 * pt.c (regenerate_decl_from_template): tsubst_decl
454 the parms.
455
b7c1f3d6
GA
4562021-04-02 Patrick Palka <ppalka@redhat.com>
457
458 PR c++/99869
459 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
460 to do_auto_deduction.
461
4622021-04-02 Patrick Palka <ppalka@redhat.com>
463
464 PR c++/99586
465 * semantics.c (finish_compound_literal): Check
466 template_placeholder_p instead of type_uses_auto.
467
4682021-04-02 Jason Merrill <jason@redhat.com>
469
470 PR c++/97938
471 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
472 * lambda.c (add_capture): Set it.
473 * pt.c (tsubst_pack_expansion): Handle it.
474
4752021-04-02 Nathan Sidwell <nathan@acm.org>
476
477 * cp-tree.h (lang_decl_base): Correct module flag comment.
478 * module.cc (trees_in::assert_definition): Break out
479 not_tmpl var.
480 (trees_out::lang_decl_bools): Do not write purview for header units.
481
f1607029
GA
4822021-04-01 Marek Polacek <polacek@redhat.com>
483
484 PR c++/99831
485 * method.c (defaulted_late_check): ++ and -- function_depth around
486 the call to synthesize_method.
487 * pt.c: Remove the saved_trees global.
488
4892021-04-01 Jason Merrill <jason@redhat.com>
490
491 PR c++/99583
492 PR c++/99584
493 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
494 TYPE_RAISES_EXCEPTIONS.
495
4962021-04-01 Iain Sandoe <iain@sandoe.co.uk>
497
498 * mapper-client.cc (INCLUDE_MAP): New; require map to be
499 included from system.h.
500 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
501
5022021-04-01 Jason Merrill <jason@redhat.com>
503
504 PR c++/98481
505 * mangle.c (write_expression): Adjust.
506 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
507 (mark_abi_tags_r): Likewise.
508
5092021-04-01 Nathan Sidwell <nathan@acm.org>
510
511 PR c++/99283
512 * module.cc (trees_out::decl_node): Adjust importedness reference
513 assert.
514 (module_state::intercluster_seed): New. Seed both imports and
515 inter-cluster references. Broken out of ...
516 (module_state::write_cluster): ... here. Call it.
517
95d217ab
GA
5182021-03-31 Jason Merrill <jason@redhat.com>
519
520 PR c++/99445
521 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
522
5232021-03-31 Patrick Palka <ppalka@redhat.com>
524
525 PR c++/88115
526 * mangle.c (write_expression): Adjust the mangling of
527 __alignof__.
528
5292021-03-31 Patrick Palka <ppalka@redhat.com>
530
531 PR c++/99815
532 * pt.c (placeholder_type_constraint_dependent_p): Expand
533 argument packs to separate the first non-pack argument
534 from the rest.
535
08d2edae
GA
5362021-03-30 Nathan Sidwell <nathan@acm.org>
537
538 PR c++/99283
539 * module.cc (dumper::operator): Make less brittle.
540 (trees_out::core_bools): VAR_DECLs always have a context.
541 (trees_out::key_mergeable): Use same_type_p for asserting.
542 (trees_in::read_var_def): Propagate
543 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
544
5452021-03-30 Jakub Jelinek <jakub@redhat.com>
546
547 PR c++/99790
548 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
549
651684b4
GA
5502021-03-26 Marek Polacek <polacek@redhat.com>
551
552 PR c++/98352
553 * method.c (implicitly_declare_fn): Pass &raises to
554 synthesized_method_walk.
555
5562021-03-26 Nathan Sidwell <nathan@acm.org>
557
558 PR c++/99283
559 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
560 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
561 * decl.c (duplicate_decls): Remove template_decl module flag
562 propagation.
563 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
564 (dumper::impl::nested_name): Adjust for template-decl module flag
565 change.
566 (trees_in::assert_definition): Likewise.
567 (trees_in::install_entity): Likewise.
568 (trees_out::decl_value): Likewise. Remove alias template
569 separation of template and type_decl.
570 (trees_in::decl_value): Likewise.
571 (trees_out::key_mergeable): Likewise,
572 (trees_in::key_mergeable): Likewise.
573 (trees_out::decl_node): Adjust for template-decl module flag
574 change.
575 (depset::hash::make_dependency): Likewise.
576 (get_originating_module, module_may_redeclare): Likewise.
577 (set_instantiating_module, set_defining_module): Likewise.
578 * name-lookup.c (name_lookup::search_adl): Likewise.
579 (do_pushdecl): Likewise.
580 * pt.c (build_template_decl): Likewise.
581 (lookup_template_class_1): Remove special alias_template handling
582 of DECL_TI_TEMPLATE.
583 (tsubst_template_decl): Likewise.
584
5852021-03-26 Jakub Jelinek <jakub@redhat.com>
586
587 PR c++/99705
588 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
589 in DECL_EXPR or in BIND_EXPR_VARS.
590
4493b1c1
GA
5912021-03-25 Jakub Jelinek <jakub@redhat.com>
592
593 PR c++/99672
594 * parser.c (cp_parser_postfix_expression): For calls, create
595 combined_loc and temporarily set input_location to it before
596 calling finish_call_expr.
597
5982021-03-25 Marek Polacek <polacek@redhat.com>
599
600 PR c++/94751
601 * call.c (build_over_call): Maybe call mark_used in case
602 deduce_inheriting_ctor fails and return error_mark_node.
603 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
604 * method.c (deduce_inheriting_ctor): Return bool if the deduction
605 fails.
606 (implicitly_declare_fn): If raises is error_mark_node, call
607 synthesized_method_walk with diag being true.
608
6092021-03-25 Jakub Jelinek <jakub@redhat.com>
610
611 PR c++/99745
612 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
613 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
614
6152021-03-25 Marek Polacek <polacek@redhat.com>
616
617 PR c++/99331
618 * call.c (build_converted_constant_expr_internal): Don't emit
619 -Wconversion warnings.
620
6212021-03-25 Jakub Jelinek <jakub@redhat.com>
622
623 PR c++/99565
624 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
625 to operand_equal_p.
626 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
627 or COMPOUND_EXPR.
628
bf1f3168
GA
6292021-03-23 Nathan Sidwell <nathan@acm.org>
630
631 PR c++/99283
632 * name-lookup.c (check_module_override): Set global or partition
633 DUP on the binding vector.
634
6352021-03-23 Marek Polacek <polacek@redhat.com>
636
637 PR c++/99318
638 * decl2.c (cp_warn_deprecated_use_scopes): Only call
639 cp_warn_deprecated_use when decl is a namespace, class, or enum.
640
6412021-03-23 Nathan Sidwell <nathan@acm.org>
642
643 PR c++/99239
644 * decl.c (duplicate_decls): Remove assert about maybe-imported
645 artificial decls.
646
6472021-03-23 Jakub Jelinek <jakub@redhat.com>
648
649 PR c++/99650
650 * decl.c (cp_finish_decomp): Diagnose void initializers when
651 using tuple_element and get.
652
8b744f46
GA
6532021-03-22 Nathan Sidwell <nathan@acm.org>
654
655 PR c++/99480
656 * module.cc (depset::hash::make_dependency): Propagate flags for
657 partial specialization.
658 (module_may_redeclare): Handle partial specialization.
659
6602021-03-22 Nathan Sidwell <nathan@acm.org>
661
662 PR c++/99425
663 * cp-tree.h (map_context_from, map_context_to): Delete.
664 (add_mergeable_specialization): Add is_alias parm.
665 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
666 * module.cc (map_context_from, map_context_to): Delete.
667 (trees_in::decl_value): Add specializations later, adjust call.
668 Drop useless alias lookup. Set duplicate fn parm context.
669 (check_mergeable_decl): Drop context mapping.
670 (trees_in::is_matching_decl): Likewise.
671 (trees_in::read_function_def): Drop parameter context adjustment
672 here.
673
6742021-03-22 Martin Liska <mliska@suse.cz>
675
676 PR c++/99687
677 * module.cc (fini_modules): Call vec_free instead of delete.
678
6af7b307
GA
6792021-03-20 Jakub Jelinek <jakub@redhat.com>
680
681 PR debug/99230
682 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
683 special code, instead call c_genericize_control_stmt.
684
5f256a70
GA
6852021-03-19 Jakub Jelinek <jakub@redhat.com>
686
687 PR c++/99456
688 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
689 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
690 don't diagnose it, set *non_constant_p nor return t.
691
287e3e84
GA
6922021-03-19 Marek Polacek <polacek@redhat.com>
693
694 PR c++/99500
695 * parser.c (cp_parser_requirement_parameter_list): Handle
696 error_mark_node.
697
6982021-03-18 Marek Polacek <polacek@redhat.com>
699
700 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
701
7022021-03-18 Marek Polacek <polacek@redhat.com>
703
704 * pt.c (tsubst_copy_and_build): Add assert.
705
7062021-03-18 Iain Sandoe <iain@sandoe.co.uk>
707
708 PR objc++/49070
709 * parser.c (cp_debug_parser): Add Objective-C++ message
710 state flag.
711 (cp_parser_nested_name_specifier_opt): Allow colon to
712 terminate an assignment-expression when parsing Objective-
713 C++ messages.
714 (cp_parser_objc_message_expression): Set and clear message
715 parsing state on entry and exit.
716 * parser.h (struct cp_parser): Add a context flag for
717 Objective-C++ message state.
718
7192021-03-18 Martin Liska <mliska@suse.cz>
720
721 PR c++/99617
722 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
723 to NULL.
724
19ac7c94
GA
7252021-03-17 Marek Polacek <polacek@redhat.com>
726
727 PR c++/97973
728 * call.c (conv_unsafe_in_template_p): New.
729 (convert_like): Use it.
730
7312021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
732 Jason Merrill <jason@redhat.com>
733
734 * semantics.c (get_class_access_diagnostic_decl): New
735 function that examines special cases when a parent
736 class causes a private access failure.
737 (enforce_access): Slightly modified to call function
738 above.
739
bc212776
GA
7402021-03-16 Jason Merrill <jason@redhat.com>
741
742 * tree.c (cp_tree_equal): Use real_identical.
743
7442021-03-16 Jakub Jelinek <jakub@redhat.com>
745
746 PR c++/99613
747 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
748 before calling __cxa_guard_release rather than after it. Formatting
749 fixes.
750
7512021-03-16 Martin Liska <mliska@suse.cz>
752 Jason Merrill <jason@redhat.com>
753
754 PR c++/99108
755 * call.c (get_function_version_dispatcher): Handle
756 DECL_LOCAL_DECL_P.
757 * decl.c (maybe_version_functions): Likewise.
758 (maybe_mark_function_versioned): New.
759 * name-lookup.c (push_local_extern_decl_alias): No longer static.
760 * name-lookup.h (push_local_extern_decl_alias): Adjust.
761
7622021-03-16 Nathan Sidwell <nathan@acm.org>
763
764 PR c++/99496
765 * module.cc (trees_out::decl_value): Adjust typedef streaming,
766 indicate whether it is a dependent alias.
767 (trees_in::decl_value): Likewise. Set as dependent alias, if it
768 is one.
769
3c5b6d24
GA
7702021-03-15 Iain Sandoe <iain@sandoe.co.uk>
771
772 PR c++/99047
773 * coroutines.cc (expand_one_await_expression): If the
774 await_ready() expression is not a boolean then convert it
775 as required.
776
7772021-03-15 Iain Sandoe <iain@sandoe.co.uk>
778
779 PR c++/98704
780 * coroutines.cc (build_actor_fn): Make destroy index 1
781 correspond to the abnormal unhandled_exception() exit.
782 Substitute the proxy for the resume index.
783 (coro_rewrite_function_body): Arrange to reset the resume
784 index and make done = true for a rethrown exception from
785 unhandled_exception ().
786 (morph_fn_to_coro): Adjust calls to build_actor_fn and
787 coro_rewrite_function_body.
788
7892021-03-15 Iain Sandoe <iain@sandoe.co.uk>
790
791 PR c++/98480
792 * coroutines.cc (replace_continue): Rewrite continue into
793 'goto label'.
794 (await_statement_walker): Handle await expressions in the
795 initializer, condition and iteration expressions of for
796 loops.
797
7982021-03-15 Iain Sandoe <iain@sandoe.co.uk>
799
800 PR c++/96749
801 * coroutines.cc (flatten_await_stmt): Allow for the case
802 where a target expression variable only has uses in the
803 second part of a compound expression.
804 (maybe_promote_temps): Avoid emiting empty statements.
805
8062021-03-15 Tobias Burnus <tobias@codesourcery.com>
807
808 PR c++/99509
809 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
810 ensure that the varpool node is marked as offloadable.
811
6da2762a
GA
8122021-03-12 Nathan Sidwell <nathan@acm.org>
813
814 PR c++/99238
815 * module.cc (depset::hash::add_binding_entity): Assert not
816 visited.
817 (depset::add::add_specializations): Likewise.
818 * name-lookup.c (name_lookup::dedup): New.
819 (name_lookup::~name_lookup): Assert not deduping.
820 (name_lookup::restore_state): Likewise.
821 (name_lookup::add_overload): Replace outlined code with dedup
822 call.
823 (name_lookup::add_value): Likewise.
824 (name_lookup::search_namespace_only): Likewise.
825 (name_lookup::adl_namespace_fns): Likewise.
826 (name_lookup::adl_class_fns): Likewise.
827 (name_lookup::search_adl): Likewise. Add clearing dedup call.
828 (name_lookup::search_qualified): Likewise.
829 (name_lookup::search_unqualified): Likewise.
830
8312021-03-12 Jakub Jelinek <jakub@redhat.com>
832
833 PR c++/99507
834 * call.c (build_over_call): For immediate evaluation of functions
835 that return references, undo convert_from_reference effects before
836 calling cxx_constant_value and call convert_from_reference
837 afterwards.
838
48ff383f
GA
8392021-03-11 Nathan Sidwell <nathan@acm.org>
840
841 PR c++/99248
842 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
843 when there's a binding vector.
844 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
845
8462021-03-11 Nathan Sidwell <nathan@acm.org>
847
848 PR c++/99528
849 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
850 MK_decl_tmpl_spec.
851 (trees_in::decl_value): Adjust add_mergeable_specialization call.
852 (trees_out::get_merge_kind): Adjust detecting a partial template
853 instantiation.
854 (trees_out::key_mergeable): Adjust handling same.
855 (trees_in::key_mergeabvle): Likewise.
856
e9800852
GA
8572021-03-10 Nathan Sidwell <nathan@acm.org>
858
859 PR c++/99423
860 * module.cc (post_load_processing): Assert not gcable.
861 (laxy_load_pendings): Extend no-gc region around
862 post_load_processing.
863
8642021-03-10 Nathan Sidwell <nathan@acm.org>
865
866 PR c++/99508
867 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
868 assembler name to the ns alias.
869
8dc225d3
GA
8702021-03-09 Jakub Jelinek <jakub@redhat.com>
871
872 PR c++/99459
873 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
874 build_special_member_call return value to find the CALL_EXPR.
875 Simplify.
876
8772021-03-09 Nathan Sidwell <nathan@acm.org>
878
879 PR c++/99472
880 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
881 that C++20 does not yet imply modules.
882
6405b40f
GA
8832021-03-08 Nathan Sidwell <nathan@acm.org>
884
885 PR c++/99436
886 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
887
8882021-03-08 Nathan Sidwell <nathan@acm.org>
889
890 * lex.c (module_token_filter::resume): Ignore module-decls inside
891 header-unit.
892 * parser.c (cp_parser_module_declaration): Reject in header-unit.
893
8942021-03-08 Nathan Sidwell <nathan@acm.org>
895
896 PR c++/99285
897 * cp-tree.h (match_mergeable_specialization)
898 (add_mergeable_specialization): Adjust parms.
899 * module.cc (trees_in::decl_value): Adjust
900 add_mergeable_specialization calls.
901 (trees_out::key_mergeable): Adjust match_mergeable_specialization
902 calls.
903 (specialization_add): Likewise.
904 * pt.c (match_mergeable_specialization): Do not insert.
905 (add_mergeable_specialization): Add to hash table here.
906
0ad6a2e2
GA
9072021-03-06 Patrick Palka <ppalka@redhat.com>
908 Jakub Jelinek <jakub@redhat.com>
909
910 PR c++/99287
911 * constexpr.c (cxx_eval_increment_expression): Pass lval when
912 evaluating the MODIFY_EXPR, and update 'mod' with the result of
913 this evaluation. Check *non_constant_p afterwards. For prefix
914 ops, just return 'mod'.
915
9162021-03-06 Patrick Palka <ppalka@redhat.com>
917 Jakub Jelinek <jakub@redhat.com>
918
919 PR c++/96330
920 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
921 variable 'fn' to 'tmpl'. Handle a variable template-id by
922 calling lookup_template_variable.
923
9242021-03-06 Patrick Palka <ppalka@redhat.com>
925
926 PR c++/99365
927 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
928 outer_targs to do_auto_deduction.
929 (placeholder_type_constraint_dependent_p): Define.
930 (do_auto_deduction): When processing_template_decl != 0
931 and context is adc_unify and we have constraints, pretend the
932 constraints are satisfied instead of punting. Otherwise don't
933 punt unless placeholder_type_constraint_dependent_p holds.
934 Add some clarifying sanity checks. Add a hack to add missing
935 outermost template levels to outer_args before checking
936 satisfaction. Don't substitute outer_targs into type if it's
937 already been done.
938
ceae9533
GA
9392021-03-05 Marek Polacek <polacek@redhat.com>
940
941 PR c++/99374
942 * call.c (standard_conversion): When converting pointers to
943 member, don't return NULL when the bases are equivalent but
944 incomplete.
945
9462021-03-05 Marek Polacek <polacek@redhat.com>
947
948 PR c++/99120
949 * name-lookup.c (check_local_shadow): Check if the type of decl
950 is non-null before checking TYPE_PTR*.
951
9522021-03-05 Nathan Sidwell <nathan@acm.org>
953
954 PR c++/99245
955 * module.cc (module_state::write_cluster): Relax binding assert.
956
9572021-03-05 Nathan Sidwell <nathan@acm.org>
958
959 PR c++/99377
960 * pt.c (instantiate_decl): Call set_instantiating_module.
961
9622021-03-05 Iain Sandoe <iain@sandoe.co.uk>
963
964 PR c++/98118
965 * coroutines.cc (build_co_await): Use type_build_ctor_call()
966 to determine cases when a CTOR needs to be built.
967 (flatten_await_stmt): Likewise.
968 (morph_fn_to_coro): Likewise.
969
9702021-03-05 Iain Sandoe <iain@sandoe.co.uk>
971
972 PR c++/95616
973 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
974 (coro_diagnose_throwing_final_aw_expr): New helper.
975 (build_co_await): Diagnose throwing final await expression
976 components.
977 (build_init_or_final_await): Diagnose a throwing promise
978 final_suspend() call.
979
9802021-03-05 Iain Sandoe <iain@sandoe.co.uk>
981
982 PR c++/95615
983 * coroutines.cc (struct param_info): Track parameter copies that need
984 a DTOR.
985 (coro_get_frame_dtor): New helper function factored from build_actor().
986 (build_actor_fn): Use coro_get_frame_dtor().
987 (morph_fn_to_coro): Track parameters that need DTORs on exception,
988 likewise the frame promise and the return object. On exception, run the
989 DTORs for these, destroy the frame and then rethrow the exception.
990
9912021-03-05 Nathan Sidwell <nathan@acm.org>
992
993 PR c++/99389
994 * pt.c (instantiate_class_template_1): Set instantiating module
995 here.
996
9972021-03-05 Tobias Burnus <tobias@codesourcery.com>
998
999 PR c/99137
1000 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
1001
67f10d28
GA
10022021-03-04 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c++/88146
1005 PR c++/99362
1006 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
1007 comment.
1008
10092021-03-04 Nathan Sidwell <nathan@acm.org>
1010
1011 PR c++/99170
1012 * module.cc (class uintset): Delete.
1013 (typedef attached_map_t): A hash map.
1014 (attached_table): Use attached_map_t. Adjust uses ...
1015 (trees_out::decl_value, trees_in::decl_value): ... here ...
1016 (trees_out::key_mergeable): ... here ...
1017 (trees_in::key_mergeable): ... here ...
1018 (maybe_attach_decl): ... here ...
1019 (direct_import): ... and here.
1020
10212021-03-04 Nathan Sidwell <nathan@acm.org>
1022
1023 PR c++/99170
1024 * cp-tree.h
1025 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
1026 rename.
1027 * module.cc (class pending_key): New.
1028 (default_hash_traits<pending_key>): New specialization.
1029 (pending_map_t): New typedef.
1030 (pending_table): Replace old table.
1031 (trees_out::lang_decl_bools): Adjust.
1032 (trees_in::lang_decl_bools): Adjust.
1033 (trees_in::install_entity): Drop pending member and specialization
1034 handling.
1035 (find_pending_key): New.
1036 (depset::hash::fiund_dependencies): Use it.
1037 (pendset_lazy_load): Delete.
1038 (module_state::write_cluster): Don't count pendings here. Bye
1039 Duff's device-like thing.
1040 (module_state::write_pendings): Reimplement.
1041 (module_state::read_pendings): Reimplement.
1042 (lazy_specializations_p): Delete.
1043 (module_state::write): Adjust write_pendings call.
1044 (lazy_load_pendings): New.
1045 (lazy_load_specializations): Delete.
1046 (lazy_load_members): Delete.
1047 (init_modules): Adjust.
1048 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
1049 not lazy_load_members.
1050 (note_pending_specializations): Delete.
1051 (load_pending_specializations): Delete.
1052 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
1053 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
1054 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
1055 (note_pending_specializations): Delete.
1056 (load_pending_specializations): Delete.
1057 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
1058 lazy_load_specializations.
1059 (instantiate_template_class_1): Likewise.
1060 (instantiate_decl): Call lazy_load_pendings.
1061 * typeck.c (complete_type): Likewise.
1062
f3641ac7
GA
10632021-03-03 Nathan Sidwell <nathan@acm.org>
1064
1065 PR c++/99170
1066 * module.cc (post_load_decls): New.
1067 (lazy_snum, recursive_lazy): Move earlier.
1068 (module_state::read_cluster): Push cloning onto post_load_decls.
1069 (post_load_processing): New. Do the cloning here.
1070 (module_state::read_inits): Call post_load_processing.
1071 (module_state::read_language): Likewise.
1072 (lazy_load_binding, lazy_load_specializations): Likewise
1073 (lazy_load_members): Likewise
1074
10752021-03-03 Nathan Sidwell <nathan@acm.org>
1076
1077 PR c++/99170
1078 * module.cc (trees_out::decl_value): Stream specialization keys
1079 after decl.
1080 (trees_in::decl_value): Stream them back and insert after
1081 completing the decl.
1082 (trees_out::key_mergeable): Drop some streaming here ...
1083 (trees_in::key_mergeable): ... and here. Don't insert into
1084 specialization tables.
1085
10862021-03-03 Patrick Palka <ppalka@redhat.com>
1087
1088 * constraint.cc (struct sat_info): Document the different
1089 meanings of noisy() and diagnose_unsatisfaction_p() during
1090 satisfaction and requires-expression evaluation.
1091 (tsubst_valid_expression_requirement): Take a sat_info instead
1092 of a subst_info. Perform the substitution quietly first. Fold
1093 in error-replaying code from diagnose_valid_expression.
1094 (tsubst_simple_requirement): Take a sat_info instead of a
1095 subst_info.
1096 (tsubst_type_requirement_1): New. Fold in error-replaying code
1097 from diagnose_valid_type.
1098 (tsubst_type_requirement): Use the above. Take a sat_info
1099 instead of a subst_info.
1100 (tsubst_compound_requirement): Likewise. Fold in
1101 error-replaying code from diagnose_compound_requirement.
1102 (tsubst_nested_requirement): Take a sat_info instead of a
1103 subst_info. Fold in error-replaying code from
1104 diagnose_nested_requirement.
1105 (tsubst_requirement): Take a sat_info instead of a subst_info.
1106 (tsubst_requires_expr): Split into two versions, one that takes
1107 a sat_info argument and another that takes a complain and
1108 in_decl argument. Remove outdated documentation. Document the
1109 effects of the sat_info argument. Don't short-circuit
1110 processing of requirements when diagnosing unsatisfaction,
1111 mirroring diagnose_requires_expr.
1112 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
1113 assert, and se the three-parameter version of tsubst_requires_expr.
1114 (diagnose_trait_expr): Make static. Take a template argument
1115 vector instead of a parameter mapping.
1116 (diagnose_valid_expression): Remove.
1117 (diagnose_valid_type): Remove.
1118 (diagnose_simple_requirement): Remove.
1119 (diagnose_compound_requirement): Remove.
1120 (diagnose_type_requirement): Remove.
1121 (diagnose_nested_requirement): Remove.
1122 (diagnose_requirement): Remove.
1123 (diagnose_requires_expr): Remove.
1124 (diagnose_atomic_constraint): Take a sat_info instead of a
1125 subst_info. Adjust call to diagnose_trait_expr. Call
1126 tsubst_requires_expr instead of diagnose_requires_expr.
1127 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
1128 and just always call constraint_satisfaction_value.
1129
11302021-03-03 Patrick Palka <ppalka@redhat.com>
1131
1132 * constexpr.c (cxx_eval_call_expression): Adjust call to
1133 evaluate_concept_check.
1134 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
1135 evaluate_requires_expression instead of
1136 satisfy_constraint_expression.
1137 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1138 * constraint.cc (struct sat_info): Adjust comment about which
1139 satisfaction entrypoints use noisy-unsat.
1140 (normalize_template_requirements): Remove (and adjust callers
1141 appropriately).
1142 (normalize_nontemplate_requirements): Likewise.
1143 (tsubst_nested_requirement): Use constraint_satisfaction_value
1144 instead of satisfy_constraint_expression, which'll do the
1145 noisy replaying of ill-formed quiet satisfaction for us.
1146 (decl_satisfied_cache): Adjust comment.
1147 (satisfy_constraint): Rename to ...
1148 (satisfy_normalized_constraints): ... this.
1149 (satisfy_associated_constraints): Remove (and make its
1150 callers check for dependent arguments).
1151 (satisfy_constraint_expression): Rename to ...
1152 (satisfy_nondeclaration_constraints): ... this. Assert that
1153 'args' is empty when 't' is a concept-id. Removing handling
1154 bare constraint-expressions, and handle REQUIRES_EXPRs
1155 specially. Adjust comment accordingly.
1156 (satisfy_declaration_constraints): Assert in the two-parameter
1157 version that 't' is not a TEMPLATE_DECL. Adjust following
1158 removal of normalize_(non)?template_requirements and
1159 satisfy_asociated_constraints.
1160 (constraint_satisfaction_value): Combine the two- and
1161 three-parameter versions in the natural way.
1162 (constraints_satisfied_p): Combine the one- and two-parameter
1163 versions in the natural way. Improve documentation.
1164 (evaluate_requires_expr): Define.
1165 (evaluate_concept_check): Remove 'complain' parameter. Use
1166 constraint_satisfaction_value instead of
1167 satisfy_constraint_expression.
1168 (diagnose_nested_requirement): Adjust following renaming of
1169 satisfy_constraint_expression.
1170 (diagnose_constraints): Handle REQUIRES_EXPR by going through
1171 diagnose_requires_expr directly instead of treating it as a
1172 constraint-expression. Improve documentation.
1173 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
1174 to evaluate_concept_check.
1175 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
1176 constraints_satisfied_p.
1177 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1178 * cp-tree.h (evaluate_requires_expr): Declare.
1179 (evaluate_concept_check): Remove tsubst_flag_t parameter.
1180 (satisfy_constraint_expression): Remove declaration.
1181 (constraints_satisfied_p): Remove one-parameter declaration.
1182 Add a default argument to the two-parameter declaration.
1183 * cvt.c (convert_to_void): Adjust call to
1184 evaluate_concept_check.
1185
11862021-03-03 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c++/82959
1189 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
1190 and COMPOUND_EXPR.
1191
11922021-03-03 Marek Polacek <polacek@redhat.com>
1193
1194 PR c++/97034
1195 PR c++/99009
1196 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
1197 (maybe_aggr_guide): Use the original template type where needed. In
1198 a class member template, partially instantiate the result of
1199 collect_ctor_idx_types.
1200 (do_class_deduction): Defer the deduction until the enclosing
1201 scope is non-dependent.
1202
12032021-03-03 Jason Merrill <jason@redhat.com>
1204
1205 PR c++/95675
1206 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
1207 if it didn't get one before.
1208
12092021-03-03 Nathan Sidwell <nathan@acm.org>
1210
1211 PR c++/99344
1212 * module.cc (trees_out::decl_node): Small refactor.
1213 (depset::hash::add_binding_entity): Return true on meeting an
1214 import. Set namespace's import here.
1215 (module_state:write_namespaces): Inform of purview too.
1216 (module_state:read_namespaces): Adjust.
1217 * name-lookup.c (implicitly_export_namespace): Delete.
1218 (do_pushdecl): Don't call it.
1219 (push_namespace): Likewise, set purview.
1220 (add_imported_namespace): Reorder parms.
1221 * name-lookup.h (add_imported_namespace): Alter param ordering.
1222
d97a92dc
GA
12232021-03-02 Martin Sebor <msebor@redhat.com>
1224
1225 PR c++/99251
1226 * class.c (build_base_path): Call build_if_nonnull.
1227 * cp-tree.h (build_if_nonnull): Declare.
1228 * rtti.c (ifnonnull): Rename...
1229 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
1230 (build_dynamic_cast_1): Adjust to name change.
1231
12322021-03-02 Patrick Palka <ppalka@redhat.com>
1233
1234 PR c++/96443
1235 PR c++/96960
1236 * constraint.cc (type_deducible_p): Don't substitute into the
1237 constraints, and instead just pass 'args' to do_auto_deduction
1238 as the outer template arguments.
1239 (tsubst_parameter_mapping): Remove confused code for handling
1240 placeholder type arguments.
1241 (normalize_placeholder_type_constraint): Define.
1242 (satisfy_constraint_expression): Use it to handle placeholder
1243 'auto' types.
1244 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
1245 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
1246 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
1247 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1248 (make_constrained_placeholder_type): Set
1249 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1250 (do_auto_deduction): Clarify comments about the outer_targs
1251 parameter. Rework satisfaction of a placeholder type constraint
1252 to pass in the complete set of template arguments directly to
1253 constraints_satisfied_p.
1254 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
1255 instead. Also rebuild the the constraint info on the new auto.
1256
12572021-03-02 Patrick Palka <ppalka@redhat.com>
1258
1259 * constraint.cc (build_parameter_mapping): Rely on the caller to
1260 determine the in-scope template parameters.
1261 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
1262 to the two-parameter constructor. In the two-parameter
1263 constructor, fold in the definition of make_context, set
1264 initial_parms appropriately, and don't set the now-removed
1265 orig_decl member.
1266 (norm_info::make_context): Remove, now that its only use is
1267 inlined into the caller.
1268 (norm_info::update_context): Adjust call to
1269 build_parameter_mapping to pass in the relevant set of in-scope
1270 template parameters.
1271 (norm_info::ctx_parms): Define this member function.
1272 (norm_info::context): Initialize to NULL_TREE.
1273 (norm_info::orig_decl): Remove this data member.
1274 (norm_info::initial_parms): Define this data member.
1275 (normalize_atom): Adjust call to build_parameter_mapping to pass
1276 in the relevant set of in-scope template parameters. Use
1277 info.initial_parms instead of info.orig_decl.
1278 (normalize_constraint_expression): Take a norm_info object
1279 instead of a bool. Cache the result of normalization.
1280 (tsubst_nested_requirement): Call satisfy_constraint_expression
1281 instead of satisfy_constraint, so that we normalize on demand.
1282 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
1283 Adjust call to normalize_constraint_expression.
1284 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
1285 to current_template_parms.
1286 (diagnose_nested_requirements): Go through
1287 satisfy_constraint_expression, as with tsubst_nested_requirement.
1288
12892021-03-02 Patrick Palka <ppalka@redhat.com>
1290
1291 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
1292 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
1293 started with a TYPE_ARGUMENT_PACK.
1294 (finish_requires_expr): Don't set DECL_CONTEXT and
1295 CONSTRAINT_VAR_P on each of the introduced parameters here.
1296 * parser.c (cp_parser_requirement_parameter_list): Instead set
1297 these fields earlier, here.
1298 * pt.c (do_auto_deduction): Canonicalize the result of
1299 do_auto_deduction. Pass 'complain' to finish_decltype_type.
1300
13012021-03-02 Patrick Palka <ppalka@redhat.com>
1302
1303 * constraint.cc (tsubst_simple_requirement): Just return
1304 boolean_true_node on success.
1305 (tsubst_type_requirement): Likewise.
1306 (tsubst_compound_requirement): Likewise.
1307 (tsubst_nested_requirement): Likewise.
1308 (tsubst_requirement_body): Remove.
1309 (check_constaint_variables): Rename to ...
1310 (check_constraint_variables): ... this.
1311 (tsubst_constraint_variables): Adjust.
1312 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
1313
88938886
GA
13142021-03-01 Nathan Sidwell <nathan@acm.org>
1315
1316 PR c++/99294
1317 * class.c (fixup_type_variants): Propagate mode, precision,
1318 alignment & emptiness.
1319 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
1320 (trees_in::tree_node): Rematerialize alignment here.
1321
ec9dc4fa
GA
13222021-02-27 Jason Merrill <jason@redhat.com>
1323
1324 PR c++/90333
1325 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
1326 between () and ->.
1327
06a9f20f
GA
13282021-02-26 Jakub Jelinek <jakub@redhat.com>
1329
1330 * parser.c (cp_parser_lambda_declarator_opt): Implement
1331 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
1332 for -std={c,gnu}++2b or with pedwarn in earlier versions.
1333
13342021-02-26 Jakub Jelinek <jakub@redhat.com>
1335
1336 PR c++/95451
1337 * lambda.c (is_lambda_ignored_entity): Before checking for
1338 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
1339
13402021-02-26 Jason Merrill <jason@redhat.com>
1341
1342 PR c++/98810
1343 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
1344 to a class non-type template argument that needs it.
1345
13462021-02-26 Patrick Palka <ppalka@redhat.com>
1347
1348 PR c++/98990
1349 * pt.c (splice_late_return_type): Rebuild the entire return type
1350 if we have to adjust the level of an auto within.
1351 (type_uses_auto): Adjust call to find_type_usage.
1352 * type-utils.h (find_type_usage): Revert r10-6571 change that
1353 made this function return a pointer to the auto node.
1354
daa68844
GA
13552021-02-25 Patrick Palka <ppalka@redhat.com>
1356
1357 PR c++/99213
1358 PR c++/94521
1359 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
1360 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
1361
13622021-02-25 Patrick Palka <ppalka@redhat.com>
1363
1364 PR c++/99103
1365 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
1366 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
1367
13682021-02-25 Marek Polacek <polacek@redhat.com>
1369
1370 DR 1312
1371 PR c++/99176
1372 * constexpr.c (is_std_construct_at): New overload.
1373 (is_std_allocator_allocate): New overload.
1374 (cxx_eval_call_expression): Use the new overloads.
1375 (cxx_eval_constant_expression): Reject casting
1376 from void * as per DR 1312. Don't check can_convert.
1377
13782021-02-25 Iain Sandoe <iain@sandoe.co.uk>
1379
1380 PR c++/97587
1381 * coroutines.cc (struct param_info): Track rvalue refs.
1382 (morph_fn_to_coro): Track rvalue refs, and call the promise
1383 CTOR with the frame copy of passed parms.
1384
13852021-02-25 Iain Sandoe <iain@sandoe.co.uk>
1386
1387 PR c++/95822
1388 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
1389 set throwing_cleanup marker.
1390
13912021-02-25 Nathan Sidwell <nathan@acm.org>
1392
1393 PR c++/99166
1394 * module.cc (module_state::inform_cmi_p): Renamed field.
1395 (module_state::do_import): Adjust.
1396 (init_modules, finish_module_processing): Likewise.
1397 (handle_module_option): Likewise.
1398
13992021-02-25 Nathan Sidwell <nathan@acm.org>
1400
1401 PR c++/98318
1402 * mapper-client.cc (module_client::open_module_client): Fix typo
1403 of fd init.
1404
4028d01a
GA
14052021-02-24 Nathan Sidwell <nathan@acm.org>
1406
1407 PR c++/98718
1408 * module.cc (ool): New indirection vector.
1409 (loc_spans::maybe_propagate): Location is not optional.
1410 (loc_spans::open): Likewise. Assert monotonically advancing.
1411 (module_for_ordinary_loc): Use ool indirection vector.
1412 (module_state::write_prepare_maps): Do not count empty macro
1413 expansions. Elide empty spans.
1414 (module_state::write_macro_maps): Skip empty expansions.
1415 (ool_cmp): New qsort comparator.
1416 (module_state::write): Create and destroy ool vector.
1417 (name_pending_imports): Fix dump push/pop.
1418 (preprocess_module): Likewise. Add more dumping.
1419 (preprocessed_module): Likewise.
1420
14212021-02-24 Iain Sandoe <iain@sandoe.co.uk>
1422
1423 PR c++/96251
1424 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
1425 error reporting when instantiating for a constexpr.
1426
71e24b06
GA
14272021-02-23 Nathan Sidwell <nathan@acm.org>
1428
1429 PR c++/99208
1430 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
1431 identity.
1432
14332021-02-23 Patrick Palka <ppalka@redhat.com>
1434
1435 PR c++/95468
1436 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
1437 over from tsubst_copy.
1438
14392021-02-23 Patrick Palka <ppalka@redhat.com>
1440
1441 * pt.c (instantiation_dependent_expression_p): Check
1442 processing_template_decl before calling
1443 potential_constant_expression.
1444
2f5765cf
GA
14452021-02-22 Nathan Sidwell <nathan@acm.org>
1446
1447 PR c++/99174
1448 * module.cc (struct module_state): Add visited_p flag.
1449 (name_pending_imports): Use it to avoid duplicate requests.
1450 (preprocess_module): Don't read preprocessor state if we failed to
1451 load a module's config.
1452
14532021-02-22 Nathan Sidwell <nathan@acm.org>
1454
1455 PR c++/99153
1456 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
1457 to common-path.
1458 * module.cc (set_defining_module): Add assert.
1459
50352c6c
GA
14602021-02-19 Nathan Sidwell <nathan@acm.org>
1461
1462 PR c++/98741
1463 * module.cc (pending_imports): New.
1464 (declare_module): Adjust test condition.
1465 (name_pending_imports): New.
1466 (preprocess_module): Reimplement using pending_imports.
1467 (preprocessed_module): Move name-getting to name_pending_imports.
1468 * name-lookup.c (append_imported_binding_slot): Assert module
1469 ordering is increasing.
1470
14712021-02-19 Nathan Sidwell <nathan@acm.org>
1472
1473 * module.cc (note_cmis): New.
1474 (struct module_state): Add inform_read_p bit.
1475 (module_state::do_import): Inform of CMI location, if enabled.
1476 (init_modules): Canonicalize note_cmis entries.
1477 (handle_module_option): Handle -flang-info-module-read=FOO.
1478
14792021-02-19 Jason Merrill <jason@redhat.com>
1480
1481 PR c++/96926
1482 * call.c (perfect_conversion_p): Limit rvalueness
1483 test to reference bindings.
1484
14852021-02-19 Jason Merrill <jason@redhat.com>
1486
1487 PR c++/96926
1488 * call.c (perfect_conversion_p): New.
1489 (perfect_candidate_p): New.
1490 (add_candidates): Ignore templates after a perfect non-template.
1491
bf81237e
GA
14922021-02-18 Nathan Sidwell <nathan@acm.org>
1493
1494 PR c++/99023
1495 * module.cc (canonicalize_header_name): Use
1496 cpp_probe_header_unit.
1497 (maybe_translate_include): Fix note_includes comparison.
1498 (init_modules): Fix note_includes string termination.
1499
15002021-02-18 Jakub Jelinek <jakub@redhat.com>
1501
1502 PR c++/99132
1503 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
1504 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
1505 for immediate function calls.
1506
acc0ee5c
GA
15072021-02-17 Nathan Sidwell <nathan@acm.org>
1508
1509 PR c++/99023
1510 * module.cc (struct macro_export): Add GTY markers.
1511 (macro_exports): Likewise, us a va_gc Vector.
1512
15132021-02-17 Jakub Jelinek <jakub@redhat.com>
1514
1515 PR sanitizer/99106
1516 * init.c (build_zero_init_1): For flexible array members just return
1517 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
1518 ARRAY_TYPE.
1519
15202021-02-17 Nathan Sidwell <nathan@acm.org>
1521
1522 PR c++/99116
1523 * name-lookup.c (do_pushdecl): Don't peek under template_parm
1524 bindings here ...
1525 (set_identifier_type_value_with_scope): ... or here.
1526 (do_pushtag): Only set_identifier_type_value_with_scope at
1527 non-class template parm scope, and use parent scope.
1528
15292021-02-17 Nathan Sidwell <nathan@acm.org>
1530
1531 PR c++/99071
1532 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
1533 pointer.
1534
15352021-02-17 Patrick Palka <ppalka@redhat.com>
1536
1537 PR debug/96997
1538 PR c++/94034
1539 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
1540
fab095da
GA
15412021-02-12 Nathan Sidwell <nathan@acm.org>
1542
1543 * module.cc (module_state::write_cluster): Check bindings for
1544 imported using-decls.
1545
15462021-02-12 Nathan Sidwell <nathan@acm.org>
1547
1548 PR c++/99040
1549 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
1550 for new namespace-scope entities.
1551 (module_state::read_cluster): Don't call add_module_decl here.
1552 * name-lookup.h (add_module_decl): Rename to ...
1553 (add_module_namespace_decl): ... this.
1554 * name-lookup.c (newbinding_bookkeeping): Move into ...
1555 (do_pushdecl): ... here. Its only remaining caller.
1556 (add_module_decl): Rename to ...
1557 (add_module_namespace_decl): ... here. Add checking-assert for
1558 circularity. Don't call newbinding_bookkeeping, just extern_c
1559 checking and incomplete var checking.
1560
15612021-02-12 Nathan Sidwell <nathan@acm.org>
1562
1563 PR c++/99039
1564 PR c++/99040
1565 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
1566 (global_type_node): Delete.
1567 (IDENTIFIER_TYPE_VALUE): Delete.
1568 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
1569 (get_type_value): Delete.
1570 * name-lookup.h (identifier_type_value): Delete.
1571 * name-lookup.c (check_module_override): Don't
1572 SET_IDENTIFIER_TYPE_VALUE here.
1573 (do_pushdecl): Nor here.
1574 (identifier_type_value_1, identifier_type_value): Delete.
1575 (set_identifier_type_value_with_scope): Only
1576 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
1577 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
1578 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
1579 * call.c (check_dtor_name): Use lookup_name.
1580 * decl.c (cxx_init_decl_processing): Drop global_type_node.
1581 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
1582 here.
1583 * init.c (get_type_value): Delete.
1584 * pt.c (instantiate_class_template_1): Don't call pushtag or
1585 SET_IDENTIFIER_TYPE_VALUE here.
1586 (tsubst): Assert never an identifier.
1587 (dependent_type_p): Drop global_type_node assert.
1588 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
1589 to determine ctorness.
1590
15912021-02-12 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c++/97742
1594 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
1595 CPP_EOF.
1596
15972021-02-12 Jason Merrill <jason@redhat.com>
1598
1599 PR c++/97246
1600 PR c++/94546
1601 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
1602 (register_parameter_specializations): Not here.
1603
0c5cdb31
GA
16042021-02-11 Marek Polacek <polacek@redhat.com>
1605
1606 PR c++/95888
1607 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
1608 for the partial instantiation.
1609
16102021-02-11 Jakub Jelinek <jakub@redhat.com>
1611
1612 PR c++/99033
1613 * init.c (build_zero_init_1): Handle zero initialiation of
1614 flexible array members like initialization of [0] arrays.
1615 Use integer_minus_onep instead of comparison to integer_minus_one_node
1616 and integer_zerop instead of comparison against size_zero_node.
1617 Formatting fixes.
1618
16192021-02-11 Marek Polacek <polacek@redhat.com>
1620
1621 PR c++/99063
1622 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
1623
16242021-02-11 Patrick Palka <ppalka@redhat.com>
1625
1626 PR c++/97582
1627 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
1628 lookup result by discarding it if the first element is a
1629 class-scope declaration, otherwise return it.
1630 (push_operator_bindings): Handle an ambiguous lookup result by
1631 doing push_local_binding on each element in the list.
1632
16332021-02-11 Marek Polacek <polacek@redhat.com>
1634
1635 * parser.c (cp_parser_selection_statement): Use vec_free.
1636
4b37c3ea
GA
16372021-02-10 Jakub Jelinek <jakub@redhat.com>
1638
1639 PR c++/98988
1640 PR c++/99031
1641 * constexpr.c: Include cgraph.h.
1642 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
1643 heap artificial vars.
1644 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
1645 heap artificial vars.
1646
16472021-02-10 Nathan Sidwell <nathan@acm.org>
1648
1649 PR c++/99030
1650 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
1651 answer if there's no local specialization.
1652
0a91b73e
GA
16532021-02-09 Nathan Sidwell <nathan@acm.org>
1654
1655 PR c++/98944
1656 * module.cc (module_state::is_rooted): Rename to ...
1657 (module_state::has_location): ... here. Adjust callers.
1658 (module_state::read_partitions): Adjust validity check.
1659 Don't overwrite a known location.
1660
16612021-02-09 Jason Merrill <jason@redhat.com>
1662
1663 PR c++/96905
1664 * pt.c (mark_decl_instantiated): Exit early if consteval.
1665
16662021-02-09 Jason Merrill <jason@redhat.com>
1667
1668 PR c++/98326
1669 PR c++/20408
1670 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
1671 parm.
1672
16732021-02-09 Jason Merrill <jason@redhat.com>
1674
1675 PR c++/98994
1676 PR c++/97566
1677 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
1678 RECORD_TYPE.
1679
2da7ce23
GA
16802021-02-08 Nathan Sidwell <nathan@acm.org>
1681
1682 * decl.c (start_cleanup_fn): Push function into
1683 namespace.
1684
16852021-02-08 Nathan Sidwell <nathan@acm.org>
1686
1687 PR c++/98531
1688 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
1689 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
1690 from rtti.c, add default namespace arg.
1691 (check_redeclaration_exception_specification): Allow a lazy
1692 builtin's eh spec to differ from an lready-declared user
1693 declaration.
1694 (declare_global_var): Use push/pop_abi_namespace.
1695 (get_atexit_node): Push the fndecl into a namespace.
1696 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
1697 decl.c.
1698
16992021-02-08 Marek Polacek <polacek@redhat.com>
1700
1701 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
1702
1ed59127
GA
17032021-02-05 Marek Polacek <polacek@redhat.com>
1704
1705 PR c++/98947
1706 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
1707 on arg2/arg3.
1708 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
1709 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
1710 a warning was emitted.
1711
17122021-02-05 Marek Polacek <polacek@redhat.com>
1713
1714 PR c++/96462
1715 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
1716
17172021-02-05 Jakub Jelinek <jakub@redhat.com>
1718
1719 PR c++/97878
1720 * decl.c (check_array_initializer): For structured bindings, require
1721 the array type to be complete.
1722
a19dd5e6
GA
17232021-02-04 Jason Merrill <jason@redhat.com>
1724
1725 PR c++/98717
1726 * constraint.cc (build_concept_check_arguments): Remove assert.
1727 (build_concept_check): Allow empty args.
1728
17292021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
1730
1731 PR c++/90926
1732 * call.c (can_convert_array): Extend to handle all valid aggregate
1733 initializers of an array; including by string literals, not just by
1734 brace-init-list.
1735 (build_aggr_conv): Call can_convert_array more often, not just in
1736 brace-init-list case.
1737 * typeck2.c (array_string_literal_compatible_p): New function.
1738 (digest_init_r): call array_string_literal_compatible_p
1739 * cp-tree.h: (array_string_literal_compatible_p): Declare.
1740
17412021-02-04 Jason Merrill <jason@redhat.com>
1742
1743 PR c++/98802
1744 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
1745
17462021-02-04 Jason Merrill <jason@redhat.com>
1747
1748 PR c++/95192
1749 * pt.c (tsubst_attribute): Handle error.
1750 (apply_late_template_attributes): Return false on error.
1751 (tsubst_function_decl): Check its return value.
1752 (tsubst_decl): Likewise.
1753 (push_template_decl): Assert current_template_parms.
1754 (tsubst_template_decl): Set current_template_parms.
1755
9faaa807
GA
17562021-02-03 Marek Polacek <polacek@redhat.com>
1757
1758 PR c++/98951
1759 * call.c (struct z_candidate): Mark rewritten and reversed as const.
1760 (struct NonPublicField): Mark operator() as const.
1761 (struct NonTrivialField): Likewise.
1762
17632021-02-03 Jason Merrill <jason@redhat.com>
1764
1765 PR c++/98926
1766 PR c++/98570
1767 * pt.c (spec_hasher::equal): Set processing_template_decl.
1768 * Make-lang.in (check-g++-strict-gc): Add --param
1769 hash-table-verification-limit=10000.
1770
17712021-02-03 Marek Polacek <polacek@redhat.com>
1772
1773 PR c++/98899
1774 * parser.c (cp_parser_class_specifier_1): Use any possible
1775 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
1776 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
1777 * pt.c (tsubst_exception_specification): Stash new_specs into
1778 DEFPARSE_INSTANTIATIONS.
1779 * tree.c (fixup_deferred_exception_variants): Use
1780 UNPARSED_NOEXCEPT_SPEC_P.
1781
548b75d8
GA
17822021-02-02 Jason Merrill <jason@redhat.com>
1783
1784 PR c++/98929
1785 PR c++/96199
1786 * error.c (dump_expr): Ignore dummy object.
1787 * pt.c (tsubst_baselink): Handle dependent scope.
1788
f7884fb1
GA
17892021-02-01 Patrick Palka <ppalka@redhat.com>
1790
1791 PR c++/98295
1792 * constexpr.c (cxx_eval_array_reference): Also set
1793 new_ctx.object when setting new_ctx.ctor.
1794
17952021-02-01 Marek Polacek <polacek@redhat.com>
1796
1797 PR c++/98355
1798 * parser.c (cp_parser_has_attribute_expression): Use
1799 uses_template_parms instead of type_dependent_expression_p.
1800
18012021-02-01 Jason Merrill <jason@redhat.com>
1802
1803 PR c++/98570
1804 * cp-tree.h: Declare it.
1805 * pt.c (comparing_dependent_aliases): New flag.
1806 (template_args_equal, spec_hasher::equal): Set it.
1807 (dependent_alias_template_spec_p): Assert that we don't
1808 get non-types other than error_mark_node.
1809 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
1810 on complex alias specializations. Set TYPE_DEPENDENT_P here.
1811 (tsubst_decl): Not here.
1812 * module.cc (module_state::read_cluster): Set
1813 comparing_dependent_aliases instead of
1814 comparing_specializations.
1815 * tree.c (cp_tree_equal): Remove comparing_specializations
1816 module handling.
1817 * typeck.c (structural_comptypes): Adjust.
1818 (comptypes): Remove comparing_specializations handling.
1819
2900f2f2
GA
18202021-01-29 Nathan Sidwell <nathan@acm.org>
1821
1822 PR c++/98843
1823 * module.cc (module_state_config): Add num_entities field.
1824 (module_state::read_entities): The entity_ary span is
1825 already allocated.
1826 (module_state::write_config): Write num_entities.
1827 (module_state::read_config): Read num_entities.
1828 (module_state::write): Set config's num_entities.
1829 (module_state::read_initial): Allocate the entity ary
1830 span here.
1831 (module_state::read_language): Do not set entity_lwm
1832 here.
1833
18342021-01-29 Marek Polacek <polacek@redhat.com>
1835
1836 PR c++/96137
1837 * parser.c (cp_parser_class_name): If parser->scope is
1838 error_mark_node, return it, otherwise continue.
1839
85d04a2e
GA
18402021-01-28 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR c++/98841
1843 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
1844
18452021-01-28 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR c++/33661
1848 PR c++/98847
1849 * decl.c (cp_finish_decl): For register vars with asmspec in templates
1850 call set_user_assembler_name and set DECL_HARD_REGISTER.
1851 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
1852 pass asmspec_tree to cp_finish_decl.
1853
18542021-01-28 Nathan Sidwell <nathan@acm.org>
1855
1856 PR c++/98770
1857 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
1858 check order.
1859 (trees_in::decl_value): Do typedef frobbing only when installing
1860 a new typedef, adjust is_matching_decl call. Swap is_typedef
1861 & TYPE_NAME check.
1862 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
1863 names and deal with typedef checking.
1864
aa69f0a8
GA
18652021-01-27 Jason Merrill <jason@redhat.com>
1866
1867 PR c++/97874
1868 * name-lookup.c (lookup_using_decl): Clean up handling
1869 of dependency and inherited constructors.
1870 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
1871 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
1872
e62bb7f0
GA
18732021-01-26 Jason Merrill <jason@redhat.com>
1874
1875 PR c++/97474
1876 * call.c (type_passed_as): Don't mark invisiref restrict.
1877
18782021-01-26 Jason Merrill <jason@redhat.com>
1879
1880 PR c++/97566
1881 PR c++/98463
1882 * class.c (layout_class_type): An empty field gets size 0.
1883 (is_empty_field): New.
1884 (check_bases): Check it.
1885 * cp-tree.h (is_empty_field): Declare it.
1886 * constexpr.c (cxx_eval_store_expression): Check it.
1887 (cx_check_missing_mem_inits): Likewise.
1888 * init.c (perform_member_init): Likewise.
1889 * typeck2.c (process_init_constructor_record): Likewise.
1890
161e4c08
GA
18912021-01-25 Martin Sebor <msebor@redhat.com>
1892
1893 PR c++/98646
1894 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
1895
18962021-01-25 Jason Merrill <jason@redhat.com>
1897
1898 PR c++/98463
1899 * constexpr.c (get_or_insert_ctor_field): Add check.
1900 (cxx_eval_store_expression): Handle discontinuity of refs.
1901
6b163337
GA
19022021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
1903
1904 * call.c (complain_about_access): Altered function.
1905 * cp-tree.h (complain_about_access): Changed parameters of function.
1906 (get_parent_with_private_access): Declared new function.
1907 * search.c (get_parent_with_private_access): Defined new function.
1908 * semantics.c (enforce_access): Modified function.
1909 * typeck.c (complain_about_unrecognized_member): Updated function
1910 arguments in complain_about_access.
1911
19122021-01-23 Patrick Palka <ppalka@redhat.com>
1913
1914 PR c++/97399
1915 * cp-tree.h (shared_member_p): Adjust declaration.
1916 * parser.c (cp_parser_init_declarator): If the storage class
1917 specifier is sc_static, pass true for static_p to
1918 cp_parser_declarator.
1919 (cp_parser_direct_declarator): Don't do inject_this_parm when
1920 the declarator is a friend.
1921 * search.c (shared_member_p): Change return type to bool and
1922 adjust function body accordingly. Return false for a dependent
1923 USING_DECL instead of aborting.
1924 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
1925 even when type-dependent.
1926
8502e23d
GA
19272021-01-22 Marek Polacek <polacek@redhat.com>
1928
1929 PR c++/96623
1930 * parser.c (inject_parm_decls): Remove a redundant assignment.
1931 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
1932 before calling inject_parm_decls.
1933
19342021-01-22 Jason Merrill <jason@redhat.com>
1935
1936 PR c++/98744
1937 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
1938
19392021-01-22 Jakub Jelinek <jakub@redhat.com>
1940
1941 PR sanitizer/95693
1942 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
1943 return build_zero_cst for reference types.
1944 * typeck2.c (process_init_constructor_record): Instead call
1945 build_zero_cst here during error recovery instead of build_zero_init.
1946
19472021-01-22 Marek Polacek <polacek@redhat.com>
1948
1949 PR c++/98545
1950 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
1951 warnings regardless of abi_version_at_least.
1952 (write_expression): When the expression is a dependent name
1953 and an operator name, write "on" before writing its name.
1954
19552021-01-22 Marek Polacek <polacek@redhat.com>
1956
1957 PR c++/97966
1958 * pt.c (instantiate_class_template_1): Instantiate members
1959 marked with attribute used only after we're done instantiating
1960 the class.
1961
7559d465
GA
19622021-01-21 Patrick Palka <ppalka@redhat.com>
1963
1964 PR c++/71879
1965 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
1966 sentinel at the start of the function. Remove a now-redundant
1967 manual adjustment of cp_unevaluated_operand.
1968
19692021-01-21 Nathan Sidwell <nathan@acm.org>
1970
1971 PR c++/98624
1972 * module.cc (depset::hash::find_dependencies): Add
1973 module arg.
1974 (trees_out::core_vals): Check state before calling
1975 write_location.
1976 (sort_cluster, module_state::write): Adjust
1977 find_dependencies call.
1978
19792021-01-21 Jakub Jelinek <jakub@redhat.com>
1980
1981 PR c++/98672
1982 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
1983 (check_for_return_continue): Also look for BREAK_STMT. Handle
1984 SWITCH_STMT by ignoring break_stmt from its body.
1985 (potential_constant_expression_1) <case FOR_STMT>,
1986 <case WHILE_STMT>: If the condition isn't constant true, check if
1987 the loop body can contain a return stmt.
1988 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
1989 <case IF_STMT>: If recursion with tf_none is successful,
1990 merge *jump_target from the branches - returns with highest priority,
1991 breaks or continues lower. If then branch is potentially constant and
1992 doesn't return, check the else branch if it could return, break or
1993 continue.
1994
19952021-01-21 Nathan Sidwell <nathan@acm.org>
1996
1997 PR c++/98530
1998 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
1999
b93d0e36
GA
20002021-01-20 Nathan Sidwell <nathan@acm.org>
2001
2002 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
2003 signed type.
2004
20052021-01-20 Patrick Palka <ppalka@redhat.com>
2006
2007 PR c++/95434
2008 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
2009 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
2010 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2011
20122021-01-20 Patrick Palka <ppalka@redhat.com>
2013
2014 PR c++/82613
2015 * parser.c (cp_parser_class_head): Defer access checking when
2016 parsing the base-clause until all bases are seen and attached
2017 to the class type.
2018 * pt.c (instantiate_class_template): Likewise when substituting
2019 into dependent bases.
2020
20212021-01-20 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR c++/98742
2024 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
2025 error_operand_p, remove clause without further checking. Check
2026 for non-NULL TYPE_NAME.
2027
f35a4f96
GA
20282021-01-19 Marek Polacek <polacek@redhat.com>
2029
2030 PR c++/98659
2031 * pt.c (maybe_instantiate_noexcept): Return false if FN is
2032 error_mark_node.
2033
20342021-01-19 Marek Polacek <polacek@redhat.com>
2035
2036 PR c++/98687
2037 * name-lookup.c (push_using_decl_bindings): New, broken out of...
2038 (finish_nonmember_using_decl): ...here.
2039 * name-lookup.h (push_using_decl_bindings): Update declaration.
2040 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
2041
20422021-01-19 Patrick Palka <ppalka@redhat.com>
2043
2044 PR c++/41437
2045 PR c++/58993
2046 * search.c (friend_accessible_p): If scope is a hidden friend
2047 defined inside a dependent class, consider access from the
2048 class.
2049 * parser.c (cp_parser_late_parsing_for_member): Don't push a
2050 dk_no_check access state.
2051
20522021-01-19 Marek Polacek <polacek@redhat.com>
2053
2054 PR c++/98333
2055 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
2056 of NSDMIs before late-parsing of noexcept-specifiers.
2057
20582021-01-19 Nathan Sidwell <nathan@acm.org>
2059
2060 * module.cc (identifier): Merge overloads.
2061
20622021-01-19 Nathan Sidwell <nathan@acm.org>
2063
2064 PR c++/98624
2065 * module.cc (trees_out::write_location): Make static.
2066
59cf67d1
GA
20672021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2068
2069 * parser.c (cp_parser_omp_clause_detach): New.
2070 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
2071 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2072 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2073 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2074 Prevent use of detach with mergeable and overriding the data sharing
2075 mode of the event handle.
2076
2f7f0d32
GA
20772021-01-15 Nathan Sidwell <nathan@acm.org>
2078
2079 PR c++/98538
2080 * tree.c (cp_build_qualified_type_real): Propagate an array's
2081 dependentness to the copy, if known.
2082
20832021-01-15 Jason Merrill <jason@redhat.com>
2084
2085 PR c++/98642
2086 * call.c (unsafe_return_slot_p): Return int.
2087 (init_by_return_slot_p): Split out from...
2088 (unsafe_copy_elision_p): ...here.
2089 (unsafe_copy_elision_p_opt): New name for old meaning.
2090 (build_over_call): Adjust.
2091 (make_safe_copy_elision): New.
2092 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
2093 list-initialization.
2094 * cp-tree.h: Adjust.
2095
20962021-01-15 Jason Merrill <jason@redhat.com>
2097
2098 * call.c (base_ctor_for, make_base_init_ok): New.
2099 (build_over_call): Use make_base_init_ok.
2100
21012021-01-15 Jason Merrill <jason@redhat.com>
2102
2103 PR c++/63707
2104 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
2105 if we got a CONSTRUCTOR.
2106
21072021-01-15 Nathan Sidwell <nathan@acm.org>
2108
2109 PR c++/98591
2110 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
2111
5fff80fd
GA
21122021-01-14 Jason Merrill <jason@redhat.com>
2113
2114 * typeck2.c (process_init_constructor_record): Use fldtype
2115 variable consistently.
2116
21172021-01-14 Nathan Sidwell <nathan@acm.org>
2118
2119 PR c++/98372
2120 * tree.c (cp_tree_equal): Correct map_context logic.
2121
be0851b8
GA
21222021-01-13 Marek Polacek <polacek@redhat.com>
2123
2124 PR c++/98231
2125 * name-lookup.c (push_using_decl_bindings): New.
2126 * name-lookup.h (push_using_decl_bindings): Declare.
2127 * pt.c (tsubst_expr): Call push_using_decl_bindings.
2128
21292021-01-13 Nathan Sidwell <nathan@acm.org>
2130
2131 PR c++/98626
2132 * module.cc (module_add_import_initializers): Pass a
2133 zero-element argument vector.
2134
6851dda2
GA
21352021-01-12 Patrick Palka <ppalka@redhat.com>
2136
2137 PR c++/98611
2138 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
2139 the template of a CTAD placeholder.
2140
21412021-01-12 Marek Polacek <polacek@redhat.com>
2142
2143 PR c++/98620
2144 * typeck2.c (process_init_constructor_record): Don't emit
2145 -Wmissing-field-initializers warnings in unevaluated contexts.
2146
67fbb7f0
GA
21472021-01-11 Jakub Jelinek <jakub@redhat.com>
2148
2149 PR c++/98481
2150 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
2151 for types.
2152 (mark_abi_tags_r): Likewise.
2153 * decl2.c (min_vis_r): Likewise.
2154 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
2155 typedefs.
2156
bf5cbb9e
GA
21572021-01-08 Patrick Palka <ppalka@redhat.com>
2158
2159 PR c++/98551
2160 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
2161 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
2162
21632021-01-08 Patrick Palka <ppalka@redhat.com>
2164
2165 PR c++/98515
2166 * semantics.c (check_accessibility_of_qualified_id): Punt if
2167 we're checking access of a scoped non-static member inside a
2168 class template.
2169
7d187e4f
GA
21702021-01-07 Jakub Jelinek <jakub@redhat.com>
2171
2172 PR c++/98329
2173 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
2174 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
2175 its location.
2176 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
2177
21782021-01-07 Marek Polacek <polacek@redhat.com>
2179
2180 PR c++/98441
2181 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
2182 !late_return_type block.
2183
21842021-01-07 Jason Merrill <jason@redhat.com>
2185
2186 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
2187 (cxx_eval_store_expression): Add comment.
2188
21892021-01-07 Jason Merrill <jason@redhat.com>
2190
2191 * call.c (has_next): Factor out from...
2192 (next_conversion): ...here.
2193 (strip_standard_conversion): And here.
2194 (is_subseq): And here.
2195 (build_conv): Check it.
2196 (standard_conversion): Don't call build_conv
2197 for ck_identity.
2198
942ae5be
GA
21992021-01-06 Martin Sebor <msebor@redhat.com>
2200
2201 PR c++/95768
2202 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
2203
651b8a50
GA
22042021-01-05 Patrick Palka <ppalka@redhat.com>
2205
2206 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
2207 the type of the NTTP, substitute into the type again. If the
2208 type is still dependent, don't unify the NTTP.
2209
22102021-01-05 Jakub Jelinek <jakub@redhat.com>
2211
2212 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
2213 $(CODYLIB) after $(BACKEND).
2214
22152021-01-05 Jakub Jelinek <jakub@redhat.com>
2216
2217 PR c++/98469
2218 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
2219 Punt if lval is true.
2220 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
2221 the result if it has a class type.
2222
22232021-01-05 Marek Polacek <polacek@redhat.com>
2224
2225 PR c++/82099
2226 * pt.c (resolve_overloaded_unification): Call
2227 maybe_instantiate_noexcept after instantiating the function
2228 decl.
2229
22302021-01-05 Nathan Sidwell <nathan@acm.org>
2231
2232 * parser.c (cp_parser_module_declaration): Alter diagnostic
2233 text to say where is permissable.
2234
22352021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2236
2237 PR c++/98316
2238 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
2239
2eacfdbd
GA
22402021-01-02 Jan Hubicka <jh@suse.cz>
2241
2242 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
2243 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
2244 * tree.c (cp_tree_c_finish_parsing): New function.
2245
b6dd195a
GA
22462021-01-01 Jakub Jelinek <jakub@redhat.com>
2247
2248 * ChangeLog-2020: Rotate ChangeLog. New file.
2249
ad41bd84 2250\f
618e665a 2251Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
2252
2253Copying and distribution of this file, with or without modification,
2254are permitted in any medium without royalty provided the copyright
2255notice and this notice are preserved.