]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
x86: Check cfun != NULL before accessing silent_p
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
5f256a70
GA
12021-03-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/99456
4 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
5 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
6 don't diagnose it, set *non_constant_p nor return t.
7
287e3e84
GA
82021-03-19 Marek Polacek <polacek@redhat.com>
9
10 PR c++/99500
11 * parser.c (cp_parser_requirement_parameter_list): Handle
12 error_mark_node.
13
142021-03-18 Marek Polacek <polacek@redhat.com>
15
16 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
17
182021-03-18 Marek Polacek <polacek@redhat.com>
19
20 * pt.c (tsubst_copy_and_build): Add assert.
21
222021-03-18 Iain Sandoe <iain@sandoe.co.uk>
23
24 PR objc++/49070
25 * parser.c (cp_debug_parser): Add Objective-C++ message
26 state flag.
27 (cp_parser_nested_name_specifier_opt): Allow colon to
28 terminate an assignment-expression when parsing Objective-
29 C++ messages.
30 (cp_parser_objc_message_expression): Set and clear message
31 parsing state on entry and exit.
32 * parser.h (struct cp_parser): Add a context flag for
33 Objective-C++ message state.
34
352021-03-18 Martin Liska <mliska@suse.cz>
36
37 PR c++/99617
38 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
39 to NULL.
40
19ac7c94
GA
412021-03-17 Marek Polacek <polacek@redhat.com>
42
43 PR c++/97973
44 * call.c (conv_unsafe_in_template_p): New.
45 (convert_like): Use it.
46
472021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
48 Jason Merrill <jason@redhat.com>
49
50 * semantics.c (get_class_access_diagnostic_decl): New
51 function that examines special cases when a parent
52 class causes a private access failure.
53 (enforce_access): Slightly modified to call function
54 above.
55
bc212776
GA
562021-03-16 Jason Merrill <jason@redhat.com>
57
58 * tree.c (cp_tree_equal): Use real_identical.
59
602021-03-16 Jakub Jelinek <jakub@redhat.com>
61
62 PR c++/99613
63 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
64 before calling __cxa_guard_release rather than after it. Formatting
65 fixes.
66
672021-03-16 Martin Liska <mliska@suse.cz>
68 Jason Merrill <jason@redhat.com>
69
70 PR c++/99108
71 * call.c (get_function_version_dispatcher): Handle
72 DECL_LOCAL_DECL_P.
73 * decl.c (maybe_version_functions): Likewise.
74 (maybe_mark_function_versioned): New.
75 * name-lookup.c (push_local_extern_decl_alias): No longer static.
76 * name-lookup.h (push_local_extern_decl_alias): Adjust.
77
782021-03-16 Nathan Sidwell <nathan@acm.org>
79
80 PR c++/99496
81 * module.cc (trees_out::decl_value): Adjust typedef streaming,
82 indicate whether it is a dependent alias.
83 (trees_in::decl_value): Likewise. Set as dependent alias, if it
84 is one.
85
3c5b6d24
GA
862021-03-15 Iain Sandoe <iain@sandoe.co.uk>
87
88 PR c++/99047
89 * coroutines.cc (expand_one_await_expression): If the
90 await_ready() expression is not a boolean then convert it
91 as required.
92
932021-03-15 Iain Sandoe <iain@sandoe.co.uk>
94
95 PR c++/98704
96 * coroutines.cc (build_actor_fn): Make destroy index 1
97 correspond to the abnormal unhandled_exception() exit.
98 Substitute the proxy for the resume index.
99 (coro_rewrite_function_body): Arrange to reset the resume
100 index and make done = true for a rethrown exception from
101 unhandled_exception ().
102 (morph_fn_to_coro): Adjust calls to build_actor_fn and
103 coro_rewrite_function_body.
104
1052021-03-15 Iain Sandoe <iain@sandoe.co.uk>
106
107 PR c++/98480
108 * coroutines.cc (replace_continue): Rewrite continue into
109 'goto label'.
110 (await_statement_walker): Handle await expressions in the
111 initializer, condition and iteration expressions of for
112 loops.
113
1142021-03-15 Iain Sandoe <iain@sandoe.co.uk>
115
116 PR c++/96749
117 * coroutines.cc (flatten_await_stmt): Allow for the case
118 where a target expression variable only has uses in the
119 second part of a compound expression.
120 (maybe_promote_temps): Avoid emiting empty statements.
121
1222021-03-15 Tobias Burnus <tobias@codesourcery.com>
123
124 PR c++/99509
125 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
126 ensure that the varpool node is marked as offloadable.
127
6da2762a
GA
1282021-03-12 Nathan Sidwell <nathan@acm.org>
129
130 PR c++/99238
131 * module.cc (depset::hash::add_binding_entity): Assert not
132 visited.
133 (depset::add::add_specializations): Likewise.
134 * name-lookup.c (name_lookup::dedup): New.
135 (name_lookup::~name_lookup): Assert not deduping.
136 (name_lookup::restore_state): Likewise.
137 (name_lookup::add_overload): Replace outlined code with dedup
138 call.
139 (name_lookup::add_value): Likewise.
140 (name_lookup::search_namespace_only): Likewise.
141 (name_lookup::adl_namespace_fns): Likewise.
142 (name_lookup::adl_class_fns): Likewise.
143 (name_lookup::search_adl): Likewise. Add clearing dedup call.
144 (name_lookup::search_qualified): Likewise.
145 (name_lookup::search_unqualified): Likewise.
146
1472021-03-12 Jakub Jelinek <jakub@redhat.com>
148
149 PR c++/99507
150 * call.c (build_over_call): For immediate evaluation of functions
151 that return references, undo convert_from_reference effects before
152 calling cxx_constant_value and call convert_from_reference
153 afterwards.
154
48ff383f
GA
1552021-03-11 Nathan Sidwell <nathan@acm.org>
156
157 PR c++/99248
158 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
159 when there's a binding vector.
160 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
161
1622021-03-11 Nathan Sidwell <nathan@acm.org>
163
164 PR c++/99528
165 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
166 MK_decl_tmpl_spec.
167 (trees_in::decl_value): Adjust add_mergeable_specialization call.
168 (trees_out::get_merge_kind): Adjust detecting a partial template
169 instantiation.
170 (trees_out::key_mergeable): Adjust handling same.
171 (trees_in::key_mergeabvle): Likewise.
172
e9800852
GA
1732021-03-10 Nathan Sidwell <nathan@acm.org>
174
175 PR c++/99423
176 * module.cc (post_load_processing): Assert not gcable.
177 (laxy_load_pendings): Extend no-gc region around
178 post_load_processing.
179
1802021-03-10 Nathan Sidwell <nathan@acm.org>
181
182 PR c++/99508
183 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
184 assembler name to the ns alias.
185
8dc225d3
GA
1862021-03-09 Jakub Jelinek <jakub@redhat.com>
187
188 PR c++/99459
189 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
190 build_special_member_call return value to find the CALL_EXPR.
191 Simplify.
192
1932021-03-09 Nathan Sidwell <nathan@acm.org>
194
195 PR c++/99472
196 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
197 that C++20 does not yet imply modules.
198
6405b40f
GA
1992021-03-08 Nathan Sidwell <nathan@acm.org>
200
201 PR c++/99436
202 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
203
2042021-03-08 Nathan Sidwell <nathan@acm.org>
205
206 * lex.c (module_token_filter::resume): Ignore module-decls inside
207 header-unit.
208 * parser.c (cp_parser_module_declaration): Reject in header-unit.
209
2102021-03-08 Nathan Sidwell <nathan@acm.org>
211
212 PR c++/99285
213 * cp-tree.h (match_mergeable_specialization)
214 (add_mergeable_specialization): Adjust parms.
215 * module.cc (trees_in::decl_value): Adjust
216 add_mergeable_specialization calls.
217 (trees_out::key_mergeable): Adjust match_mergeable_specialization
218 calls.
219 (specialization_add): Likewise.
220 * pt.c (match_mergeable_specialization): Do not insert.
221 (add_mergeable_specialization): Add to hash table here.
222
0ad6a2e2
GA
2232021-03-06 Patrick Palka <ppalka@redhat.com>
224 Jakub Jelinek <jakub@redhat.com>
225
226 PR c++/99287
227 * constexpr.c (cxx_eval_increment_expression): Pass lval when
228 evaluating the MODIFY_EXPR, and update 'mod' with the result of
229 this evaluation. Check *non_constant_p afterwards. For prefix
230 ops, just return 'mod'.
231
2322021-03-06 Patrick Palka <ppalka@redhat.com>
233 Jakub Jelinek <jakub@redhat.com>
234
235 PR c++/96330
236 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
237 variable 'fn' to 'tmpl'. Handle a variable template-id by
238 calling lookup_template_variable.
239
2402021-03-06 Patrick Palka <ppalka@redhat.com>
241
242 PR c++/99365
243 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
244 outer_targs to do_auto_deduction.
245 (placeholder_type_constraint_dependent_p): Define.
246 (do_auto_deduction): When processing_template_decl != 0
247 and context is adc_unify and we have constraints, pretend the
248 constraints are satisfied instead of punting. Otherwise don't
249 punt unless placeholder_type_constraint_dependent_p holds.
250 Add some clarifying sanity checks. Add a hack to add missing
251 outermost template levels to outer_args before checking
252 satisfaction. Don't substitute outer_targs into type if it's
253 already been done.
254
ceae9533
GA
2552021-03-05 Marek Polacek <polacek@redhat.com>
256
257 PR c++/99374
258 * call.c (standard_conversion): When converting pointers to
259 member, don't return NULL when the bases are equivalent but
260 incomplete.
261
2622021-03-05 Marek Polacek <polacek@redhat.com>
263
264 PR c++/99120
265 * name-lookup.c (check_local_shadow): Check if the type of decl
266 is non-null before checking TYPE_PTR*.
267
2682021-03-05 Nathan Sidwell <nathan@acm.org>
269
270 PR c++/99245
271 * module.cc (module_state::write_cluster): Relax binding assert.
272
2732021-03-05 Nathan Sidwell <nathan@acm.org>
274
275 PR c++/99377
276 * pt.c (instantiate_decl): Call set_instantiating_module.
277
2782021-03-05 Iain Sandoe <iain@sandoe.co.uk>
279
280 PR c++/98118
281 * coroutines.cc (build_co_await): Use type_build_ctor_call()
282 to determine cases when a CTOR needs to be built.
283 (flatten_await_stmt): Likewise.
284 (morph_fn_to_coro): Likewise.
285
2862021-03-05 Iain Sandoe <iain@sandoe.co.uk>
287
288 PR c++/95616
289 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
290 (coro_diagnose_throwing_final_aw_expr): New helper.
291 (build_co_await): Diagnose throwing final await expression
292 components.
293 (build_init_or_final_await): Diagnose a throwing promise
294 final_suspend() call.
295
2962021-03-05 Iain Sandoe <iain@sandoe.co.uk>
297
298 PR c++/95615
299 * coroutines.cc (struct param_info): Track parameter copies that need
300 a DTOR.
301 (coro_get_frame_dtor): New helper function factored from build_actor().
302 (build_actor_fn): Use coro_get_frame_dtor().
303 (morph_fn_to_coro): Track parameters that need DTORs on exception,
304 likewise the frame promise and the return object. On exception, run the
305 DTORs for these, destroy the frame and then rethrow the exception.
306
3072021-03-05 Nathan Sidwell <nathan@acm.org>
308
309 PR c++/99389
310 * pt.c (instantiate_class_template_1): Set instantiating module
311 here.
312
3132021-03-05 Tobias Burnus <tobias@codesourcery.com>
314
315 PR c/99137
316 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
317
67f10d28
GA
3182021-03-04 Jakub Jelinek <jakub@redhat.com>
319
320 PR c++/88146
321 PR c++/99362
322 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
323 comment.
324
3252021-03-04 Nathan Sidwell <nathan@acm.org>
326
327 PR c++/99170
328 * module.cc (class uintset): Delete.
329 (typedef attached_map_t): A hash map.
330 (attached_table): Use attached_map_t. Adjust uses ...
331 (trees_out::decl_value, trees_in::decl_value): ... here ...
332 (trees_out::key_mergeable): ... here ...
333 (trees_in::key_mergeable): ... here ...
334 (maybe_attach_decl): ... here ...
335 (direct_import): ... and here.
336
3372021-03-04 Nathan Sidwell <nathan@acm.org>
338
339 PR c++/99170
340 * cp-tree.h
341 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
342 rename.
343 * module.cc (class pending_key): New.
344 (default_hash_traits<pending_key>): New specialization.
345 (pending_map_t): New typedef.
346 (pending_table): Replace old table.
347 (trees_out::lang_decl_bools): Adjust.
348 (trees_in::lang_decl_bools): Adjust.
349 (trees_in::install_entity): Drop pending member and specialization
350 handling.
351 (find_pending_key): New.
352 (depset::hash::fiund_dependencies): Use it.
353 (pendset_lazy_load): Delete.
354 (module_state::write_cluster): Don't count pendings here. Bye
355 Duff's device-like thing.
356 (module_state::write_pendings): Reimplement.
357 (module_state::read_pendings): Reimplement.
358 (lazy_specializations_p): Delete.
359 (module_state::write): Adjust write_pendings call.
360 (lazy_load_pendings): New.
361 (lazy_load_specializations): Delete.
362 (lazy_load_members): Delete.
363 (init_modules): Adjust.
364 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
365 not lazy_load_members.
366 (note_pending_specializations): Delete.
367 (load_pending_specializations): Delete.
368 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
369 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
370 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
371 (note_pending_specializations): Delete.
372 (load_pending_specializations): Delete.
373 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
374 lazy_load_specializations.
375 (instantiate_template_class_1): Likewise.
376 (instantiate_decl): Call lazy_load_pendings.
377 * typeck.c (complete_type): Likewise.
378
f3641ac7
GA
3792021-03-03 Nathan Sidwell <nathan@acm.org>
380
381 PR c++/99170
382 * module.cc (post_load_decls): New.
383 (lazy_snum, recursive_lazy): Move earlier.
384 (module_state::read_cluster): Push cloning onto post_load_decls.
385 (post_load_processing): New. Do the cloning here.
386 (module_state::read_inits): Call post_load_processing.
387 (module_state::read_language): Likewise.
388 (lazy_load_binding, lazy_load_specializations): Likewise
389 (lazy_load_members): Likewise
390
3912021-03-03 Nathan Sidwell <nathan@acm.org>
392
393 PR c++/99170
394 * module.cc (trees_out::decl_value): Stream specialization keys
395 after decl.
396 (trees_in::decl_value): Stream them back and insert after
397 completing the decl.
398 (trees_out::key_mergeable): Drop some streaming here ...
399 (trees_in::key_mergeable): ... and here. Don't insert into
400 specialization tables.
401
4022021-03-03 Patrick Palka <ppalka@redhat.com>
403
404 * constraint.cc (struct sat_info): Document the different
405 meanings of noisy() and diagnose_unsatisfaction_p() during
406 satisfaction and requires-expression evaluation.
407 (tsubst_valid_expression_requirement): Take a sat_info instead
408 of a subst_info. Perform the substitution quietly first. Fold
409 in error-replaying code from diagnose_valid_expression.
410 (tsubst_simple_requirement): Take a sat_info instead of a
411 subst_info.
412 (tsubst_type_requirement_1): New. Fold in error-replaying code
413 from diagnose_valid_type.
414 (tsubst_type_requirement): Use the above. Take a sat_info
415 instead of a subst_info.
416 (tsubst_compound_requirement): Likewise. Fold in
417 error-replaying code from diagnose_compound_requirement.
418 (tsubst_nested_requirement): Take a sat_info instead of a
419 subst_info. Fold in error-replaying code from
420 diagnose_nested_requirement.
421 (tsubst_requirement): Take a sat_info instead of a subst_info.
422 (tsubst_requires_expr): Split into two versions, one that takes
423 a sat_info argument and another that takes a complain and
424 in_decl argument. Remove outdated documentation. Document the
425 effects of the sat_info argument. Don't short-circuit
426 processing of requirements when diagnosing unsatisfaction,
427 mirroring diagnose_requires_expr.
428 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
429 assert, and se the three-parameter version of tsubst_requires_expr.
430 (diagnose_trait_expr): Make static. Take a template argument
431 vector instead of a parameter mapping.
432 (diagnose_valid_expression): Remove.
433 (diagnose_valid_type): Remove.
434 (diagnose_simple_requirement): Remove.
435 (diagnose_compound_requirement): Remove.
436 (diagnose_type_requirement): Remove.
437 (diagnose_nested_requirement): Remove.
438 (diagnose_requirement): Remove.
439 (diagnose_requires_expr): Remove.
440 (diagnose_atomic_constraint): Take a sat_info instead of a
441 subst_info. Adjust call to diagnose_trait_expr. Call
442 tsubst_requires_expr instead of diagnose_requires_expr.
443 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
444 and just always call constraint_satisfaction_value.
445
4462021-03-03 Patrick Palka <ppalka@redhat.com>
447
448 * constexpr.c (cxx_eval_call_expression): Adjust call to
449 evaluate_concept_check.
450 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
451 evaluate_requires_expression instead of
452 satisfy_constraint_expression.
453 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
454 * constraint.cc (struct sat_info): Adjust comment about which
455 satisfaction entrypoints use noisy-unsat.
456 (normalize_template_requirements): Remove (and adjust callers
457 appropriately).
458 (normalize_nontemplate_requirements): Likewise.
459 (tsubst_nested_requirement): Use constraint_satisfaction_value
460 instead of satisfy_constraint_expression, which'll do the
461 noisy replaying of ill-formed quiet satisfaction for us.
462 (decl_satisfied_cache): Adjust comment.
463 (satisfy_constraint): Rename to ...
464 (satisfy_normalized_constraints): ... this.
465 (satisfy_associated_constraints): Remove (and make its
466 callers check for dependent arguments).
467 (satisfy_constraint_expression): Rename to ...
468 (satisfy_nondeclaration_constraints): ... this. Assert that
469 'args' is empty when 't' is a concept-id. Removing handling
470 bare constraint-expressions, and handle REQUIRES_EXPRs
471 specially. Adjust comment accordingly.
472 (satisfy_declaration_constraints): Assert in the two-parameter
473 version that 't' is not a TEMPLATE_DECL. Adjust following
474 removal of normalize_(non)?template_requirements and
475 satisfy_asociated_constraints.
476 (constraint_satisfaction_value): Combine the two- and
477 three-parameter versions in the natural way.
478 (constraints_satisfied_p): Combine the one- and two-parameter
479 versions in the natural way. Improve documentation.
480 (evaluate_requires_expr): Define.
481 (evaluate_concept_check): Remove 'complain' parameter. Use
482 constraint_satisfaction_value instead of
483 satisfy_constraint_expression.
484 (diagnose_nested_requirement): Adjust following renaming of
485 satisfy_constraint_expression.
486 (diagnose_constraints): Handle REQUIRES_EXPR by going through
487 diagnose_requires_expr directly instead of treating it as a
488 constraint-expression. Improve documentation.
489 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
490 to evaluate_concept_check.
491 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
492 constraints_satisfied_p.
493 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
494 * cp-tree.h (evaluate_requires_expr): Declare.
495 (evaluate_concept_check): Remove tsubst_flag_t parameter.
496 (satisfy_constraint_expression): Remove declaration.
497 (constraints_satisfied_p): Remove one-parameter declaration.
498 Add a default argument to the two-parameter declaration.
499 * cvt.c (convert_to_void): Adjust call to
500 evaluate_concept_check.
501
5022021-03-03 Jakub Jelinek <jakub@redhat.com>
503
504 PR c++/82959
505 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
506 and COMPOUND_EXPR.
507
5082021-03-03 Marek Polacek <polacek@redhat.com>
509
510 PR c++/97034
511 PR c++/99009
512 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
513 (maybe_aggr_guide): Use the original template type where needed. In
514 a class member template, partially instantiate the result of
515 collect_ctor_idx_types.
516 (do_class_deduction): Defer the deduction until the enclosing
517 scope is non-dependent.
518
5192021-03-03 Jason Merrill <jason@redhat.com>
520
521 PR c++/95675
522 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
523 if it didn't get one before.
524
5252021-03-03 Nathan Sidwell <nathan@acm.org>
526
527 PR c++/99344
528 * module.cc (trees_out::decl_node): Small refactor.
529 (depset::hash::add_binding_entity): Return true on meeting an
530 import. Set namespace's import here.
531 (module_state:write_namespaces): Inform of purview too.
532 (module_state:read_namespaces): Adjust.
533 * name-lookup.c (implicitly_export_namespace): Delete.
534 (do_pushdecl): Don't call it.
535 (push_namespace): Likewise, set purview.
536 (add_imported_namespace): Reorder parms.
537 * name-lookup.h (add_imported_namespace): Alter param ordering.
538
d97a92dc
GA
5392021-03-02 Martin Sebor <msebor@redhat.com>
540
541 PR c++/99251
542 * class.c (build_base_path): Call build_if_nonnull.
543 * cp-tree.h (build_if_nonnull): Declare.
544 * rtti.c (ifnonnull): Rename...
545 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
546 (build_dynamic_cast_1): Adjust to name change.
547
5482021-03-02 Patrick Palka <ppalka@redhat.com>
549
550 PR c++/96443
551 PR c++/96960
552 * constraint.cc (type_deducible_p): Don't substitute into the
553 constraints, and instead just pass 'args' to do_auto_deduction
554 as the outer template arguments.
555 (tsubst_parameter_mapping): Remove confused code for handling
556 placeholder type arguments.
557 (normalize_placeholder_type_constraint): Define.
558 (satisfy_constraint_expression): Use it to handle placeholder
559 'auto' types.
560 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
561 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
562 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
563 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
564 (make_constrained_placeholder_type): Set
565 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
566 (do_auto_deduction): Clarify comments about the outer_targs
567 parameter. Rework satisfaction of a placeholder type constraint
568 to pass in the complete set of template arguments directly to
569 constraints_satisfied_p.
570 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
571 instead. Also rebuild the the constraint info on the new auto.
572
5732021-03-02 Patrick Palka <ppalka@redhat.com>
574
575 * constraint.cc (build_parameter_mapping): Rely on the caller to
576 determine the in-scope template parameters.
577 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
578 to the two-parameter constructor. In the two-parameter
579 constructor, fold in the definition of make_context, set
580 initial_parms appropriately, and don't set the now-removed
581 orig_decl member.
582 (norm_info::make_context): Remove, now that its only use is
583 inlined into the caller.
584 (norm_info::update_context): Adjust call to
585 build_parameter_mapping to pass in the relevant set of in-scope
586 template parameters.
587 (norm_info::ctx_parms): Define this member function.
588 (norm_info::context): Initialize to NULL_TREE.
589 (norm_info::orig_decl): Remove this data member.
590 (norm_info::initial_parms): Define this data member.
591 (normalize_atom): Adjust call to build_parameter_mapping to pass
592 in the relevant set of in-scope template parameters. Use
593 info.initial_parms instead of info.orig_decl.
594 (normalize_constraint_expression): Take a norm_info object
595 instead of a bool. Cache the result of normalization.
596 (tsubst_nested_requirement): Call satisfy_constraint_expression
597 instead of satisfy_constraint, so that we normalize on demand.
598 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
599 Adjust call to normalize_constraint_expression.
600 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
601 to current_template_parms.
602 (diagnose_nested_requirements): Go through
603 satisfy_constraint_expression, as with tsubst_nested_requirement.
604
6052021-03-02 Patrick Palka <ppalka@redhat.com>
606
607 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
608 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
609 started with a TYPE_ARGUMENT_PACK.
610 (finish_requires_expr): Don't set DECL_CONTEXT and
611 CONSTRAINT_VAR_P on each of the introduced parameters here.
612 * parser.c (cp_parser_requirement_parameter_list): Instead set
613 these fields earlier, here.
614 * pt.c (do_auto_deduction): Canonicalize the result of
615 do_auto_deduction. Pass 'complain' to finish_decltype_type.
616
6172021-03-02 Patrick Palka <ppalka@redhat.com>
618
619 * constraint.cc (tsubst_simple_requirement): Just return
620 boolean_true_node on success.
621 (tsubst_type_requirement): Likewise.
622 (tsubst_compound_requirement): Likewise.
623 (tsubst_nested_requirement): Likewise.
624 (tsubst_requirement_body): Remove.
625 (check_constaint_variables): Rename to ...
626 (check_constraint_variables): ... this.
627 (tsubst_constraint_variables): Adjust.
628 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
629
88938886
GA
6302021-03-01 Nathan Sidwell <nathan@acm.org>
631
632 PR c++/99294
633 * class.c (fixup_type_variants): Propagate mode, precision,
634 alignment & emptiness.
635 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
636 (trees_in::tree_node): Rematerialize alignment here.
637
ec9dc4fa
GA
6382021-02-27 Jason Merrill <jason@redhat.com>
639
640 PR c++/90333
641 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
642 between () and ->.
643
06a9f20f
GA
6442021-02-26 Jakub Jelinek <jakub@redhat.com>
645
646 * parser.c (cp_parser_lambda_declarator_opt): Implement
647 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
648 for -std={c,gnu}++2b or with pedwarn in earlier versions.
649
6502021-02-26 Jakub Jelinek <jakub@redhat.com>
651
652 PR c++/95451
653 * lambda.c (is_lambda_ignored_entity): Before checking for
654 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
655
6562021-02-26 Jason Merrill <jason@redhat.com>
657
658 PR c++/98810
659 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
660 to a class non-type template argument that needs it.
661
6622021-02-26 Patrick Palka <ppalka@redhat.com>
663
664 PR c++/98990
665 * pt.c (splice_late_return_type): Rebuild the entire return type
666 if we have to adjust the level of an auto within.
667 (type_uses_auto): Adjust call to find_type_usage.
668 * type-utils.h (find_type_usage): Revert r10-6571 change that
669 made this function return a pointer to the auto node.
670
daa68844
GA
6712021-02-25 Patrick Palka <ppalka@redhat.com>
672
673 PR c++/99213
674 PR c++/94521
675 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
676 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
677
6782021-02-25 Patrick Palka <ppalka@redhat.com>
679
680 PR c++/99103
681 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
682 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
683
6842021-02-25 Marek Polacek <polacek@redhat.com>
685
686 DR 1312
687 PR c++/99176
688 * constexpr.c (is_std_construct_at): New overload.
689 (is_std_allocator_allocate): New overload.
690 (cxx_eval_call_expression): Use the new overloads.
691 (cxx_eval_constant_expression): Reject casting
692 from void * as per DR 1312. Don't check can_convert.
693
6942021-02-25 Iain Sandoe <iain@sandoe.co.uk>
695
696 PR c++/97587
697 * coroutines.cc (struct param_info): Track rvalue refs.
698 (morph_fn_to_coro): Track rvalue refs, and call the promise
699 CTOR with the frame copy of passed parms.
700
7012021-02-25 Iain Sandoe <iain@sandoe.co.uk>
702
703 PR c++/95822
704 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
705 set throwing_cleanup marker.
706
7072021-02-25 Nathan Sidwell <nathan@acm.org>
708
709 PR c++/99166
710 * module.cc (module_state::inform_cmi_p): Renamed field.
711 (module_state::do_import): Adjust.
712 (init_modules, finish_module_processing): Likewise.
713 (handle_module_option): Likewise.
714
7152021-02-25 Nathan Sidwell <nathan@acm.org>
716
717 PR c++/98318
718 * mapper-client.cc (module_client::open_module_client): Fix typo
719 of fd init.
720
4028d01a
GA
7212021-02-24 Nathan Sidwell <nathan@acm.org>
722
723 PR c++/98718
724 * module.cc (ool): New indirection vector.
725 (loc_spans::maybe_propagate): Location is not optional.
726 (loc_spans::open): Likewise. Assert monotonically advancing.
727 (module_for_ordinary_loc): Use ool indirection vector.
728 (module_state::write_prepare_maps): Do not count empty macro
729 expansions. Elide empty spans.
730 (module_state::write_macro_maps): Skip empty expansions.
731 (ool_cmp): New qsort comparator.
732 (module_state::write): Create and destroy ool vector.
733 (name_pending_imports): Fix dump push/pop.
734 (preprocess_module): Likewise. Add more dumping.
735 (preprocessed_module): Likewise.
736
7372021-02-24 Iain Sandoe <iain@sandoe.co.uk>
738
739 PR c++/96251
740 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
741 error reporting when instantiating for a constexpr.
742
71e24b06
GA
7432021-02-23 Nathan Sidwell <nathan@acm.org>
744
745 PR c++/99208
746 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
747 identity.
748
7492021-02-23 Patrick Palka <ppalka@redhat.com>
750
751 PR c++/95468
752 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
753 over from tsubst_copy.
754
7552021-02-23 Patrick Palka <ppalka@redhat.com>
756
757 * pt.c (instantiation_dependent_expression_p): Check
758 processing_template_decl before calling
759 potential_constant_expression.
760
2f5765cf
GA
7612021-02-22 Nathan Sidwell <nathan@acm.org>
762
763 PR c++/99174
764 * module.cc (struct module_state): Add visited_p flag.
765 (name_pending_imports): Use it to avoid duplicate requests.
766 (preprocess_module): Don't read preprocessor state if we failed to
767 load a module's config.
768
7692021-02-22 Nathan Sidwell <nathan@acm.org>
770
771 PR c++/99153
772 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
773 to common-path.
774 * module.cc (set_defining_module): Add assert.
775
50352c6c
GA
7762021-02-19 Nathan Sidwell <nathan@acm.org>
777
778 PR c++/98741
779 * module.cc (pending_imports): New.
780 (declare_module): Adjust test condition.
781 (name_pending_imports): New.
782 (preprocess_module): Reimplement using pending_imports.
783 (preprocessed_module): Move name-getting to name_pending_imports.
784 * name-lookup.c (append_imported_binding_slot): Assert module
785 ordering is increasing.
786
7872021-02-19 Nathan Sidwell <nathan@acm.org>
788
789 * module.cc (note_cmis): New.
790 (struct module_state): Add inform_read_p bit.
791 (module_state::do_import): Inform of CMI location, if enabled.
792 (init_modules): Canonicalize note_cmis entries.
793 (handle_module_option): Handle -flang-info-module-read=FOO.
794
7952021-02-19 Jason Merrill <jason@redhat.com>
796
797 PR c++/96926
798 * call.c (perfect_conversion_p): Limit rvalueness
799 test to reference bindings.
800
8012021-02-19 Jason Merrill <jason@redhat.com>
802
803 PR c++/96926
804 * call.c (perfect_conversion_p): New.
805 (perfect_candidate_p): New.
806 (add_candidates): Ignore templates after a perfect non-template.
807
bf81237e
GA
8082021-02-18 Nathan Sidwell <nathan@acm.org>
809
810 PR c++/99023
811 * module.cc (canonicalize_header_name): Use
812 cpp_probe_header_unit.
813 (maybe_translate_include): Fix note_includes comparison.
814 (init_modules): Fix note_includes string termination.
815
8162021-02-18 Jakub Jelinek <jakub@redhat.com>
817
818 PR c++/99132
819 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
820 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
821 for immediate function calls.
822
acc0ee5c
GA
8232021-02-17 Nathan Sidwell <nathan@acm.org>
824
825 PR c++/99023
826 * module.cc (struct macro_export): Add GTY markers.
827 (macro_exports): Likewise, us a va_gc Vector.
828
8292021-02-17 Jakub Jelinek <jakub@redhat.com>
830
831 PR sanitizer/99106
832 * init.c (build_zero_init_1): For flexible array members just return
833 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
834 ARRAY_TYPE.
835
8362021-02-17 Nathan Sidwell <nathan@acm.org>
837
838 PR c++/99116
839 * name-lookup.c (do_pushdecl): Don't peek under template_parm
840 bindings here ...
841 (set_identifier_type_value_with_scope): ... or here.
842 (do_pushtag): Only set_identifier_type_value_with_scope at
843 non-class template parm scope, and use parent scope.
844
8452021-02-17 Nathan Sidwell <nathan@acm.org>
846
847 PR c++/99071
848 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
849 pointer.
850
8512021-02-17 Patrick Palka <ppalka@redhat.com>
852
853 PR debug/96997
854 PR c++/94034
855 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
856
fab095da
GA
8572021-02-12 Nathan Sidwell <nathan@acm.org>
858
859 * module.cc (module_state::write_cluster): Check bindings for
860 imported using-decls.
861
8622021-02-12 Nathan Sidwell <nathan@acm.org>
863
864 PR c++/99040
865 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
866 for new namespace-scope entities.
867 (module_state::read_cluster): Don't call add_module_decl here.
868 * name-lookup.h (add_module_decl): Rename to ...
869 (add_module_namespace_decl): ... this.
870 * name-lookup.c (newbinding_bookkeeping): Move into ...
871 (do_pushdecl): ... here. Its only remaining caller.
872 (add_module_decl): Rename to ...
873 (add_module_namespace_decl): ... here. Add checking-assert for
874 circularity. Don't call newbinding_bookkeeping, just extern_c
875 checking and incomplete var checking.
876
8772021-02-12 Nathan Sidwell <nathan@acm.org>
878
879 PR c++/99039
880 PR c++/99040
881 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
882 (global_type_node): Delete.
883 (IDENTIFIER_TYPE_VALUE): Delete.
884 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
885 (get_type_value): Delete.
886 * name-lookup.h (identifier_type_value): Delete.
887 * name-lookup.c (check_module_override): Don't
888 SET_IDENTIFIER_TYPE_VALUE here.
889 (do_pushdecl): Nor here.
890 (identifier_type_value_1, identifier_type_value): Delete.
891 (set_identifier_type_value_with_scope): Only
892 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
893 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
894 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
895 * call.c (check_dtor_name): Use lookup_name.
896 * decl.c (cxx_init_decl_processing): Drop global_type_node.
897 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
898 here.
899 * init.c (get_type_value): Delete.
900 * pt.c (instantiate_class_template_1): Don't call pushtag or
901 SET_IDENTIFIER_TYPE_VALUE here.
902 (tsubst): Assert never an identifier.
903 (dependent_type_p): Drop global_type_node assert.
904 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
905 to determine ctorness.
906
9072021-02-12 Jakub Jelinek <jakub@redhat.com>
908
909 PR c++/97742
910 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
911 CPP_EOF.
912
9132021-02-12 Jason Merrill <jason@redhat.com>
914
915 PR c++/97246
916 PR c++/94546
917 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
918 (register_parameter_specializations): Not here.
919
0c5cdb31
GA
9202021-02-11 Marek Polacek <polacek@redhat.com>
921
922 PR c++/95888
923 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
924 for the partial instantiation.
925
9262021-02-11 Jakub Jelinek <jakub@redhat.com>
927
928 PR c++/99033
929 * init.c (build_zero_init_1): Handle zero initialiation of
930 flexible array members like initialization of [0] arrays.
931 Use integer_minus_onep instead of comparison to integer_minus_one_node
932 and integer_zerop instead of comparison against size_zero_node.
933 Formatting fixes.
934
9352021-02-11 Marek Polacek <polacek@redhat.com>
936
937 PR c++/99063
938 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
939
9402021-02-11 Patrick Palka <ppalka@redhat.com>
941
942 PR c++/97582
943 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
944 lookup result by discarding it if the first element is a
945 class-scope declaration, otherwise return it.
946 (push_operator_bindings): Handle an ambiguous lookup result by
947 doing push_local_binding on each element in the list.
948
9492021-02-11 Marek Polacek <polacek@redhat.com>
950
951 * parser.c (cp_parser_selection_statement): Use vec_free.
952
4b37c3ea
GA
9532021-02-10 Jakub Jelinek <jakub@redhat.com>
954
955 PR c++/98988
956 PR c++/99031
957 * constexpr.c: Include cgraph.h.
958 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
959 heap artificial vars.
960 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
961 heap artificial vars.
962
9632021-02-10 Nathan Sidwell <nathan@acm.org>
964
965 PR c++/99030
966 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
967 answer if there's no local specialization.
968
0a91b73e
GA
9692021-02-09 Nathan Sidwell <nathan@acm.org>
970
971 PR c++/98944
972 * module.cc (module_state::is_rooted): Rename to ...
973 (module_state::has_location): ... here. Adjust callers.
974 (module_state::read_partitions): Adjust validity check.
975 Don't overwrite a known location.
976
9772021-02-09 Jason Merrill <jason@redhat.com>
978
979 PR c++/96905
980 * pt.c (mark_decl_instantiated): Exit early if consteval.
981
9822021-02-09 Jason Merrill <jason@redhat.com>
983
984 PR c++/98326
985 PR c++/20408
986 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
987 parm.
988
9892021-02-09 Jason Merrill <jason@redhat.com>
990
991 PR c++/98994
992 PR c++/97566
993 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
994 RECORD_TYPE.
995
2da7ce23
GA
9962021-02-08 Nathan Sidwell <nathan@acm.org>
997
998 * decl.c (start_cleanup_fn): Push function into
999 namespace.
1000
10012021-02-08 Nathan Sidwell <nathan@acm.org>
1002
1003 PR c++/98531
1004 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
1005 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
1006 from rtti.c, add default namespace arg.
1007 (check_redeclaration_exception_specification): Allow a lazy
1008 builtin's eh spec to differ from an lready-declared user
1009 declaration.
1010 (declare_global_var): Use push/pop_abi_namespace.
1011 (get_atexit_node): Push the fndecl into a namespace.
1012 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
1013 decl.c.
1014
10152021-02-08 Marek Polacek <polacek@redhat.com>
1016
1017 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
1018
1ed59127
GA
10192021-02-05 Marek Polacek <polacek@redhat.com>
1020
1021 PR c++/98947
1022 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
1023 on arg2/arg3.
1024 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
1025 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
1026 a warning was emitted.
1027
10282021-02-05 Marek Polacek <polacek@redhat.com>
1029
1030 PR c++/96462
1031 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
1032
10332021-02-05 Jakub Jelinek <jakub@redhat.com>
1034
1035 PR c++/97878
1036 * decl.c (check_array_initializer): For structured bindings, require
1037 the array type to be complete.
1038
a19dd5e6
GA
10392021-02-04 Jason Merrill <jason@redhat.com>
1040
1041 PR c++/98717
1042 * constraint.cc (build_concept_check_arguments): Remove assert.
1043 (build_concept_check): Allow empty args.
1044
10452021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
1046
1047 PR c++/90926
1048 * call.c (can_convert_array): Extend to handle all valid aggregate
1049 initializers of an array; including by string literals, not just by
1050 brace-init-list.
1051 (build_aggr_conv): Call can_convert_array more often, not just in
1052 brace-init-list case.
1053 * typeck2.c (array_string_literal_compatible_p): New function.
1054 (digest_init_r): call array_string_literal_compatible_p
1055 * cp-tree.h: (array_string_literal_compatible_p): Declare.
1056
10572021-02-04 Jason Merrill <jason@redhat.com>
1058
1059 PR c++/98802
1060 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
1061
10622021-02-04 Jason Merrill <jason@redhat.com>
1063
1064 PR c++/95192
1065 * pt.c (tsubst_attribute): Handle error.
1066 (apply_late_template_attributes): Return false on error.
1067 (tsubst_function_decl): Check its return value.
1068 (tsubst_decl): Likewise.
1069 (push_template_decl): Assert current_template_parms.
1070 (tsubst_template_decl): Set current_template_parms.
1071
9faaa807
GA
10722021-02-03 Marek Polacek <polacek@redhat.com>
1073
1074 PR c++/98951
1075 * call.c (struct z_candidate): Mark rewritten and reversed as const.
1076 (struct NonPublicField): Mark operator() as const.
1077 (struct NonTrivialField): Likewise.
1078
10792021-02-03 Jason Merrill <jason@redhat.com>
1080
1081 PR c++/98926
1082 PR c++/98570
1083 * pt.c (spec_hasher::equal): Set processing_template_decl.
1084 * Make-lang.in (check-g++-strict-gc): Add --param
1085 hash-table-verification-limit=10000.
1086
10872021-02-03 Marek Polacek <polacek@redhat.com>
1088
1089 PR c++/98899
1090 * parser.c (cp_parser_class_specifier_1): Use any possible
1091 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
1092 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
1093 * pt.c (tsubst_exception_specification): Stash new_specs into
1094 DEFPARSE_INSTANTIATIONS.
1095 * tree.c (fixup_deferred_exception_variants): Use
1096 UNPARSED_NOEXCEPT_SPEC_P.
1097
548b75d8
GA
10982021-02-02 Jason Merrill <jason@redhat.com>
1099
1100 PR c++/98929
1101 PR c++/96199
1102 * error.c (dump_expr): Ignore dummy object.
1103 * pt.c (tsubst_baselink): Handle dependent scope.
1104
f7884fb1
GA
11052021-02-01 Patrick Palka <ppalka@redhat.com>
1106
1107 PR c++/98295
1108 * constexpr.c (cxx_eval_array_reference): Also set
1109 new_ctx.object when setting new_ctx.ctor.
1110
11112021-02-01 Marek Polacek <polacek@redhat.com>
1112
1113 PR c++/98355
1114 * parser.c (cp_parser_has_attribute_expression): Use
1115 uses_template_parms instead of type_dependent_expression_p.
1116
11172021-02-01 Jason Merrill <jason@redhat.com>
1118
1119 PR c++/98570
1120 * cp-tree.h: Declare it.
1121 * pt.c (comparing_dependent_aliases): New flag.
1122 (template_args_equal, spec_hasher::equal): Set it.
1123 (dependent_alias_template_spec_p): Assert that we don't
1124 get non-types other than error_mark_node.
1125 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
1126 on complex alias specializations. Set TYPE_DEPENDENT_P here.
1127 (tsubst_decl): Not here.
1128 * module.cc (module_state::read_cluster): Set
1129 comparing_dependent_aliases instead of
1130 comparing_specializations.
1131 * tree.c (cp_tree_equal): Remove comparing_specializations
1132 module handling.
1133 * typeck.c (structural_comptypes): Adjust.
1134 (comptypes): Remove comparing_specializations handling.
1135
2900f2f2
GA
11362021-01-29 Nathan Sidwell <nathan@acm.org>
1137
1138 PR c++/98843
1139 * module.cc (module_state_config): Add num_entities field.
1140 (module_state::read_entities): The entity_ary span is
1141 already allocated.
1142 (module_state::write_config): Write num_entities.
1143 (module_state::read_config): Read num_entities.
1144 (module_state::write): Set config's num_entities.
1145 (module_state::read_initial): Allocate the entity ary
1146 span here.
1147 (module_state::read_language): Do not set entity_lwm
1148 here.
1149
11502021-01-29 Marek Polacek <polacek@redhat.com>
1151
1152 PR c++/96137
1153 * parser.c (cp_parser_class_name): If parser->scope is
1154 error_mark_node, return it, otherwise continue.
1155
85d04a2e
GA
11562021-01-28 Jakub Jelinek <jakub@redhat.com>
1157
1158 PR c++/98841
1159 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
1160
11612021-01-28 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c++/33661
1164 PR c++/98847
1165 * decl.c (cp_finish_decl): For register vars with asmspec in templates
1166 call set_user_assembler_name and set DECL_HARD_REGISTER.
1167 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
1168 pass asmspec_tree to cp_finish_decl.
1169
11702021-01-28 Nathan Sidwell <nathan@acm.org>
1171
1172 PR c++/98770
1173 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
1174 check order.
1175 (trees_in::decl_value): Do typedef frobbing only when installing
1176 a new typedef, adjust is_matching_decl call. Swap is_typedef
1177 & TYPE_NAME check.
1178 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
1179 names and deal with typedef checking.
1180
aa69f0a8
GA
11812021-01-27 Jason Merrill <jason@redhat.com>
1182
1183 PR c++/97874
1184 * name-lookup.c (lookup_using_decl): Clean up handling
1185 of dependency and inherited constructors.
1186 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
1187 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
1188
e62bb7f0
GA
11892021-01-26 Jason Merrill <jason@redhat.com>
1190
1191 PR c++/97474
1192 * call.c (type_passed_as): Don't mark invisiref restrict.
1193
11942021-01-26 Jason Merrill <jason@redhat.com>
1195
1196 PR c++/97566
1197 PR c++/98463
1198 * class.c (layout_class_type): An empty field gets size 0.
1199 (is_empty_field): New.
1200 (check_bases): Check it.
1201 * cp-tree.h (is_empty_field): Declare it.
1202 * constexpr.c (cxx_eval_store_expression): Check it.
1203 (cx_check_missing_mem_inits): Likewise.
1204 * init.c (perform_member_init): Likewise.
1205 * typeck2.c (process_init_constructor_record): Likewise.
1206
161e4c08
GA
12072021-01-25 Martin Sebor <msebor@redhat.com>
1208
1209 PR c++/98646
1210 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
1211
12122021-01-25 Jason Merrill <jason@redhat.com>
1213
1214 PR c++/98463
1215 * constexpr.c (get_or_insert_ctor_field): Add check.
1216 (cxx_eval_store_expression): Handle discontinuity of refs.
1217
6b163337
GA
12182021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
1219
1220 * call.c (complain_about_access): Altered function.
1221 * cp-tree.h (complain_about_access): Changed parameters of function.
1222 (get_parent_with_private_access): Declared new function.
1223 * search.c (get_parent_with_private_access): Defined new function.
1224 * semantics.c (enforce_access): Modified function.
1225 * typeck.c (complain_about_unrecognized_member): Updated function
1226 arguments in complain_about_access.
1227
12282021-01-23 Patrick Palka <ppalka@redhat.com>
1229
1230 PR c++/97399
1231 * cp-tree.h (shared_member_p): Adjust declaration.
1232 * parser.c (cp_parser_init_declarator): If the storage class
1233 specifier is sc_static, pass true for static_p to
1234 cp_parser_declarator.
1235 (cp_parser_direct_declarator): Don't do inject_this_parm when
1236 the declarator is a friend.
1237 * search.c (shared_member_p): Change return type to bool and
1238 adjust function body accordingly. Return false for a dependent
1239 USING_DECL instead of aborting.
1240 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
1241 even when type-dependent.
1242
8502e23d
GA
12432021-01-22 Marek Polacek <polacek@redhat.com>
1244
1245 PR c++/96623
1246 * parser.c (inject_parm_decls): Remove a redundant assignment.
1247 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
1248 before calling inject_parm_decls.
1249
12502021-01-22 Jason Merrill <jason@redhat.com>
1251
1252 PR c++/98744
1253 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
1254
12552021-01-22 Jakub Jelinek <jakub@redhat.com>
1256
1257 PR sanitizer/95693
1258 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
1259 return build_zero_cst for reference types.
1260 * typeck2.c (process_init_constructor_record): Instead call
1261 build_zero_cst here during error recovery instead of build_zero_init.
1262
12632021-01-22 Marek Polacek <polacek@redhat.com>
1264
1265 PR c++/98545
1266 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
1267 warnings regardless of abi_version_at_least.
1268 (write_expression): When the expression is a dependent name
1269 and an operator name, write "on" before writing its name.
1270
12712021-01-22 Marek Polacek <polacek@redhat.com>
1272
1273 PR c++/97966
1274 * pt.c (instantiate_class_template_1): Instantiate members
1275 marked with attribute used only after we're done instantiating
1276 the class.
1277
7559d465
GA
12782021-01-21 Patrick Palka <ppalka@redhat.com>
1279
1280 PR c++/71879
1281 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
1282 sentinel at the start of the function. Remove a now-redundant
1283 manual adjustment of cp_unevaluated_operand.
1284
12852021-01-21 Nathan Sidwell <nathan@acm.org>
1286
1287 PR c++/98624
1288 * module.cc (depset::hash::find_dependencies): Add
1289 module arg.
1290 (trees_out::core_vals): Check state before calling
1291 write_location.
1292 (sort_cluster, module_state::write): Adjust
1293 find_dependencies call.
1294
12952021-01-21 Jakub Jelinek <jakub@redhat.com>
1296
1297 PR c++/98672
1298 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
1299 (check_for_return_continue): Also look for BREAK_STMT. Handle
1300 SWITCH_STMT by ignoring break_stmt from its body.
1301 (potential_constant_expression_1) <case FOR_STMT>,
1302 <case WHILE_STMT>: If the condition isn't constant true, check if
1303 the loop body can contain a return stmt.
1304 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
1305 <case IF_STMT>: If recursion with tf_none is successful,
1306 merge *jump_target from the branches - returns with highest priority,
1307 breaks or continues lower. If then branch is potentially constant and
1308 doesn't return, check the else branch if it could return, break or
1309 continue.
1310
13112021-01-21 Nathan Sidwell <nathan@acm.org>
1312
1313 PR c++/98530
1314 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
1315
b93d0e36
GA
13162021-01-20 Nathan Sidwell <nathan@acm.org>
1317
1318 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
1319 signed type.
1320
13212021-01-20 Patrick Palka <ppalka@redhat.com>
1322
1323 PR c++/95434
1324 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
1325 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
1326 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1327
13282021-01-20 Patrick Palka <ppalka@redhat.com>
1329
1330 PR c++/82613
1331 * parser.c (cp_parser_class_head): Defer access checking when
1332 parsing the base-clause until all bases are seen and attached
1333 to the class type.
1334 * pt.c (instantiate_class_template): Likewise when substituting
1335 into dependent bases.
1336
13372021-01-20 Jakub Jelinek <jakub@redhat.com>
1338
1339 PR c++/98742
1340 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
1341 error_operand_p, remove clause without further checking. Check
1342 for non-NULL TYPE_NAME.
1343
f35a4f96
GA
13442021-01-19 Marek Polacek <polacek@redhat.com>
1345
1346 PR c++/98659
1347 * pt.c (maybe_instantiate_noexcept): Return false if FN is
1348 error_mark_node.
1349
13502021-01-19 Marek Polacek <polacek@redhat.com>
1351
1352 PR c++/98687
1353 * name-lookup.c (push_using_decl_bindings): New, broken out of...
1354 (finish_nonmember_using_decl): ...here.
1355 * name-lookup.h (push_using_decl_bindings): Update declaration.
1356 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
1357
13582021-01-19 Patrick Palka <ppalka@redhat.com>
1359
1360 PR c++/41437
1361 PR c++/58993
1362 * search.c (friend_accessible_p): If scope is a hidden friend
1363 defined inside a dependent class, consider access from the
1364 class.
1365 * parser.c (cp_parser_late_parsing_for_member): Don't push a
1366 dk_no_check access state.
1367
13682021-01-19 Marek Polacek <polacek@redhat.com>
1369
1370 PR c++/98333
1371 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
1372 of NSDMIs before late-parsing of noexcept-specifiers.
1373
13742021-01-19 Nathan Sidwell <nathan@acm.org>
1375
1376 * module.cc (identifier): Merge overloads.
1377
13782021-01-19 Nathan Sidwell <nathan@acm.org>
1379
1380 PR c++/98624
1381 * module.cc (trees_out::write_location): Make static.
1382
59cf67d1
GA
13832021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1384
1385 * parser.c (cp_parser_omp_clause_detach): New.
1386 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
1387 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1388 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
1389 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
1390 Prevent use of detach with mergeable and overriding the data sharing
1391 mode of the event handle.
1392
2f7f0d32
GA
13932021-01-15 Nathan Sidwell <nathan@acm.org>
1394
1395 PR c++/98538
1396 * tree.c (cp_build_qualified_type_real): Propagate an array's
1397 dependentness to the copy, if known.
1398
13992021-01-15 Jason Merrill <jason@redhat.com>
1400
1401 PR c++/98642
1402 * call.c (unsafe_return_slot_p): Return int.
1403 (init_by_return_slot_p): Split out from...
1404 (unsafe_copy_elision_p): ...here.
1405 (unsafe_copy_elision_p_opt): New name for old meaning.
1406 (build_over_call): Adjust.
1407 (make_safe_copy_elision): New.
1408 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
1409 list-initialization.
1410 * cp-tree.h: Adjust.
1411
14122021-01-15 Jason Merrill <jason@redhat.com>
1413
1414 * call.c (base_ctor_for, make_base_init_ok): New.
1415 (build_over_call): Use make_base_init_ok.
1416
14172021-01-15 Jason Merrill <jason@redhat.com>
1418
1419 PR c++/63707
1420 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
1421 if we got a CONSTRUCTOR.
1422
14232021-01-15 Nathan Sidwell <nathan@acm.org>
1424
1425 PR c++/98591
1426 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
1427
5fff80fd
GA
14282021-01-14 Jason Merrill <jason@redhat.com>
1429
1430 * typeck2.c (process_init_constructor_record): Use fldtype
1431 variable consistently.
1432
14332021-01-14 Nathan Sidwell <nathan@acm.org>
1434
1435 PR c++/98372
1436 * tree.c (cp_tree_equal): Correct map_context logic.
1437
be0851b8
GA
14382021-01-13 Marek Polacek <polacek@redhat.com>
1439
1440 PR c++/98231
1441 * name-lookup.c (push_using_decl_bindings): New.
1442 * name-lookup.h (push_using_decl_bindings): Declare.
1443 * pt.c (tsubst_expr): Call push_using_decl_bindings.
1444
14452021-01-13 Nathan Sidwell <nathan@acm.org>
1446
1447 PR c++/98626
1448 * module.cc (module_add_import_initializers): Pass a
1449 zero-element argument vector.
1450
6851dda2
GA
14512021-01-12 Patrick Palka <ppalka@redhat.com>
1452
1453 PR c++/98611
1454 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
1455 the template of a CTAD placeholder.
1456
14572021-01-12 Marek Polacek <polacek@redhat.com>
1458
1459 PR c++/98620
1460 * typeck2.c (process_init_constructor_record): Don't emit
1461 -Wmissing-field-initializers warnings in unevaluated contexts.
1462
67fbb7f0
GA
14632021-01-11 Jakub Jelinek <jakub@redhat.com>
1464
1465 PR c++/98481
1466 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
1467 for types.
1468 (mark_abi_tags_r): Likewise.
1469 * decl2.c (min_vis_r): Likewise.
1470 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
1471 typedefs.
1472
bf5cbb9e
GA
14732021-01-08 Patrick Palka <ppalka@redhat.com>
1474
1475 PR c++/98551
1476 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
1477 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
1478
14792021-01-08 Patrick Palka <ppalka@redhat.com>
1480
1481 PR c++/98515
1482 * semantics.c (check_accessibility_of_qualified_id): Punt if
1483 we're checking access of a scoped non-static member inside a
1484 class template.
1485
7d187e4f
GA
14862021-01-07 Jakub Jelinek <jakub@redhat.com>
1487
1488 PR c++/98329
1489 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
1490 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
1491 its location.
1492 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
1493
14942021-01-07 Marek Polacek <polacek@redhat.com>
1495
1496 PR c++/98441
1497 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
1498 !late_return_type block.
1499
15002021-01-07 Jason Merrill <jason@redhat.com>
1501
1502 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
1503 (cxx_eval_store_expression): Add comment.
1504
15052021-01-07 Jason Merrill <jason@redhat.com>
1506
1507 * call.c (has_next): Factor out from...
1508 (next_conversion): ...here.
1509 (strip_standard_conversion): And here.
1510 (is_subseq): And here.
1511 (build_conv): Check it.
1512 (standard_conversion): Don't call build_conv
1513 for ck_identity.
1514
942ae5be
GA
15152021-01-06 Martin Sebor <msebor@redhat.com>
1516
1517 PR c++/95768
1518 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
1519
651b8a50
GA
15202021-01-05 Patrick Palka <ppalka@redhat.com>
1521
1522 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
1523 the type of the NTTP, substitute into the type again. If the
1524 type is still dependent, don't unify the NTTP.
1525
15262021-01-05 Jakub Jelinek <jakub@redhat.com>
1527
1528 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
1529 $(CODYLIB) after $(BACKEND).
1530
15312021-01-05 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c++/98469
1534 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
1535 Punt if lval is true.
1536 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
1537 the result if it has a class type.
1538
15392021-01-05 Marek Polacek <polacek@redhat.com>
1540
1541 PR c++/82099
1542 * pt.c (resolve_overloaded_unification): Call
1543 maybe_instantiate_noexcept after instantiating the function
1544 decl.
1545
15462021-01-05 Nathan Sidwell <nathan@acm.org>
1547
1548 * parser.c (cp_parser_module_declaration): Alter diagnostic
1549 text to say where is permissable.
1550
15512021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1552
1553 PR c++/98316
1554 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
1555
2eacfdbd
GA
15562021-01-02 Jan Hubicka <jh@suse.cz>
1557
1558 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
1559 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
1560 * tree.c (cp_tree_c_finish_parsing): New function.
1561
b6dd195a
GA
15622021-01-01 Jakub Jelinek <jakub@redhat.com>
1563
1564 * ChangeLog-2020: Rotate ChangeLog. New file.
1565
ad41bd84 1566\f
618e665a 1567Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
1568
1569Copying and distribution of this file, with or without modification,
1570are permitted in any medium without royalty provided the copyright
1571notice and this notice are preserved.
This page took 3.908548 seconds and 5 git commands to generate.