]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Correct uninitialized object offset and size computation [PR101494].
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
af3f12e6
GA
12021-07-27 Marek Polacek <polacek@redhat.com>
2
3 DR 1512
4 PR c++/99701
5 * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
6 a switch.
7 * typeck.c (cp_build_binary_op): Reject ordered comparison
8 of two null pointers.
9
1a7febe9
GA
102021-07-26 Jakub Jelinek <jakub@redhat.com>
11
12 * parser.h (struct cp_lexer): Add orphan_p member.
13 * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
14 upon restart from CPP_PRAGMA handling. Fix up condition when a lexer
15 should be destroyed and adjust saved_tokens if it records tokens from
16 the to be destroyed lexer.
17 (cp_parser_omp_section_scan): New function.
18 (cp_parser_omp_scan_loop_body): Use it. If
19 parser->lexer->in_omp_attribute_pragma, allow optional comma
20 after scan.
21 (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
22
ead235f6
GA
232021-07-23 Jakub Jelinek <jakub@redhat.com>
24
25 * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
26 * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
27 mixing of attribute and pragma syntax directives when seeing
28 omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
29 directives are followed by OpenMP pragma.
30 (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
31 the cp_parser_handle_statement_omp_attributes call.
32 (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
33 if true, set parser->omp_attrs_forbidden_p.
34 (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
35 false as disallow_omp_attrs to cp_parser_omp_structured_block.
36 (cp_parser_omp_parallel, cp_parser_omp_task): Set
37 parser->omp_attrs_forbidden_p.
38
419c6c68
GA
392021-07-21 Thomas Schwinge <thomas@codesourcery.com>
40 Joseph Myers <joseph@codesourcery.com>
41 Cesar Philippidis <cesar@codesourcery.com>
42
43 * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
44 (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
45 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
46 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
47 * semantics.c (finish_omp_clauses): Likewise.
48
492021-07-21 Jakub Jelinek <jakub@redhat.com>
50
51 PR c++/101516
52 * semantics.c (finish_omp_reduction_clause): Also call
53 complete_type_or_else and return true if it fails.
54
21ea2f93
GA
552021-07-19 Iain Sandoe <iain@sandoe.co.uk>
56
57 PR c++/95520
58 * coroutines.cc (struct coroutine_info): Add fields for
59 actor and destroy function decls.
60 (to_ramp): New.
61 (coro_get_ramp_function): New.
62 (coro_get_actor_function): New.
63 (coro_get_destroy_function): New.
64 (act_des_fn): Set up mapping between ramp, actor and
65 destroy functions.
66 (morph_fn_to_coro): Adjust interface to the builder for
67 helper function decls.
68 * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
69 JOIN_STR): New.
70 * mangle.c (write_encoding): Handle coroutine helpers.
71 (write_unqualified_name): Handle lambda coroutine helpers.
72
87277b6a
GA
732021-07-16 Patrick Palka <ppalka@redhat.com>
74
75 PR c++/101233
76 * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
77 substituting DECL_ARGUMENTS.
78
792021-07-16 Patrick Palka <ppalka@redhat.com>
80
81 DR 960
82 PR c++/99664
83 * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
84 when the return types are references.
85
862021-07-16 Marek Polacek <polacek@redhat.com>
87
88 * typeck2.c (check_narrowing): Don't suppress the pedantic error
89 in system headers.
90
d97d71a1
GA
912021-07-15 Jakub Jelinek <jakub@redhat.com>
92
93 PR c++/101443
94 * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
95 operands, fold them right away to true or false.
96
972021-07-15 Jason Merrill <jason@redhat.com>
98
99 PR c++/101095
100 * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
101 (cp_tree_size): Remove redundant entries.
102
c4fee1c6
GA
1032021-07-14 Patrick Palka <ppalka@redhat.com>
104
105 PR c++/88252
106 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
107 * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
108 handling.
109 (redeclare_class_template): Likewise.
110 (forwarding_reference_p): Define.
111 (maybe_adjust_types_for_deduction): Use it instead. Add 'tparms'
112 parameter.
113 (unify_one_argument): Pass tparms to
114 maybe_adjust_types_for_deduction.
115 (try_one_overload): Likewise.
116 (unify): Likewise.
117 (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
118 handling.
119
1202021-07-14 Jason Merrill <jason@redhat.com>
121
122 * class.c (struct find_final_overrider_data): Use auto_vec.
123 (find_final_overrider): Remove explicit release.
124 * coroutines.cc (process_conditional): Use auto_vec.
125 * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
126 (cp_genericize_tree): Remove explicit release.
127 * parser.c (cp_parser_objc_at_property_declaration): Use
128 auto_delete_vec.
129 * semantics.c (omp_reduction_lookup): Use auto_vec.
130
1312021-07-14 Marek Polacek <polacek@redhat.com>
132
133 PR c++/101371
134 * constexpr.c (cxx_eval_array_reference): Create a new .object
135 and .ctor for the non-aggregate non-scalar case too when
136 value-initializing.
137
07bcbf9c
GA
1382021-07-12 Patrick Palka <ppalka@redhat.com>
139
140 PR c++/79501
141 PR c++/100983
142 * decl.c (grokfndecl): Don't require that deduction guides are
143 declared at namespace scope. Check that class-scope deduction
144 guides have the same access as the member class template.
145 (grokdeclarator): Pretend class-scope deduction guides are static.
146 * search.c (lookup_member): Don't use a BASELINK for (class-scope)
147 deduction guides.
148
269256f3
GA
1492021-07-10 Patrick Palka <ppalka@redhat.com>
150
151 PR c++/82110
152 * init.c (build_aggr_init): Return error_mark_node if
153 expand_aggr_init_1 returns false.
154 (expand_default_init): Change return type to bool. Return false
155 on error, true on success.
156 (expand_aggr_init_1): Likewise.
157
ef2ace64
GA
1582021-07-09 Jason Merrill <jason@redhat.com>
159
160 PR c++/101098
161 * decl.c (function_requirements_equivalent_p): Only compare
162 trailing requirements on a specialization.
163
1642021-07-09 Iain Sandoe <iain@sandoe.co.uk>
165
166 * coroutines.cc (build_actor_fn): Move common code to
167 act_des_fn.
168 (build_destroy_fn): Likewise.
169 (act_des_fn): Build the void return here. Ensure that the
170 source location matches the original function.
171
1722021-07-09 Iain Sandoe <iain@sandoe.co.uk>
173
174 * coroutines.cc
175 (coro_rewrite_function_body): Connect the replacement
176 function block to the block nest correctly.
177
1782021-07-09 Patrick Palka <ppalka@redhat.com>
179
180 PR c++/101181
181 * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
182 add_extra_args.
183 * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
184 * pt.c (build_extra_args): Make a copy of args.
185 (add_extra_args): Add complain/in_decl parameters. Enable the
186 code for handling the case where the extra arguments are
187 dependent.
188 (tsubst_pack_expansion): Pass complain/in_decl to
189 add_extra_args.
190 (tsubst_template_args): Handle missing template arguments.
191 (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
192 add_extra_args.
193
1942021-07-09 Patrick Palka <ppalka@redhat.com>
195
196 PR c++/101247
197 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
198 DECL_CONTEXT.
199
fdc4d2a5
GA
2002021-07-08 Martin Sebor <msebor@redhat.com>
201
202 PR bootstrap/101372
203 * module.cc (identifier): Suppress warning.
204 (module_state::read_macro_maps): Remove warning suppression.
205 (module_state::install_macros): Ditto.
206
2072021-07-08 Marek Polacek <polacek@redhat.com>
208
209 PR c++/101087
210 * cp-tree.h (unevaluated_p): New.
211 * except.c (check_noexcept_r): Use it. Don't walk into
212 unevaluated operands.
213
2142021-07-08 Martin Sebor <msebor@redhat.com>
215
216 PR bootstrap/101374
217 * module.cc (module_state::read_macro_maps): Temporarily disable
218 -Warray-bounds.
219 (module_state::install_macros): Same.
220
6fba0eea
GA
2212021-07-06 Martin Sebor <msebor@redhat.com>
222
223 * error.c (cp_printer): Remove support for %G and %K.
224
7a60a6e8
GA
2252021-07-02 Jakub Jelinek <jakub@redhat.com>
226
227 * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
228 (struct cp_omp_declare_simd_data): Likewise.
229 * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
230 (omp_identifier): Define.
231 * parser.c (cp_parser_skip_to_pragma_eol): Handle
232 in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
233 (cp_parser_require_pragma_eol): Likewise.
234 (struct cp_omp_attribute_data): New type.
235 (cp_parser_handle_statement_omp_attributes): New function.
236 (cp_parser_statement): Handle OpenMP directives in statement's
237 attribute-specifier-seq.
238 (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
239 functions.
240 (cp_parser_std_attribute): Handle omp::directive and omp::sequence
241 attributes.
242 (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
243 a comma also before the first clause.
244 (cp_parser_omp_allocate): Likewise.
245 (cp_parser_omp_atomic): Likewise.
246 (cp_parser_omp_depobj): Likewise.
247 (cp_parser_omp_flush): Likewise.
248 (cp_parser_omp_ordered): Likewise.
249 (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
250 into struct cp_omp_declare_simd_data.
251 (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
252 argument. If set, allow a comma also before match clause.
253 (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
254 allow a comma also before the first clause. Adjust
255 cp_finish_omp_declare_variant caller.
256 (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
257 a comma also before the first clause.
258 (cp_parser_omp_declare_reduction_exprs): Likewise.
259 (cp_parser_omp_requires): Likewise.
260 * decl.c (initialize_predefined_identifiers): Initialize
261 omp_identifier.
262 * decl2.c (cplus_decl_attributes): Reject omp::directive and
263 omp::sequence attributes.
264
2652021-07-02 Jakub Jelinek <jakub@redhat.com>
266
267 PR c/101297
268 * parser.c (cp_parser_omp_atomic): Consume comma only if it
269 appears before a CPP_NAME.
270
2712021-07-02 Patrick Palka <ppalka@redhat.com>
272
273 PR c++/101247
274 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
275 use common_enclosing_class and to not depend on the TREE_TYPE
276 of outer levels pointing to the corresponding primary template.
277
bea7c16a
GA
2782021-07-01 Patrick Palka <ppalka@redhat.com>
279
280 PR c++/101194
281 * constexpr.c (cxx_eval_array_reference): When the element type
282 is an empty type and the corresponding element is omitted, just
283 return an empty CONSTRUCTOR instead of attempting value
284 initialization.
285
2862021-07-01 Patrick Palka <ppalka@redhat.com>
287
288 PR c++/96204
289 * pt.c (finish_template_variable): Pass the partially
290 instantiated template and its args to instantiate_template.
291 (instantiate_class_template_1): No need to call
292 push_nested_class and pop_nested_class around the call to
293 most_specialized_partial_spec.
294 (instantiate_template_1): Pass the partially instantiated
295 template to lookup_template_variable.
296 (most_specialized_partial_spec): Use push_access_scope_guard
297 to set the access scope appropriately. Use
298 deferring_access_check_sentinel to force access to get checked
299 immediately.
300 (instantiate_decl): Just pass the VAR_DECL to
301 most_specialized_partial_spec.
302
25b6bfea
GA
3032021-06-30 Patrick Palka <ppalka@redhat.com>
304
305 * constraint.cc (get_normalized_constraints_from_decl): Use
306 push_access_scope_guard instead of push_nested_class_guard.
307 * cp-tree.h (struct push_nested_class_guard): Replace with ...
308 (struct push_access_scope_guard): ... this.
309 * pt.c (push_access_scope): When the argument corresponds to
310 a class type, push the class instead of its context.
311 (pop_access_scope): Adjust accordingly.
312
3132021-06-30 Marek Polacek <polacek@redhat.com>
314
315 PR c++/100975
316 DR 2397
317 * decl.c (create_array_type_for_decl): Allow array of auto.
318
6bc18203
GA
3192021-06-29 Jason Merrill <jason@redhat.com>
320
321 * pt.c (instantiate_decl): Only consider partial specializations of
322 actual variable templates.
323
461f937b
GA
3242021-06-26 Patrick Palka <ppalka@redhat.com>
325
326 PR c++/96204
327 * pt.c (instantiate_class_template_1): Enter the scope of the
328 type when calling most_specialized_partial_spec.
329
3302021-06-26 Jason Merrill <jason@redhat.com>
331
332 PR c++/101040
333 PR c++/97566
334 * class.c (is_empty_field): Handle null argument.
335 * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
336 for empty field.
337
90708f87
GA
3382021-06-26 Marek Polacek <polacek@redhat.com>
339
340 PR c++/100752
341 * parser.c (cp_parser_declarator): Pass flags down to
342 cp_parser_declarator. Also pass static_p/member_p.
343
3442021-06-25 Martin Sebor <msebor@redhat.com>
345
346 * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
347 with warning_suppressed_p, suppress_warning, and copy_no_warning, or
348 nothing if not necessary.
349 (set_up_extended_ref_temp): Same.
350 * class.c (layout_class_type): Same.
351 * constraint.cc (constraint_satisfaction_value): Same.
352 * coroutines.cc (finish_co_await_expr): Same.
353 (finish_co_yield_expr): Same.
354 (finish_co_return_stmt): Same.
355 (build_actor_fn): Same.
356 (coro_rewrite_function_body): Same.
357 (morph_fn_to_coro): Same.
358 * cp-gimplify.c (genericize_eh_spec_block): Same.
359 (gimplify_expr_stmt): Same.
360 (cp_genericize_r): Same.
361 (cp_fold): Same.
362 * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
363 * cvt.c (cp_fold_convert): Same.
364 (convert_to_void): Same.
365 * decl.c (wrapup_namespace_globals): Same.
366 (grokdeclarator): Same.
367 (finish_function): Same.
368 (require_deduced_type): Same.
369 * decl2.c (no_linkage_error): Same.
370 (c_parse_final_cleanups): Same.
371 * except.c (expand_end_catch_block): Same.
372 * init.c (build_new_1): Same.
373 (build_new): Same.
374 (build_vec_delete_1): Same.
375 (build_vec_init): Same.
376 (build_delete): Same.
377 * method.c (defaultable_fn_check): Same.
378 * parser.c (cp_parser_fold_expression): Same.
379 (cp_parser_primary_expression): Same.
380 * pt.c (push_tinst_level_loc): Same.
381 (tsubst_copy): Same.
382 (tsubst_omp_udr): Same.
383 (tsubst_copy_and_build): Same.
384 * rtti.c (build_if_nonnull): Same.
385 * semantics.c (maybe_convert_cond): Same.
386 (finish_return_stmt): Same.
387 (finish_parenthesized_expr): Same.
388 (cp_check_omp_declare_reduction): Same.
389 * tree.c (build_cplus_array_type): Same.
390 * typeck.c (build_ptrmemfunc_access_expr): Same.
391 (cp_build_indirect_ref_1): Same.
392 (cp_build_function_call_vec): Same.
393 (warn_for_null_address): Same.
394 (cp_build_binary_op): Same.
395 (unary_complex_lvalue): Same.
396 (cp_build_modify_expr): Same.
397 (build_x_modify_expr): Same.
398 (convert_for_assignment): Same.
399
9aa8327e
GA
4002021-06-24 Patrick Palka <ppalka@redhat.com>
401
402 PR c++/98832
403 * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
404
4052021-06-24 Patrick Palka <ppalka@redhat.com>
406
407 PR c++/101182
408 * constraint.cc (evaluate_requires_expr): Adjust function comment.
409 * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
410 (cp_fold) <case REQUIRES_EXPR>: ... here.
411
4122021-06-24 Jakub Jelinek <jakub@redhat.com>
413
414 * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
415 C_ORT_OMP for clauses on target construct.
416 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
417 (cp_parser_omp_target): For non-combined target add
418 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
419 C_ORT_OMP_TARGET to finish_omp_clauses.
420 * semantics.c (handle_omp_array_sections_1): Adjust ort handling
421 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
422 never present on C_ORT_*DECLARE_SIMD.
423 (handle_omp_array_sections): Likewise.
424 (finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
425 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
426 corresponding map clauses.
427 * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
428 clauses on target construct.
429
fcf617f0
GA
4302021-06-23 Patrick Palka <ppalka@redhat.com>
431
432 PR c++/101174
433 * pt.c (push_access_scope): For artificial deduction guides,
434 set the access scope to that of the constructor.
435 (pop_access_scope): Likewise.
436 (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
437
4382021-06-23 Patrick Palka <ppalka@redhat.com>
439
440 PR c++/86439
441 * call.c (print_error_for_call_failure): Constify 'args' parameter.
442 (perform_dguide_overload_resolution): Define.
443 * cp-tree.h: (perform_dguide_overload_resolution): Declare.
444 * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
445 instead of build_new_function_call. Don't use tf_decltype or
446 set cp_unevaluated_operand. Remove unnecessary NULL_TREE tests.
447
2f080224
GA
4482021-06-21 Patrick Palka <ppalka@redhat.com>
449
450 PR c++/67302
451 * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
452 sooner, before the NRVO handling.
453
4542021-06-21 Patrick Palka <ppalka@redhat.com>
455
456 PR c++/80431
457 * tree.c (bot_replace): Use convert_to_base to build the
458 conversion to the (morally) virtual base.
459
4602021-06-21 Jakub Jelinek <jakub@redhat.com>
461
462 PR inline-asm/100785
463 * typeck.c (cxx_mark_addressable): Diagnose trying to make
464 bit-fields addressable.
465
688359a2
GA
4662021-06-17 Jason Merrill <jason@redhat.com>
467
468 PR c++/101106
469 * decl.c (duplicate_decls): Make 'deleted after first declaration'
470 pedwarn on by default.
471
4722021-06-17 Jason Merrill <jason@redhat.com>
473
474 PR c++/101029
475 * init.c (build_vec_init): Preserve the type of base.
476
9a61dfdb
GA
4772021-06-16 Jason Merrill <jason@redhat.com>
478
479 PR c++/101078
480 PR c++/91706
481 * pt.c (tsubst_baselink): Update binfos in non-dependent case.
482
ede6c356
GA
4832021-06-15 Robin Dapp <rdapp@linux.ibm.com>
484
485 * decl.c (duplicate_decls): Likewise.
486
8dc48181
GA
4872021-06-14 Tobias Burnus <tobias@codesourcery.com>
488
489 PR c/100913
490 * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
491 var in the error case.
492
4e70c34e
GA
4932021-06-13 Trevor Saunders <tbsaunde@tbsaunde.org>
494
495 * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
496 with range based for.
497 (cxx_eval_store_expression): Likewise.
498 (cxx_eval_loop_expr): Likewise.
499 * decl.c (wrapup_namespace_globals): Likewise.
500 (cp_finish_decl): Likewise.
501 (cxx_simulate_enum_decl): Likewise.
502 * parser.c (cp_parser_postfix_expression): Likewise.
503
8b8c3912
GA
5042021-06-12 Jason Merrill <jason@redhat.com>
505
506 PR c++/101029
507 * init.c (build_vec_init): Shortcut [0] case.
508
5092021-06-12 Jason Merrill <jason@redhat.com>
510
511 * pt.c (lookup_template_class_1): Shortcut current_class_type.
512
f16f65f8
GA
5132021-06-11 Patrick Palka <ppalka@redhat.com>
514
515 DR 1227
516 PR c++/96560
517 * pt.c (tsubst_arg_types): Rearrange so that we substitute into
518 TYPE_ARG_TYPES in forward order while short circuiting
519 appropriately. Adjust formatting.
520
5212021-06-11 Jakub Jelinek <jakub@redhat.com>
522
523 PR c++/100974
524 * cp-tree.h (struct saved_scope): Add consteval_if_p
525 member. Formatting fix for the discarded_stmt comment.
526 (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
527 * parser.c (cp_parser_lambda_expression): Temporarily disable
528 in_consteval_if_p when parsing lambda body.
529 (cp_parser_selection_statement): Parse consteval if.
530 * decl.c (struct named_label_entry): Add in_consteval_if member.
531 (level_for_consteval_if): New function.
532 (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
533 consteval if.
534 * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
535 why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
536 for !ctx->manifestly_const_eval.
537 (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
538 condition as if it was __builtin_is_constant_evaluated call.
539 (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
540 recurse on both branches.
541 * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
542 as the else branch.
543 * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
544 Temporarily set in_consteval_if_p when recursing on
545 IF_STMT_CONSTEVAL_P then branch.
546 (tsubst_lambda_expr): Temporarily disable
547 in_consteval_if_p when instantiating lambda body.
548 * call.c (immediate_invocation_p): Return false when
549 in_consteval_if_p.
550
43c35d0d
GA
5512021-06-11 Marek Polacek <polacek@redhat.com>
552
553 PR c++/100995
554 * constexpr.c (maybe_constexpr_fn): New.
555 * cp-tree.h (maybe_constexpr_fn): Declare.
556 * semantics.c (find_std_constant_evaluated_r): New.
557 (maybe_warn_for_constant_evaluated): New.
558 (finish_if_stmt_cond): Call it.
559
5602021-06-10 Patrick Palka <ppalka@redhat.com>
561
562 PR c++/67829
563 * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
564 the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
565 a template template parameter, adjust to the
566 TEMPLATE_TEMPLATE_PARAMETER before falling through.
567
5682021-06-10 Patrick Palka <ppalka@redhat.com>
569
570 PR c++/100946
571 * constraint.cc (normalize_placeholder_type_constraints): When
572 normalizing a non-templated return-type-requirement, add a dummy
573 level to initial_parms.
574
c6038721
GA
5752021-06-08 Marek Polacek <polacek@redhat.com>
576
577 PR c++/100065
578 * decl.c (grokdeclarator): Store a value-dependent
579 explicit-specifier even for deduction guides.
580
5812021-06-08 Jason Merrill <jason@redhat.com>
582
583 * parser.c (cp_parser_string_literal): Adjust diagnostic.
584
5852021-06-08 Jason Merrill <jason@redhat.com>
586
587 PR c++/100963
588 * call.c (perfect_conversion_p): Check check_narrowing.
589
5902021-06-08 Jason Merrill <jason@redhat.com>
591
592 PR c++/91706
593 * name-lookup.c (get_class_binding): Keep a BASELINK.
594 (set_inherited_value_binding_p): Adjust.
595 * lambda.c (is_lambda_ignored_entity): Adjust.
596 * pt.c (lookup_template_function): Copy a BASELINK before
597 modifying it.
598
5992021-06-08 Jason Merrill <jason@redhat.com>
600
601 PR c++/91706
602 * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
603
6042021-06-08 Jason Merrill <jason@redhat.com>
605
606 * module.cc (duplicate_hash::hash): Comment out.
607 (trees_in::tree_value): Adjust loop counter.
608
6092021-06-08 Jason Merrill <jason@redhat.com>
610
611 PR c++/100102
612 * init.c (build_offset_ref): Return the BASELINK for a static
613 member function.
614
438aac59
GA
6152021-06-07 Patrick Palka <ppalka@redhat.com>
616
617 PR c++/100918
618 * parser.c (cp_parser_lookup_name): Check access of the lookup
619 result before we potentially adjust an injected-class-name to
620 its TEMPLATE_DECL.
621
7d6987e9
GA
6222021-06-06 Jakub Jelinek <jakub@redhat.com>
623
624 PR c/100902
625 * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
626 even when target is combined with other constructs.
627
600f90cb
GA
6282021-06-04 Patrick Palka <ppalka@redhat.com>
629
630 PR c++/100893
631 * pt.c (convert_template_argument): Strip top-level cv-quals
632 on the substituted type of a non-type template parameter.
633
6342021-06-04 Patrick Palka <ppalka@redhat.com>
635
636 PR c++/100102
637 * pt.c (tsubst_function_decl): Remove old code for reducing
638 args when it has excess levels.
639
6402021-06-04 Jakub Jelinek <jakub@redhat.com>
641
642 PR c++/100872
643 * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
644 ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
645 to the start.
646
440c8a0a
GA
6472021-06-03 Patrick Palka <ppalka@redhat.com>
648
649 PR c++/100592
650 * decl.c (make_typename_type): After calling
651 lookup_template_class, adjust the result to its TYPE_NAME and
652 then consider the tf_keep_type_decl flag.
653
6542021-06-03 Patrick Palka <ppalka@redhat.com>
655
656 PR c++/100862
657 * pt.c (set_current_access_from_decl): Move to ...
658 * class.c (set_current_access_from_decl): ... here.
659 (handle_using_decl): Use it to propagate the access of the
660 using-enum decl to the copy of the imported enumerator.
661 * cp-tree.h (set_current_access_from_decl): Declare.
662 * decl.c (build_enumerator): Simplify using make_temp_override
663 and set_current_access_from_decl.
664
6652021-06-03 Jakub Jelinek <jakub@redhat.com>
666
667 PR c++/100859
668 * semantics.c (handle_omp_array_sections_1): For
669 OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
670 finish_non_static_data_member and allow this as base.
671 (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
672 after depend only cases. Let this be diagnosed by !lvalue_p
673 case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
674 assert.
675 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
676
9663c744
GA
6772021-06-02 Jason Merrill <jason@redhat.com>
678
679 PR c++/100838
680 * call.c (convert_like_internal): Clear tf_no_cleanup when
681 recursing.
682 (build_user_type_conversion_1): Only add ck_rvalue if
683 LOOKUP_ONLYCONVERTING.
684
b75978d1
GA
6852021-06-01 Patrick Palka <ppalka@redhat.com>
686
687 PR c++/65816
688 * init.c (expand_aggr_init_1): Check
689 type_has_non_user_provided_default_constructor instead of
690 type_has_user_provided_constructor.
691
6922021-06-01 Jason Merrill <jason@redhat.com>
693
694 PR c++/91859
695 * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
696 for destroying delete.
697 * init.c (build_delete): Don't clobber before destroying delete.
698
6992021-06-01 Jason Merrill <jason@redhat.com>
700
701 PR c++/94492
702 * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
703
ee682192
GA
7042021-05-31 Richard Biener <rguenther@suse.de>
705
706 PR c++/88601
707 * cp-objcp-common.c (names_builtin_p): Handle
708 RID_BUILTIN_SHUFFLEVECTOR.
709 * cp-tree.h (build_x_shufflevector): Declare.
710 * parser.c (cp_parser_postfix_expression): Handle
711 RID_BUILTIN_SHUFFLEVECTOR.
712 * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
713 * typeck.c (build_x_shufflevector): Build either a lowered
714 VEC_PERM_EXPR or an unlowered shufflevector via a temporary
715 internal function IFN_SHUFFLEVECTOR.
716
48166757
GA
7172021-05-28 Jason Merrill <jason@redhat.com>
718
719 * constexpr.c (build_data_member_initialization): Use tsi_range.
720 (build_constexpr_constructor_member_initializers): Likewise.
721 (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
722 (potential_constant_expression_1): Likewise.
723 * coroutines.cc (await_statement_expander): Likewise.
724 (await_statement_walker): Likewise.
725 * module.cc (trees_out::core_vals): Likewise.
726 * pt.c (tsubst_expr): Likewise.
727 * semantics.c (set_cleanup_locs): Likewise.
728
7292021-05-28 Jason Merrill <jason@redhat.com>
730
731 PR c++/100797
732 PR c++/95719
733 * call.c (build_over_call): Adjust base_binfo in
734 resolves_to_fixed_type_p case.
735
7362021-05-28 Jakub Jelinek <jakub@redhat.com>
737
738 PR middle-end/99928
739 * semantics.c (handle_omp_array_sections): Copy
740 OMP_CLAUSE_MAP_IMPLICIT.
741 (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
742 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
743 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
744 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
745 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
746 if present in map_head, map_field_head or map_firstprivate_head
747 bitmaps.
748
7492021-05-28 Tobias Burnus <tobias@codesourcery.com>
750
751 * parser.c (cp_parser_omp_clause_affinity): New.
752 (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
753 cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
754 clause.
755 * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
756 finish_omp_clauses): Likewise.
757
cd62d089
GA
7582021-05-27 Matthias Kretz <kretz@kde.org>
759
760 PR c++/100716
761 * error.c (dump_template_bindings): Include code to print
762 "[with" and ']', conditional on whether anything is printed at
763 all. This is tied to whether a semicolon is needed to separate
764 multiple template parameters. If the template argument repeats
765 the template parameter (T = T), then skip the parameter.
766 (dump_substitution): Moved code to print "[with" and ']' to
767 dump_template_bindings.
768 (dump_function_decl): Partial revert of PR50828, which masked
769 TFF_TEMPLATE_NAME for all of dump_function_decl. Now
770 TFF_TEMPLATE_NAME is masked for the scope of the function and
771 only carries through to dump_function_name.
772 (dump_function_name): Avoid calling dump_template_parms if
773 TFF_TEMPLATE_NAME is set.
774
7752021-05-27 Matthias Kretz <kretz@kde.org>
776
777 PR c++/100763
778 * error.c: Call dump_scope when printing a typedef.
779
7802021-05-27 Patrick Palka <ppalka@redhat.com>
781
782 PR c++/99893
783 * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
784
7852021-05-27 Jason Merrill <jason@redhat.com>
786
787 PR c++/86355
788 * pt.c (use_pack_expansion_extra_args_p): Don't compare
789 args from the same argument pack.
790
7912021-05-27 Patrick Palka <ppalka@redhat.com>
792
793 DR 1315
794 PR c++/67593
795 PR c++/96555
796 * pt.c (process_partial_specialization): Don't error on a
797 non-simple non-type template argument that involves template
798 parameters.
799 (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
800 MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
801
01c59ef2
GA
8022021-05-26 Patrick Palka <ppalka@redhat.com>
803
804 PR c++/100502
805 * typeck.c (finish_class_member_access_expr): Disable ahead
806 of time access checking during the member lookup.
807
8082021-05-26 Patrick Palka <ppalka@redhat.com>
809
810 PR c++/100368
811 * tree.c (build_target_expr_with_type): Don't call force_rvalue
812 on CALL_EXPR initializer. Simplify now that bot_manip is no
813 longer a caller.
814 (bot_manip): Use force_target_expr instead of
815 build_target_expr_with_type.
816
8172021-05-26 Patrick Palka <ppalka@redhat.com>
818
819 PR c++/97420
820 * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
821 (fnptr_conv_p): Don't call non_reference. Use INDIRECT_TYPE_P
822 instead of TYPE_PTR_P.
823 * pt.c (convert_nontype_argument_function): Look through
824 implicit INDIRECT_REFs before calling strip_fnptr_conv.
825
2bc6dace
GA
8262021-05-25 Jakub Jelinek <jakub@redhat.com>
827
828 PR c++/100666
829 * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
830 and side-effects, temporarily disable -Wunused-result warning when
831 building COMPOUND_EXPR.
832
2832d51b
GA
8332021-05-21 Jakub Jelinek <jakub@redhat.com>
834
835 PR middle-end/99928
836 * semantics.c (finish_omp_clauses): Move firstprivate clauses with
837 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
838 if a decl is mentioned both in map clause and in such firstprivate
839 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
840
ea34e2ed
GA
8412021-05-20 Jason Merrill <jason@redhat.com>
842
843 * call.c (reference_binding): Check for designator.
844 (implicit_conversion_1, build_special_member_call): Likewise.
845 * decl.c (reshape_init_r): Likewise.
846 * pt.c (do_class_deduction): Likewise.
847 * typeck2.c (digest_init_r): Likewise.
848
8492021-05-20 Jason Merrill <jason@redhat.com>
850
851 PR c++/100489
852 * decl.c (reshape_init_class): Handle designator for
853 member of anonymous aggregate here.
854 * typeck2.c (process_init_constructor_record): Not here.
855
8562021-05-20 Jonathan Wakely <jwakely@redhat.com>
857
858 * call.c (maybe_warn_array_conv): Use new warning option.
859 * decl.c (mark_inline_variable, grokdeclarator): Likewise.
860 * error.c (maybe_warn_cpp0x): Likewise.
861 * parser.c (cp_parser_primary_expression)
862 (cp_parser_unqualified_id)
863 (cp_parser_pseudo_destructor_name)
864 (cp_parser_lambda_introducer)
865 (cp_parser_lambda_declarator_opt)
866 (cp_parser_selection_statement)
867 (cp_parser_init_statement)
868 (cp_parser_decomposition_declaration)
869 (cp_parser_function_specifier_opt)
870 (cp_parser_static_assert)
871 (cp_parser_namespace_definition)
872 (cp_parser_using_declaration)
873 (cp_parser_asm_definition)
874 (cp_parser_ctor_initializer_opt_and_function_body)
875 (cp_parser_initializer_list)
876 (cp_parser_type_parameter_key)
877 (cp_parser_member_declaration)
878 (cp_parser_try_block)
879 (cp_parser_std_attribute_spec): Likewise.
880 * pt.c (check_template_variable): Likewise.
881
8822021-05-20 Jason Merrill <jason@redhat.com>
883
884 PR c++/100634
885 * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
886
8872021-05-20 Jason Merrill <jason@redhat.com>
888
889 PR c++/100659
890 * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
891
65f32e5d
GA
8922021-05-19 Jason Merrill <jason@redhat.com>
893
894 PR c++/100367
895 PR c++/96299
896 * method.c (genericize_spaceship): Use fold_build2 for scalar
897 operands.
898
8992021-05-19 Jason Merrill <jason@redhat.com>
900
901 * pt.c (build_deduction_guide): Treat the implicit deduction guide
902 as a member of the class.
903
9042021-05-19 Marek Polacek <polacek@redhat.com>
905
906 PR c++/100596
907 * cp-tree.h (any_non_type_attribute_p): Remove.
908 * decl.c (grokdeclarator): Turn an error into a warning and only
909 warn for standard attributes.
910 * decl2.c (any_non_type_attribute_p): Remove.
911 * parser.c (cp_parser_elaborated_type_specifier): Turn an error
912 into a warning and only warn for standard attributes.
913 (cp_parser_member_declaration): Likewise.
914
9152021-05-19 Martin Liska <mliska@suse.cz>
916
917 PR testsuite/100658
918 * mangle.c (write_encoding): Fix typos.
919
9202021-05-19 Jakub Jelinek <jakub@redhat.com>
921
922 PR middle-end/99928
923 * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
924 master when combined with taskloop.
925 (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
926 parallel master when not combined with taskloop.
927
9282021-05-19 Jason Merrill <jason@redhat.com>
929
930 PR c++/100261
931 * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
932
9332021-05-19 Jason Merrill <jason@redhat.com>
934
935 PR c++/100372
936 * tree.c (strip_typedefs): Only look at the pattern of a
937 TYPE_PACK_EXPANSION if it's a type.
938
a8daf9a1
GA
9392021-05-18 Marek Polacek <polacek@redhat.com>
940
941 * class.c (classtype_has_non_deleted_copy_ctor): Remove.
942 * constraint.cc (contains_wildcard_p): Likewise.
943 (get_template_head_requirements): Likewise.
944 (check_constrained_friend): Likewise.
945 (subsumes_constraints): Likewise.
946 * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
947 (push_void_library_fn): Likewise.
948 (get_pattern_parm): Likewise.
949 (get_template_parms_at_level): Likewise.
950 (lambda_return_type): Likewise.
951 (get_template_head_requirements): Likewise.
952 (check_constrained_friend): Likewise.
953 (subsumes_constraints): Likewise.
954 * decl.c (push_void_library_fn): Likewise.
955 * lambda.c (lambda_return_type): Likewise.
956 * pt.c (get_template_parms_at_level): Likewise.
957 (get_pattern_parm): Likewise.
958
9592021-05-18 Jason Merrill <jason@redhat.com>
960
961 PR c++/100644
962 * call.c (perfect_candidate_p): An implicitly deleted move
963 is not perfect.
964
9652021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
966
967 PR c++/100281
968 * cvt.c (cp_convert_to_pointer): Use the size of the target
969 pointer type.
970 * tree.c (cp_build_reference_type): Call
971 cp_build_reference_type_for_mode with VOIDmode.
972 (cp_build_reference_type_for_mode): Rename from
973 cp_build_reference_type. Add MODE argument and invoke
974 build_reference_type_for_mode.
975 (strip_typedefs): Use build_pointer_type_for_mode and
976 cp_build_reference_type_for_mode for pointers and references.
977
a7ffc1ef
GA
9782021-05-17 Jonathan Wakely <jwakely@redhat.com>
979
980 PR c++/100635
981 * call.c (convert_like_internal): Print different diagnostic if
982 the lvalue reference is const.
983
87a7d10c
GA
9842021-05-14 Jason Merrill <jason@redhat.com>
985
986 PR c++/95870
987 * pt.c (enclosing_instantiation_of): Just compare
988 DECL_SOURCE_LOCATION.
989 (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
990
9912021-05-14 Marek Polacek <polacek@redhat.com>
992 Jason Merrill <jason@redhat.com>
993
994 PR c++/99032
995 * cp-tree.h (any_non_type_attribute_p): Declare.
996 * decl.c (grokdeclarator): Diagnose when an attribute appertains to
997 a friend declaration that is not a definition.
998 * decl2.c (any_non_type_attribute_p): New.
999 * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
1000 in the middle of decl-specifiers.
1001 (cp_parser_elaborated_type_specifier): Diagnose when an attribute
1002 appertains to a friend declaration that is not a definition.
1003 (cp_parser_member_declaration): Likewise.
1004
0ff3a0f2
GA
10052021-05-12 Marek Polacek <polacek@redhat.com>
1006
1007 * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
1008 sentinel.
1009
10102021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1011
1012 * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
1013 'close'.
1014
037e3661
GA
10152021-05-11 Jason Merrill <jason@redhat.com>
1016
1017 PR c++/100517
1018 * typeck.c (build_reinterpret_cast_1): Check intype on
1019 cast to vector.
1020
10212021-05-11 Patrick Palka <ppalka@redhat.com>
1022
1023 PR c++/51577
1024 * name-lookup.c (maybe_save_operator_binding): Unconditionally
1025 enable for all function templates, not just generic lambdas.
1026 Handle compound-assignment operator expressions.
1027 * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
1028 in the type-dependent case.
1029 (build_x_modify_expr): Likewise. Move declaration of 'op' closer
1030 to its first use.
1031
10322021-05-11 Patrick Palka <ppalka@redhat.com>
1033
1034 PR c++/100138
1035 * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
1036 (satisfy_atom): Set up iloc_sentinel before calling
1037 cxx_constant_value.
1038 * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
1039 expansion, carry over PACK_EXPANSION_LOCAL_P and
1040 PACK_EXPANSION_SIZEOF_P from the original pack expansion.
1041
aa891c56
GA
10422021-05-10 Richard Biener <rguenther@suse.de>
1043
1044 PR middle-end/100464
1045 PR c++/100468
1046 * call.c (set_up_extended_ref_temp): Mark the temporary
1047 addressable if the TARGET_EXPR was.
1048
10492021-05-10 Martin Liska <mliska@suse.cz>
1050
1051 * decl.c (duplicate_decls): Use startswith
1052 function instead of strncmp.
1053 (cxx_builtin_function): Likewise.
1054 (omp_declare_variant_finalize_one): Likewise.
1055 (grokfndecl): Likewise.
1056 * error.c (dump_decl_name): Likewise.
1057 * mangle.c (find_decomp_unqualified_name): Likewise.
1058 (write_guarded_var_name): Likewise.
1059 (decl_tls_wrapper_p): Likewise.
1060 * parser.c (cp_parser_simple_type_specifier): Likewise.
1061 (cp_parser_tx_qualifier_opt): Likewise.
1062 * pt.c (template_parm_object_p): Likewise.
1063 (dguide_name_p): Likewise.
1064
10652021-05-10 Martin Liska <mliska@suse.cz>
1066
1067 PR c++/99616
1068 * decl.c (grokdeclarator): Remove redundant NULL check.
1069
62d87a32
GA
10702021-05-07 Jason Merrill <jason@redhat.com>
1071
1072 * tree.c (rvalue): Assert expr is not a class lvalue.
1073
10742021-05-07 Jason Merrill <jason@redhat.com>
1075
1076 * cp-tree.h (build_stub_object): Declare.
1077 * method.c (build_stub_object): No longer static.
1078 * call.c (can_convert): Use it.
1079 * tree.c (build_dummy_object): Adjust comment.
1080 * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
1081 TARGET_EXPR.
1082
10832021-05-07 Jason Merrill <jason@redhat.com>
1084
1085 * coroutines.cc (build_co_await): Don't call 'rvalue'.
1086 (flatten_await_stmt): Simplify initialization.
1087 (morph_fn_to_coro): Change 'rvalue' to 'move'. Simplify.
1088
99e8df7a
GA
10892021-05-04 Tobias Burnus <tobias@codesourcery.com>
1090
1091 * semantics.c (finish_omp_reduction_clause): Accept float + complex
1092 for || and && reductions.
1093
e690396d
GA
10942021-05-03 Patrick Palka <ppalka@redhat.com>
1095
1096 PR c++/100362
1097 * parser.c (cp_parser_class_head): Reinstate calls to pushclass
1098 and popclass when parsing the base-clause that were removed in
1099 r11-6815.
1100
11012021-05-03 Patrick Palka <ppalka@redhat.com>
1102
1103 PR c++/68942
1104 PR c++/100344
1105 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
1106 only when the callee is a FUNCTION_DECL.
1107
11082021-05-03 Marek Polacek <polacek@redhat.com>
1109
1110 PR c++/100055
1111 * decl.c (grokfndecl): Check current_template_parms.
1112
11132021-05-03 Marek Polacek <polacek@redhat.com>
1114
1115 DR 1312
1116 * constexpr.c (cxx_eval_constant_expression): Don't check
1117 integer_zerop.
1118
620a0635
GA
11192021-05-01 Jason Merrill <jason@redhat.com>
1120
1121 * cp-tree.h (class ovl_iterator): Allow copying. Add op==.
1122 (class ovl_range, class lkp_range): New.
1123 * call.c (build_op_call_1, add_candidates): Use them.
1124 (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
1125 (has_trivial_copy_p): Likewise.
1126 * class.c (handle_using_decl, get_basefndecls): Likewise.
1127 (maybe_warn_about_overly_private_class): Likewise.
1128 (warn_hidden, add_implicitly_declared_members): Likewise.
1129 (check_methods, clone_constructors_and_destructors): Likewise.
1130 (type_has_user_nondefault_constructor): Likewise.
1131
3c8e539d
GA
11322021-04-29 Jason Merrill <jason@redhat.com>
1133
1134 * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
1135 don't find a field.
1136
11372021-04-29 Jason Merrill <jason@redhat.com>
1138
1139 PR c++/51344
1140 * decl2.c (grokfield): Call cplus_decl_attributes for friend.
1141 (save_template_attributes): Use chainon.
1142 * friend.c (do_friend): Remove attrlist parm.
1143 * cp-tree.h (do_friend): Adjust.
1144 * class.c (add_implicitly_declared_members): Adjust.
1145 * decl.c (grokdeclarator): Adjust.
1146 * pt.c (apply_late_template_attributes): Optimize.
1147
11482021-04-29 Jason Merrill <jason@redhat.com>
1149
1150 PR c++/97974
1151 * class.c (finish_struct_anon_r): Drop complain parm.
1152 Remove non-field diagnostic.
1153 (finish_struct_anon): Adjust.
1154 * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
1155
11562021-04-29 Jason Merrill <jason@redhat.com>
1157
1158 * cp-tree.h (cp_evaluated): Add reset parm to constructor.
1159 * parser.c (cp_parser_constant_expression): Change
1160 allow_non_constant_p to int. Use cp_evaluated.
1161 (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
1162 * semantics.c (finish_id_expression_1): Don't mess with
1163 cp_unevaluated_operand here.
1164
11652021-04-29 Jason Merrill <jason@redhat.com>
1166
1167 * cp-tree.h: Clarify comments.
1168 * pt.c (get_template_parm_object): Add assert.
1169 * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
1170 * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
1171 * typeck2.c (store_init_value): Likewise.
1172
11732021-04-29 Patrick Palka <ppalka@redhat.com>
1174
1175 PR c++/68942
1176 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
1177 set tf_conv during the initial substitution into the function.
1178
11792021-04-29 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR c++/100319
1182 * semantics.c (finish_omp_clauses): Fix up check that variable
1183 mentioned in detach clause doesn't appear in data-sharing clauses.
1184
e4ff4ffb
GA
11852021-04-28 Jakub Jelinek <jakub@redhat.com>
1186
1187 * module.cc: Remove #error that triggers if DEV-PHASE is empty.
1188
8f54dd61
GA
11892021-04-27 Jason Merrill <jason@redhat.com>
1190
1191 PR c++/92145
1192 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
1193 of operator=.
1194
11952021-04-27 Patrick Palka <ppalka@redhat.com>
1196
1197 PR c++/88580
1198 * pt.c (tsubst_initializer_list): Correctly handle the case
1199 where an argument inside a base initializer pack expansion is
1200 itself a pack expansion.
1201
c0fa3f2f
GA
12022021-04-26 Patrick Palka <ppalka@redhat.com>
1203
1204 PR c++/100209
1205 * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
1206 object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
1207 with a negative offset into one whose offset is nonnegative
1208 before calling cxx_fold_indirect_ref_1.
1209
502ef97c
GA
12102021-04-24 Patrick Palka <ppalka@redhat.com>
1211
1212 PR c++/89565
1213 PR c++/93383
1214 PR c++/95291
1215 PR c++/99200
1216 PR c++/99683
1217 * pt.c (do_class_deduction): Punt if the initializer is
1218 type-dependent.
1219
12202021-04-24 Patrick Palka <ppalka@redhat.com>
1221
1222 PR c++/87709
1223 * parser.c (cp_parser_type_id_1): If we see a template
1224 placeholder, first try simulating an error before issuing
1225 a real error.
1226
05ec629f
GA
12272021-04-23 Patrick Palka <ppalka@redhat.com>
1228
1229 PR c++/98767
1230 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
1231 Adjust parameter list loop to iterate over 'types' instead of
1232 'args'. Output the trailing '...' for a variadic function.
1233 Remove PARM_DECL support.
1234 (pp_cxx_requires_expr): Pretty print the parameter list directly
1235 instead of going through pp_cxx_parameter_declaration_clause.
1236
12372021-04-23 Patrick Palka <ppalka@redhat.com>
1238
1239 DR 2374
1240 * decl.c (is_direct_enum_init): Check the implicit
1241 convertibility requirement added by CWG 2374.
1242
12432021-04-23 Martin Liska <mliska@suse.cz>
1244
1245 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
1246 * lex.c (init_operators): Remove run-time check.
1247
e3948473
GA
12482021-04-22 Marek Polacek <polacek@redhat.com>
1249
1250 PR c++/100161
1251 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
1252 op1 separately for value- or type-dependence.
1253
c1ef0c92
GA
12542021-04-21 Marek Polacek <polacek@redhat.com>
1255
1256 PR c++/96380
1257 * parser.c (cp_parser_enum_specifier): Don't allow defining
1258 types in enum-base.
1259
12602021-04-21 Martin Liska <mliska@suse.cz>
1261
1262 Revert:
1263 2021-04-21 Martin Liska <mliska@suse.cz>
1264
1265 * error.c (dump_decl): Use flags in dump_generic_node call.
1266
12672021-04-21 Martin Liska <mliska@suse.cz>
1268
1269 * error.c (dump_decl): Use flags in dump_generic_node call.
1270
12712021-04-21 Martin Liska <mliska@suse.cz>
1272
1273 * error.c (dump_decl): Support anonymous labels.
1274
be8aad8d
GA
12752021-04-20 Jason Merrill <jason@redhat.com>
1276
1277 PR c++/100109
1278 * pt.c (find_parameter_packs_r): Look into enum initializers.
1279
6e81e015
GA
12802021-04-19 Marek Polacek <polacek@redhat.com>
1281
1282 PR c++/97536
1283 * decl.c (grokvardecl): Given an error when a concept is not defined
1284 at namespace scope.
1285
8ae884c0
GA
12862021-04-16 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR c++/100111
1289 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
1290 for empty classes into *valp when types don't match even when *valp
1291 is NULL.
1292
12932021-04-16 Marek Polacek <polacek@redhat.com>
1294
1295 PR c++/99803
1296 * decl.c (make_typename_type): Give an error and return when
1297 name is is_overloaded_fn.
1298 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
1299 before calling make_typename_type.
1300
13012021-04-16 Patrick Palka <ppalka@redhat.com>
1302
1303 PR c++/99700
1304 * constexpr.c (reduced_constant_expression_p): For array
1305 CONSTRUCTORs, use a dedicated loop that additionally verifies
1306 the CONSTRUCTOR spans the entire array.
1307
13082021-04-16 Jakub Jelinek <jakub@redhat.com>
1309
1310 PR c++/99850
1311 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
1312 If lambda_p, return pce_ok instead of pce_maybe_postfix.
1313
13142021-04-16 Jakub Jelinek <jakub@redhat.com>
1315
1316 PR c++/99833
1317 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
1318 binding, add to data.internal also all corresponding structured
1319 binding decls.
1320
13212021-04-16 Jason Merrill <jason@redhat.com>
1322
1323 PR c++/100079
1324 * cp-tree.h (first_field): Declare.
1325 * mangle.c (range_expr_nelts): New.
1326 (write_expression): Improve class NTTP mangling.
1327 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
1328 * tree.c (zero_init_expr_p): Improve class NTTP handling.
1329 * decl.c: Adjust comment.
1330
ee351f7f
GA
13312021-04-15 Jason Merrill <jason@redhat.com>
1332
1333 PR c++/80456
1334 * call.c (build_new_method_call_1): Check again for side-effects
1335 with a volatile object.
1336
13372021-04-15 Jason Merrill <jason@redhat.com>
1338
1339 PR c++/100101
1340 PR c++/99583
1341 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
1342 TYPE_RAISES_EXCEPTIONS here.
1343 * tree.c (cp_walk_subtrees): Not here.
1344
13452021-04-15 Jason Merrill <jason@redhat.com>
1346
1347 PR c++/100091
1348 PR c++/99478
1349 * parser.c (cp_parser_default_type_template_argument): Set
1350 parser->local_variables_forbidden_p.
1351
13522021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1353
1354 PR c++/98852
1355 * typeck.c (merge_type_attributes_from): New function.
1356 (cp_common_type): Use it for vector types.
1357
df3b1289
GA
13582021-04-14 Jason Merrill <jason@redhat.com>
1359
1360 PR c++/100078
1361 PR c++/93085
1362 * pt.c (uses_outer_template_parms): Also look at default
1363 template argument.
1364
13652021-04-14 Jason Merrill <jason@redhat.com>
1366
1367 PR c++/93314
1368 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
1369 for a non-static data member in a constant-expression.
1370
13712021-04-14 Patrick Palka <ppalka@redhat.com>
1372
1373 PR c++/83476
1374 PR c++/99885
1375 * pt.c (deducible_expression): Look through implicit
1376 INDIRECT_REFs as well.
1377
13782021-04-14 Jason Merrill <jason@redhat.com>
1379
1380 PR c++/99478
1381 * parser.c (cp_parser_lambda_expression): Reject lambda
1382 in template parameter type.
1383
13842021-04-14 Jason Merrill <jason@redhat.com>
1385
1386 PR c++/90674
1387 * decl.c (duplicate_decls): Don't propagate
1388 DECL_INITIALIZED_IN_CLASS_P to a specialization.
1389
13902021-04-14 Jason Merrill <jason@redhat.com>
1391
1392 PR c++/88742
1393 PR c++/49951
1394 PR c++/58123
1395 * semantics.c (set_cleanup_locs): New.
1396 (do_poplevel): Call it.
1397 * parser.c (cp_parser_compound_statement): Consume the }
1398 before finish_compound_stmt.
1399
6d0d35d5
GA
14002021-04-13 Jason Merrill <jason@redhat.com>
1401
1402 PR c++/100032
1403 * pt.c (get_underlying_template): Compare TYPE_QUALS.
1404
14052021-04-13 Jason Merrill <jason@redhat.com>
1406
1407 PR c++/100054
1408 PR c++/90479
1409 * init.c (get_nsdmi): Do more context adjustment for local classes.
1410
14112021-04-13 Patrick Palka <ppalka@redhat.com>
1412
1413 PR c++/99008
1414 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
1415 rather than issuing a pedwarn.
1416 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
1417 for consistent diagnostics.
1418
14192021-04-13 Jason Merrill <jason@redhat.com>
1420
1421 PR c++/91933
1422 * class.c (build_base_path): Shortcut simple non-pointer case.
1423
14242021-04-13 Eric Botcazou <ebotcazou@adacore.com>
1425
1426 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
1427 of the linemap.
1428 (module_state::write_location): Likewise.
1429
14302021-04-13 Patrick Palka <ppalka@redhat.com>
1431
1432 PR c++/97134
1433 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
1434 when checking if the initializer is an equivalent class
1435 placeholder template parameter.
1436
14372021-04-13 Patrick Palka <ppalka@redhat.com>
1438
1439 PR c++/99961
1440 PR c++/99994
1441 * constraint.cc (satisfy_normalized_constraints): Set
1442 cp_unevaluated.
1443 * parser.c (cp_parser_concept_definition): Likewise.
1444 (cp_parser_requires_clause_opt): Likewise.
1445
287ad814
GA
14462021-04-12 Jason Merrill <jason@redhat.com>
1447
1448 PR c++/93085
1449 * pt.c (uses_outer_template_parms): Handle non-type and template
1450 template parameters specifically.
1451
a0ecde22
GA
14522021-04-11 Jason Merrill <jason@redhat.com>
1453
1454 PR c++/97974
1455 * decl.c (fixup_anonymous_aggr): Prune all functions from
1456 CLASSTYPE_MEMBER_VEC.
1457
1d54b138
GA
14582021-04-10 Jason Merrill <jason@redhat.com>
1459
1460 PR c++/98800
1461 PR c++/97399
1462 * parser.c (cp_parser_direct_declarator): Don't
1463 inject_this_parameter if static_p.
1464 (cp_parser_omp_var_list_no_open): Parse 'this' even if
1465 current_class_ptr isn't set for a better diagnostic.
1466
14672021-04-10 Jason Merrill <jason@redhat.com>
1468
1469 PR c++/99180
1470 PR c++/93295
1471 PR c++/93867
1472 PR c++/99118
1473 PR c++/96873
1474 * pt.c (alias_ctad_tweaks): Handle failure better.
1475
14762021-04-10 Jason Merrill <jason@redhat.com>
1477
1478 PR c++/100006
1479 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
1480
3115aba8
GA
14812021-04-09 Patrick Palka <ppalka@redhat.com>
1482
1483 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
1484 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
1485 (LAMBDA_EXPR_REGEN_INFO): ... this.
1486 (tree_lambda_expr::regenerated_from)
1487 (tree_lambda_expr::regenerating_targs): Replace these with ...
1488 (tree_lambda_expr::regen_info): ... this.
1489 * constraint.cc (satisfy_declaration_constraints): Adjust
1490 accordingly.
1491 * lambda.c (build_lambda_expr): Likewise.
1492 * pt.c (regenerated_lambda_fn_p): Likewise.
1493 (most_general_lambda): Likewise.
1494 (tsubst_lambda_expr): Likewise.
1495
14962021-04-09 Marek Polacek <polacek@redhat.com>
1497
1498 PR c++/99806
1499 * parser.c (cp_parser_member_declaration): Call
1500 cp_parser_save_default_args even for function templates. Use
1501 STRIP_TEMPLATE on the declaration we're passing.
1502
019a9220
GA
15032021-04-08 Patrick Palka <ppalka@redhat.com>
1504
1505 PR c++/99874
1506 * constraint.cc (get_normalized_constraints_from_decl): Handle
1507 regenerated lambdas.
1508 (satisfy_declaration_constraints): Likewise. Check for
1509 dependent args later.
1510 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
1511 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
1512 (LAMBDA_EXPR_REGENERATING_TARGS): New.
1513 (tree_lambda_expr::regenerated_from): New data member.
1514 (tree_lambda_expr::regenerating_targs): New data member.
1515 (add_to_template_args): Declare.
1516 (regenerated_lambda_fn_p): Likewise.
1517 (most_general_lambda): Likewise.
1518 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
1519 and LAMBDA_EXPR_REGENERATING_TARGS.
1520 * pt.c (add_to_template_args): No longer static.
1521 (tsubst_function_decl): Unconditionally propagate constraints on
1522 the substituted function decl.
1523 (instantiated_lambda_fn_p): Rename to ...
1524 (regenerated_lambda_fn_p): ... this. Check
1525 LAMBDA_EXPR_REGENERATED_FROM instead of
1526 LAMBDA_EXPR_INSTANTIATED.
1527 (most_general_lambda): Define.
1528 (enclosing_instantiation_of): Adjust after renaming
1529 instantiated_lambda_fn_p.
1530 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
1531 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
1532 Don't substitute or set constraints on the regenerated lambda.
1533
15342021-04-08 Patrick Palka <ppalka@redhat.com>
1535
1536 PR c++/97679
1537 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
1538 them into the propagated constraints.
1539
15402021-04-08 Jason Merrill <jason@redhat.com>
1541
1542 PR c++/91849
1543 * call.c (convert_like_internal): Improve reference diagnostic.
1544
15452021-04-08 Jakub Jelinek <jakub@redhat.com>
1546
1547 PR c++/99859
1548 * constexpr.c (addr_of_non_const_var): New function.
1549 (cxx_bind_parameters_in_call): Set *non_constant_args to true
1550 even if cp_walk_tree on arg with addr_of_non_const_var callback
1551 returns true.
1552
15532021-04-08 Jason Merrill <jason@redhat.com>
1554
1555 PR c++/94529
1556 * pt.c (determine_specialization): Improve diagnostic.
1557
15582021-04-08 Marek Polacek <polacek@redhat.com>
1559
1560 PR c++/99844
1561 * decl.c (build_explicit_specifier): Call
1562 check_for_bare_parameter_packs.
1563 * except.c (build_noexcept_spec): Likewise.
1564
299859c2
GA
15652021-04-07 Jason Merrill <jason@redhat.com>
1566
1567 PR c++/41723
1568 * parser.c (cp_parser_class_name): Check dependent_scope_p.
1569
15702021-04-07 Jason Merrill <jason@redhat.com>
1571
1572 PR c++/52625
1573 * pt.c (maybe_process_partial_specialization): Check
1574 DECL_SELF_REFERENCE_P.
1575
15762021-04-07 Jason Merrill <jason@redhat.com>
1577
1578 PR c++/92918
1579 * name-lookup.c (push_class_level_binding_1): Do overload a new
1580 function with a previous using-declaration.
1581
8cac6af6
GA
15822021-04-06 Jason Merrill <jason@redhat.com>
1583
1584 PR c++/96673
1585 * init.c (get_nsdmi): Don't defer access checking.
1586
15872021-04-06 Jason Merrill <jason@redhat.com>
1588
1589 PR c++/99901
1590 * decl.c (cp_finish_decl): mark_needed an implicitly inline
1591 static data member with an out-of-class redeclaration.
1592
15932021-04-06 Jason Merrill <jason@redhat.com>
1594
1595 PR c++/91241
1596 * mangle.c (write_compact_number): Add sanity check.
1597 (write_local_name): Use list_length for parm number.
1598
15992021-04-06 Patrick Palka <ppalka@redhat.com>
1600
1601 PR c++/99899
1602 * pt.c (do_auto_deduction): Don't exit early when deducing the
1603 array type of a structured binding. Also handle adc_decomp_type
1604 during constraint checking.
1605
b1da9916
GA
16062021-04-05 Jason Merrill <jason@redhat.com>
1607
1608 PR c++/96311
1609 * typeck.c (check_return_expr): Call mark_exp_read in dependent
1610 case.
1611
16122021-04-05 Jason Merrill <jason@redhat.com>
1613
1614 PR c++/98440
1615 * typeck.c (build_reinterpret_cast_1): Don't perform
1616 temporary materialization.
1617
16182021-04-05 Jason Merrill <jason@redhat.com>
1619
1620 PR c++/95317
1621 * pt.c (lookup_template_class_1): Do tsubst_enum when
1622 tsubsting a generic lambda.
1623
16242021-04-05 Jason Merrill <jason@redhat.com>
1625
1626 PR c++/95870
1627 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
1628 there is no enclosing non-lambda function.
1629
16302021-04-05 Nathan Sidwell <nathan@acm.org>
1631
1632 PR c++/99380
1633 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
1634 query export when not needed.
1635 (preprocess_module, preprocessed_module): Adjust.
1636
16372021-04-05 Jason Merrill <jason@redhat.com>
1638
1639 PR c++/99066
1640 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
1641
16422021-04-05 Jason Merrill <jason@redhat.com>
1643
1644 PR c++/99201
1645 * pt.c (class el_data): Add visited field.
1646 (extract_local_specs): Pass it to cp_walk_tree.
1647 (extract_locals_r): Walk into the body of a lambda.
1648
16492021-04-05 Jason Merrill <jason@redhat.com>
1650
1651 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
1652 template result.
1653
91472884
GA
16542021-04-04 Jason Merrill <jason@redhat.com>
1655
1656 PR c++/99643
1657 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
1658
c0756c4e
GA
16592021-04-03 Marek Polacek <polacek@redhat.com>
1660
1661 PR c++/91416
1662 * parser.c: Create a GC root for attributes in a decl specifier.
1663 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
1664
16652021-04-03 Jason Merrill <jason@redhat.com>
1666
1667 PR c++/91217
1668 * pt.c (tsubst_lambda_expr): Skip the body block from
1669 DECL_SAVED_TREE.
1670
16712021-04-03 Jason Merrill <jason@redhat.com>
1672
1673 PR c++/90664
1674 * cvt.c (can_convert_qual): Check fnptr_conv_p.
1675
16762021-04-03 Jason Merrill <jason@redhat.com>
1677
1678 PR c++/97900
1679 * pt.c (regenerate_decl_from_template): tsubst_decl
1680 the parms.
1681
b7c1f3d6
GA
16822021-04-02 Patrick Palka <ppalka@redhat.com>
1683
1684 PR c++/99869
1685 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
1686 to do_auto_deduction.
1687
16882021-04-02 Patrick Palka <ppalka@redhat.com>
1689
1690 PR c++/99586
1691 * semantics.c (finish_compound_literal): Check
1692 template_placeholder_p instead of type_uses_auto.
1693
16942021-04-02 Jason Merrill <jason@redhat.com>
1695
1696 PR c++/97938
1697 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
1698 * lambda.c (add_capture): Set it.
1699 * pt.c (tsubst_pack_expansion): Handle it.
1700
17012021-04-02 Nathan Sidwell <nathan@acm.org>
1702
1703 * cp-tree.h (lang_decl_base): Correct module flag comment.
1704 * module.cc (trees_in::assert_definition): Break out
1705 not_tmpl var.
1706 (trees_out::lang_decl_bools): Do not write purview for header units.
1707
f1607029
GA
17082021-04-01 Marek Polacek <polacek@redhat.com>
1709
1710 PR c++/99831
1711 * method.c (defaulted_late_check): ++ and -- function_depth around
1712 the call to synthesize_method.
1713 * pt.c: Remove the saved_trees global.
1714
17152021-04-01 Jason Merrill <jason@redhat.com>
1716
1717 PR c++/99583
1718 PR c++/99584
1719 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
1720 TYPE_RAISES_EXCEPTIONS.
1721
17222021-04-01 Iain Sandoe <iain@sandoe.co.uk>
1723
1724 * mapper-client.cc (INCLUDE_MAP): New; require map to be
1725 included from system.h.
1726 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
1727
17282021-04-01 Jason Merrill <jason@redhat.com>
1729
1730 PR c++/98481
1731 * mangle.c (write_expression): Adjust.
1732 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
1733 (mark_abi_tags_r): Likewise.
1734
17352021-04-01 Nathan Sidwell <nathan@acm.org>
1736
1737 PR c++/99283
1738 * module.cc (trees_out::decl_node): Adjust importedness reference
1739 assert.
1740 (module_state::intercluster_seed): New. Seed both imports and
1741 inter-cluster references. Broken out of ...
1742 (module_state::write_cluster): ... here. Call it.
1743
95d217ab
GA
17442021-03-31 Jason Merrill <jason@redhat.com>
1745
1746 PR c++/99445
1747 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
1748
17492021-03-31 Patrick Palka <ppalka@redhat.com>
1750
1751 PR c++/88115
1752 * mangle.c (write_expression): Adjust the mangling of
1753 __alignof__.
1754
17552021-03-31 Patrick Palka <ppalka@redhat.com>
1756
1757 PR c++/99815
1758 * pt.c (placeholder_type_constraint_dependent_p): Expand
1759 argument packs to separate the first non-pack argument
1760 from the rest.
1761
08d2edae
GA
17622021-03-30 Nathan Sidwell <nathan@acm.org>
1763
1764 PR c++/99283
1765 * module.cc (dumper::operator): Make less brittle.
1766 (trees_out::core_bools): VAR_DECLs always have a context.
1767 (trees_out::key_mergeable): Use same_type_p for asserting.
1768 (trees_in::read_var_def): Propagate
1769 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1770
17712021-03-30 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c++/99790
1774 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
1775
651684b4
GA
17762021-03-26 Marek Polacek <polacek@redhat.com>
1777
1778 PR c++/98352
1779 * method.c (implicitly_declare_fn): Pass &raises to
1780 synthesized_method_walk.
1781
17822021-03-26 Nathan Sidwell <nathan@acm.org>
1783
1784 PR c++/99283
1785 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
1786 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
1787 * decl.c (duplicate_decls): Remove template_decl module flag
1788 propagation.
1789 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
1790 (dumper::impl::nested_name): Adjust for template-decl module flag
1791 change.
1792 (trees_in::assert_definition): Likewise.
1793 (trees_in::install_entity): Likewise.
1794 (trees_out::decl_value): Likewise. Remove alias template
1795 separation of template and type_decl.
1796 (trees_in::decl_value): Likewise.
1797 (trees_out::key_mergeable): Likewise,
1798 (trees_in::key_mergeable): Likewise.
1799 (trees_out::decl_node): Adjust for template-decl module flag
1800 change.
1801 (depset::hash::make_dependency): Likewise.
1802 (get_originating_module, module_may_redeclare): Likewise.
1803 (set_instantiating_module, set_defining_module): Likewise.
1804 * name-lookup.c (name_lookup::search_adl): Likewise.
1805 (do_pushdecl): Likewise.
1806 * pt.c (build_template_decl): Likewise.
1807 (lookup_template_class_1): Remove special alias_template handling
1808 of DECL_TI_TEMPLATE.
1809 (tsubst_template_decl): Likewise.
1810
18112021-03-26 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c++/99705
1814 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
1815 in DECL_EXPR or in BIND_EXPR_VARS.
1816
4493b1c1
GA
18172021-03-25 Jakub Jelinek <jakub@redhat.com>
1818
1819 PR c++/99672
1820 * parser.c (cp_parser_postfix_expression): For calls, create
1821 combined_loc and temporarily set input_location to it before
1822 calling finish_call_expr.
1823
18242021-03-25 Marek Polacek <polacek@redhat.com>
1825
1826 PR c++/94751
1827 * call.c (build_over_call): Maybe call mark_used in case
1828 deduce_inheriting_ctor fails and return error_mark_node.
1829 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
1830 * method.c (deduce_inheriting_ctor): Return bool if the deduction
1831 fails.
1832 (implicitly_declare_fn): If raises is error_mark_node, call
1833 synthesized_method_walk with diag being true.
1834
18352021-03-25 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c++/99745
1838 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
1839 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
1840
18412021-03-25 Marek Polacek <polacek@redhat.com>
1842
1843 PR c++/99331
1844 * call.c (build_converted_constant_expr_internal): Don't emit
1845 -Wconversion warnings.
1846
18472021-03-25 Jakub Jelinek <jakub@redhat.com>
1848
1849 PR c++/99565
1850 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
1851 to operand_equal_p.
1852 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
1853 or COMPOUND_EXPR.
1854
bf1f3168
GA
18552021-03-23 Nathan Sidwell <nathan@acm.org>
1856
1857 PR c++/99283
1858 * name-lookup.c (check_module_override): Set global or partition
1859 DUP on the binding vector.
1860
18612021-03-23 Marek Polacek <polacek@redhat.com>
1862
1863 PR c++/99318
1864 * decl2.c (cp_warn_deprecated_use_scopes): Only call
1865 cp_warn_deprecated_use when decl is a namespace, class, or enum.
1866
18672021-03-23 Nathan Sidwell <nathan@acm.org>
1868
1869 PR c++/99239
1870 * decl.c (duplicate_decls): Remove assert about maybe-imported
1871 artificial decls.
1872
18732021-03-23 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR c++/99650
1876 * decl.c (cp_finish_decomp): Diagnose void initializers when
1877 using tuple_element and get.
1878
8b744f46
GA
18792021-03-22 Nathan Sidwell <nathan@acm.org>
1880
1881 PR c++/99480
1882 * module.cc (depset::hash::make_dependency): Propagate flags for
1883 partial specialization.
1884 (module_may_redeclare): Handle partial specialization.
1885
18862021-03-22 Nathan Sidwell <nathan@acm.org>
1887
1888 PR c++/99425
1889 * cp-tree.h (map_context_from, map_context_to): Delete.
1890 (add_mergeable_specialization): Add is_alias parm.
1891 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
1892 * module.cc (map_context_from, map_context_to): Delete.
1893 (trees_in::decl_value): Add specializations later, adjust call.
1894 Drop useless alias lookup. Set duplicate fn parm context.
1895 (check_mergeable_decl): Drop context mapping.
1896 (trees_in::is_matching_decl): Likewise.
1897 (trees_in::read_function_def): Drop parameter context adjustment
1898 here.
1899
19002021-03-22 Martin Liska <mliska@suse.cz>
1901
1902 PR c++/99687
1903 * module.cc (fini_modules): Call vec_free instead of delete.
1904
6af7b307
GA
19052021-03-20 Jakub Jelinek <jakub@redhat.com>
1906
1907 PR debug/99230
1908 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
1909 special code, instead call c_genericize_control_stmt.
1910
5f256a70
GA
19112021-03-19 Jakub Jelinek <jakub@redhat.com>
1912
1913 PR c++/99456
1914 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
1915 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
1916 don't diagnose it, set *non_constant_p nor return t.
1917
287e3e84
GA
19182021-03-19 Marek Polacek <polacek@redhat.com>
1919
1920 PR c++/99500
1921 * parser.c (cp_parser_requirement_parameter_list): Handle
1922 error_mark_node.
1923
19242021-03-18 Marek Polacek <polacek@redhat.com>
1925
1926 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
1927
19282021-03-18 Marek Polacek <polacek@redhat.com>
1929
1930 * pt.c (tsubst_copy_and_build): Add assert.
1931
19322021-03-18 Iain Sandoe <iain@sandoe.co.uk>
1933
1934 PR objc++/49070
1935 * parser.c (cp_debug_parser): Add Objective-C++ message
1936 state flag.
1937 (cp_parser_nested_name_specifier_opt): Allow colon to
1938 terminate an assignment-expression when parsing Objective-
1939 C++ messages.
1940 (cp_parser_objc_message_expression): Set and clear message
1941 parsing state on entry and exit.
1942 * parser.h (struct cp_parser): Add a context flag for
1943 Objective-C++ message state.
1944
19452021-03-18 Martin Liska <mliska@suse.cz>
1946
1947 PR c++/99617
1948 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
1949 to NULL.
1950
19ac7c94
GA
19512021-03-17 Marek Polacek <polacek@redhat.com>
1952
1953 PR c++/97973
1954 * call.c (conv_unsafe_in_template_p): New.
1955 (convert_like): Use it.
1956
19572021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
1958 Jason Merrill <jason@redhat.com>
1959
1960 * semantics.c (get_class_access_diagnostic_decl): New
1961 function that examines special cases when a parent
1962 class causes a private access failure.
1963 (enforce_access): Slightly modified to call function
1964 above.
1965
bc212776
GA
19662021-03-16 Jason Merrill <jason@redhat.com>
1967
1968 * tree.c (cp_tree_equal): Use real_identical.
1969
19702021-03-16 Jakub Jelinek <jakub@redhat.com>
1971
1972 PR c++/99613
1973 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
1974 before calling __cxa_guard_release rather than after it. Formatting
1975 fixes.
1976
19772021-03-16 Martin Liska <mliska@suse.cz>
1978 Jason Merrill <jason@redhat.com>
1979
1980 PR c++/99108
1981 * call.c (get_function_version_dispatcher): Handle
1982 DECL_LOCAL_DECL_P.
1983 * decl.c (maybe_version_functions): Likewise.
1984 (maybe_mark_function_versioned): New.
1985 * name-lookup.c (push_local_extern_decl_alias): No longer static.
1986 * name-lookup.h (push_local_extern_decl_alias): Adjust.
1987
19882021-03-16 Nathan Sidwell <nathan@acm.org>
1989
1990 PR c++/99496
1991 * module.cc (trees_out::decl_value): Adjust typedef streaming,
1992 indicate whether it is a dependent alias.
1993 (trees_in::decl_value): Likewise. Set as dependent alias, if it
1994 is one.
1995
3c5b6d24
GA
19962021-03-15 Iain Sandoe <iain@sandoe.co.uk>
1997
1998 PR c++/99047
1999 * coroutines.cc (expand_one_await_expression): If the
2000 await_ready() expression is not a boolean then convert it
2001 as required.
2002
20032021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2004
2005 PR c++/98704
2006 * coroutines.cc (build_actor_fn): Make destroy index 1
2007 correspond to the abnormal unhandled_exception() exit.
2008 Substitute the proxy for the resume index.
2009 (coro_rewrite_function_body): Arrange to reset the resume
2010 index and make done = true for a rethrown exception from
2011 unhandled_exception ().
2012 (morph_fn_to_coro): Adjust calls to build_actor_fn and
2013 coro_rewrite_function_body.
2014
20152021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2016
2017 PR c++/98480
2018 * coroutines.cc (replace_continue): Rewrite continue into
2019 'goto label'.
2020 (await_statement_walker): Handle await expressions in the
2021 initializer, condition and iteration expressions of for
2022 loops.
2023
20242021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2025
2026 PR c++/96749
2027 * coroutines.cc (flatten_await_stmt): Allow for the case
2028 where a target expression variable only has uses in the
2029 second part of a compound expression.
2030 (maybe_promote_temps): Avoid emiting empty statements.
2031
20322021-03-15 Tobias Burnus <tobias@codesourcery.com>
2033
2034 PR c++/99509
2035 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
2036 ensure that the varpool node is marked as offloadable.
2037
6da2762a
GA
20382021-03-12 Nathan Sidwell <nathan@acm.org>
2039
2040 PR c++/99238
2041 * module.cc (depset::hash::add_binding_entity): Assert not
2042 visited.
2043 (depset::add::add_specializations): Likewise.
2044 * name-lookup.c (name_lookup::dedup): New.
2045 (name_lookup::~name_lookup): Assert not deduping.
2046 (name_lookup::restore_state): Likewise.
2047 (name_lookup::add_overload): Replace outlined code with dedup
2048 call.
2049 (name_lookup::add_value): Likewise.
2050 (name_lookup::search_namespace_only): Likewise.
2051 (name_lookup::adl_namespace_fns): Likewise.
2052 (name_lookup::adl_class_fns): Likewise.
2053 (name_lookup::search_adl): Likewise. Add clearing dedup call.
2054 (name_lookup::search_qualified): Likewise.
2055 (name_lookup::search_unqualified): Likewise.
2056
20572021-03-12 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR c++/99507
2060 * call.c (build_over_call): For immediate evaluation of functions
2061 that return references, undo convert_from_reference effects before
2062 calling cxx_constant_value and call convert_from_reference
2063 afterwards.
2064
48ff383f
GA
20652021-03-11 Nathan Sidwell <nathan@acm.org>
2066
2067 PR c++/99248
2068 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
2069 when there's a binding vector.
2070 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
2071
20722021-03-11 Nathan Sidwell <nathan@acm.org>
2073
2074 PR c++/99528
2075 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
2076 MK_decl_tmpl_spec.
2077 (trees_in::decl_value): Adjust add_mergeable_specialization call.
2078 (trees_out::get_merge_kind): Adjust detecting a partial template
2079 instantiation.
2080 (trees_out::key_mergeable): Adjust handling same.
2081 (trees_in::key_mergeabvle): Likewise.
2082
e9800852
GA
20832021-03-10 Nathan Sidwell <nathan@acm.org>
2084
2085 PR c++/99423
2086 * module.cc (post_load_processing): Assert not gcable.
2087 (laxy_load_pendings): Extend no-gc region around
2088 post_load_processing.
2089
20902021-03-10 Nathan Sidwell <nathan@acm.org>
2091
2092 PR c++/99508
2093 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
2094 assembler name to the ns alias.
2095
8dc225d3
GA
20962021-03-09 Jakub Jelinek <jakub@redhat.com>
2097
2098 PR c++/99459
2099 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
2100 build_special_member_call return value to find the CALL_EXPR.
2101 Simplify.
2102
21032021-03-09 Nathan Sidwell <nathan@acm.org>
2104
2105 PR c++/99472
2106 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
2107 that C++20 does not yet imply modules.
2108
6405b40f
GA
21092021-03-08 Nathan Sidwell <nathan@acm.org>
2110
2111 PR c++/99436
2112 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
2113
21142021-03-08 Nathan Sidwell <nathan@acm.org>
2115
2116 * lex.c (module_token_filter::resume): Ignore module-decls inside
2117 header-unit.
2118 * parser.c (cp_parser_module_declaration): Reject in header-unit.
2119
21202021-03-08 Nathan Sidwell <nathan@acm.org>
2121
2122 PR c++/99285
2123 * cp-tree.h (match_mergeable_specialization)
2124 (add_mergeable_specialization): Adjust parms.
2125 * module.cc (trees_in::decl_value): Adjust
2126 add_mergeable_specialization calls.
2127 (trees_out::key_mergeable): Adjust match_mergeable_specialization
2128 calls.
2129 (specialization_add): Likewise.
2130 * pt.c (match_mergeable_specialization): Do not insert.
2131 (add_mergeable_specialization): Add to hash table here.
2132
0ad6a2e2
GA
21332021-03-06 Patrick Palka <ppalka@redhat.com>
2134 Jakub Jelinek <jakub@redhat.com>
2135
2136 PR c++/99287
2137 * constexpr.c (cxx_eval_increment_expression): Pass lval when
2138 evaluating the MODIFY_EXPR, and update 'mod' with the result of
2139 this evaluation. Check *non_constant_p afterwards. For prefix
2140 ops, just return 'mod'.
2141
21422021-03-06 Patrick Palka <ppalka@redhat.com>
2143 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR c++/96330
2146 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
2147 variable 'fn' to 'tmpl'. Handle a variable template-id by
2148 calling lookup_template_variable.
2149
21502021-03-06 Patrick Palka <ppalka@redhat.com>
2151
2152 PR c++/99365
2153 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
2154 outer_targs to do_auto_deduction.
2155 (placeholder_type_constraint_dependent_p): Define.
2156 (do_auto_deduction): When processing_template_decl != 0
2157 and context is adc_unify and we have constraints, pretend the
2158 constraints are satisfied instead of punting. Otherwise don't
2159 punt unless placeholder_type_constraint_dependent_p holds.
2160 Add some clarifying sanity checks. Add a hack to add missing
2161 outermost template levels to outer_args before checking
2162 satisfaction. Don't substitute outer_targs into type if it's
2163 already been done.
2164
ceae9533
GA
21652021-03-05 Marek Polacek <polacek@redhat.com>
2166
2167 PR c++/99374
2168 * call.c (standard_conversion): When converting pointers to
2169 member, don't return NULL when the bases are equivalent but
2170 incomplete.
2171
21722021-03-05 Marek Polacek <polacek@redhat.com>
2173
2174 PR c++/99120
2175 * name-lookup.c (check_local_shadow): Check if the type of decl
2176 is non-null before checking TYPE_PTR*.
2177
21782021-03-05 Nathan Sidwell <nathan@acm.org>
2179
2180 PR c++/99245
2181 * module.cc (module_state::write_cluster): Relax binding assert.
2182
21832021-03-05 Nathan Sidwell <nathan@acm.org>
2184
2185 PR c++/99377
2186 * pt.c (instantiate_decl): Call set_instantiating_module.
2187
21882021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2189
2190 PR c++/98118
2191 * coroutines.cc (build_co_await): Use type_build_ctor_call()
2192 to determine cases when a CTOR needs to be built.
2193 (flatten_await_stmt): Likewise.
2194 (morph_fn_to_coro): Likewise.
2195
21962021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2197
2198 PR c++/95616
2199 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
2200 (coro_diagnose_throwing_final_aw_expr): New helper.
2201 (build_co_await): Diagnose throwing final await expression
2202 components.
2203 (build_init_or_final_await): Diagnose a throwing promise
2204 final_suspend() call.
2205
22062021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2207
2208 PR c++/95615
2209 * coroutines.cc (struct param_info): Track parameter copies that need
2210 a DTOR.
2211 (coro_get_frame_dtor): New helper function factored from build_actor().
2212 (build_actor_fn): Use coro_get_frame_dtor().
2213 (morph_fn_to_coro): Track parameters that need DTORs on exception,
2214 likewise the frame promise and the return object. On exception, run the
2215 DTORs for these, destroy the frame and then rethrow the exception.
2216
22172021-03-05 Nathan Sidwell <nathan@acm.org>
2218
2219 PR c++/99389
2220 * pt.c (instantiate_class_template_1): Set instantiating module
2221 here.
2222
22232021-03-05 Tobias Burnus <tobias@codesourcery.com>
2224
2225 PR c/99137
2226 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
2227
67f10d28
GA
22282021-03-04 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR c++/88146
2231 PR c++/99362
2232 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
2233 comment.
2234
22352021-03-04 Nathan Sidwell <nathan@acm.org>
2236
2237 PR c++/99170
2238 * module.cc (class uintset): Delete.
2239 (typedef attached_map_t): A hash map.
2240 (attached_table): Use attached_map_t. Adjust uses ...
2241 (trees_out::decl_value, trees_in::decl_value): ... here ...
2242 (trees_out::key_mergeable): ... here ...
2243 (trees_in::key_mergeable): ... here ...
2244 (maybe_attach_decl): ... here ...
2245 (direct_import): ... and here.
2246
22472021-03-04 Nathan Sidwell <nathan@acm.org>
2248
2249 PR c++/99170
2250 * cp-tree.h
2251 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
2252 rename.
2253 * module.cc (class pending_key): New.
2254 (default_hash_traits<pending_key>): New specialization.
2255 (pending_map_t): New typedef.
2256 (pending_table): Replace old table.
2257 (trees_out::lang_decl_bools): Adjust.
2258 (trees_in::lang_decl_bools): Adjust.
2259 (trees_in::install_entity): Drop pending member and specialization
2260 handling.
2261 (find_pending_key): New.
2262 (depset::hash::fiund_dependencies): Use it.
2263 (pendset_lazy_load): Delete.
2264 (module_state::write_cluster): Don't count pendings here. Bye
2265 Duff's device-like thing.
2266 (module_state::write_pendings): Reimplement.
2267 (module_state::read_pendings): Reimplement.
2268 (lazy_specializations_p): Delete.
2269 (module_state::write): Adjust write_pendings call.
2270 (lazy_load_pendings): New.
2271 (lazy_load_specializations): Delete.
2272 (lazy_load_members): Delete.
2273 (init_modules): Adjust.
2274 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
2275 not lazy_load_members.
2276 (note_pending_specializations): Delete.
2277 (load_pending_specializations): Delete.
2278 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
2279 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
2280 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
2281 (note_pending_specializations): Delete.
2282 (load_pending_specializations): Delete.
2283 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
2284 lazy_load_specializations.
2285 (instantiate_template_class_1): Likewise.
2286 (instantiate_decl): Call lazy_load_pendings.
2287 * typeck.c (complete_type): Likewise.
2288
f3641ac7
GA
22892021-03-03 Nathan Sidwell <nathan@acm.org>
2290
2291 PR c++/99170
2292 * module.cc (post_load_decls): New.
2293 (lazy_snum, recursive_lazy): Move earlier.
2294 (module_state::read_cluster): Push cloning onto post_load_decls.
2295 (post_load_processing): New. Do the cloning here.
2296 (module_state::read_inits): Call post_load_processing.
2297 (module_state::read_language): Likewise.
2298 (lazy_load_binding, lazy_load_specializations): Likewise
2299 (lazy_load_members): Likewise
2300
23012021-03-03 Nathan Sidwell <nathan@acm.org>
2302
2303 PR c++/99170
2304 * module.cc (trees_out::decl_value): Stream specialization keys
2305 after decl.
2306 (trees_in::decl_value): Stream them back and insert after
2307 completing the decl.
2308 (trees_out::key_mergeable): Drop some streaming here ...
2309 (trees_in::key_mergeable): ... and here. Don't insert into
2310 specialization tables.
2311
23122021-03-03 Patrick Palka <ppalka@redhat.com>
2313
2314 * constraint.cc (struct sat_info): Document the different
2315 meanings of noisy() and diagnose_unsatisfaction_p() during
2316 satisfaction and requires-expression evaluation.
2317 (tsubst_valid_expression_requirement): Take a sat_info instead
2318 of a subst_info. Perform the substitution quietly first. Fold
2319 in error-replaying code from diagnose_valid_expression.
2320 (tsubst_simple_requirement): Take a sat_info instead of a
2321 subst_info.
2322 (tsubst_type_requirement_1): New. Fold in error-replaying code
2323 from diagnose_valid_type.
2324 (tsubst_type_requirement): Use the above. Take a sat_info
2325 instead of a subst_info.
2326 (tsubst_compound_requirement): Likewise. Fold in
2327 error-replaying code from diagnose_compound_requirement.
2328 (tsubst_nested_requirement): Take a sat_info instead of a
2329 subst_info. Fold in error-replaying code from
2330 diagnose_nested_requirement.
2331 (tsubst_requirement): Take a sat_info instead of a subst_info.
2332 (tsubst_requires_expr): Split into two versions, one that takes
2333 a sat_info argument and another that takes a complain and
2334 in_decl argument. Remove outdated documentation. Document the
2335 effects of the sat_info argument. Don't short-circuit
2336 processing of requirements when diagnosing unsatisfaction,
2337 mirroring diagnose_requires_expr.
2338 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
2339 assert, and se the three-parameter version of tsubst_requires_expr.
2340 (diagnose_trait_expr): Make static. Take a template argument
2341 vector instead of a parameter mapping.
2342 (diagnose_valid_expression): Remove.
2343 (diagnose_valid_type): Remove.
2344 (diagnose_simple_requirement): Remove.
2345 (diagnose_compound_requirement): Remove.
2346 (diagnose_type_requirement): Remove.
2347 (diagnose_nested_requirement): Remove.
2348 (diagnose_requirement): Remove.
2349 (diagnose_requires_expr): Remove.
2350 (diagnose_atomic_constraint): Take a sat_info instead of a
2351 subst_info. Adjust call to diagnose_trait_expr. Call
2352 tsubst_requires_expr instead of diagnose_requires_expr.
2353 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
2354 and just always call constraint_satisfaction_value.
2355
23562021-03-03 Patrick Palka <ppalka@redhat.com>
2357
2358 * constexpr.c (cxx_eval_call_expression): Adjust call to
2359 evaluate_concept_check.
2360 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
2361 evaluate_requires_expression instead of
2362 satisfy_constraint_expression.
2363 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2364 * constraint.cc (struct sat_info): Adjust comment about which
2365 satisfaction entrypoints use noisy-unsat.
2366 (normalize_template_requirements): Remove (and adjust callers
2367 appropriately).
2368 (normalize_nontemplate_requirements): Likewise.
2369 (tsubst_nested_requirement): Use constraint_satisfaction_value
2370 instead of satisfy_constraint_expression, which'll do the
2371 noisy replaying of ill-formed quiet satisfaction for us.
2372 (decl_satisfied_cache): Adjust comment.
2373 (satisfy_constraint): Rename to ...
2374 (satisfy_normalized_constraints): ... this.
2375 (satisfy_associated_constraints): Remove (and make its
2376 callers check for dependent arguments).
2377 (satisfy_constraint_expression): Rename to ...
2378 (satisfy_nondeclaration_constraints): ... this. Assert that
2379 'args' is empty when 't' is a concept-id. Removing handling
2380 bare constraint-expressions, and handle REQUIRES_EXPRs
2381 specially. Adjust comment accordingly.
2382 (satisfy_declaration_constraints): Assert in the two-parameter
2383 version that 't' is not a TEMPLATE_DECL. Adjust following
2384 removal of normalize_(non)?template_requirements and
2385 satisfy_asociated_constraints.
2386 (constraint_satisfaction_value): Combine the two- and
2387 three-parameter versions in the natural way.
2388 (constraints_satisfied_p): Combine the one- and two-parameter
2389 versions in the natural way. Improve documentation.
2390 (evaluate_requires_expr): Define.
2391 (evaluate_concept_check): Remove 'complain' parameter. Use
2392 constraint_satisfaction_value instead of
2393 satisfy_constraint_expression.
2394 (diagnose_nested_requirement): Adjust following renaming of
2395 satisfy_constraint_expression.
2396 (diagnose_constraints): Handle REQUIRES_EXPR by going through
2397 diagnose_requires_expr directly instead of treating it as a
2398 constraint-expression. Improve documentation.
2399 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
2400 to evaluate_concept_check.
2401 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
2402 constraints_satisfied_p.
2403 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2404 * cp-tree.h (evaluate_requires_expr): Declare.
2405 (evaluate_concept_check): Remove tsubst_flag_t parameter.
2406 (satisfy_constraint_expression): Remove declaration.
2407 (constraints_satisfied_p): Remove one-parameter declaration.
2408 Add a default argument to the two-parameter declaration.
2409 * cvt.c (convert_to_void): Adjust call to
2410 evaluate_concept_check.
2411
24122021-03-03 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c++/82959
2415 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
2416 and COMPOUND_EXPR.
2417
24182021-03-03 Marek Polacek <polacek@redhat.com>
2419
2420 PR c++/97034
2421 PR c++/99009
2422 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
2423 (maybe_aggr_guide): Use the original template type where needed. In
2424 a class member template, partially instantiate the result of
2425 collect_ctor_idx_types.
2426 (do_class_deduction): Defer the deduction until the enclosing
2427 scope is non-dependent.
2428
24292021-03-03 Jason Merrill <jason@redhat.com>
2430
2431 PR c++/95675
2432 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
2433 if it didn't get one before.
2434
24352021-03-03 Nathan Sidwell <nathan@acm.org>
2436
2437 PR c++/99344
2438 * module.cc (trees_out::decl_node): Small refactor.
2439 (depset::hash::add_binding_entity): Return true on meeting an
2440 import. Set namespace's import here.
2441 (module_state:write_namespaces): Inform of purview too.
2442 (module_state:read_namespaces): Adjust.
2443 * name-lookup.c (implicitly_export_namespace): Delete.
2444 (do_pushdecl): Don't call it.
2445 (push_namespace): Likewise, set purview.
2446 (add_imported_namespace): Reorder parms.
2447 * name-lookup.h (add_imported_namespace): Alter param ordering.
2448
d97a92dc
GA
24492021-03-02 Martin Sebor <msebor@redhat.com>
2450
2451 PR c++/99251
2452 * class.c (build_base_path): Call build_if_nonnull.
2453 * cp-tree.h (build_if_nonnull): Declare.
2454 * rtti.c (ifnonnull): Rename...
2455 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
2456 (build_dynamic_cast_1): Adjust to name change.
2457
24582021-03-02 Patrick Palka <ppalka@redhat.com>
2459
2460 PR c++/96443
2461 PR c++/96960
2462 * constraint.cc (type_deducible_p): Don't substitute into the
2463 constraints, and instead just pass 'args' to do_auto_deduction
2464 as the outer template arguments.
2465 (tsubst_parameter_mapping): Remove confused code for handling
2466 placeholder type arguments.
2467 (normalize_placeholder_type_constraint): Define.
2468 (satisfy_constraint_expression): Use it to handle placeholder
2469 'auto' types.
2470 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
2471 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
2472 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
2473 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2474 (make_constrained_placeholder_type): Set
2475 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2476 (do_auto_deduction): Clarify comments about the outer_targs
2477 parameter. Rework satisfaction of a placeholder type constraint
2478 to pass in the complete set of template arguments directly to
2479 constraints_satisfied_p.
2480 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
2481 instead. Also rebuild the the constraint info on the new auto.
2482
24832021-03-02 Patrick Palka <ppalka@redhat.com>
2484
2485 * constraint.cc (build_parameter_mapping): Rely on the caller to
2486 determine the in-scope template parameters.
2487 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
2488 to the two-parameter constructor. In the two-parameter
2489 constructor, fold in the definition of make_context, set
2490 initial_parms appropriately, and don't set the now-removed
2491 orig_decl member.
2492 (norm_info::make_context): Remove, now that its only use is
2493 inlined into the caller.
2494 (norm_info::update_context): Adjust call to
2495 build_parameter_mapping to pass in the relevant set of in-scope
2496 template parameters.
2497 (norm_info::ctx_parms): Define this member function.
2498 (norm_info::context): Initialize to NULL_TREE.
2499 (norm_info::orig_decl): Remove this data member.
2500 (norm_info::initial_parms): Define this data member.
2501 (normalize_atom): Adjust call to build_parameter_mapping to pass
2502 in the relevant set of in-scope template parameters. Use
2503 info.initial_parms instead of info.orig_decl.
2504 (normalize_constraint_expression): Take a norm_info object
2505 instead of a bool. Cache the result of normalization.
2506 (tsubst_nested_requirement): Call satisfy_constraint_expression
2507 instead of satisfy_constraint, so that we normalize on demand.
2508 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
2509 Adjust call to normalize_constraint_expression.
2510 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
2511 to current_template_parms.
2512 (diagnose_nested_requirements): Go through
2513 satisfy_constraint_expression, as with tsubst_nested_requirement.
2514
25152021-03-02 Patrick Palka <ppalka@redhat.com>
2516
2517 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
2518 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
2519 started with a TYPE_ARGUMENT_PACK.
2520 (finish_requires_expr): Don't set DECL_CONTEXT and
2521 CONSTRAINT_VAR_P on each of the introduced parameters here.
2522 * parser.c (cp_parser_requirement_parameter_list): Instead set
2523 these fields earlier, here.
2524 * pt.c (do_auto_deduction): Canonicalize the result of
2525 do_auto_deduction. Pass 'complain' to finish_decltype_type.
2526
25272021-03-02 Patrick Palka <ppalka@redhat.com>
2528
2529 * constraint.cc (tsubst_simple_requirement): Just return
2530 boolean_true_node on success.
2531 (tsubst_type_requirement): Likewise.
2532 (tsubst_compound_requirement): Likewise.
2533 (tsubst_nested_requirement): Likewise.
2534 (tsubst_requirement_body): Remove.
2535 (check_constaint_variables): Rename to ...
2536 (check_constraint_variables): ... this.
2537 (tsubst_constraint_variables): Adjust.
2538 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
2539
88938886
GA
25402021-03-01 Nathan Sidwell <nathan@acm.org>
2541
2542 PR c++/99294
2543 * class.c (fixup_type_variants): Propagate mode, precision,
2544 alignment & emptiness.
2545 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
2546 (trees_in::tree_node): Rematerialize alignment here.
2547
ec9dc4fa
GA
25482021-02-27 Jason Merrill <jason@redhat.com>
2549
2550 PR c++/90333
2551 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
2552 between () and ->.
2553
06a9f20f
GA
25542021-02-26 Jakub Jelinek <jakub@redhat.com>
2555
2556 * parser.c (cp_parser_lambda_declarator_opt): Implement
2557 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
2558 for -std={c,gnu}++2b or with pedwarn in earlier versions.
2559
25602021-02-26 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c++/95451
2563 * lambda.c (is_lambda_ignored_entity): Before checking for
2564 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
2565
25662021-02-26 Jason Merrill <jason@redhat.com>
2567
2568 PR c++/98810
2569 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
2570 to a class non-type template argument that needs it.
2571
25722021-02-26 Patrick Palka <ppalka@redhat.com>
2573
2574 PR c++/98990
2575 * pt.c (splice_late_return_type): Rebuild the entire return type
2576 if we have to adjust the level of an auto within.
2577 (type_uses_auto): Adjust call to find_type_usage.
2578 * type-utils.h (find_type_usage): Revert r10-6571 change that
2579 made this function return a pointer to the auto node.
2580
daa68844
GA
25812021-02-25 Patrick Palka <ppalka@redhat.com>
2582
2583 PR c++/99213
2584 PR c++/94521
2585 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
2586 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
2587
25882021-02-25 Patrick Palka <ppalka@redhat.com>
2589
2590 PR c++/99103
2591 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
2592 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
2593
25942021-02-25 Marek Polacek <polacek@redhat.com>
2595
2596 DR 1312
2597 PR c++/99176
2598 * constexpr.c (is_std_construct_at): New overload.
2599 (is_std_allocator_allocate): New overload.
2600 (cxx_eval_call_expression): Use the new overloads.
2601 (cxx_eval_constant_expression): Reject casting
2602 from void * as per DR 1312. Don't check can_convert.
2603
26042021-02-25 Iain Sandoe <iain@sandoe.co.uk>
2605
2606 PR c++/97587
2607 * coroutines.cc (struct param_info): Track rvalue refs.
2608 (morph_fn_to_coro): Track rvalue refs, and call the promise
2609 CTOR with the frame copy of passed parms.
2610
26112021-02-25 Iain Sandoe <iain@sandoe.co.uk>
2612
2613 PR c++/95822
2614 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
2615 set throwing_cleanup marker.
2616
26172021-02-25 Nathan Sidwell <nathan@acm.org>
2618
2619 PR c++/99166
2620 * module.cc (module_state::inform_cmi_p): Renamed field.
2621 (module_state::do_import): Adjust.
2622 (init_modules, finish_module_processing): Likewise.
2623 (handle_module_option): Likewise.
2624
26252021-02-25 Nathan Sidwell <nathan@acm.org>
2626
2627 PR c++/98318
2628 * mapper-client.cc (module_client::open_module_client): Fix typo
2629 of fd init.
2630
4028d01a
GA
26312021-02-24 Nathan Sidwell <nathan@acm.org>
2632
2633 PR c++/98718
2634 * module.cc (ool): New indirection vector.
2635 (loc_spans::maybe_propagate): Location is not optional.
2636 (loc_spans::open): Likewise. Assert monotonically advancing.
2637 (module_for_ordinary_loc): Use ool indirection vector.
2638 (module_state::write_prepare_maps): Do not count empty macro
2639 expansions. Elide empty spans.
2640 (module_state::write_macro_maps): Skip empty expansions.
2641 (ool_cmp): New qsort comparator.
2642 (module_state::write): Create and destroy ool vector.
2643 (name_pending_imports): Fix dump push/pop.
2644 (preprocess_module): Likewise. Add more dumping.
2645 (preprocessed_module): Likewise.
2646
26472021-02-24 Iain Sandoe <iain@sandoe.co.uk>
2648
2649 PR c++/96251
2650 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
2651 error reporting when instantiating for a constexpr.
2652
71e24b06
GA
26532021-02-23 Nathan Sidwell <nathan@acm.org>
2654
2655 PR c++/99208
2656 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
2657 identity.
2658
26592021-02-23 Patrick Palka <ppalka@redhat.com>
2660
2661 PR c++/95468
2662 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
2663 over from tsubst_copy.
2664
26652021-02-23 Patrick Palka <ppalka@redhat.com>
2666
2667 * pt.c (instantiation_dependent_expression_p): Check
2668 processing_template_decl before calling
2669 potential_constant_expression.
2670
2f5765cf
GA
26712021-02-22 Nathan Sidwell <nathan@acm.org>
2672
2673 PR c++/99174
2674 * module.cc (struct module_state): Add visited_p flag.
2675 (name_pending_imports): Use it to avoid duplicate requests.
2676 (preprocess_module): Don't read preprocessor state if we failed to
2677 load a module's config.
2678
26792021-02-22 Nathan Sidwell <nathan@acm.org>
2680
2681 PR c++/99153
2682 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
2683 to common-path.
2684 * module.cc (set_defining_module): Add assert.
2685
50352c6c
GA
26862021-02-19 Nathan Sidwell <nathan@acm.org>
2687
2688 PR c++/98741
2689 * module.cc (pending_imports): New.
2690 (declare_module): Adjust test condition.
2691 (name_pending_imports): New.
2692 (preprocess_module): Reimplement using pending_imports.
2693 (preprocessed_module): Move name-getting to name_pending_imports.
2694 * name-lookup.c (append_imported_binding_slot): Assert module
2695 ordering is increasing.
2696
26972021-02-19 Nathan Sidwell <nathan@acm.org>
2698
2699 * module.cc (note_cmis): New.
2700 (struct module_state): Add inform_read_p bit.
2701 (module_state::do_import): Inform of CMI location, if enabled.
2702 (init_modules): Canonicalize note_cmis entries.
2703 (handle_module_option): Handle -flang-info-module-read=FOO.
2704
27052021-02-19 Jason Merrill <jason@redhat.com>
2706
2707 PR c++/96926
2708 * call.c (perfect_conversion_p): Limit rvalueness
2709 test to reference bindings.
2710
27112021-02-19 Jason Merrill <jason@redhat.com>
2712
2713 PR c++/96926
2714 * call.c (perfect_conversion_p): New.
2715 (perfect_candidate_p): New.
2716 (add_candidates): Ignore templates after a perfect non-template.
2717
bf81237e
GA
27182021-02-18 Nathan Sidwell <nathan@acm.org>
2719
2720 PR c++/99023
2721 * module.cc (canonicalize_header_name): Use
2722 cpp_probe_header_unit.
2723 (maybe_translate_include): Fix note_includes comparison.
2724 (init_modules): Fix note_includes string termination.
2725
27262021-02-18 Jakub Jelinek <jakub@redhat.com>
2727
2728 PR c++/99132
2729 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
2730 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
2731 for immediate function calls.
2732
acc0ee5c
GA
27332021-02-17 Nathan Sidwell <nathan@acm.org>
2734
2735 PR c++/99023
2736 * module.cc (struct macro_export): Add GTY markers.
2737 (macro_exports): Likewise, us a va_gc Vector.
2738
27392021-02-17 Jakub Jelinek <jakub@redhat.com>
2740
2741 PR sanitizer/99106
2742 * init.c (build_zero_init_1): For flexible array members just return
2743 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
2744 ARRAY_TYPE.
2745
27462021-02-17 Nathan Sidwell <nathan@acm.org>
2747
2748 PR c++/99116
2749 * name-lookup.c (do_pushdecl): Don't peek under template_parm
2750 bindings here ...
2751 (set_identifier_type_value_with_scope): ... or here.
2752 (do_pushtag): Only set_identifier_type_value_with_scope at
2753 non-class template parm scope, and use parent scope.
2754
27552021-02-17 Nathan Sidwell <nathan@acm.org>
2756
2757 PR c++/99071
2758 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
2759 pointer.
2760
27612021-02-17 Patrick Palka <ppalka@redhat.com>
2762
2763 PR debug/96997
2764 PR c++/94034
2765 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
2766
fab095da
GA
27672021-02-12 Nathan Sidwell <nathan@acm.org>
2768
2769 * module.cc (module_state::write_cluster): Check bindings for
2770 imported using-decls.
2771
27722021-02-12 Nathan Sidwell <nathan@acm.org>
2773
2774 PR c++/99040
2775 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
2776 for new namespace-scope entities.
2777 (module_state::read_cluster): Don't call add_module_decl here.
2778 * name-lookup.h (add_module_decl): Rename to ...
2779 (add_module_namespace_decl): ... this.
2780 * name-lookup.c (newbinding_bookkeeping): Move into ...
2781 (do_pushdecl): ... here. Its only remaining caller.
2782 (add_module_decl): Rename to ...
2783 (add_module_namespace_decl): ... here. Add checking-assert for
2784 circularity. Don't call newbinding_bookkeeping, just extern_c
2785 checking and incomplete var checking.
2786
27872021-02-12 Nathan Sidwell <nathan@acm.org>
2788
2789 PR c++/99039
2790 PR c++/99040
2791 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
2792 (global_type_node): Delete.
2793 (IDENTIFIER_TYPE_VALUE): Delete.
2794 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
2795 (get_type_value): Delete.
2796 * name-lookup.h (identifier_type_value): Delete.
2797 * name-lookup.c (check_module_override): Don't
2798 SET_IDENTIFIER_TYPE_VALUE here.
2799 (do_pushdecl): Nor here.
2800 (identifier_type_value_1, identifier_type_value): Delete.
2801 (set_identifier_type_value_with_scope): Only
2802 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
2803 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
2804 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
2805 * call.c (check_dtor_name): Use lookup_name.
2806 * decl.c (cxx_init_decl_processing): Drop global_type_node.
2807 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
2808 here.
2809 * init.c (get_type_value): Delete.
2810 * pt.c (instantiate_class_template_1): Don't call pushtag or
2811 SET_IDENTIFIER_TYPE_VALUE here.
2812 (tsubst): Assert never an identifier.
2813 (dependent_type_p): Drop global_type_node assert.
2814 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
2815 to determine ctorness.
2816
28172021-02-12 Jakub Jelinek <jakub@redhat.com>
2818
2819 PR c++/97742
2820 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
2821 CPP_EOF.
2822
28232021-02-12 Jason Merrill <jason@redhat.com>
2824
2825 PR c++/97246
2826 PR c++/94546
2827 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
2828 (register_parameter_specializations): Not here.
2829
0c5cdb31
GA
28302021-02-11 Marek Polacek <polacek@redhat.com>
2831
2832 PR c++/95888
2833 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
2834 for the partial instantiation.
2835
28362021-02-11 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR c++/99033
2839 * init.c (build_zero_init_1): Handle zero initialiation of
2840 flexible array members like initialization of [0] arrays.
2841 Use integer_minus_onep instead of comparison to integer_minus_one_node
2842 and integer_zerop instead of comparison against size_zero_node.
2843 Formatting fixes.
2844
28452021-02-11 Marek Polacek <polacek@redhat.com>
2846
2847 PR c++/99063
2848 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
2849
28502021-02-11 Patrick Palka <ppalka@redhat.com>
2851
2852 PR c++/97582
2853 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
2854 lookup result by discarding it if the first element is a
2855 class-scope declaration, otherwise return it.
2856 (push_operator_bindings): Handle an ambiguous lookup result by
2857 doing push_local_binding on each element in the list.
2858
28592021-02-11 Marek Polacek <polacek@redhat.com>
2860
2861 * parser.c (cp_parser_selection_statement): Use vec_free.
2862
4b37c3ea
GA
28632021-02-10 Jakub Jelinek <jakub@redhat.com>
2864
2865 PR c++/98988
2866 PR c++/99031
2867 * constexpr.c: Include cgraph.h.
2868 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
2869 heap artificial vars.
2870 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
2871 heap artificial vars.
2872
28732021-02-10 Nathan Sidwell <nathan@acm.org>
2874
2875 PR c++/99030
2876 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
2877 answer if there's no local specialization.
2878
0a91b73e
GA
28792021-02-09 Nathan Sidwell <nathan@acm.org>
2880
2881 PR c++/98944
2882 * module.cc (module_state::is_rooted): Rename to ...
2883 (module_state::has_location): ... here. Adjust callers.
2884 (module_state::read_partitions): Adjust validity check.
2885 Don't overwrite a known location.
2886
28872021-02-09 Jason Merrill <jason@redhat.com>
2888
2889 PR c++/96905
2890 * pt.c (mark_decl_instantiated): Exit early if consteval.
2891
28922021-02-09 Jason Merrill <jason@redhat.com>
2893
2894 PR c++/98326
2895 PR c++/20408
2896 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
2897 parm.
2898
28992021-02-09 Jason Merrill <jason@redhat.com>
2900
2901 PR c++/98994
2902 PR c++/97566
2903 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
2904 RECORD_TYPE.
2905
2da7ce23
GA
29062021-02-08 Nathan Sidwell <nathan@acm.org>
2907
2908 * decl.c (start_cleanup_fn): Push function into
2909 namespace.
2910
29112021-02-08 Nathan Sidwell <nathan@acm.org>
2912
2913 PR c++/98531
2914 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
2915 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
2916 from rtti.c, add default namespace arg.
2917 (check_redeclaration_exception_specification): Allow a lazy
2918 builtin's eh spec to differ from an lready-declared user
2919 declaration.
2920 (declare_global_var): Use push/pop_abi_namespace.
2921 (get_atexit_node): Push the fndecl into a namespace.
2922 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
2923 decl.c.
2924
29252021-02-08 Marek Polacek <polacek@redhat.com>
2926
2927 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
2928
1ed59127
GA
29292021-02-05 Marek Polacek <polacek@redhat.com>
2930
2931 PR c++/98947
2932 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
2933 on arg2/arg3.
2934 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
2935 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
2936 a warning was emitted.
2937
29382021-02-05 Marek Polacek <polacek@redhat.com>
2939
2940 PR c++/96462
2941 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
2942
29432021-02-05 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR c++/97878
2946 * decl.c (check_array_initializer): For structured bindings, require
2947 the array type to be complete.
2948
a19dd5e6
GA
29492021-02-04 Jason Merrill <jason@redhat.com>
2950
2951 PR c++/98717
2952 * constraint.cc (build_concept_check_arguments): Remove assert.
2953 (build_concept_check): Allow empty args.
2954
29552021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
2956
2957 PR c++/90926
2958 * call.c (can_convert_array): Extend to handle all valid aggregate
2959 initializers of an array; including by string literals, not just by
2960 brace-init-list.
2961 (build_aggr_conv): Call can_convert_array more often, not just in
2962 brace-init-list case.
2963 * typeck2.c (array_string_literal_compatible_p): New function.
2964 (digest_init_r): call array_string_literal_compatible_p
2965 * cp-tree.h: (array_string_literal_compatible_p): Declare.
2966
29672021-02-04 Jason Merrill <jason@redhat.com>
2968
2969 PR c++/98802
2970 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
2971
29722021-02-04 Jason Merrill <jason@redhat.com>
2973
2974 PR c++/95192
2975 * pt.c (tsubst_attribute): Handle error.
2976 (apply_late_template_attributes): Return false on error.
2977 (tsubst_function_decl): Check its return value.
2978 (tsubst_decl): Likewise.
2979 (push_template_decl): Assert current_template_parms.
2980 (tsubst_template_decl): Set current_template_parms.
2981
9faaa807
GA
29822021-02-03 Marek Polacek <polacek@redhat.com>
2983
2984 PR c++/98951
2985 * call.c (struct z_candidate): Mark rewritten and reversed as const.
2986 (struct NonPublicField): Mark operator() as const.
2987 (struct NonTrivialField): Likewise.
2988
29892021-02-03 Jason Merrill <jason@redhat.com>
2990
2991 PR c++/98926
2992 PR c++/98570
2993 * pt.c (spec_hasher::equal): Set processing_template_decl.
2994 * Make-lang.in (check-g++-strict-gc): Add --param
2995 hash-table-verification-limit=10000.
2996
29972021-02-03 Marek Polacek <polacek@redhat.com>
2998
2999 PR c++/98899
3000 * parser.c (cp_parser_class_specifier_1): Use any possible
3001 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
3002 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
3003 * pt.c (tsubst_exception_specification): Stash new_specs into
3004 DEFPARSE_INSTANTIATIONS.
3005 * tree.c (fixup_deferred_exception_variants): Use
3006 UNPARSED_NOEXCEPT_SPEC_P.
3007
548b75d8
GA
30082021-02-02 Jason Merrill <jason@redhat.com>
3009
3010 PR c++/98929
3011 PR c++/96199
3012 * error.c (dump_expr): Ignore dummy object.
3013 * pt.c (tsubst_baselink): Handle dependent scope.
3014
f7884fb1
GA
30152021-02-01 Patrick Palka <ppalka@redhat.com>
3016
3017 PR c++/98295
3018 * constexpr.c (cxx_eval_array_reference): Also set
3019 new_ctx.object when setting new_ctx.ctor.
3020
30212021-02-01 Marek Polacek <polacek@redhat.com>
3022
3023 PR c++/98355
3024 * parser.c (cp_parser_has_attribute_expression): Use
3025 uses_template_parms instead of type_dependent_expression_p.
3026
30272021-02-01 Jason Merrill <jason@redhat.com>
3028
3029 PR c++/98570
3030 * cp-tree.h: Declare it.
3031 * pt.c (comparing_dependent_aliases): New flag.
3032 (template_args_equal, spec_hasher::equal): Set it.
3033 (dependent_alias_template_spec_p): Assert that we don't
3034 get non-types other than error_mark_node.
3035 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
3036 on complex alias specializations. Set TYPE_DEPENDENT_P here.
3037 (tsubst_decl): Not here.
3038 * module.cc (module_state::read_cluster): Set
3039 comparing_dependent_aliases instead of
3040 comparing_specializations.
3041 * tree.c (cp_tree_equal): Remove comparing_specializations
3042 module handling.
3043 * typeck.c (structural_comptypes): Adjust.
3044 (comptypes): Remove comparing_specializations handling.
3045
2900f2f2
GA
30462021-01-29 Nathan Sidwell <nathan@acm.org>
3047
3048 PR c++/98843
3049 * module.cc (module_state_config): Add num_entities field.
3050 (module_state::read_entities): The entity_ary span is
3051 already allocated.
3052 (module_state::write_config): Write num_entities.
3053 (module_state::read_config): Read num_entities.
3054 (module_state::write): Set config's num_entities.
3055 (module_state::read_initial): Allocate the entity ary
3056 span here.
3057 (module_state::read_language): Do not set entity_lwm
3058 here.
3059
30602021-01-29 Marek Polacek <polacek@redhat.com>
3061
3062 PR c++/96137
3063 * parser.c (cp_parser_class_name): If parser->scope is
3064 error_mark_node, return it, otherwise continue.
3065
85d04a2e
GA
30662021-01-28 Jakub Jelinek <jakub@redhat.com>
3067
3068 PR c++/98841
3069 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
3070
30712021-01-28 Jakub Jelinek <jakub@redhat.com>
3072
3073 PR c++/33661
3074 PR c++/98847
3075 * decl.c (cp_finish_decl): For register vars with asmspec in templates
3076 call set_user_assembler_name and set DECL_HARD_REGISTER.
3077 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
3078 pass asmspec_tree to cp_finish_decl.
3079
30802021-01-28 Nathan Sidwell <nathan@acm.org>
3081
3082 PR c++/98770
3083 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
3084 check order.
3085 (trees_in::decl_value): Do typedef frobbing only when installing
3086 a new typedef, adjust is_matching_decl call. Swap is_typedef
3087 & TYPE_NAME check.
3088 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
3089 names and deal with typedef checking.
3090
aa69f0a8
GA
30912021-01-27 Jason Merrill <jason@redhat.com>
3092
3093 PR c++/97874
3094 * name-lookup.c (lookup_using_decl): Clean up handling
3095 of dependency and inherited constructors.
3096 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
3097 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
3098
e62bb7f0
GA
30992021-01-26 Jason Merrill <jason@redhat.com>
3100
3101 PR c++/97474
3102 * call.c (type_passed_as): Don't mark invisiref restrict.
3103
31042021-01-26 Jason Merrill <jason@redhat.com>
3105
3106 PR c++/97566
3107 PR c++/98463
3108 * class.c (layout_class_type): An empty field gets size 0.
3109 (is_empty_field): New.
3110 (check_bases): Check it.
3111 * cp-tree.h (is_empty_field): Declare it.
3112 * constexpr.c (cxx_eval_store_expression): Check it.
3113 (cx_check_missing_mem_inits): Likewise.
3114 * init.c (perform_member_init): Likewise.
3115 * typeck2.c (process_init_constructor_record): Likewise.
3116
161e4c08
GA
31172021-01-25 Martin Sebor <msebor@redhat.com>
3118
3119 PR c++/98646
3120 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
3121
31222021-01-25 Jason Merrill <jason@redhat.com>
3123
3124 PR c++/98463
3125 * constexpr.c (get_or_insert_ctor_field): Add check.
3126 (cxx_eval_store_expression): Handle discontinuity of refs.
3127
6b163337
GA
31282021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
3129
3130 * call.c (complain_about_access): Altered function.
3131 * cp-tree.h (complain_about_access): Changed parameters of function.
3132 (get_parent_with_private_access): Declared new function.
3133 * search.c (get_parent_with_private_access): Defined new function.
3134 * semantics.c (enforce_access): Modified function.
3135 * typeck.c (complain_about_unrecognized_member): Updated function
3136 arguments in complain_about_access.
3137
31382021-01-23 Patrick Palka <ppalka@redhat.com>
3139
3140 PR c++/97399
3141 * cp-tree.h (shared_member_p): Adjust declaration.
3142 * parser.c (cp_parser_init_declarator): If the storage class
3143 specifier is sc_static, pass true for static_p to
3144 cp_parser_declarator.
3145 (cp_parser_direct_declarator): Don't do inject_this_parm when
3146 the declarator is a friend.
3147 * search.c (shared_member_p): Change return type to bool and
3148 adjust function body accordingly. Return false for a dependent
3149 USING_DECL instead of aborting.
3150 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
3151 even when type-dependent.
3152
8502e23d
GA
31532021-01-22 Marek Polacek <polacek@redhat.com>
3154
3155 PR c++/96623
3156 * parser.c (inject_parm_decls): Remove a redundant assignment.
3157 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
3158 before calling inject_parm_decls.
3159
31602021-01-22 Jason Merrill <jason@redhat.com>
3161
3162 PR c++/98744
3163 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
3164
31652021-01-22 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR sanitizer/95693
3168 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
3169 return build_zero_cst for reference types.
3170 * typeck2.c (process_init_constructor_record): Instead call
3171 build_zero_cst here during error recovery instead of build_zero_init.
3172
31732021-01-22 Marek Polacek <polacek@redhat.com>
3174
3175 PR c++/98545
3176 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
3177 warnings regardless of abi_version_at_least.
3178 (write_expression): When the expression is a dependent name
3179 and an operator name, write "on" before writing its name.
3180
31812021-01-22 Marek Polacek <polacek@redhat.com>
3182
3183 PR c++/97966
3184 * pt.c (instantiate_class_template_1): Instantiate members
3185 marked with attribute used only after we're done instantiating
3186 the class.
3187
7559d465
GA
31882021-01-21 Patrick Palka <ppalka@redhat.com>
3189
3190 PR c++/71879
3191 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
3192 sentinel at the start of the function. Remove a now-redundant
3193 manual adjustment of cp_unevaluated_operand.
3194
31952021-01-21 Nathan Sidwell <nathan@acm.org>
3196
3197 PR c++/98624
3198 * module.cc (depset::hash::find_dependencies): Add
3199 module arg.
3200 (trees_out::core_vals): Check state before calling
3201 write_location.
3202 (sort_cluster, module_state::write): Adjust
3203 find_dependencies call.
3204
32052021-01-21 Jakub Jelinek <jakub@redhat.com>
3206
3207 PR c++/98672
3208 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
3209 (check_for_return_continue): Also look for BREAK_STMT. Handle
3210 SWITCH_STMT by ignoring break_stmt from its body.
3211 (potential_constant_expression_1) <case FOR_STMT>,
3212 <case WHILE_STMT>: If the condition isn't constant true, check if
3213 the loop body can contain a return stmt.
3214 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
3215 <case IF_STMT>: If recursion with tf_none is successful,
3216 merge *jump_target from the branches - returns with highest priority,
3217 breaks or continues lower. If then branch is potentially constant and
3218 doesn't return, check the else branch if it could return, break or
3219 continue.
3220
32212021-01-21 Nathan Sidwell <nathan@acm.org>
3222
3223 PR c++/98530
3224 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
3225
b93d0e36
GA
32262021-01-20 Nathan Sidwell <nathan@acm.org>
3227
3228 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
3229 signed type.
3230
32312021-01-20 Patrick Palka <ppalka@redhat.com>
3232
3233 PR c++/95434
3234 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
3235 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
3236 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3237
32382021-01-20 Patrick Palka <ppalka@redhat.com>
3239
3240 PR c++/82613
3241 * parser.c (cp_parser_class_head): Defer access checking when
3242 parsing the base-clause until all bases are seen and attached
3243 to the class type.
3244 * pt.c (instantiate_class_template): Likewise when substituting
3245 into dependent bases.
3246
32472021-01-20 Jakub Jelinek <jakub@redhat.com>
3248
3249 PR c++/98742
3250 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
3251 error_operand_p, remove clause without further checking. Check
3252 for non-NULL TYPE_NAME.
3253
f35a4f96
GA
32542021-01-19 Marek Polacek <polacek@redhat.com>
3255
3256 PR c++/98659
3257 * pt.c (maybe_instantiate_noexcept): Return false if FN is
3258 error_mark_node.
3259
32602021-01-19 Marek Polacek <polacek@redhat.com>
3261
3262 PR c++/98687
3263 * name-lookup.c (push_using_decl_bindings): New, broken out of...
3264 (finish_nonmember_using_decl): ...here.
3265 * name-lookup.h (push_using_decl_bindings): Update declaration.
3266 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
3267
32682021-01-19 Patrick Palka <ppalka@redhat.com>
3269
3270 PR c++/41437
3271 PR c++/58993
3272 * search.c (friend_accessible_p): If scope is a hidden friend
3273 defined inside a dependent class, consider access from the
3274 class.
3275 * parser.c (cp_parser_late_parsing_for_member): Don't push a
3276 dk_no_check access state.
3277
32782021-01-19 Marek Polacek <polacek@redhat.com>
3279
3280 PR c++/98333
3281 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
3282 of NSDMIs before late-parsing of noexcept-specifiers.
3283
32842021-01-19 Nathan Sidwell <nathan@acm.org>
3285
3286 * module.cc (identifier): Merge overloads.
3287
32882021-01-19 Nathan Sidwell <nathan@acm.org>
3289
3290 PR c++/98624
3291 * module.cc (trees_out::write_location): Make static.
3292
59cf67d1
GA
32932021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
3294
3295 * parser.c (cp_parser_omp_clause_detach): New.
3296 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
3297 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
3298 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3299 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3300 Prevent use of detach with mergeable and overriding the data sharing
3301 mode of the event handle.
3302
2f7f0d32
GA
33032021-01-15 Nathan Sidwell <nathan@acm.org>
3304
3305 PR c++/98538
3306 * tree.c (cp_build_qualified_type_real): Propagate an array's
3307 dependentness to the copy, if known.
3308
33092021-01-15 Jason Merrill <jason@redhat.com>
3310
3311 PR c++/98642
3312 * call.c (unsafe_return_slot_p): Return int.
3313 (init_by_return_slot_p): Split out from...
3314 (unsafe_copy_elision_p): ...here.
3315 (unsafe_copy_elision_p_opt): New name for old meaning.
3316 (build_over_call): Adjust.
3317 (make_safe_copy_elision): New.
3318 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
3319 list-initialization.
3320 * cp-tree.h: Adjust.
3321
33222021-01-15 Jason Merrill <jason@redhat.com>
3323
3324 * call.c (base_ctor_for, make_base_init_ok): New.
3325 (build_over_call): Use make_base_init_ok.
3326
33272021-01-15 Jason Merrill <jason@redhat.com>
3328
3329 PR c++/63707
3330 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
3331 if we got a CONSTRUCTOR.
3332
33332021-01-15 Nathan Sidwell <nathan@acm.org>
3334
3335 PR c++/98591
3336 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
3337
5fff80fd
GA
33382021-01-14 Jason Merrill <jason@redhat.com>
3339
3340 * typeck2.c (process_init_constructor_record): Use fldtype
3341 variable consistently.
3342
33432021-01-14 Nathan Sidwell <nathan@acm.org>
3344
3345 PR c++/98372
3346 * tree.c (cp_tree_equal): Correct map_context logic.
3347
be0851b8
GA
33482021-01-13 Marek Polacek <polacek@redhat.com>
3349
3350 PR c++/98231
3351 * name-lookup.c (push_using_decl_bindings): New.
3352 * name-lookup.h (push_using_decl_bindings): Declare.
3353 * pt.c (tsubst_expr): Call push_using_decl_bindings.
3354
33552021-01-13 Nathan Sidwell <nathan@acm.org>
3356
3357 PR c++/98626
3358 * module.cc (module_add_import_initializers): Pass a
3359 zero-element argument vector.
3360
6851dda2
GA
33612021-01-12 Patrick Palka <ppalka@redhat.com>
3362
3363 PR c++/98611
3364 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
3365 the template of a CTAD placeholder.
3366
33672021-01-12 Marek Polacek <polacek@redhat.com>
3368
3369 PR c++/98620
3370 * typeck2.c (process_init_constructor_record): Don't emit
3371 -Wmissing-field-initializers warnings in unevaluated contexts.
3372
67fbb7f0
GA
33732021-01-11 Jakub Jelinek <jakub@redhat.com>
3374
3375 PR c++/98481
3376 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
3377 for types.
3378 (mark_abi_tags_r): Likewise.
3379 * decl2.c (min_vis_r): Likewise.
3380 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
3381 typedefs.
3382
bf5cbb9e
GA
33832021-01-08 Patrick Palka <ppalka@redhat.com>
3384
3385 PR c++/98551
3386 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
3387 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
3388
33892021-01-08 Patrick Palka <ppalka@redhat.com>
3390
3391 PR c++/98515
3392 * semantics.c (check_accessibility_of_qualified_id): Punt if
3393 we're checking access of a scoped non-static member inside a
3394 class template.
3395
7d187e4f
GA
33962021-01-07 Jakub Jelinek <jakub@redhat.com>
3397
3398 PR c++/98329
3399 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
3400 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
3401 its location.
3402 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
3403
34042021-01-07 Marek Polacek <polacek@redhat.com>
3405
3406 PR c++/98441
3407 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
3408 !late_return_type block.
3409
34102021-01-07 Jason Merrill <jason@redhat.com>
3411
3412 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
3413 (cxx_eval_store_expression): Add comment.
3414
34152021-01-07 Jason Merrill <jason@redhat.com>
3416
3417 * call.c (has_next): Factor out from...
3418 (next_conversion): ...here.
3419 (strip_standard_conversion): And here.
3420 (is_subseq): And here.
3421 (build_conv): Check it.
3422 (standard_conversion): Don't call build_conv
3423 for ck_identity.
3424
942ae5be
GA
34252021-01-06 Martin Sebor <msebor@redhat.com>
3426
3427 PR c++/95768
3428 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
3429
651b8a50
GA
34302021-01-05 Patrick Palka <ppalka@redhat.com>
3431
3432 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
3433 the type of the NTTP, substitute into the type again. If the
3434 type is still dependent, don't unify the NTTP.
3435
34362021-01-05 Jakub Jelinek <jakub@redhat.com>
3437
3438 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
3439 $(CODYLIB) after $(BACKEND).
3440
34412021-01-05 Jakub Jelinek <jakub@redhat.com>
3442
3443 PR c++/98469
3444 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
3445 Punt if lval is true.
3446 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
3447 the result if it has a class type.
3448
34492021-01-05 Marek Polacek <polacek@redhat.com>
3450
3451 PR c++/82099
3452 * pt.c (resolve_overloaded_unification): Call
3453 maybe_instantiate_noexcept after instantiating the function
3454 decl.
3455
34562021-01-05 Nathan Sidwell <nathan@acm.org>
3457
3458 * parser.c (cp_parser_module_declaration): Alter diagnostic
3459 text to say where is permissable.
3460
34612021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3462
3463 PR c++/98316
3464 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
3465
2eacfdbd
GA
34662021-01-02 Jan Hubicka <jh@suse.cz>
3467
3468 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
3469 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
3470 * tree.c (cp_tree_c_finish_parsing): New function.
3471
b6dd195a
GA
34722021-01-01 Jakub Jelinek <jakub@redhat.com>
3473
3474 * ChangeLog-2020: Rotate ChangeLog. New file.
3475
ad41bd84 3476\f
618e665a 3477Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
3478
3479Copying and distribution of this file, with or without modification,
3480are permitted in any medium without royalty provided the copyright
3481notice and this notice are preserved.
This page took 4.544772 seconds and 5 git commands to generate.