]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
c++: Fix docs on assignment of virtual bases [PR60318]
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
b2748138
GA
12021-09-07 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/100495
4 * constexpr.c (maybe_save_constexpr_fundef): Save body even for
5 constexpr deleting dtors.
6 (cxx_eval_call_expression): Don't use DECL_CLONED_FUNCTION for
7 deleting dtors.
8
92021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
10
11 * parser.c (cp_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
12 directive.
13 * semantics.c (finish_omp_flush): Handle MEMMODEL_SEQ_CST.
14
7b739540
GA
152021-09-03 Iain Sandoe <iain@sandoe.co.uk>
16
17 * coroutines.cc (register_local_var_uses): Do not mangle
18 frame entries for the outermost scope. Record the outer
19 scope as nesting depth 0.
20
212021-09-03 Iain Sandoe <iain@sandoe.co.uk>
22
23 * coroutines.cc (coro_build_artificial_var): New.
24 (build_actor_fn): Use var builder, rename vars to use
25 implementation namespace.
26 (coro_rewrite_function_body): Likewise.
27 (morph_fn_to_coro): Likewise.
28
292021-09-03 Iain Sandoe <iain@sandoe.co.uk>
30
31 * coroutines.cc (transform_local_var_uses): Record
32 frame offset expressions as DECL_VALUE_EXPRs instead of
33 rewriting them.
34
352021-09-03 Patrick Palka <ppalka@redhat.com>
36
37 PR c++/101904
38 * call.c (build_this_conversion): New function, split out from
39 add_function_candidate.
40 (add_function_candidate): New parameter shortcut_bad_convs.
41 Document it. Use build_this_conversion. Stop at the first bad
42 argument conversion when shortcut_bad_convs is true.
43 (add_template_candidate_real): New parameter shortcut_bad_convs.
44 Use build_this_conversion to check the 'this' conversion before
45 attempting deduction. When the rejection reason code is
46 rr_bad_arg_conversion, pass -1 instead of 0 as the viable
47 parameter to add_candidate. Pass 'convs' to add_candidate.
48 (add_template_candidate): New parameter shortcut_bad_convs.
49 (add_template_conv_candidate): Pass false as shortcut_bad_convs
50 to add_template_candidate_real.
51 (add_candidates): Prefer to shortcut bad conversions during
52 overload resolution under the assumption that we'll eventually
53 see a strictly viable candidate. If this assumption turns out
54 to be false, re-process the non-strictly viable candidates
55 without shortcutting those bad conversions.
56
572021-09-03 Jason Merrill <jason@redhat.com>
58
59 * pt.c (limit_bad_template_recursion): Suppress -Wunused for decls
60 we decide not to instantiate.
61
622021-09-03 Jakub Jelinek <jakub@redhat.com>
63
64 PR target/102024
65 * class.c (build_base_field): Use SET_DECL_FIELD_ABI_IGNORED
66 instead of writing to DECL_FIELD_ABI_IGNORED.
67 (layout_class_type): Likewise. In the place where zero-width
68 bitfields used to be removed, use
69 SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on those fields instead.
70
e11c6046
GA
712021-09-01 Iain Sandoe <iain@sandoe.co.uk>
72
73 * call.c (build_over_call): Handle unavailable state in addition to
74 deprecation.
75 * class.c (type_build_ctor_call): Likewise.
76 (type_build_dtor_call): Likewise.
77 * cp-tree.h: Rename cp_warn_deprecated_use to
78 cp_handle_deprecated_or_unavailable.
79 * decl.c (duplicate_decls): Merge unavailability.
80 (grokdeclarator): Handle unavailability in addition to deprecation.
81 (type_is_unavailable): New.
82 (grokparms): Handle unavailability in addition to deprecation.
83 * decl.h (enum deprecated_states): Add
84 UNAVAILABLE_DEPRECATED_SUPPRESS.
85 * decl2.c (cplus_decl_attributes): Propagate unavailability to
86 templates.
87 (cp_warn_deprecated_use): Rename to ...
88 (cp_handle_deprecated_or_unavailable): ... this and amend to handle
89 the unavailable case. It remains a warning in the case of deprecation
90 but becomes an error in the case of unavailability.
91 (cp_warn_deprecated_use_scopes): Handle unavailability.
92 (mark_used): Likewise.
93 * parser.c (cp_parser_template_name): Likewise.
94 (cp_parser_template_argument): Likewise.
95 (cp_parser_parameter_declaration_list): Likewise.
96 * typeck.c (build_class_member_access_expr): Likewise.
97 (finish_class_member_access_expr): Likewise.
98 * typeck2.c (build_functional_cast_1): Likewise.
99
1002021-09-01 Iain Sandoe <iain@sandoe.co.uk>
101
102 * coroutines.cc (build_actor_fn): Add begin/finish clauses
103 to the initial test in the actor function.
104
1052021-09-01 Iain Sandoe <iain@sandoe.co.uk>
106
107 * coroutines.cc (await_statement_walker): Use build_stmt and
108 add_stmt instead of build1 and finish_expr_stmt.
109
6d51ee43
GA
1102021-08-31 Jason Merrill <jason@redhat.com>
111
112 * coroutines.cc (flatten_await_stmt): Fix copyo.
113 * decl.c (reshape_init_class): Simplify.
114 * module.cc (module_state::read_language): Add null check.
115 * parser.c (build_range_temp): Avoid type_uses_auto.
116 (cp_parser_class_specifier_1): Add null check.
117
1182021-08-31 Patrick Palka <ppalka@redhat.com>
119
120 PR c++/12672
121 * call.c (rejection_reason::call_varargs_p): Rename this
122 previously unused member to ...
123 (rejection_reason::least_p): ... this.
124 (arity_rejection): Add least_p parameter.
125 (add_template_candidate_real): When there are explicit
126 template arguments, check that the arity of the call agrees with
127 the arity of the function before attempting deduction.
128 (print_arity_information): Add least_p parameter.
129 (print_z_candidate): Adjust call to print_arity_information.
130
1312021-08-31 Martin Sebor <msebor@redhat.com>
132
133 * parser.c (cp_parser_selection_statement): Use direct initialization
134 instead of copy.
135
1362021-08-31 Jason Merrill <jason@redhat.com>
137
138 * constexpr.c (explain_invalid_constexpr_fn): Use iloc_sentinel.
139
1402021-08-31 Jason Merrill <jason@redhat.com>
141
142 PR c++/92193
143 * cp-tree.h (FNDECL_MANIFESTLY_CONST_EVALUATED): New.
144 * constexpr.c (cxx_eval_call_expression): Set it.
145 * pt.c (neglectable_inst_p): Check it.
146
1472021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
148
149 * parser.c (cp_parser_omp_clause_device): Parse device-modifiers 'device_num'
150 and 'ancestor' in 'target device' clauses.
151 * semantics.c (finish_omp_clauses): Error handling. Constant device ids must
152 evaluate to '1' if 'ancestor' is used.
153
1e2f030b
GA
1542021-08-30 Jason Merrill <jason@redhat.com>
155
156 PR c++/96286
157 * cp-tree.h (struct lang_type): Add erroneous bit-field.
158 (CLASSTYPE_ERRONEOUS): New.
159 * pt.c (limit_bad_template_recursion): Check it.
160 (instantiate_class_template_1): Set it.
161
1622021-08-30 Jason Merrill <jason@redhat.com>
163
164 * constexpr.c (cxx_eval_outermost_constant_expr): Copy
165 expr location to result.
166
1672021-08-30 Jason Merrill <jason@redhat.com>
168
169 PR c++/101460
170 * cp-tree.h (cxx_constant_value_sfinae): Declare.
171 * constexpr.c (cxx_constant_value_sfinae): New.
172 * pt.c (fold_targs_r, maybe_fold_fn_template_args): New.
173 (tsubst_copy_and_build) [CALL_EXPR]: Call
174 maybe_fold_fn_template_args.
175
1762021-08-30 Jason Merrill <jason@redhat.com>
177
178 * parser.c (cp_parser_simple_requirement): Warn about missing
179 requires.
180
1e52538d
GA
1812021-08-27 Jason Merrill <jason@redhat.com>
182
183 * typeck2.c (build_x_arrow): Do set TREE_TYPE when operand is
184 a dependent pointer.
185
85d77ac4
GA
1862021-08-25 Andrew Pinski <apinski@marvell.com>
187
188 PR c++/66590
189 * cp-objcp-common.c (cxx_block_may_fallthru): Handle
190 CLEANUP_STMT for the case which will be try/finally.
191
1922021-08-25 Jakub Jelinek <jakub@redhat.com>
193
194 PR c++/102019
195 * init.c (build_value_init_noctor): Ignore unnamed zero-width
196 bitfields.
197
38b19c5b
GA
1982021-08-23 Jakub Jelinek <jakub@redhat.com>
199
200 * parser.c (cp_parser_omp_clause_num_tasks,
201 cp_parser_omp_clause_grainsize): Parse the optional strict: modifier.
202
7c9e1645
GA
2032021-08-20 Jakub Jelinek <jakub@redhat.com>
204
205 * parser.c (cp_parser_handle_statement_omp_attributes): Determine if
206 PRAGMA_OMP_ERROR directive is C_OMP_DIR_STANDALONE.
207 (cp_parser_omp_error): New function.
208 (cp_parser_pragma): Handle PRAGMA_OMP_ERROR.
209
2102021-08-20 Jakub Jelinek <jakub@redhat.com>
211
212 * parser.c (cp_parser_omp_clause_depend_sink): Reject spurious
213 comma at the end of list. Don't parse closing paren here...
214 (cp_parser_omp_clause_depend): ... but here instead.
215
b57fba5e
GA
2162021-08-19 Patrick Palka <ppalka@redhat.com>
217
218 PR c++/101803
219 * cp-tree.h (CONSTRUCTOR_IS_PAREN_INIT): Clarify comment.
220
2212021-08-19 Jakub Jelinek <jakub@redhat.com>
222
223 * parser.c (cp_parser_omp_requires): Don't call cp_lexer_nth_token_is
224 and optionally consume token if current token is CPP_EOF,
225 CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
226
2272021-08-19 Jakub Jelinek <jakub@redhat.com>
228
229 * parser.c (cp_parser_omp_nothing): Use cp_parser_require_pragma_eol
230 instead of cp_parser_skip_to_pragma_eol.
231
6e529985
GA
2322021-08-18 Patrick Palka <ppalka@redhat.com>
233
234 PR c++/101344
0c0907f9 235 PR c++/101803
6e529985
GA
236 * cp-tree.h (CONSTRUCTOR_BRACES_ELIDED_P): Define.
237 * decl.c (reshape_init_r): Set it.
238 * pt.c (collect_ctor_idx_types): Recurse into a sub-CONSTRUCTOR
239 iff CONSTRUCTOR_BRACES_ELIDED_P.
240
2412021-08-18 Patrick Palka <ppalka@redhat.com>
242
243 PR c++/101883
244 * pt.c (convert_template_argument): Pass LOOKUP_IMPLICIT to
245 do_auto_deduction.
246
2472021-08-18 Jakub Jelinek <jakub@redhat.com>
248
249 * parser.c (cp_parser_omp_nothing): New function.
250 (cp_parser_pragma): Handle PRAGMA_OMP_NOTHING.
251
2522021-08-18 Jakub Jelinek <jakub@redhat.com>
253
254 * parser.c (cp_parser_omp_ordered): Return true instead of
255 false after emitting errors that the directive is not allowed in
256 pragma_stmt context.
257 (cp_parser_omp_target_update): Likewise.
258 (cp_parser_omp_cancellation_point): Change return type from void to
259 bool, return false if the directive should be ignored in pragma_stmt
260 contexts.
261 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data):
262 Change return type from tree to bool, return false if the
263 directive should be ignored in pragma_stmt contexts.
264 (cp_parser_omp_target): Adjust callers of cp_parser_omp_target_*_data,
265 return their result directly.
266 (cp_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
267 cp_parser_omp_cancellation_point returned. Return true instead of
268 false after emitting errors that the directive is not allowed in
269 pragma_stmt context.
270
2d14d64b
GA
2712021-08-17 Jakub Jelinek <jakub@redhat.com>
272
273 PR c++/101539
274 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_LAYOUT_COMPATIBLE.
275 (enum cp_built_in_function): Add CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
276 (fold_builtin_is_corresponding_member, next_common_initial_seqence,
277 layout_compatible_type_p): Declare.
278 * parser.c (cp_parser_primary_expression): Handle
279 RID_IS_LAYOUT_COMPATIBLE.
280 (cp_parser_trait_expr): Likewise.
281 * cp-objcp-common.c (names_builtin_p): Likewise.
282 * constraint.cc (diagnose_trait_expr): Handle
283 CPTK_IS_LAYOUT_COMPATIBLE.
284 * decl.c (cxx_init_decl_processing): Register
285 __builtin_is_corresponding_member builtin.
286 * constexpr.c (cxx_eval_builtin_function_call): Handle
287 CP_BUILT_IN_IS_CORRESPONDING_MEMBER builtin.
288 * semantics.c (is_corresponding_member_union,
289 is_corresponding_member_aggr, fold_builtin_is_corresponding_member):
290 New functions.
291 (trait_expr_value): Handle CPTK_IS_LAYOUT_COMPATIBLE.
292 (finish_trait_expr): Likewise.
293 * typeck.c (next_common_initial_seqence, layout_compatible_type_p):
294 New functions.
295 * cp-gimplify.c (cp_gimplify_expr): Fold
296 CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
297 (cp_fold): Likewise.
298 * tree.c (builtin_valid_in_constant_expr_p): Handle
299 CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
300 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
301 CPTK_IS_LAYOUT_COMPATIBLE.
302 * class.c (remove_zero_width_bit_fields): Remove.
303 (layout_class_type): Don't call it.
304
3052021-08-17 Jakub Jelinek <jakub@redhat.com>
306
307 * parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
308 (cp_parser_omp_scope): New function.
309 (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_SCOPE.
310 * pt.c (tsubst_expr): Handle OMP_SCOPE.
311
72be20e2
GA
3122021-08-12 Jakub Jelinek <jakub@redhat.com>
313
314 * parser.c (cp_parser_omp_clause_name): Parse filter clause name.
315 (cp_parser_omp_clause_filter): New function.
316 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
317 (OMP_MASKED_CLAUSE_MASK): Define.
318 (cp_parser_omp_masked): New function.
319 (cp_parser_omp_parallel): Handle parallel masked.
320 (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_MASKED.
321 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
322 * pt.c (tsubst_omp_clauses): Likewise.
323 (tsubst_expr): Handle OMP_MASKED.
324
3252021-08-12 Sergei Trofimovich <siarheit@google.com>
326
327 PR c++/101219
328 * pt.c (tsubst_copy_and_build): Use build_ptrmemfunc_access_expr
329 to construct ptrmemfunc expression instantiation.
330
3312021-08-12 Tobias Burnus <tobias@codesourcery.com>
332
333 * parser.c (cp_parser_omp_clause_proc_bind): Accept
334 'primary' as alias for 'master'.
335
3362021-08-12 Jakub Jelinek <jakub@redhat.com>
337
338 * cp-tree.h (omp_declare_target_attr): New type.
339 (struct saved_scope): Change type of omp_declare_target_attribute
340 from int to vec<omp_declare_target_attr, va_gc> * and move it.
341 * parser.c (cp_parser_omp_declare_target): Instead of
342 incrementing scope_chain->omp_declare_target_attribute, push
343 a struct containing parser->lexer->in_omp_attribute_pragma to
344 the vector.
345 (cp_parser_omp_end_declare_target): Instead of decrementing
346 scope_chain->omp_declare_target_attribute, pop a structure
347 from it. Diagnose mismatching declare target vs.
348 end declare target syntax.
349 * semantics.c (finish_translation_unit): Use vec_safe_length
350 and vec_safe_truncate on scope_chain->omp_declare_target_attributes.
351 * decl2.c (cplus_decl_attributes): Use vec_safe_length
352 on scope_chain->omp_declare_target_attributes.
353
3542021-08-12 Jakub Jelinek <jakub@redhat.com>
355
356 * parser.c (cp_parser_lambda_body): Add temp overrides
357 for parser->{omp_declare_simd,oacc_routine,omp_attrs_forbidden_p}.
358 (cp_parser_statement): Restore parser->omp_attrs_forbidden_p for
359 cp_parser_declaration_statement.
360 (cp_parser_default_argument): Add temp override for
361 parser->omp_attrs_forbidden_p.
362 (cp_parser_late_parsing_omp_declare_simd): Diagnose declare simd
363 or declare variant in attribute syntax on a declaration immediately
364 following an OpenMP construct in pragma syntax.
365
3662021-08-12 Jakub Jelinek <jakub@redhat.com>
367
368 PR c++/94162
369 * method.c (cat_tag_for): Return cc_last for !CLASS_TYPE_P
370 or for classes not in std namespace.
371
3722021-08-12 Jakub Jelinek <jakub@redhat.com>
373
374 * name-lookup.c (finish_using_directive): Diagnose omp::directive
375 or omp::sequence attributes on using-directive.
376
3772021-08-12 Jakub Jelinek <jakub@redhat.com>
378
379 * parser.c (cp_parser_block_declaration): Call
380 cp_parser_using_directive for C++11 attributes followed by
381 using namespace tokens.
382 (cp_parser_using_directive): Parse C++11 attributes at the start
383 of the directive rather than at the end, only parse GNU attributes
384 at the end.
385
3862021-08-12 Patrick Palka <ppalka@redhat.com>
387
388 PR c++/101663
389 * constexpr.c (cxx_eval_store_expression): Handle the lval=true
390 case in the early exit code path for empty stores with mismatched
391 types.
392
58f87503
GA
3932021-08-11 Patrick Palka <ppalka@redhat.com>
394
395 PR c++/101725
396 DR 2082
397 * cp-tree.h (unevaluated_p): Return true for REQUIRES_EXPR.
398 * decl.c (local_variable_p_walkfn): Don't walk into unevaluated
399 operands.
400 * parser.c (cp_parser_primary_expression) <case CPP_NAME>: Never
401 reject uses of local variables in unevaluated contexts.
402 * tree.c (cp_walk_subtrees) <case REQUIRES_EXPR>: Increment
403 cp_unevaluated_operand. Use cp_walk_tree directly instead of
404 WALK_SUBTREE to avoid the goto. Use REQUIRES_EXPR_REQS instead
405 of TREE_OPERAND directly.
406
4072021-08-11 Jakub Jelinek <jakub@redhat.com>
408
409 PR c++/101786
410 * decl2.c (var_defined_without_dynamic_init): Return true for
411 DECL_DECLARED_CONSTINIT_P with complete type and trivial destructor.
412
4132021-08-11 Patrick Palka <ppalka@redhat.com>
414
415 PR c++/79501
416 * parser.c (maybe_adjust_declarator_for_dguide): New, split
417 out from ...
418 (cp_parser_init_declarator): ... here.
419 (cp_parser_member_declaration): Use it.
420
4212021-08-11 Patrick Palka <ppalka@redhat.com>
422
423 PR c++/89062
424 * parser.c (cp_parser_parameter_declaration_list): Don't call
425 grokdeclarator if cp_parser_error_occurred.
426 (cp_parser_parameter_declaration): Simulate an error if we see
427 the beginning of a CTAD form, i.e. if we see an opening brace
428 after the decl-specifier-seq and the type is a CTAD placeholder.
429
3ae564ea
GA
4302021-08-10 Jakub Jelinek <jakub@redhat.com>
431
432 * parser.c (cp_parser_member_declaration): Move odsd declaration
433 before cp_parser_using_declaration call to avoid errors with
434 GCC 4.8 to 6.
435
4362021-08-10 Jakub Jelinek <jakub@redhat.com>
437
438 * parser.h (struct cp_omp_declare_simd_data): Remove
439 in_omp_attribute_pragma and clauses members, add loc and attribs.
440 (struct cp_oacc_routine_data): Remove loc member, add clauses
441 member.
442 * parser.c (cp_finalize_omp_declare_simd): New function.
443 (cp_parser_handle_statement_omp_attributes): Mention in
444 function comment the function is used also for
445 attribute-declaration.
446 (cp_parser_handle_directive_omp_attributes): New function.
447 (cp_parser_statement): Don't call
448 cp_parser_handle_statement_omp_attributes if statement doesn't
449 have attribute-specifier-seq at the beginning at all or if
450 if those attributes don't appertain to the statement.
451 (cp_parser_simple_declaration): Call
452 cp_parser_handle_directive_omp_attributes and
453 cp_finalize_omp_declare_simd.
454 (cp_parser_explicit_instantiation): Likewise.
455 (cp_parser_init_declarator): Initialize prefix_attributes
456 only after parsing declarators.
457 (cp_parser_direct_declarator): Call
458 cp_parser_handle_directive_omp_attributes and
459 cp_finalize_omp_declare_simd.
460 (cp_parser_member_declaration): Likewise.
461 (cp_parser_single_declaration): Likewise.
462 (cp_parser_omp_declare_simd): Don't initialize
463 data.in_omp_attribute_pragma, instead initialize
464 data.attribs[0] and data.attribs[1].
465 (cp_finish_omp_declare_variant): Remove
466 in_omp_attribute_pragma argument, instead use
467 parser->lexer->in_omp_attribute_pragma.
468 (cp_parser_late_parsing_omp_declare_simd): Adjust
469 cp_finish_omp_declare_variant caller. Handle attribute-syntax
470 declare simd/variant.
471
f92f4778
GA
4722021-08-06 Tamar Christina <tamar.christina@arm.com>
473
474 * cp-objcp-common.h (cxx_simulate_enum_decl): Pass vec<> by pointer.
475 * decl.c (cxx_simulate_enum_decl): Likewise.
476
2697f832
GA
4772021-08-04 Jakub Jelinek <jakub@redhat.com>
478
479 PR c++/101759
480 * parser.c (cp_parser_default_argument): Temporarily override
481 parser->omp_declare_simd and parser->oacc_routine to NULL.
482
4d17ca1b
GA
4832021-08-02 Patrick Palka <ppalka@redhat.com>
484
485 PR c++/100828
486 * logic.cc (formula::formula): Use emplace_back instead of
487 push_back.
488 (formula::branch): Insert a copy of m_current directly after
489 m_current instead of at the end of the list.
490 (formula::erase): Define.
491 (decompose_formula): Remove.
492 (decompose_antecedents): Remove.
493 (decompose_consequents): Remove.
494 (derive_proofs): Remove.
495 (max_problem_size): Remove.
496 (diagnose_constraint_size): Remove.
497 (subsumes_constraints_nonnull): Rewrite directly in terms of
498 decompose_clause and derive_proof, interleaving decomposition
499 with implication checking. Remove limit on constraint complexity.
500 Use formula::erase to free the current clause before moving on to
501 the next one.
502
5032021-07-31 Jason Merrill <jason@redhat.com>
504
505 PR c++/96636
506 * decl.c (fixup_anonymous_aggr): Clear TYPE_NEEDS_CONSTRUCTING
507 after error.
508
5092021-07-31 Jason Merrill <jason@redhat.com>
510
511 * ptree.c (cxx_print_type) [TYPE_PACK_EXPANSION]: Also print
512 PACK_EXPANSION_PATTERN.
513
5142021-07-31 Jakub Jelinek <jakub@redhat.com>
515
516 * parser.c (cp_parser_declaration): Handle OpenMP directives
517 in attribute-declaration.
518
5192021-07-30 Jakub Jelinek <jakub@redhat.com>
520
521 PR c++/101539
522 * cp-tree.h (enum cp_trait_kind): Add
523 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
524 (enum cp_built_in_function): Add
525 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.
526 (fold_builtin_is_pointer_inverconvertible_with_class): Declare.
527 * parser.c (cp_parser_primary_expression): Handle
528 RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
529 (cp_parser_trait_expr): Likewise.
530 * cp-objcp-common.c (names_builtin_p): Likewise.
531 * constraint.cc (diagnose_trait_expr): Handle
532 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
533 * decl.c (cxx_init_decl_processing): Register
534 __builtin_is_pointer_interconvertible_with_class builtin.
535 * constexpr.c (cxx_eval_builtin_function_call): Handle
536 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS builtin.
537 * semantics.c (pointer_interconvertible_base_of_p,
538 first_nonstatic_data_member_p,
539 fold_builtin_is_pointer_inverconvertible_with_class): New functions.
540 (trait_expr_value): Handle CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
541 (finish_trait_expr): Likewise. Formatting fix.
542 * cp-gimplify.c (cp_gimplify_expr): Fold
543 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS. Call
544 fndecl_built_in_p just once.
545 (cp_fold): Likewise.
546 * tree.c (builtin_valid_in_constant_expr_p): Handle
547 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS. Call
548 fndecl_built_in_p just once.
549 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
550 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
551
5522021-07-30 Jason Merrill <jason@redhat.com>
553
554 * class.c (finish_struct_anon): Improve comment.
555 * decl.c (fixup_anonymous_aggr): Reject anonymous struct
556 with bases.
557
5582021-07-30 Jakub Jelinek <jakub@redhat.com>
559
560 * parser.c (cp_parser_statement): Rollback attributes not just
561 when std_attrs is non-NULL, but whenever
562 cp_parser_std_attribute_spec_seq parsed any tokens.
563
5642021-07-30 Jakub Jelinek <jakub@redhat.com>
565
566 PR c++/101582
567 * parser.c (cp_parser_skip_std_attribute_spec_seq): Add a forward
568 declaration.
569 (cp_parser_declaration): Parse empty-declaration and
570 attribute-declaration.
571 (cp_parser_toplevel_declaration): Don't parse empty-declaration here.
572
39169029
GA
5732021-07-28 Martin Sebor <msebor@redhat.com>
574
575 * init.c: Include new header.
576
af3f12e6
GA
5772021-07-27 Marek Polacek <polacek@redhat.com>
578
579 DR 1512
580 PR c++/99701
581 * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
582 a switch.
583 * typeck.c (cp_build_binary_op): Reject ordered comparison
584 of two null pointers.
585
1a7febe9
GA
5862021-07-26 Jakub Jelinek <jakub@redhat.com>
587
588 * parser.h (struct cp_lexer): Add orphan_p member.
589 * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
590 upon restart from CPP_PRAGMA handling. Fix up condition when a lexer
591 should be destroyed and adjust saved_tokens if it records tokens from
592 the to be destroyed lexer.
593 (cp_parser_omp_section_scan): New function.
594 (cp_parser_omp_scan_loop_body): Use it. If
595 parser->lexer->in_omp_attribute_pragma, allow optional comma
596 after scan.
597 (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
598
ead235f6
GA
5992021-07-23 Jakub Jelinek <jakub@redhat.com>
600
601 * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
602 * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
603 mixing of attribute and pragma syntax directives when seeing
604 omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
605 directives are followed by OpenMP pragma.
606 (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
607 the cp_parser_handle_statement_omp_attributes call.
608 (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
609 if true, set parser->omp_attrs_forbidden_p.
610 (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
611 false as disallow_omp_attrs to cp_parser_omp_structured_block.
612 (cp_parser_omp_parallel, cp_parser_omp_task): Set
613 parser->omp_attrs_forbidden_p.
614
419c6c68
GA
6152021-07-21 Thomas Schwinge <thomas@codesourcery.com>
616 Joseph Myers <joseph@codesourcery.com>
617 Cesar Philippidis <cesar@codesourcery.com>
618
619 * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
620 (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
621 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
622 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
623 * semantics.c (finish_omp_clauses): Likewise.
624
6252021-07-21 Jakub Jelinek <jakub@redhat.com>
626
627 PR c++/101516
628 * semantics.c (finish_omp_reduction_clause): Also call
629 complete_type_or_else and return true if it fails.
630
21ea2f93
GA
6312021-07-19 Iain Sandoe <iain@sandoe.co.uk>
632
633 PR c++/95520
634 * coroutines.cc (struct coroutine_info): Add fields for
635 actor and destroy function decls.
636 (to_ramp): New.
637 (coro_get_ramp_function): New.
638 (coro_get_actor_function): New.
639 (coro_get_destroy_function): New.
640 (act_des_fn): Set up mapping between ramp, actor and
641 destroy functions.
642 (morph_fn_to_coro): Adjust interface to the builder for
643 helper function decls.
644 * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
645 JOIN_STR): New.
646 * mangle.c (write_encoding): Handle coroutine helpers.
647 (write_unqualified_name): Handle lambda coroutine helpers.
648
87277b6a
GA
6492021-07-16 Patrick Palka <ppalka@redhat.com>
650
651 PR c++/101233
652 * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
653 substituting DECL_ARGUMENTS.
654
6552021-07-16 Patrick Palka <ppalka@redhat.com>
656
657 DR 960
658 PR c++/99664
659 * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
660 when the return types are references.
661
6622021-07-16 Marek Polacek <polacek@redhat.com>
663
664 * typeck2.c (check_narrowing): Don't suppress the pedantic error
665 in system headers.
666
d97d71a1
GA
6672021-07-15 Jakub Jelinek <jakub@redhat.com>
668
669 PR c++/101443
670 * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
671 operands, fold them right away to true or false.
672
6732021-07-15 Jason Merrill <jason@redhat.com>
674
675 PR c++/101095
676 * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
677 (cp_tree_size): Remove redundant entries.
678
c4fee1c6
GA
6792021-07-14 Patrick Palka <ppalka@redhat.com>
680
681 PR c++/88252
682 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
683 * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
684 handling.
685 (redeclare_class_template): Likewise.
686 (forwarding_reference_p): Define.
687 (maybe_adjust_types_for_deduction): Use it instead. Add 'tparms'
688 parameter.
689 (unify_one_argument): Pass tparms to
690 maybe_adjust_types_for_deduction.
691 (try_one_overload): Likewise.
692 (unify): Likewise.
693 (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
694 handling.
695
6962021-07-14 Jason Merrill <jason@redhat.com>
697
698 * class.c (struct find_final_overrider_data): Use auto_vec.
699 (find_final_overrider): Remove explicit release.
700 * coroutines.cc (process_conditional): Use auto_vec.
701 * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
702 (cp_genericize_tree): Remove explicit release.
703 * parser.c (cp_parser_objc_at_property_declaration): Use
704 auto_delete_vec.
705 * semantics.c (omp_reduction_lookup): Use auto_vec.
706
7072021-07-14 Marek Polacek <polacek@redhat.com>
708
709 PR c++/101371
710 * constexpr.c (cxx_eval_array_reference): Create a new .object
711 and .ctor for the non-aggregate non-scalar case too when
712 value-initializing.
713
07bcbf9c
GA
7142021-07-12 Patrick Palka <ppalka@redhat.com>
715
716 PR c++/79501
717 PR c++/100983
718 * decl.c (grokfndecl): Don't require that deduction guides are
719 declared at namespace scope. Check that class-scope deduction
720 guides have the same access as the member class template.
721 (grokdeclarator): Pretend class-scope deduction guides are static.
722 * search.c (lookup_member): Don't use a BASELINK for (class-scope)
723 deduction guides.
724
269256f3
GA
7252021-07-10 Patrick Palka <ppalka@redhat.com>
726
727 PR c++/82110
728 * init.c (build_aggr_init): Return error_mark_node if
729 expand_aggr_init_1 returns false.
730 (expand_default_init): Change return type to bool. Return false
731 on error, true on success.
732 (expand_aggr_init_1): Likewise.
733
ef2ace64
GA
7342021-07-09 Jason Merrill <jason@redhat.com>
735
736 PR c++/101098
737 * decl.c (function_requirements_equivalent_p): Only compare
738 trailing requirements on a specialization.
739
7402021-07-09 Iain Sandoe <iain@sandoe.co.uk>
741
742 * coroutines.cc (build_actor_fn): Move common code to
743 act_des_fn.
744 (build_destroy_fn): Likewise.
745 (act_des_fn): Build the void return here. Ensure that the
746 source location matches the original function.
747
7482021-07-09 Iain Sandoe <iain@sandoe.co.uk>
749
750 * coroutines.cc
751 (coro_rewrite_function_body): Connect the replacement
752 function block to the block nest correctly.
753
7542021-07-09 Patrick Palka <ppalka@redhat.com>
755
756 PR c++/101181
757 * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
758 add_extra_args.
759 * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
760 * pt.c (build_extra_args): Make a copy of args.
761 (add_extra_args): Add complain/in_decl parameters. Enable the
762 code for handling the case where the extra arguments are
763 dependent.
764 (tsubst_pack_expansion): Pass complain/in_decl to
765 add_extra_args.
766 (tsubst_template_args): Handle missing template arguments.
767 (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
768 add_extra_args.
769
7702021-07-09 Patrick Palka <ppalka@redhat.com>
771
772 PR c++/101247
773 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
774 DECL_CONTEXT.
775
fdc4d2a5
GA
7762021-07-08 Martin Sebor <msebor@redhat.com>
777
778 PR bootstrap/101372
779 * module.cc (identifier): Suppress warning.
780 (module_state::read_macro_maps): Remove warning suppression.
781 (module_state::install_macros): Ditto.
782
7832021-07-08 Marek Polacek <polacek@redhat.com>
784
785 PR c++/101087
786 * cp-tree.h (unevaluated_p): New.
787 * except.c (check_noexcept_r): Use it. Don't walk into
788 unevaluated operands.
789
7902021-07-08 Martin Sebor <msebor@redhat.com>
791
792 PR bootstrap/101374
793 * module.cc (module_state::read_macro_maps): Temporarily disable
794 -Warray-bounds.
795 (module_state::install_macros): Same.
796
6fba0eea
GA
7972021-07-06 Martin Sebor <msebor@redhat.com>
798
799 * error.c (cp_printer): Remove support for %G and %K.
800
7a60a6e8
GA
8012021-07-02 Jakub Jelinek <jakub@redhat.com>
802
803 * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
804 (struct cp_omp_declare_simd_data): Likewise.
805 * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
806 (omp_identifier): Define.
807 * parser.c (cp_parser_skip_to_pragma_eol): Handle
808 in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
809 (cp_parser_require_pragma_eol): Likewise.
810 (struct cp_omp_attribute_data): New type.
811 (cp_parser_handle_statement_omp_attributes): New function.
812 (cp_parser_statement): Handle OpenMP directives in statement's
813 attribute-specifier-seq.
814 (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
815 functions.
816 (cp_parser_std_attribute): Handle omp::directive and omp::sequence
817 attributes.
818 (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
819 a comma also before the first clause.
820 (cp_parser_omp_allocate): Likewise.
821 (cp_parser_omp_atomic): Likewise.
822 (cp_parser_omp_depobj): Likewise.
823 (cp_parser_omp_flush): Likewise.
824 (cp_parser_omp_ordered): Likewise.
825 (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
826 into struct cp_omp_declare_simd_data.
827 (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
828 argument. If set, allow a comma also before match clause.
829 (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
830 allow a comma also before the first clause. Adjust
831 cp_finish_omp_declare_variant caller.
832 (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
833 a comma also before the first clause.
834 (cp_parser_omp_declare_reduction_exprs): Likewise.
835 (cp_parser_omp_requires): Likewise.
836 * decl.c (initialize_predefined_identifiers): Initialize
837 omp_identifier.
838 * decl2.c (cplus_decl_attributes): Reject omp::directive and
839 omp::sequence attributes.
840
8412021-07-02 Jakub Jelinek <jakub@redhat.com>
842
843 PR c/101297
844 * parser.c (cp_parser_omp_atomic): Consume comma only if it
845 appears before a CPP_NAME.
846
8472021-07-02 Patrick Palka <ppalka@redhat.com>
848
849 PR c++/101247
850 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
851 use common_enclosing_class and to not depend on the TREE_TYPE
852 of outer levels pointing to the corresponding primary template.
853
bea7c16a
GA
8542021-07-01 Patrick Palka <ppalka@redhat.com>
855
856 PR c++/101194
857 * constexpr.c (cxx_eval_array_reference): When the element type
858 is an empty type and the corresponding element is omitted, just
859 return an empty CONSTRUCTOR instead of attempting value
860 initialization.
861
8622021-07-01 Patrick Palka <ppalka@redhat.com>
863
864 PR c++/96204
865 * pt.c (finish_template_variable): Pass the partially
866 instantiated template and its args to instantiate_template.
867 (instantiate_class_template_1): No need to call
868 push_nested_class and pop_nested_class around the call to
869 most_specialized_partial_spec.
870 (instantiate_template_1): Pass the partially instantiated
871 template to lookup_template_variable.
872 (most_specialized_partial_spec): Use push_access_scope_guard
873 to set the access scope appropriately. Use
874 deferring_access_check_sentinel to force access to get checked
875 immediately.
876 (instantiate_decl): Just pass the VAR_DECL to
877 most_specialized_partial_spec.
878
25b6bfea
GA
8792021-06-30 Patrick Palka <ppalka@redhat.com>
880
881 * constraint.cc (get_normalized_constraints_from_decl): Use
882 push_access_scope_guard instead of push_nested_class_guard.
883 * cp-tree.h (struct push_nested_class_guard): Replace with ...
884 (struct push_access_scope_guard): ... this.
885 * pt.c (push_access_scope): When the argument corresponds to
886 a class type, push the class instead of its context.
887 (pop_access_scope): Adjust accordingly.
888
8892021-06-30 Marek Polacek <polacek@redhat.com>
890
891 PR c++/100975
892 DR 2397
893 * decl.c (create_array_type_for_decl): Allow array of auto.
894
6bc18203
GA
8952021-06-29 Jason Merrill <jason@redhat.com>
896
897 * pt.c (instantiate_decl): Only consider partial specializations of
898 actual variable templates.
899
461f937b
GA
9002021-06-26 Patrick Palka <ppalka@redhat.com>
901
902 PR c++/96204
903 * pt.c (instantiate_class_template_1): Enter the scope of the
904 type when calling most_specialized_partial_spec.
905
9062021-06-26 Jason Merrill <jason@redhat.com>
907
908 PR c++/101040
909 PR c++/97566
910 * class.c (is_empty_field): Handle null argument.
911 * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
912 for empty field.
913
90708f87
GA
9142021-06-26 Marek Polacek <polacek@redhat.com>
915
916 PR c++/100752
917 * parser.c (cp_parser_declarator): Pass flags down to
918 cp_parser_declarator. Also pass static_p/member_p.
919
9202021-06-25 Martin Sebor <msebor@redhat.com>
921
922 * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
923 with warning_suppressed_p, suppress_warning, and copy_no_warning, or
924 nothing if not necessary.
925 (set_up_extended_ref_temp): Same.
926 * class.c (layout_class_type): Same.
927 * constraint.cc (constraint_satisfaction_value): Same.
928 * coroutines.cc (finish_co_await_expr): Same.
929 (finish_co_yield_expr): Same.
930 (finish_co_return_stmt): Same.
931 (build_actor_fn): Same.
932 (coro_rewrite_function_body): Same.
933 (morph_fn_to_coro): Same.
934 * cp-gimplify.c (genericize_eh_spec_block): Same.
935 (gimplify_expr_stmt): Same.
936 (cp_genericize_r): Same.
937 (cp_fold): Same.
938 * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
939 * cvt.c (cp_fold_convert): Same.
940 (convert_to_void): Same.
941 * decl.c (wrapup_namespace_globals): Same.
942 (grokdeclarator): Same.
943 (finish_function): Same.
944 (require_deduced_type): Same.
945 * decl2.c (no_linkage_error): Same.
946 (c_parse_final_cleanups): Same.
947 * except.c (expand_end_catch_block): Same.
948 * init.c (build_new_1): Same.
949 (build_new): Same.
950 (build_vec_delete_1): Same.
951 (build_vec_init): Same.
952 (build_delete): Same.
953 * method.c (defaultable_fn_check): Same.
954 * parser.c (cp_parser_fold_expression): Same.
955 (cp_parser_primary_expression): Same.
956 * pt.c (push_tinst_level_loc): Same.
957 (tsubst_copy): Same.
958 (tsubst_omp_udr): Same.
959 (tsubst_copy_and_build): Same.
960 * rtti.c (build_if_nonnull): Same.
961 * semantics.c (maybe_convert_cond): Same.
962 (finish_return_stmt): Same.
963 (finish_parenthesized_expr): Same.
964 (cp_check_omp_declare_reduction): Same.
965 * tree.c (build_cplus_array_type): Same.
966 * typeck.c (build_ptrmemfunc_access_expr): Same.
967 (cp_build_indirect_ref_1): Same.
968 (cp_build_function_call_vec): Same.
969 (warn_for_null_address): Same.
970 (cp_build_binary_op): Same.
971 (unary_complex_lvalue): Same.
972 (cp_build_modify_expr): Same.
973 (build_x_modify_expr): Same.
974 (convert_for_assignment): Same.
975
9aa8327e
GA
9762021-06-24 Patrick Palka <ppalka@redhat.com>
977
978 PR c++/98832
979 * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
980
9812021-06-24 Patrick Palka <ppalka@redhat.com>
982
983 PR c++/101182
984 * constraint.cc (evaluate_requires_expr): Adjust function comment.
985 * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
986 (cp_fold) <case REQUIRES_EXPR>: ... here.
987
9882021-06-24 Jakub Jelinek <jakub@redhat.com>
989
990 * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
991 C_ORT_OMP for clauses on target construct.
992 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
993 (cp_parser_omp_target): For non-combined target add
994 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
995 C_ORT_OMP_TARGET to finish_omp_clauses.
996 * semantics.c (handle_omp_array_sections_1): Adjust ort handling
997 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
998 never present on C_ORT_*DECLARE_SIMD.
999 (handle_omp_array_sections): Likewise.
1000 (finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1001 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1002 corresponding map clauses.
1003 * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
1004 clauses on target construct.
1005
fcf617f0
GA
10062021-06-23 Patrick Palka <ppalka@redhat.com>
1007
1008 PR c++/101174
1009 * pt.c (push_access_scope): For artificial deduction guides,
1010 set the access scope to that of the constructor.
1011 (pop_access_scope): Likewise.
1012 (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
1013
10142021-06-23 Patrick Palka <ppalka@redhat.com>
1015
1016 PR c++/86439
1017 * call.c (print_error_for_call_failure): Constify 'args' parameter.
1018 (perform_dguide_overload_resolution): Define.
1019 * cp-tree.h: (perform_dguide_overload_resolution): Declare.
1020 * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
1021 instead of build_new_function_call. Don't use tf_decltype or
1022 set cp_unevaluated_operand. Remove unnecessary NULL_TREE tests.
1023
2f080224
GA
10242021-06-21 Patrick Palka <ppalka@redhat.com>
1025
1026 PR c++/67302
1027 * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
1028 sooner, before the NRVO handling.
1029
10302021-06-21 Patrick Palka <ppalka@redhat.com>
1031
1032 PR c++/80431
1033 * tree.c (bot_replace): Use convert_to_base to build the
1034 conversion to the (morally) virtual base.
1035
10362021-06-21 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR inline-asm/100785
1039 * typeck.c (cxx_mark_addressable): Diagnose trying to make
1040 bit-fields addressable.
1041
688359a2
GA
10422021-06-17 Jason Merrill <jason@redhat.com>
1043
1044 PR c++/101106
1045 * decl.c (duplicate_decls): Make 'deleted after first declaration'
1046 pedwarn on by default.
1047
10482021-06-17 Jason Merrill <jason@redhat.com>
1049
1050 PR c++/101029
1051 * init.c (build_vec_init): Preserve the type of base.
1052
9a61dfdb
GA
10532021-06-16 Jason Merrill <jason@redhat.com>
1054
1055 PR c++/101078
1056 PR c++/91706
1057 * pt.c (tsubst_baselink): Update binfos in non-dependent case.
1058
ede6c356
GA
10592021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1060
1061 * decl.c (duplicate_decls): Likewise.
1062
8dc48181
GA
10632021-06-14 Tobias Burnus <tobias@codesourcery.com>
1064
1065 PR c/100913
1066 * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
1067 var in the error case.
1068
4e70c34e
GA
10692021-06-13 Trevor Saunders <tbsaunde@tbsaunde.org>
1070
1071 * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
1072 with range based for.
1073 (cxx_eval_store_expression): Likewise.
1074 (cxx_eval_loop_expr): Likewise.
1075 * decl.c (wrapup_namespace_globals): Likewise.
1076 (cp_finish_decl): Likewise.
1077 (cxx_simulate_enum_decl): Likewise.
1078 * parser.c (cp_parser_postfix_expression): Likewise.
1079
8b8c3912
GA
10802021-06-12 Jason Merrill <jason@redhat.com>
1081
1082 PR c++/101029
1083 * init.c (build_vec_init): Shortcut [0] case.
1084
10852021-06-12 Jason Merrill <jason@redhat.com>
1086
1087 * pt.c (lookup_template_class_1): Shortcut current_class_type.
1088
f16f65f8
GA
10892021-06-11 Patrick Palka <ppalka@redhat.com>
1090
1091 DR 1227
1092 PR c++/96560
1093 * pt.c (tsubst_arg_types): Rearrange so that we substitute into
1094 TYPE_ARG_TYPES in forward order while short circuiting
1095 appropriately. Adjust formatting.
1096
10972021-06-11 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c++/100974
1100 * cp-tree.h (struct saved_scope): Add consteval_if_p
1101 member. Formatting fix for the discarded_stmt comment.
1102 (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
1103 * parser.c (cp_parser_lambda_expression): Temporarily disable
1104 in_consteval_if_p when parsing lambda body.
1105 (cp_parser_selection_statement): Parse consteval if.
1106 * decl.c (struct named_label_entry): Add in_consteval_if member.
1107 (level_for_consteval_if): New function.
1108 (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
1109 consteval if.
1110 * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
1111 why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
1112 for !ctx->manifestly_const_eval.
1113 (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
1114 condition as if it was __builtin_is_constant_evaluated call.
1115 (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
1116 recurse on both branches.
1117 * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
1118 as the else branch.
1119 * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
1120 Temporarily set in_consteval_if_p when recursing on
1121 IF_STMT_CONSTEVAL_P then branch.
1122 (tsubst_lambda_expr): Temporarily disable
1123 in_consteval_if_p when instantiating lambda body.
1124 * call.c (immediate_invocation_p): Return false when
1125 in_consteval_if_p.
1126
43c35d0d
GA
11272021-06-11 Marek Polacek <polacek@redhat.com>
1128
1129 PR c++/100995
1130 * constexpr.c (maybe_constexpr_fn): New.
1131 * cp-tree.h (maybe_constexpr_fn): Declare.
1132 * semantics.c (find_std_constant_evaluated_r): New.
1133 (maybe_warn_for_constant_evaluated): New.
1134 (finish_if_stmt_cond): Call it.
1135
11362021-06-10 Patrick Palka <ppalka@redhat.com>
1137
1138 PR c++/67829
1139 * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
1140 the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
1141 a template template parameter, adjust to the
1142 TEMPLATE_TEMPLATE_PARAMETER before falling through.
1143
11442021-06-10 Patrick Palka <ppalka@redhat.com>
1145
1146 PR c++/100946
1147 * constraint.cc (normalize_placeholder_type_constraints): When
1148 normalizing a non-templated return-type-requirement, add a dummy
1149 level to initial_parms.
1150
c6038721
GA
11512021-06-08 Marek Polacek <polacek@redhat.com>
1152
1153 PR c++/100065
1154 * decl.c (grokdeclarator): Store a value-dependent
1155 explicit-specifier even for deduction guides.
1156
11572021-06-08 Jason Merrill <jason@redhat.com>
1158
1159 * parser.c (cp_parser_string_literal): Adjust diagnostic.
1160
11612021-06-08 Jason Merrill <jason@redhat.com>
1162
1163 PR c++/100963
1164 * call.c (perfect_conversion_p): Check check_narrowing.
1165
11662021-06-08 Jason Merrill <jason@redhat.com>
1167
1168 PR c++/91706
1169 * name-lookup.c (get_class_binding): Keep a BASELINK.
1170 (set_inherited_value_binding_p): Adjust.
1171 * lambda.c (is_lambda_ignored_entity): Adjust.
1172 * pt.c (lookup_template_function): Copy a BASELINK before
1173 modifying it.
1174
11752021-06-08 Jason Merrill <jason@redhat.com>
1176
1177 PR c++/91706
1178 * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
1179
11802021-06-08 Jason Merrill <jason@redhat.com>
1181
1182 * module.cc (duplicate_hash::hash): Comment out.
1183 (trees_in::tree_value): Adjust loop counter.
1184
11852021-06-08 Jason Merrill <jason@redhat.com>
1186
1187 PR c++/100102
1188 * init.c (build_offset_ref): Return the BASELINK for a static
1189 member function.
1190
438aac59
GA
11912021-06-07 Patrick Palka <ppalka@redhat.com>
1192
1193 PR c++/100918
1194 * parser.c (cp_parser_lookup_name): Check access of the lookup
1195 result before we potentially adjust an injected-class-name to
1196 its TEMPLATE_DECL.
1197
7d6987e9
GA
11982021-06-06 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/100902
1201 * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
1202 even when target is combined with other constructs.
1203
600f90cb
GA
12042021-06-04 Patrick Palka <ppalka@redhat.com>
1205
1206 PR c++/100893
1207 * pt.c (convert_template_argument): Strip top-level cv-quals
1208 on the substituted type of a non-type template parameter.
1209
12102021-06-04 Patrick Palka <ppalka@redhat.com>
1211
1212 PR c++/100102
1213 * pt.c (tsubst_function_decl): Remove old code for reducing
1214 args when it has excess levels.
1215
12162021-06-04 Jakub Jelinek <jakub@redhat.com>
1217
1218 PR c++/100872
1219 * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
1220 ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
1221 to the start.
1222
440c8a0a
GA
12232021-06-03 Patrick Palka <ppalka@redhat.com>
1224
1225 PR c++/100592
1226 * decl.c (make_typename_type): After calling
1227 lookup_template_class, adjust the result to its TYPE_NAME and
1228 then consider the tf_keep_type_decl flag.
1229
12302021-06-03 Patrick Palka <ppalka@redhat.com>
1231
1232 PR c++/100862
1233 * pt.c (set_current_access_from_decl): Move to ...
1234 * class.c (set_current_access_from_decl): ... here.
1235 (handle_using_decl): Use it to propagate the access of the
1236 using-enum decl to the copy of the imported enumerator.
1237 * cp-tree.h (set_current_access_from_decl): Declare.
1238 * decl.c (build_enumerator): Simplify using make_temp_override
1239 and set_current_access_from_decl.
1240
12412021-06-03 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c++/100859
1244 * semantics.c (handle_omp_array_sections_1): For
1245 OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
1246 finish_non_static_data_member and allow this as base.
1247 (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1248 after depend only cases. Let this be diagnosed by !lvalue_p
1249 case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
1250 assert.
1251 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
1252
9663c744
GA
12532021-06-02 Jason Merrill <jason@redhat.com>
1254
1255 PR c++/100838
1256 * call.c (convert_like_internal): Clear tf_no_cleanup when
1257 recursing.
1258 (build_user_type_conversion_1): Only add ck_rvalue if
1259 LOOKUP_ONLYCONVERTING.
1260
b75978d1
GA
12612021-06-01 Patrick Palka <ppalka@redhat.com>
1262
1263 PR c++/65816
1264 * init.c (expand_aggr_init_1): Check
1265 type_has_non_user_provided_default_constructor instead of
1266 type_has_user_provided_constructor.
1267
12682021-06-01 Jason Merrill <jason@redhat.com>
1269
1270 PR c++/91859
1271 * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
1272 for destroying delete.
1273 * init.c (build_delete): Don't clobber before destroying delete.
1274
12752021-06-01 Jason Merrill <jason@redhat.com>
1276
1277 PR c++/94492
1278 * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
1279
ee682192
GA
12802021-05-31 Richard Biener <rguenther@suse.de>
1281
1282 PR c++/88601
1283 * cp-objcp-common.c (names_builtin_p): Handle
1284 RID_BUILTIN_SHUFFLEVECTOR.
1285 * cp-tree.h (build_x_shufflevector): Declare.
1286 * parser.c (cp_parser_postfix_expression): Handle
1287 RID_BUILTIN_SHUFFLEVECTOR.
1288 * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
1289 * typeck.c (build_x_shufflevector): Build either a lowered
1290 VEC_PERM_EXPR or an unlowered shufflevector via a temporary
1291 internal function IFN_SHUFFLEVECTOR.
1292
48166757
GA
12932021-05-28 Jason Merrill <jason@redhat.com>
1294
1295 * constexpr.c (build_data_member_initialization): Use tsi_range.
1296 (build_constexpr_constructor_member_initializers): Likewise.
1297 (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
1298 (potential_constant_expression_1): Likewise.
1299 * coroutines.cc (await_statement_expander): Likewise.
1300 (await_statement_walker): Likewise.
1301 * module.cc (trees_out::core_vals): Likewise.
1302 * pt.c (tsubst_expr): Likewise.
1303 * semantics.c (set_cleanup_locs): Likewise.
1304
13052021-05-28 Jason Merrill <jason@redhat.com>
1306
1307 PR c++/100797
1308 PR c++/95719
1309 * call.c (build_over_call): Adjust base_binfo in
1310 resolves_to_fixed_type_p case.
1311
13122021-05-28 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR middle-end/99928
1315 * semantics.c (handle_omp_array_sections): Copy
1316 OMP_CLAUSE_MAP_IMPLICIT.
1317 (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1318 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1319 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1320 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1321 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1322 if present in map_head, map_field_head or map_firstprivate_head
1323 bitmaps.
1324
13252021-05-28 Tobias Burnus <tobias@codesourcery.com>
1326
1327 * parser.c (cp_parser_omp_clause_affinity): New.
1328 (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
1329 cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
1330 clause.
1331 * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
1332 finish_omp_clauses): Likewise.
1333
cd62d089
GA
13342021-05-27 Matthias Kretz <kretz@kde.org>
1335
1336 PR c++/100716
1337 * error.c (dump_template_bindings): Include code to print
1338 "[with" and ']', conditional on whether anything is printed at
1339 all. This is tied to whether a semicolon is needed to separate
1340 multiple template parameters. If the template argument repeats
1341 the template parameter (T = T), then skip the parameter.
1342 (dump_substitution): Moved code to print "[with" and ']' to
1343 dump_template_bindings.
1344 (dump_function_decl): Partial revert of PR50828, which masked
1345 TFF_TEMPLATE_NAME for all of dump_function_decl. Now
1346 TFF_TEMPLATE_NAME is masked for the scope of the function and
1347 only carries through to dump_function_name.
1348 (dump_function_name): Avoid calling dump_template_parms if
1349 TFF_TEMPLATE_NAME is set.
1350
13512021-05-27 Matthias Kretz <kretz@kde.org>
1352
1353 PR c++/100763
1354 * error.c: Call dump_scope when printing a typedef.
1355
13562021-05-27 Patrick Palka <ppalka@redhat.com>
1357
1358 PR c++/99893
1359 * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
1360
13612021-05-27 Jason Merrill <jason@redhat.com>
1362
1363 PR c++/86355
1364 * pt.c (use_pack_expansion_extra_args_p): Don't compare
1365 args from the same argument pack.
1366
13672021-05-27 Patrick Palka <ppalka@redhat.com>
1368
1369 DR 1315
1370 PR c++/67593
1371 PR c++/96555
1372 * pt.c (process_partial_specialization): Don't error on a
1373 non-simple non-type template argument that involves template
1374 parameters.
1375 (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
1376 MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
1377
01c59ef2
GA
13782021-05-26 Patrick Palka <ppalka@redhat.com>
1379
1380 PR c++/100502
1381 * typeck.c (finish_class_member_access_expr): Disable ahead
1382 of time access checking during the member lookup.
1383
13842021-05-26 Patrick Palka <ppalka@redhat.com>
1385
1386 PR c++/100368
1387 * tree.c (build_target_expr_with_type): Don't call force_rvalue
1388 on CALL_EXPR initializer. Simplify now that bot_manip is no
1389 longer a caller.
1390 (bot_manip): Use force_target_expr instead of
1391 build_target_expr_with_type.
1392
13932021-05-26 Patrick Palka <ppalka@redhat.com>
1394
1395 PR c++/97420
1396 * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
1397 (fnptr_conv_p): Don't call non_reference. Use INDIRECT_TYPE_P
1398 instead of TYPE_PTR_P.
1399 * pt.c (convert_nontype_argument_function): Look through
1400 implicit INDIRECT_REFs before calling strip_fnptr_conv.
1401
2bc6dace
GA
14022021-05-25 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR c++/100666
1405 * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
1406 and side-effects, temporarily disable -Wunused-result warning when
1407 building COMPOUND_EXPR.
1408
2832d51b
GA
14092021-05-21 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR middle-end/99928
1412 * semantics.c (finish_omp_clauses): Move firstprivate clauses with
1413 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1414 if a decl is mentioned both in map clause and in such firstprivate
1415 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1416
ea34e2ed
GA
14172021-05-20 Jason Merrill <jason@redhat.com>
1418
1419 * call.c (reference_binding): Check for designator.
1420 (implicit_conversion_1, build_special_member_call): Likewise.
1421 * decl.c (reshape_init_r): Likewise.
1422 * pt.c (do_class_deduction): Likewise.
1423 * typeck2.c (digest_init_r): Likewise.
1424
14252021-05-20 Jason Merrill <jason@redhat.com>
1426
1427 PR c++/100489
1428 * decl.c (reshape_init_class): Handle designator for
1429 member of anonymous aggregate here.
1430 * typeck2.c (process_init_constructor_record): Not here.
1431
14322021-05-20 Jonathan Wakely <jwakely@redhat.com>
1433
1434 * call.c (maybe_warn_array_conv): Use new warning option.
1435 * decl.c (mark_inline_variable, grokdeclarator): Likewise.
1436 * error.c (maybe_warn_cpp0x): Likewise.
1437 * parser.c (cp_parser_primary_expression)
1438 (cp_parser_unqualified_id)
1439 (cp_parser_pseudo_destructor_name)
1440 (cp_parser_lambda_introducer)
1441 (cp_parser_lambda_declarator_opt)
1442 (cp_parser_selection_statement)
1443 (cp_parser_init_statement)
1444 (cp_parser_decomposition_declaration)
1445 (cp_parser_function_specifier_opt)
1446 (cp_parser_static_assert)
1447 (cp_parser_namespace_definition)
1448 (cp_parser_using_declaration)
1449 (cp_parser_asm_definition)
1450 (cp_parser_ctor_initializer_opt_and_function_body)
1451 (cp_parser_initializer_list)
1452 (cp_parser_type_parameter_key)
1453 (cp_parser_member_declaration)
1454 (cp_parser_try_block)
1455 (cp_parser_std_attribute_spec): Likewise.
1456 * pt.c (check_template_variable): Likewise.
1457
14582021-05-20 Jason Merrill <jason@redhat.com>
1459
1460 PR c++/100634
1461 * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
1462
14632021-05-20 Jason Merrill <jason@redhat.com>
1464
1465 PR c++/100659
1466 * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
1467
65f32e5d
GA
14682021-05-19 Jason Merrill <jason@redhat.com>
1469
1470 PR c++/100367
1471 PR c++/96299
1472 * method.c (genericize_spaceship): Use fold_build2 for scalar
1473 operands.
1474
14752021-05-19 Jason Merrill <jason@redhat.com>
1476
1477 * pt.c (build_deduction_guide): Treat the implicit deduction guide
1478 as a member of the class.
1479
14802021-05-19 Marek Polacek <polacek@redhat.com>
1481
1482 PR c++/100596
1483 * cp-tree.h (any_non_type_attribute_p): Remove.
1484 * decl.c (grokdeclarator): Turn an error into a warning and only
1485 warn for standard attributes.
1486 * decl2.c (any_non_type_attribute_p): Remove.
1487 * parser.c (cp_parser_elaborated_type_specifier): Turn an error
1488 into a warning and only warn for standard attributes.
1489 (cp_parser_member_declaration): Likewise.
1490
14912021-05-19 Martin Liska <mliska@suse.cz>
1492
1493 PR testsuite/100658
1494 * mangle.c (write_encoding): Fix typos.
1495
14962021-05-19 Jakub Jelinek <jakub@redhat.com>
1497
1498 PR middle-end/99928
1499 * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
1500 master when combined with taskloop.
1501 (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1502 parallel master when not combined with taskloop.
1503
15042021-05-19 Jason Merrill <jason@redhat.com>
1505
1506 PR c++/100261
1507 * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
1508
15092021-05-19 Jason Merrill <jason@redhat.com>
1510
1511 PR c++/100372
1512 * tree.c (strip_typedefs): Only look at the pattern of a
1513 TYPE_PACK_EXPANSION if it's a type.
1514
a8daf9a1
GA
15152021-05-18 Marek Polacek <polacek@redhat.com>
1516
1517 * class.c (classtype_has_non_deleted_copy_ctor): Remove.
1518 * constraint.cc (contains_wildcard_p): Likewise.
1519 (get_template_head_requirements): Likewise.
1520 (check_constrained_friend): Likewise.
1521 (subsumes_constraints): Likewise.
1522 * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
1523 (push_void_library_fn): Likewise.
1524 (get_pattern_parm): Likewise.
1525 (get_template_parms_at_level): Likewise.
1526 (lambda_return_type): Likewise.
1527 (get_template_head_requirements): Likewise.
1528 (check_constrained_friend): Likewise.
1529 (subsumes_constraints): Likewise.
1530 * decl.c (push_void_library_fn): Likewise.
1531 * lambda.c (lambda_return_type): Likewise.
1532 * pt.c (get_template_parms_at_level): Likewise.
1533 (get_pattern_parm): Likewise.
1534
15352021-05-18 Jason Merrill <jason@redhat.com>
1536
1537 PR c++/100644
1538 * call.c (perfect_candidate_p): An implicitly deleted move
1539 is not perfect.
1540
15412021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
1542
1543 PR c++/100281
1544 * cvt.c (cp_convert_to_pointer): Use the size of the target
1545 pointer type.
1546 * tree.c (cp_build_reference_type): Call
1547 cp_build_reference_type_for_mode with VOIDmode.
1548 (cp_build_reference_type_for_mode): Rename from
1549 cp_build_reference_type. Add MODE argument and invoke
1550 build_reference_type_for_mode.
1551 (strip_typedefs): Use build_pointer_type_for_mode and
1552 cp_build_reference_type_for_mode for pointers and references.
1553
a7ffc1ef
GA
15542021-05-17 Jonathan Wakely <jwakely@redhat.com>
1555
1556 PR c++/100635
1557 * call.c (convert_like_internal): Print different diagnostic if
1558 the lvalue reference is const.
1559
87a7d10c
GA
15602021-05-14 Jason Merrill <jason@redhat.com>
1561
1562 PR c++/95870
1563 * pt.c (enclosing_instantiation_of): Just compare
1564 DECL_SOURCE_LOCATION.
1565 (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
1566
15672021-05-14 Marek Polacek <polacek@redhat.com>
1568 Jason Merrill <jason@redhat.com>
1569
1570 PR c++/99032
1571 * cp-tree.h (any_non_type_attribute_p): Declare.
1572 * decl.c (grokdeclarator): Diagnose when an attribute appertains to
1573 a friend declaration that is not a definition.
1574 * decl2.c (any_non_type_attribute_p): New.
1575 * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
1576 in the middle of decl-specifiers.
1577 (cp_parser_elaborated_type_specifier): Diagnose when an attribute
1578 appertains to a friend declaration that is not a definition.
1579 (cp_parser_member_declaration): Likewise.
1580
0ff3a0f2
GA
15812021-05-12 Marek Polacek <polacek@redhat.com>
1582
1583 * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
1584 sentinel.
1585
15862021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1587
1588 * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
1589 'close'.
1590
037e3661
GA
15912021-05-11 Jason Merrill <jason@redhat.com>
1592
1593 PR c++/100517
1594 * typeck.c (build_reinterpret_cast_1): Check intype on
1595 cast to vector.
1596
15972021-05-11 Patrick Palka <ppalka@redhat.com>
1598
1599 PR c++/51577
1600 * name-lookup.c (maybe_save_operator_binding): Unconditionally
1601 enable for all function templates, not just generic lambdas.
1602 Handle compound-assignment operator expressions.
1603 * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
1604 in the type-dependent case.
1605 (build_x_modify_expr): Likewise. Move declaration of 'op' closer
1606 to its first use.
1607
16082021-05-11 Patrick Palka <ppalka@redhat.com>
1609
1610 PR c++/100138
1611 * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
1612 (satisfy_atom): Set up iloc_sentinel before calling
1613 cxx_constant_value.
1614 * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
1615 expansion, carry over PACK_EXPANSION_LOCAL_P and
1616 PACK_EXPANSION_SIZEOF_P from the original pack expansion.
1617
aa891c56
GA
16182021-05-10 Richard Biener <rguenther@suse.de>
1619
1620 PR middle-end/100464
1621 PR c++/100468
1622 * call.c (set_up_extended_ref_temp): Mark the temporary
1623 addressable if the TARGET_EXPR was.
1624
16252021-05-10 Martin Liska <mliska@suse.cz>
1626
1627 * decl.c (duplicate_decls): Use startswith
1628 function instead of strncmp.
1629 (cxx_builtin_function): Likewise.
1630 (omp_declare_variant_finalize_one): Likewise.
1631 (grokfndecl): Likewise.
1632 * error.c (dump_decl_name): Likewise.
1633 * mangle.c (find_decomp_unqualified_name): Likewise.
1634 (write_guarded_var_name): Likewise.
1635 (decl_tls_wrapper_p): Likewise.
1636 * parser.c (cp_parser_simple_type_specifier): Likewise.
1637 (cp_parser_tx_qualifier_opt): Likewise.
1638 * pt.c (template_parm_object_p): Likewise.
1639 (dguide_name_p): Likewise.
1640
16412021-05-10 Martin Liska <mliska@suse.cz>
1642
1643 PR c++/99616
1644 * decl.c (grokdeclarator): Remove redundant NULL check.
1645
62d87a32
GA
16462021-05-07 Jason Merrill <jason@redhat.com>
1647
1648 * tree.c (rvalue): Assert expr is not a class lvalue.
1649
16502021-05-07 Jason Merrill <jason@redhat.com>
1651
1652 * cp-tree.h (build_stub_object): Declare.
1653 * method.c (build_stub_object): No longer static.
1654 * call.c (can_convert): Use it.
1655 * tree.c (build_dummy_object): Adjust comment.
1656 * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
1657 TARGET_EXPR.
1658
16592021-05-07 Jason Merrill <jason@redhat.com>
1660
1661 * coroutines.cc (build_co_await): Don't call 'rvalue'.
1662 (flatten_await_stmt): Simplify initialization.
1663 (morph_fn_to_coro): Change 'rvalue' to 'move'. Simplify.
1664
99e8df7a
GA
16652021-05-04 Tobias Burnus <tobias@codesourcery.com>
1666
1667 * semantics.c (finish_omp_reduction_clause): Accept float + complex
1668 for || and && reductions.
1669
e690396d
GA
16702021-05-03 Patrick Palka <ppalka@redhat.com>
1671
1672 PR c++/100362
1673 * parser.c (cp_parser_class_head): Reinstate calls to pushclass
1674 and popclass when parsing the base-clause that were removed in
1675 r11-6815.
1676
16772021-05-03 Patrick Palka <ppalka@redhat.com>
1678
1679 PR c++/68942
1680 PR c++/100344
1681 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
1682 only when the callee is a FUNCTION_DECL.
1683
16842021-05-03 Marek Polacek <polacek@redhat.com>
1685
1686 PR c++/100055
1687 * decl.c (grokfndecl): Check current_template_parms.
1688
16892021-05-03 Marek Polacek <polacek@redhat.com>
1690
1691 DR 1312
1692 * constexpr.c (cxx_eval_constant_expression): Don't check
1693 integer_zerop.
1694
620a0635
GA
16952021-05-01 Jason Merrill <jason@redhat.com>
1696
1697 * cp-tree.h (class ovl_iterator): Allow copying. Add op==.
1698 (class ovl_range, class lkp_range): New.
1699 * call.c (build_op_call_1, add_candidates): Use them.
1700 (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
1701 (has_trivial_copy_p): Likewise.
1702 * class.c (handle_using_decl, get_basefndecls): Likewise.
1703 (maybe_warn_about_overly_private_class): Likewise.
1704 (warn_hidden, add_implicitly_declared_members): Likewise.
1705 (check_methods, clone_constructors_and_destructors): Likewise.
1706 (type_has_user_nondefault_constructor): Likewise.
1707
3c8e539d
GA
17082021-04-29 Jason Merrill <jason@redhat.com>
1709
1710 * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
1711 don't find a field.
1712
17132021-04-29 Jason Merrill <jason@redhat.com>
1714
1715 PR c++/51344
1716 * decl2.c (grokfield): Call cplus_decl_attributes for friend.
1717 (save_template_attributes): Use chainon.
1718 * friend.c (do_friend): Remove attrlist parm.
1719 * cp-tree.h (do_friend): Adjust.
1720 * class.c (add_implicitly_declared_members): Adjust.
1721 * decl.c (grokdeclarator): Adjust.
1722 * pt.c (apply_late_template_attributes): Optimize.
1723
17242021-04-29 Jason Merrill <jason@redhat.com>
1725
1726 PR c++/97974
1727 * class.c (finish_struct_anon_r): Drop complain parm.
1728 Remove non-field diagnostic.
1729 (finish_struct_anon): Adjust.
1730 * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
1731
17322021-04-29 Jason Merrill <jason@redhat.com>
1733
1734 * cp-tree.h (cp_evaluated): Add reset parm to constructor.
1735 * parser.c (cp_parser_constant_expression): Change
1736 allow_non_constant_p to int. Use cp_evaluated.
1737 (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
1738 * semantics.c (finish_id_expression_1): Don't mess with
1739 cp_unevaluated_operand here.
1740
17412021-04-29 Jason Merrill <jason@redhat.com>
1742
1743 * cp-tree.h: Clarify comments.
1744 * pt.c (get_template_parm_object): Add assert.
1745 * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
1746 * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
1747 * typeck2.c (store_init_value): Likewise.
1748
17492021-04-29 Patrick Palka <ppalka@redhat.com>
1750
1751 PR c++/68942
1752 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
1753 set tf_conv during the initial substitution into the function.
1754
17552021-04-29 Jakub Jelinek <jakub@redhat.com>
1756
1757 PR c++/100319
1758 * semantics.c (finish_omp_clauses): Fix up check that variable
1759 mentioned in detach clause doesn't appear in data-sharing clauses.
1760
e4ff4ffb
GA
17612021-04-28 Jakub Jelinek <jakub@redhat.com>
1762
1763 * module.cc: Remove #error that triggers if DEV-PHASE is empty.
1764
8f54dd61
GA
17652021-04-27 Jason Merrill <jason@redhat.com>
1766
1767 PR c++/92145
1768 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
1769 of operator=.
1770
17712021-04-27 Patrick Palka <ppalka@redhat.com>
1772
1773 PR c++/88580
1774 * pt.c (tsubst_initializer_list): Correctly handle the case
1775 where an argument inside a base initializer pack expansion is
1776 itself a pack expansion.
1777
c0fa3f2f
GA
17782021-04-26 Patrick Palka <ppalka@redhat.com>
1779
1780 PR c++/100209
1781 * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
1782 object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
1783 with a negative offset into one whose offset is nonnegative
1784 before calling cxx_fold_indirect_ref_1.
1785
502ef97c
GA
17862021-04-24 Patrick Palka <ppalka@redhat.com>
1787
1788 PR c++/89565
1789 PR c++/93383
1790 PR c++/95291
1791 PR c++/99200
1792 PR c++/99683
1793 * pt.c (do_class_deduction): Punt if the initializer is
1794 type-dependent.
1795
17962021-04-24 Patrick Palka <ppalka@redhat.com>
1797
1798 PR c++/87709
1799 * parser.c (cp_parser_type_id_1): If we see a template
1800 placeholder, first try simulating an error before issuing
1801 a real error.
1802
05ec629f
GA
18032021-04-23 Patrick Palka <ppalka@redhat.com>
1804
1805 PR c++/98767
1806 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
1807 Adjust parameter list loop to iterate over 'types' instead of
1808 'args'. Output the trailing '...' for a variadic function.
1809 Remove PARM_DECL support.
1810 (pp_cxx_requires_expr): Pretty print the parameter list directly
1811 instead of going through pp_cxx_parameter_declaration_clause.
1812
18132021-04-23 Patrick Palka <ppalka@redhat.com>
1814
1815 DR 2374
1816 * decl.c (is_direct_enum_init): Check the implicit
1817 convertibility requirement added by CWG 2374.
1818
18192021-04-23 Martin Liska <mliska@suse.cz>
1820
1821 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
1822 * lex.c (init_operators): Remove run-time check.
1823
e3948473
GA
18242021-04-22 Marek Polacek <polacek@redhat.com>
1825
1826 PR c++/100161
1827 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
1828 op1 separately for value- or type-dependence.
1829
c1ef0c92
GA
18302021-04-21 Marek Polacek <polacek@redhat.com>
1831
1832 PR c++/96380
1833 * parser.c (cp_parser_enum_specifier): Don't allow defining
1834 types in enum-base.
1835
18362021-04-21 Martin Liska <mliska@suse.cz>
1837
1838 Revert:
1839 2021-04-21 Martin Liska <mliska@suse.cz>
1840
1841 * error.c (dump_decl): Use flags in dump_generic_node call.
1842
18432021-04-21 Martin Liska <mliska@suse.cz>
1844
1845 * error.c (dump_decl): Use flags in dump_generic_node call.
1846
18472021-04-21 Martin Liska <mliska@suse.cz>
1848
1849 * error.c (dump_decl): Support anonymous labels.
1850
be8aad8d
GA
18512021-04-20 Jason Merrill <jason@redhat.com>
1852
1853 PR c++/100109
1854 * pt.c (find_parameter_packs_r): Look into enum initializers.
1855
6e81e015
GA
18562021-04-19 Marek Polacek <polacek@redhat.com>
1857
1858 PR c++/97536
1859 * decl.c (grokvardecl): Given an error when a concept is not defined
1860 at namespace scope.
1861
8ae884c0
GA
18622021-04-16 Jakub Jelinek <jakub@redhat.com>
1863
1864 PR c++/100111
1865 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
1866 for empty classes into *valp when types don't match even when *valp
1867 is NULL.
1868
18692021-04-16 Marek Polacek <polacek@redhat.com>
1870
1871 PR c++/99803
1872 * decl.c (make_typename_type): Give an error and return when
1873 name is is_overloaded_fn.
1874 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
1875 before calling make_typename_type.
1876
18772021-04-16 Patrick Palka <ppalka@redhat.com>
1878
1879 PR c++/99700
1880 * constexpr.c (reduced_constant_expression_p): For array
1881 CONSTRUCTORs, use a dedicated loop that additionally verifies
1882 the CONSTRUCTOR spans the entire array.
1883
18842021-04-16 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c++/99850
1887 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
1888 If lambda_p, return pce_ok instead of pce_maybe_postfix.
1889
18902021-04-16 Jakub Jelinek <jakub@redhat.com>
1891
1892 PR c++/99833
1893 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
1894 binding, add to data.internal also all corresponding structured
1895 binding decls.
1896
18972021-04-16 Jason Merrill <jason@redhat.com>
1898
1899 PR c++/100079
1900 * cp-tree.h (first_field): Declare.
1901 * mangle.c (range_expr_nelts): New.
1902 (write_expression): Improve class NTTP mangling.
1903 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
1904 * tree.c (zero_init_expr_p): Improve class NTTP handling.
1905 * decl.c: Adjust comment.
1906
ee351f7f
GA
19072021-04-15 Jason Merrill <jason@redhat.com>
1908
1909 PR c++/80456
1910 * call.c (build_new_method_call_1): Check again for side-effects
1911 with a volatile object.
1912
19132021-04-15 Jason Merrill <jason@redhat.com>
1914
1915 PR c++/100101
1916 PR c++/99583
1917 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
1918 TYPE_RAISES_EXCEPTIONS here.
1919 * tree.c (cp_walk_subtrees): Not here.
1920
19212021-04-15 Jason Merrill <jason@redhat.com>
1922
1923 PR c++/100091
1924 PR c++/99478
1925 * parser.c (cp_parser_default_type_template_argument): Set
1926 parser->local_variables_forbidden_p.
1927
19282021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1929
1930 PR c++/98852
1931 * typeck.c (merge_type_attributes_from): New function.
1932 (cp_common_type): Use it for vector types.
1933
df3b1289
GA
19342021-04-14 Jason Merrill <jason@redhat.com>
1935
1936 PR c++/100078
1937 PR c++/93085
1938 * pt.c (uses_outer_template_parms): Also look at default
1939 template argument.
1940
19412021-04-14 Jason Merrill <jason@redhat.com>
1942
1943 PR c++/93314
1944 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
1945 for a non-static data member in a constant-expression.
1946
19472021-04-14 Patrick Palka <ppalka@redhat.com>
1948
1949 PR c++/83476
1950 PR c++/99885
1951 * pt.c (deducible_expression): Look through implicit
1952 INDIRECT_REFs as well.
1953
19542021-04-14 Jason Merrill <jason@redhat.com>
1955
1956 PR c++/99478
1957 * parser.c (cp_parser_lambda_expression): Reject lambda
1958 in template parameter type.
1959
19602021-04-14 Jason Merrill <jason@redhat.com>
1961
1962 PR c++/90674
1963 * decl.c (duplicate_decls): Don't propagate
1964 DECL_INITIALIZED_IN_CLASS_P to a specialization.
1965
19662021-04-14 Jason Merrill <jason@redhat.com>
1967
1968 PR c++/88742
1969 PR c++/49951
1970 PR c++/58123
1971 * semantics.c (set_cleanup_locs): New.
1972 (do_poplevel): Call it.
1973 * parser.c (cp_parser_compound_statement): Consume the }
1974 before finish_compound_stmt.
1975
6d0d35d5
GA
19762021-04-13 Jason Merrill <jason@redhat.com>
1977
1978 PR c++/100032
1979 * pt.c (get_underlying_template): Compare TYPE_QUALS.
1980
19812021-04-13 Jason Merrill <jason@redhat.com>
1982
1983 PR c++/100054
1984 PR c++/90479
1985 * init.c (get_nsdmi): Do more context adjustment for local classes.
1986
19872021-04-13 Patrick Palka <ppalka@redhat.com>
1988
1989 PR c++/99008
1990 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
1991 rather than issuing a pedwarn.
1992 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
1993 for consistent diagnostics.
1994
19952021-04-13 Jason Merrill <jason@redhat.com>
1996
1997 PR c++/91933
1998 * class.c (build_base_path): Shortcut simple non-pointer case.
1999
20002021-04-13 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
2003 of the linemap.
2004 (module_state::write_location): Likewise.
2005
20062021-04-13 Patrick Palka <ppalka@redhat.com>
2007
2008 PR c++/97134
2009 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
2010 when checking if the initializer is an equivalent class
2011 placeholder template parameter.
2012
20132021-04-13 Patrick Palka <ppalka@redhat.com>
2014
2015 PR c++/99961
2016 PR c++/99994
2017 * constraint.cc (satisfy_normalized_constraints): Set
2018 cp_unevaluated.
2019 * parser.c (cp_parser_concept_definition): Likewise.
2020 (cp_parser_requires_clause_opt): Likewise.
2021
287ad814
GA
20222021-04-12 Jason Merrill <jason@redhat.com>
2023
2024 PR c++/93085
2025 * pt.c (uses_outer_template_parms): Handle non-type and template
2026 template parameters specifically.
2027
a0ecde22
GA
20282021-04-11 Jason Merrill <jason@redhat.com>
2029
2030 PR c++/97974
2031 * decl.c (fixup_anonymous_aggr): Prune all functions from
2032 CLASSTYPE_MEMBER_VEC.
2033
1d54b138
GA
20342021-04-10 Jason Merrill <jason@redhat.com>
2035
2036 PR c++/98800
2037 PR c++/97399
2038 * parser.c (cp_parser_direct_declarator): Don't
2039 inject_this_parameter if static_p.
2040 (cp_parser_omp_var_list_no_open): Parse 'this' even if
2041 current_class_ptr isn't set for a better diagnostic.
2042
20432021-04-10 Jason Merrill <jason@redhat.com>
2044
2045 PR c++/99180
2046 PR c++/93295
2047 PR c++/93867
2048 PR c++/99118
2049 PR c++/96873
2050 * pt.c (alias_ctad_tweaks): Handle failure better.
2051
20522021-04-10 Jason Merrill <jason@redhat.com>
2053
2054 PR c++/100006
2055 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
2056
3115aba8
GA
20572021-04-09 Patrick Palka <ppalka@redhat.com>
2058
2059 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
2060 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
2061 (LAMBDA_EXPR_REGEN_INFO): ... this.
2062 (tree_lambda_expr::regenerated_from)
2063 (tree_lambda_expr::regenerating_targs): Replace these with ...
2064 (tree_lambda_expr::regen_info): ... this.
2065 * constraint.cc (satisfy_declaration_constraints): Adjust
2066 accordingly.
2067 * lambda.c (build_lambda_expr): Likewise.
2068 * pt.c (regenerated_lambda_fn_p): Likewise.
2069 (most_general_lambda): Likewise.
2070 (tsubst_lambda_expr): Likewise.
2071
20722021-04-09 Marek Polacek <polacek@redhat.com>
2073
2074 PR c++/99806
2075 * parser.c (cp_parser_member_declaration): Call
2076 cp_parser_save_default_args even for function templates. Use
2077 STRIP_TEMPLATE on the declaration we're passing.
2078
019a9220
GA
20792021-04-08 Patrick Palka <ppalka@redhat.com>
2080
2081 PR c++/99874
2082 * constraint.cc (get_normalized_constraints_from_decl): Handle
2083 regenerated lambdas.
2084 (satisfy_declaration_constraints): Likewise. Check for
2085 dependent args later.
2086 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
2087 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
2088 (LAMBDA_EXPR_REGENERATING_TARGS): New.
2089 (tree_lambda_expr::regenerated_from): New data member.
2090 (tree_lambda_expr::regenerating_targs): New data member.
2091 (add_to_template_args): Declare.
2092 (regenerated_lambda_fn_p): Likewise.
2093 (most_general_lambda): Likewise.
2094 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
2095 and LAMBDA_EXPR_REGENERATING_TARGS.
2096 * pt.c (add_to_template_args): No longer static.
2097 (tsubst_function_decl): Unconditionally propagate constraints on
2098 the substituted function decl.
2099 (instantiated_lambda_fn_p): Rename to ...
2100 (regenerated_lambda_fn_p): ... this. Check
2101 LAMBDA_EXPR_REGENERATED_FROM instead of
2102 LAMBDA_EXPR_INSTANTIATED.
2103 (most_general_lambda): Define.
2104 (enclosing_instantiation_of): Adjust after renaming
2105 instantiated_lambda_fn_p.
2106 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
2107 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
2108 Don't substitute or set constraints on the regenerated lambda.
2109
21102021-04-08 Patrick Palka <ppalka@redhat.com>
2111
2112 PR c++/97679
2113 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
2114 them into the propagated constraints.
2115
21162021-04-08 Jason Merrill <jason@redhat.com>
2117
2118 PR c++/91849
2119 * call.c (convert_like_internal): Improve reference diagnostic.
2120
21212021-04-08 Jakub Jelinek <jakub@redhat.com>
2122
2123 PR c++/99859
2124 * constexpr.c (addr_of_non_const_var): New function.
2125 (cxx_bind_parameters_in_call): Set *non_constant_args to true
2126 even if cp_walk_tree on arg with addr_of_non_const_var callback
2127 returns true.
2128
21292021-04-08 Jason Merrill <jason@redhat.com>
2130
2131 PR c++/94529
2132 * pt.c (determine_specialization): Improve diagnostic.
2133
21342021-04-08 Marek Polacek <polacek@redhat.com>
2135
2136 PR c++/99844
2137 * decl.c (build_explicit_specifier): Call
2138 check_for_bare_parameter_packs.
2139 * except.c (build_noexcept_spec): Likewise.
2140
299859c2
GA
21412021-04-07 Jason Merrill <jason@redhat.com>
2142
2143 PR c++/41723
2144 * parser.c (cp_parser_class_name): Check dependent_scope_p.
2145
21462021-04-07 Jason Merrill <jason@redhat.com>
2147
2148 PR c++/52625
2149 * pt.c (maybe_process_partial_specialization): Check
2150 DECL_SELF_REFERENCE_P.
2151
21522021-04-07 Jason Merrill <jason@redhat.com>
2153
2154 PR c++/92918
2155 * name-lookup.c (push_class_level_binding_1): Do overload a new
2156 function with a previous using-declaration.
2157
8cac6af6
GA
21582021-04-06 Jason Merrill <jason@redhat.com>
2159
2160 PR c++/96673
2161 * init.c (get_nsdmi): Don't defer access checking.
2162
21632021-04-06 Jason Merrill <jason@redhat.com>
2164
2165 PR c++/99901
2166 * decl.c (cp_finish_decl): mark_needed an implicitly inline
2167 static data member with an out-of-class redeclaration.
2168
21692021-04-06 Jason Merrill <jason@redhat.com>
2170
2171 PR c++/91241
2172 * mangle.c (write_compact_number): Add sanity check.
2173 (write_local_name): Use list_length for parm number.
2174
21752021-04-06 Patrick Palka <ppalka@redhat.com>
2176
2177 PR c++/99899
2178 * pt.c (do_auto_deduction): Don't exit early when deducing the
2179 array type of a structured binding. Also handle adc_decomp_type
2180 during constraint checking.
2181
b1da9916
GA
21822021-04-05 Jason Merrill <jason@redhat.com>
2183
2184 PR c++/96311
2185 * typeck.c (check_return_expr): Call mark_exp_read in dependent
2186 case.
2187
21882021-04-05 Jason Merrill <jason@redhat.com>
2189
2190 PR c++/98440
2191 * typeck.c (build_reinterpret_cast_1): Don't perform
2192 temporary materialization.
2193
21942021-04-05 Jason Merrill <jason@redhat.com>
2195
2196 PR c++/95317
2197 * pt.c (lookup_template_class_1): Do tsubst_enum when
2198 tsubsting a generic lambda.
2199
22002021-04-05 Jason Merrill <jason@redhat.com>
2201
2202 PR c++/95870
2203 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
2204 there is no enclosing non-lambda function.
2205
22062021-04-05 Nathan Sidwell <nathan@acm.org>
2207
2208 PR c++/99380
2209 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
2210 query export when not needed.
2211 (preprocess_module, preprocessed_module): Adjust.
2212
22132021-04-05 Jason Merrill <jason@redhat.com>
2214
2215 PR c++/99066
2216 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
2217
22182021-04-05 Jason Merrill <jason@redhat.com>
2219
2220 PR c++/99201
2221 * pt.c (class el_data): Add visited field.
2222 (extract_local_specs): Pass it to cp_walk_tree.
2223 (extract_locals_r): Walk into the body of a lambda.
2224
22252021-04-05 Jason Merrill <jason@redhat.com>
2226
2227 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
2228 template result.
2229
91472884
GA
22302021-04-04 Jason Merrill <jason@redhat.com>
2231
2232 PR c++/99643
2233 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
2234
c0756c4e
GA
22352021-04-03 Marek Polacek <polacek@redhat.com>
2236
2237 PR c++/91416
2238 * parser.c: Create a GC root for attributes in a decl specifier.
2239 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
2240
22412021-04-03 Jason Merrill <jason@redhat.com>
2242
2243 PR c++/91217
2244 * pt.c (tsubst_lambda_expr): Skip the body block from
2245 DECL_SAVED_TREE.
2246
22472021-04-03 Jason Merrill <jason@redhat.com>
2248
2249 PR c++/90664
2250 * cvt.c (can_convert_qual): Check fnptr_conv_p.
2251
22522021-04-03 Jason Merrill <jason@redhat.com>
2253
2254 PR c++/97900
2255 * pt.c (regenerate_decl_from_template): tsubst_decl
2256 the parms.
2257
b7c1f3d6
GA
22582021-04-02 Patrick Palka <ppalka@redhat.com>
2259
2260 PR c++/99869
2261 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
2262 to do_auto_deduction.
2263
22642021-04-02 Patrick Palka <ppalka@redhat.com>
2265
2266 PR c++/99586
2267 * semantics.c (finish_compound_literal): Check
2268 template_placeholder_p instead of type_uses_auto.
2269
22702021-04-02 Jason Merrill <jason@redhat.com>
2271
2272 PR c++/97938
2273 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
2274 * lambda.c (add_capture): Set it.
2275 * pt.c (tsubst_pack_expansion): Handle it.
2276
22772021-04-02 Nathan Sidwell <nathan@acm.org>
2278
2279 * cp-tree.h (lang_decl_base): Correct module flag comment.
2280 * module.cc (trees_in::assert_definition): Break out
2281 not_tmpl var.
2282 (trees_out::lang_decl_bools): Do not write purview for header units.
2283
f1607029
GA
22842021-04-01 Marek Polacek <polacek@redhat.com>
2285
2286 PR c++/99831
2287 * method.c (defaulted_late_check): ++ and -- function_depth around
2288 the call to synthesize_method.
2289 * pt.c: Remove the saved_trees global.
2290
22912021-04-01 Jason Merrill <jason@redhat.com>
2292
2293 PR c++/99583
2294 PR c++/99584
2295 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
2296 TYPE_RAISES_EXCEPTIONS.
2297
22982021-04-01 Iain Sandoe <iain@sandoe.co.uk>
2299
2300 * mapper-client.cc (INCLUDE_MAP): New; require map to be
2301 included from system.h.
2302 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
2303
23042021-04-01 Jason Merrill <jason@redhat.com>
2305
2306 PR c++/98481
2307 * mangle.c (write_expression): Adjust.
2308 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
2309 (mark_abi_tags_r): Likewise.
2310
23112021-04-01 Nathan Sidwell <nathan@acm.org>
2312
2313 PR c++/99283
2314 * module.cc (trees_out::decl_node): Adjust importedness reference
2315 assert.
2316 (module_state::intercluster_seed): New. Seed both imports and
2317 inter-cluster references. Broken out of ...
2318 (module_state::write_cluster): ... here. Call it.
2319
95d217ab
GA
23202021-03-31 Jason Merrill <jason@redhat.com>
2321
2322 PR c++/99445
2323 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
2324
23252021-03-31 Patrick Palka <ppalka@redhat.com>
2326
2327 PR c++/88115
2328 * mangle.c (write_expression): Adjust the mangling of
2329 __alignof__.
2330
23312021-03-31 Patrick Palka <ppalka@redhat.com>
2332
2333 PR c++/99815
2334 * pt.c (placeholder_type_constraint_dependent_p): Expand
2335 argument packs to separate the first non-pack argument
2336 from the rest.
2337
08d2edae
GA
23382021-03-30 Nathan Sidwell <nathan@acm.org>
2339
2340 PR c++/99283
2341 * module.cc (dumper::operator): Make less brittle.
2342 (trees_out::core_bools): VAR_DECLs always have a context.
2343 (trees_out::key_mergeable): Use same_type_p for asserting.
2344 (trees_in::read_var_def): Propagate
2345 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2346
23472021-03-30 Jakub Jelinek <jakub@redhat.com>
2348
2349 PR c++/99790
2350 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
2351
651684b4
GA
23522021-03-26 Marek Polacek <polacek@redhat.com>
2353
2354 PR c++/98352
2355 * method.c (implicitly_declare_fn): Pass &raises to
2356 synthesized_method_walk.
2357
23582021-03-26 Nathan Sidwell <nathan@acm.org>
2359
2360 PR c++/99283
2361 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
2362 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
2363 * decl.c (duplicate_decls): Remove template_decl module flag
2364 propagation.
2365 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
2366 (dumper::impl::nested_name): Adjust for template-decl module flag
2367 change.
2368 (trees_in::assert_definition): Likewise.
2369 (trees_in::install_entity): Likewise.
2370 (trees_out::decl_value): Likewise. Remove alias template
2371 separation of template and type_decl.
2372 (trees_in::decl_value): Likewise.
2373 (trees_out::key_mergeable): Likewise,
2374 (trees_in::key_mergeable): Likewise.
2375 (trees_out::decl_node): Adjust for template-decl module flag
2376 change.
2377 (depset::hash::make_dependency): Likewise.
2378 (get_originating_module, module_may_redeclare): Likewise.
2379 (set_instantiating_module, set_defining_module): Likewise.
2380 * name-lookup.c (name_lookup::search_adl): Likewise.
2381 (do_pushdecl): Likewise.
2382 * pt.c (build_template_decl): Likewise.
2383 (lookup_template_class_1): Remove special alias_template handling
2384 of DECL_TI_TEMPLATE.
2385 (tsubst_template_decl): Likewise.
2386
23872021-03-26 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c++/99705
2390 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
2391 in DECL_EXPR or in BIND_EXPR_VARS.
2392
4493b1c1
GA
23932021-03-25 Jakub Jelinek <jakub@redhat.com>
2394
2395 PR c++/99672
2396 * parser.c (cp_parser_postfix_expression): For calls, create
2397 combined_loc and temporarily set input_location to it before
2398 calling finish_call_expr.
2399
24002021-03-25 Marek Polacek <polacek@redhat.com>
2401
2402 PR c++/94751
2403 * call.c (build_over_call): Maybe call mark_used in case
2404 deduce_inheriting_ctor fails and return error_mark_node.
2405 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
2406 * method.c (deduce_inheriting_ctor): Return bool if the deduction
2407 fails.
2408 (implicitly_declare_fn): If raises is error_mark_node, call
2409 synthesized_method_walk with diag being true.
2410
24112021-03-25 Jakub Jelinek <jakub@redhat.com>
2412
2413 PR c++/99745
2414 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
2415 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
2416
24172021-03-25 Marek Polacek <polacek@redhat.com>
2418
2419 PR c++/99331
2420 * call.c (build_converted_constant_expr_internal): Don't emit
2421 -Wconversion warnings.
2422
24232021-03-25 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c++/99565
2426 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
2427 to operand_equal_p.
2428 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
2429 or COMPOUND_EXPR.
2430
bf1f3168
GA
24312021-03-23 Nathan Sidwell <nathan@acm.org>
2432
2433 PR c++/99283
2434 * name-lookup.c (check_module_override): Set global or partition
2435 DUP on the binding vector.
2436
24372021-03-23 Marek Polacek <polacek@redhat.com>
2438
2439 PR c++/99318
2440 * decl2.c (cp_warn_deprecated_use_scopes): Only call
2441 cp_warn_deprecated_use when decl is a namespace, class, or enum.
2442
24432021-03-23 Nathan Sidwell <nathan@acm.org>
2444
2445 PR c++/99239
2446 * decl.c (duplicate_decls): Remove assert about maybe-imported
2447 artificial decls.
2448
24492021-03-23 Jakub Jelinek <jakub@redhat.com>
2450
2451 PR c++/99650
2452 * decl.c (cp_finish_decomp): Diagnose void initializers when
2453 using tuple_element and get.
2454
8b744f46
GA
24552021-03-22 Nathan Sidwell <nathan@acm.org>
2456
2457 PR c++/99480
2458 * module.cc (depset::hash::make_dependency): Propagate flags for
2459 partial specialization.
2460 (module_may_redeclare): Handle partial specialization.
2461
24622021-03-22 Nathan Sidwell <nathan@acm.org>
2463
2464 PR c++/99425
2465 * cp-tree.h (map_context_from, map_context_to): Delete.
2466 (add_mergeable_specialization): Add is_alias parm.
2467 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
2468 * module.cc (map_context_from, map_context_to): Delete.
2469 (trees_in::decl_value): Add specializations later, adjust call.
2470 Drop useless alias lookup. Set duplicate fn parm context.
2471 (check_mergeable_decl): Drop context mapping.
2472 (trees_in::is_matching_decl): Likewise.
2473 (trees_in::read_function_def): Drop parameter context adjustment
2474 here.
2475
24762021-03-22 Martin Liska <mliska@suse.cz>
2477
2478 PR c++/99687
2479 * module.cc (fini_modules): Call vec_free instead of delete.
2480
6af7b307
GA
24812021-03-20 Jakub Jelinek <jakub@redhat.com>
2482
2483 PR debug/99230
2484 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
2485 special code, instead call c_genericize_control_stmt.
2486
5f256a70
GA
24872021-03-19 Jakub Jelinek <jakub@redhat.com>
2488
2489 PR c++/99456
2490 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
2491 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
2492 don't diagnose it, set *non_constant_p nor return t.
2493
287e3e84
GA
24942021-03-19 Marek Polacek <polacek@redhat.com>
2495
2496 PR c++/99500
2497 * parser.c (cp_parser_requirement_parameter_list): Handle
2498 error_mark_node.
2499
25002021-03-18 Marek Polacek <polacek@redhat.com>
2501
2502 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
2503
25042021-03-18 Marek Polacek <polacek@redhat.com>
2505
2506 * pt.c (tsubst_copy_and_build): Add assert.
2507
25082021-03-18 Iain Sandoe <iain@sandoe.co.uk>
2509
2510 PR objc++/49070
2511 * parser.c (cp_debug_parser): Add Objective-C++ message
2512 state flag.
2513 (cp_parser_nested_name_specifier_opt): Allow colon to
2514 terminate an assignment-expression when parsing Objective-
2515 C++ messages.
2516 (cp_parser_objc_message_expression): Set and clear message
2517 parsing state on entry and exit.
2518 * parser.h (struct cp_parser): Add a context flag for
2519 Objective-C++ message state.
2520
25212021-03-18 Martin Liska <mliska@suse.cz>
2522
2523 PR c++/99617
2524 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
2525 to NULL.
2526
19ac7c94
GA
25272021-03-17 Marek Polacek <polacek@redhat.com>
2528
2529 PR c++/97973
2530 * call.c (conv_unsafe_in_template_p): New.
2531 (convert_like): Use it.
2532
25332021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
2534 Jason Merrill <jason@redhat.com>
2535
2536 * semantics.c (get_class_access_diagnostic_decl): New
2537 function that examines special cases when a parent
2538 class causes a private access failure.
2539 (enforce_access): Slightly modified to call function
2540 above.
2541
bc212776
GA
25422021-03-16 Jason Merrill <jason@redhat.com>
2543
2544 * tree.c (cp_tree_equal): Use real_identical.
2545
25462021-03-16 Jakub Jelinek <jakub@redhat.com>
2547
2548 PR c++/99613
2549 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
2550 before calling __cxa_guard_release rather than after it. Formatting
2551 fixes.
2552
25532021-03-16 Martin Liska <mliska@suse.cz>
2554 Jason Merrill <jason@redhat.com>
2555
2556 PR c++/99108
2557 * call.c (get_function_version_dispatcher): Handle
2558 DECL_LOCAL_DECL_P.
2559 * decl.c (maybe_version_functions): Likewise.
2560 (maybe_mark_function_versioned): New.
2561 * name-lookup.c (push_local_extern_decl_alias): No longer static.
2562 * name-lookup.h (push_local_extern_decl_alias): Adjust.
2563
25642021-03-16 Nathan Sidwell <nathan@acm.org>
2565
2566 PR c++/99496
2567 * module.cc (trees_out::decl_value): Adjust typedef streaming,
2568 indicate whether it is a dependent alias.
2569 (trees_in::decl_value): Likewise. Set as dependent alias, if it
2570 is one.
2571
3c5b6d24
GA
25722021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2573
2574 PR c++/99047
2575 * coroutines.cc (expand_one_await_expression): If the
2576 await_ready() expression is not a boolean then convert it
2577 as required.
2578
25792021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2580
2581 PR c++/98704
2582 * coroutines.cc (build_actor_fn): Make destroy index 1
2583 correspond to the abnormal unhandled_exception() exit.
2584 Substitute the proxy for the resume index.
2585 (coro_rewrite_function_body): Arrange to reset the resume
2586 index and make done = true for a rethrown exception from
2587 unhandled_exception ().
2588 (morph_fn_to_coro): Adjust calls to build_actor_fn and
2589 coro_rewrite_function_body.
2590
25912021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2592
2593 PR c++/98480
2594 * coroutines.cc (replace_continue): Rewrite continue into
2595 'goto label'.
2596 (await_statement_walker): Handle await expressions in the
2597 initializer, condition and iteration expressions of for
2598 loops.
2599
26002021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2601
2602 PR c++/96749
2603 * coroutines.cc (flatten_await_stmt): Allow for the case
2604 where a target expression variable only has uses in the
2605 second part of a compound expression.
2606 (maybe_promote_temps): Avoid emiting empty statements.
2607
26082021-03-15 Tobias Burnus <tobias@codesourcery.com>
2609
2610 PR c++/99509
2611 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
2612 ensure that the varpool node is marked as offloadable.
2613
6da2762a
GA
26142021-03-12 Nathan Sidwell <nathan@acm.org>
2615
2616 PR c++/99238
2617 * module.cc (depset::hash::add_binding_entity): Assert not
2618 visited.
2619 (depset::add::add_specializations): Likewise.
2620 * name-lookup.c (name_lookup::dedup): New.
2621 (name_lookup::~name_lookup): Assert not deduping.
2622 (name_lookup::restore_state): Likewise.
2623 (name_lookup::add_overload): Replace outlined code with dedup
2624 call.
2625 (name_lookup::add_value): Likewise.
2626 (name_lookup::search_namespace_only): Likewise.
2627 (name_lookup::adl_namespace_fns): Likewise.
2628 (name_lookup::adl_class_fns): Likewise.
2629 (name_lookup::search_adl): Likewise. Add clearing dedup call.
2630 (name_lookup::search_qualified): Likewise.
2631 (name_lookup::search_unqualified): Likewise.
2632
26332021-03-12 Jakub Jelinek <jakub@redhat.com>
2634
2635 PR c++/99507
2636 * call.c (build_over_call): For immediate evaluation of functions
2637 that return references, undo convert_from_reference effects before
2638 calling cxx_constant_value and call convert_from_reference
2639 afterwards.
2640
48ff383f
GA
26412021-03-11 Nathan Sidwell <nathan@acm.org>
2642
2643 PR c++/99248
2644 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
2645 when there's a binding vector.
2646 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
2647
26482021-03-11 Nathan Sidwell <nathan@acm.org>
2649
2650 PR c++/99528
2651 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
2652 MK_decl_tmpl_spec.
2653 (trees_in::decl_value): Adjust add_mergeable_specialization call.
2654 (trees_out::get_merge_kind): Adjust detecting a partial template
2655 instantiation.
2656 (trees_out::key_mergeable): Adjust handling same.
2657 (trees_in::key_mergeabvle): Likewise.
2658
e9800852
GA
26592021-03-10 Nathan Sidwell <nathan@acm.org>
2660
2661 PR c++/99423
2662 * module.cc (post_load_processing): Assert not gcable.
2663 (laxy_load_pendings): Extend no-gc region around
2664 post_load_processing.
2665
26662021-03-10 Nathan Sidwell <nathan@acm.org>
2667
2668 PR c++/99508
2669 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
2670 assembler name to the ns alias.
2671
8dc225d3
GA
26722021-03-09 Jakub Jelinek <jakub@redhat.com>
2673
2674 PR c++/99459
2675 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
2676 build_special_member_call return value to find the CALL_EXPR.
2677 Simplify.
2678
26792021-03-09 Nathan Sidwell <nathan@acm.org>
2680
2681 PR c++/99472
2682 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
2683 that C++20 does not yet imply modules.
2684
6405b40f
GA
26852021-03-08 Nathan Sidwell <nathan@acm.org>
2686
2687 PR c++/99436
2688 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
2689
26902021-03-08 Nathan Sidwell <nathan@acm.org>
2691
2692 * lex.c (module_token_filter::resume): Ignore module-decls inside
2693 header-unit.
2694 * parser.c (cp_parser_module_declaration): Reject in header-unit.
2695
26962021-03-08 Nathan Sidwell <nathan@acm.org>
2697
2698 PR c++/99285
2699 * cp-tree.h (match_mergeable_specialization)
2700 (add_mergeable_specialization): Adjust parms.
2701 * module.cc (trees_in::decl_value): Adjust
2702 add_mergeable_specialization calls.
2703 (trees_out::key_mergeable): Adjust match_mergeable_specialization
2704 calls.
2705 (specialization_add): Likewise.
2706 * pt.c (match_mergeable_specialization): Do not insert.
2707 (add_mergeable_specialization): Add to hash table here.
2708
0ad6a2e2
GA
27092021-03-06 Patrick Palka <ppalka@redhat.com>
2710 Jakub Jelinek <jakub@redhat.com>
2711
2712 PR c++/99287
2713 * constexpr.c (cxx_eval_increment_expression): Pass lval when
2714 evaluating the MODIFY_EXPR, and update 'mod' with the result of
2715 this evaluation. Check *non_constant_p afterwards. For prefix
2716 ops, just return 'mod'.
2717
27182021-03-06 Patrick Palka <ppalka@redhat.com>
2719 Jakub Jelinek <jakub@redhat.com>
2720
2721 PR c++/96330
2722 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
2723 variable 'fn' to 'tmpl'. Handle a variable template-id by
2724 calling lookup_template_variable.
2725
27262021-03-06 Patrick Palka <ppalka@redhat.com>
2727
2728 PR c++/99365
2729 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
2730 outer_targs to do_auto_deduction.
2731 (placeholder_type_constraint_dependent_p): Define.
2732 (do_auto_deduction): When processing_template_decl != 0
2733 and context is adc_unify and we have constraints, pretend the
2734 constraints are satisfied instead of punting. Otherwise don't
2735 punt unless placeholder_type_constraint_dependent_p holds.
2736 Add some clarifying sanity checks. Add a hack to add missing
2737 outermost template levels to outer_args before checking
2738 satisfaction. Don't substitute outer_targs into type if it's
2739 already been done.
2740
ceae9533
GA
27412021-03-05 Marek Polacek <polacek@redhat.com>
2742
2743 PR c++/99374
2744 * call.c (standard_conversion): When converting pointers to
2745 member, don't return NULL when the bases are equivalent but
2746 incomplete.
2747
27482021-03-05 Marek Polacek <polacek@redhat.com>
2749
2750 PR c++/99120
2751 * name-lookup.c (check_local_shadow): Check if the type of decl
2752 is non-null before checking TYPE_PTR*.
2753
27542021-03-05 Nathan Sidwell <nathan@acm.org>
2755
2756 PR c++/99245
2757 * module.cc (module_state::write_cluster): Relax binding assert.
2758
27592021-03-05 Nathan Sidwell <nathan@acm.org>
2760
2761 PR c++/99377
2762 * pt.c (instantiate_decl): Call set_instantiating_module.
2763
27642021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2765
2766 PR c++/98118
2767 * coroutines.cc (build_co_await): Use type_build_ctor_call()
2768 to determine cases when a CTOR needs to be built.
2769 (flatten_await_stmt): Likewise.
2770 (morph_fn_to_coro): Likewise.
2771
27722021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2773
2774 PR c++/95616
2775 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
2776 (coro_diagnose_throwing_final_aw_expr): New helper.
2777 (build_co_await): Diagnose throwing final await expression
2778 components.
2779 (build_init_or_final_await): Diagnose a throwing promise
2780 final_suspend() call.
2781
27822021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2783
2784 PR c++/95615
2785 * coroutines.cc (struct param_info): Track parameter copies that need
2786 a DTOR.
2787 (coro_get_frame_dtor): New helper function factored from build_actor().
2788 (build_actor_fn): Use coro_get_frame_dtor().
2789 (morph_fn_to_coro): Track parameters that need DTORs on exception,
2790 likewise the frame promise and the return object. On exception, run the
2791 DTORs for these, destroy the frame and then rethrow the exception.
2792
27932021-03-05 Nathan Sidwell <nathan@acm.org>
2794
2795 PR c++/99389
2796 * pt.c (instantiate_class_template_1): Set instantiating module
2797 here.
2798
27992021-03-05 Tobias Burnus <tobias@codesourcery.com>
2800
2801 PR c/99137
2802 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
2803
67f10d28
GA
28042021-03-04 Jakub Jelinek <jakub@redhat.com>
2805
2806 PR c++/88146
2807 PR c++/99362
2808 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
2809 comment.
2810
28112021-03-04 Nathan Sidwell <nathan@acm.org>
2812
2813 PR c++/99170
2814 * module.cc (class uintset): Delete.
2815 (typedef attached_map_t): A hash map.
2816 (attached_table): Use attached_map_t. Adjust uses ...
2817 (trees_out::decl_value, trees_in::decl_value): ... here ...
2818 (trees_out::key_mergeable): ... here ...
2819 (trees_in::key_mergeable): ... here ...
2820 (maybe_attach_decl): ... here ...
2821 (direct_import): ... and here.
2822
28232021-03-04 Nathan Sidwell <nathan@acm.org>
2824
2825 PR c++/99170
2826 * cp-tree.h
2827 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
2828 rename.
2829 * module.cc (class pending_key): New.
2830 (default_hash_traits<pending_key>): New specialization.
2831 (pending_map_t): New typedef.
2832 (pending_table): Replace old table.
2833 (trees_out::lang_decl_bools): Adjust.
2834 (trees_in::lang_decl_bools): Adjust.
2835 (trees_in::install_entity): Drop pending member and specialization
2836 handling.
2837 (find_pending_key): New.
2838 (depset::hash::fiund_dependencies): Use it.
2839 (pendset_lazy_load): Delete.
2840 (module_state::write_cluster): Don't count pendings here. Bye
2841 Duff's device-like thing.
2842 (module_state::write_pendings): Reimplement.
2843 (module_state::read_pendings): Reimplement.
2844 (lazy_specializations_p): Delete.
2845 (module_state::write): Adjust write_pendings call.
2846 (lazy_load_pendings): New.
2847 (lazy_load_specializations): Delete.
2848 (lazy_load_members): Delete.
2849 (init_modules): Adjust.
2850 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
2851 not lazy_load_members.
2852 (note_pending_specializations): Delete.
2853 (load_pending_specializations): Delete.
2854 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
2855 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
2856 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
2857 (note_pending_specializations): Delete.
2858 (load_pending_specializations): Delete.
2859 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
2860 lazy_load_specializations.
2861 (instantiate_template_class_1): Likewise.
2862 (instantiate_decl): Call lazy_load_pendings.
2863 * typeck.c (complete_type): Likewise.
2864
f3641ac7
GA
28652021-03-03 Nathan Sidwell <nathan@acm.org>
2866
2867 PR c++/99170
2868 * module.cc (post_load_decls): New.
2869 (lazy_snum, recursive_lazy): Move earlier.
2870 (module_state::read_cluster): Push cloning onto post_load_decls.
2871 (post_load_processing): New. Do the cloning here.
2872 (module_state::read_inits): Call post_load_processing.
2873 (module_state::read_language): Likewise.
2874 (lazy_load_binding, lazy_load_specializations): Likewise
2875 (lazy_load_members): Likewise
2876
28772021-03-03 Nathan Sidwell <nathan@acm.org>
2878
2879 PR c++/99170
2880 * module.cc (trees_out::decl_value): Stream specialization keys
2881 after decl.
2882 (trees_in::decl_value): Stream them back and insert after
2883 completing the decl.
2884 (trees_out::key_mergeable): Drop some streaming here ...
2885 (trees_in::key_mergeable): ... and here. Don't insert into
2886 specialization tables.
2887
28882021-03-03 Patrick Palka <ppalka@redhat.com>
2889
2890 * constraint.cc (struct sat_info): Document the different
2891 meanings of noisy() and diagnose_unsatisfaction_p() during
2892 satisfaction and requires-expression evaluation.
2893 (tsubst_valid_expression_requirement): Take a sat_info instead
2894 of a subst_info. Perform the substitution quietly first. Fold
2895 in error-replaying code from diagnose_valid_expression.
2896 (tsubst_simple_requirement): Take a sat_info instead of a
2897 subst_info.
2898 (tsubst_type_requirement_1): New. Fold in error-replaying code
2899 from diagnose_valid_type.
2900 (tsubst_type_requirement): Use the above. Take a sat_info
2901 instead of a subst_info.
2902 (tsubst_compound_requirement): Likewise. Fold in
2903 error-replaying code from diagnose_compound_requirement.
2904 (tsubst_nested_requirement): Take a sat_info instead of a
2905 subst_info. Fold in error-replaying code from
2906 diagnose_nested_requirement.
2907 (tsubst_requirement): Take a sat_info instead of a subst_info.
2908 (tsubst_requires_expr): Split into two versions, one that takes
2909 a sat_info argument and another that takes a complain and
2910 in_decl argument. Remove outdated documentation. Document the
2911 effects of the sat_info argument. Don't short-circuit
2912 processing of requirements when diagnosing unsatisfaction,
2913 mirroring diagnose_requires_expr.
2914 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
2915 assert, and se the three-parameter version of tsubst_requires_expr.
2916 (diagnose_trait_expr): Make static. Take a template argument
2917 vector instead of a parameter mapping.
2918 (diagnose_valid_expression): Remove.
2919 (diagnose_valid_type): Remove.
2920 (diagnose_simple_requirement): Remove.
2921 (diagnose_compound_requirement): Remove.
2922 (diagnose_type_requirement): Remove.
2923 (diagnose_nested_requirement): Remove.
2924 (diagnose_requirement): Remove.
2925 (diagnose_requires_expr): Remove.
2926 (diagnose_atomic_constraint): Take a sat_info instead of a
2927 subst_info. Adjust call to diagnose_trait_expr. Call
2928 tsubst_requires_expr instead of diagnose_requires_expr.
2929 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
2930 and just always call constraint_satisfaction_value.
2931
29322021-03-03 Patrick Palka <ppalka@redhat.com>
2933
2934 * constexpr.c (cxx_eval_call_expression): Adjust call to
2935 evaluate_concept_check.
2936 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
2937 evaluate_requires_expression instead of
2938 satisfy_constraint_expression.
2939 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2940 * constraint.cc (struct sat_info): Adjust comment about which
2941 satisfaction entrypoints use noisy-unsat.
2942 (normalize_template_requirements): Remove (and adjust callers
2943 appropriately).
2944 (normalize_nontemplate_requirements): Likewise.
2945 (tsubst_nested_requirement): Use constraint_satisfaction_value
2946 instead of satisfy_constraint_expression, which'll do the
2947 noisy replaying of ill-formed quiet satisfaction for us.
2948 (decl_satisfied_cache): Adjust comment.
2949 (satisfy_constraint): Rename to ...
2950 (satisfy_normalized_constraints): ... this.
2951 (satisfy_associated_constraints): Remove (and make its
2952 callers check for dependent arguments).
2953 (satisfy_constraint_expression): Rename to ...
2954 (satisfy_nondeclaration_constraints): ... this. Assert that
2955 'args' is empty when 't' is a concept-id. Removing handling
2956 bare constraint-expressions, and handle REQUIRES_EXPRs
2957 specially. Adjust comment accordingly.
2958 (satisfy_declaration_constraints): Assert in the two-parameter
2959 version that 't' is not a TEMPLATE_DECL. Adjust following
2960 removal of normalize_(non)?template_requirements and
2961 satisfy_asociated_constraints.
2962 (constraint_satisfaction_value): Combine the two- and
2963 three-parameter versions in the natural way.
2964 (constraints_satisfied_p): Combine the one- and two-parameter
2965 versions in the natural way. Improve documentation.
2966 (evaluate_requires_expr): Define.
2967 (evaluate_concept_check): Remove 'complain' parameter. Use
2968 constraint_satisfaction_value instead of
2969 satisfy_constraint_expression.
2970 (diagnose_nested_requirement): Adjust following renaming of
2971 satisfy_constraint_expression.
2972 (diagnose_constraints): Handle REQUIRES_EXPR by going through
2973 diagnose_requires_expr directly instead of treating it as a
2974 constraint-expression. Improve documentation.
2975 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
2976 to evaluate_concept_check.
2977 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
2978 constraints_satisfied_p.
2979 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2980 * cp-tree.h (evaluate_requires_expr): Declare.
2981 (evaluate_concept_check): Remove tsubst_flag_t parameter.
2982 (satisfy_constraint_expression): Remove declaration.
2983 (constraints_satisfied_p): Remove one-parameter declaration.
2984 Add a default argument to the two-parameter declaration.
2985 * cvt.c (convert_to_void): Adjust call to
2986 evaluate_concept_check.
2987
29882021-03-03 Jakub Jelinek <jakub@redhat.com>
2989
2990 PR c++/82959
2991 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
2992 and COMPOUND_EXPR.
2993
29942021-03-03 Marek Polacek <polacek@redhat.com>
2995
2996 PR c++/97034
2997 PR c++/99009
2998 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
2999 (maybe_aggr_guide): Use the original template type where needed. In
3000 a class member template, partially instantiate the result of
3001 collect_ctor_idx_types.
3002 (do_class_deduction): Defer the deduction until the enclosing
3003 scope is non-dependent.
3004
30052021-03-03 Jason Merrill <jason@redhat.com>
3006
3007 PR c++/95675
3008 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
3009 if it didn't get one before.
3010
30112021-03-03 Nathan Sidwell <nathan@acm.org>
3012
3013 PR c++/99344
3014 * module.cc (trees_out::decl_node): Small refactor.
3015 (depset::hash::add_binding_entity): Return true on meeting an
3016 import. Set namespace's import here.
3017 (module_state:write_namespaces): Inform of purview too.
3018 (module_state:read_namespaces): Adjust.
3019 * name-lookup.c (implicitly_export_namespace): Delete.
3020 (do_pushdecl): Don't call it.
3021 (push_namespace): Likewise, set purview.
3022 (add_imported_namespace): Reorder parms.
3023 * name-lookup.h (add_imported_namespace): Alter param ordering.
3024
d97a92dc
GA
30252021-03-02 Martin Sebor <msebor@redhat.com>
3026
3027 PR c++/99251
3028 * class.c (build_base_path): Call build_if_nonnull.
3029 * cp-tree.h (build_if_nonnull): Declare.
3030 * rtti.c (ifnonnull): Rename...
3031 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
3032 (build_dynamic_cast_1): Adjust to name change.
3033
30342021-03-02 Patrick Palka <ppalka@redhat.com>
3035
3036 PR c++/96443
3037 PR c++/96960
3038 * constraint.cc (type_deducible_p): Don't substitute into the
3039 constraints, and instead just pass 'args' to do_auto_deduction
3040 as the outer template arguments.
3041 (tsubst_parameter_mapping): Remove confused code for handling
3042 placeholder type arguments.
3043 (normalize_placeholder_type_constraint): Define.
3044 (satisfy_constraint_expression): Use it to handle placeholder
3045 'auto' types.
3046 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
3047 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
3048 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
3049 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3050 (make_constrained_placeholder_type): Set
3051 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3052 (do_auto_deduction): Clarify comments about the outer_targs
3053 parameter. Rework satisfaction of a placeholder type constraint
3054 to pass in the complete set of template arguments directly to
3055 constraints_satisfied_p.
3056 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
3057 instead. Also rebuild the the constraint info on the new auto.
3058
30592021-03-02 Patrick Palka <ppalka@redhat.com>
3060
3061 * constraint.cc (build_parameter_mapping): Rely on the caller to
3062 determine the in-scope template parameters.
3063 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
3064 to the two-parameter constructor. In the two-parameter
3065 constructor, fold in the definition of make_context, set
3066 initial_parms appropriately, and don't set the now-removed
3067 orig_decl member.
3068 (norm_info::make_context): Remove, now that its only use is
3069 inlined into the caller.
3070 (norm_info::update_context): Adjust call to
3071 build_parameter_mapping to pass in the relevant set of in-scope
3072 template parameters.
3073 (norm_info::ctx_parms): Define this member function.
3074 (norm_info::context): Initialize to NULL_TREE.
3075 (norm_info::orig_decl): Remove this data member.
3076 (norm_info::initial_parms): Define this data member.
3077 (normalize_atom): Adjust call to build_parameter_mapping to pass
3078 in the relevant set of in-scope template parameters. Use
3079 info.initial_parms instead of info.orig_decl.
3080 (normalize_constraint_expression): Take a norm_info object
3081 instead of a bool. Cache the result of normalization.
3082 (tsubst_nested_requirement): Call satisfy_constraint_expression
3083 instead of satisfy_constraint, so that we normalize on demand.
3084 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
3085 Adjust call to normalize_constraint_expression.
3086 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
3087 to current_template_parms.
3088 (diagnose_nested_requirements): Go through
3089 satisfy_constraint_expression, as with tsubst_nested_requirement.
3090
30912021-03-02 Patrick Palka <ppalka@redhat.com>
3092
3093 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
3094 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
3095 started with a TYPE_ARGUMENT_PACK.
3096 (finish_requires_expr): Don't set DECL_CONTEXT and
3097 CONSTRAINT_VAR_P on each of the introduced parameters here.
3098 * parser.c (cp_parser_requirement_parameter_list): Instead set
3099 these fields earlier, here.
3100 * pt.c (do_auto_deduction): Canonicalize the result of
3101 do_auto_deduction. Pass 'complain' to finish_decltype_type.
3102
31032021-03-02 Patrick Palka <ppalka@redhat.com>
3104
3105 * constraint.cc (tsubst_simple_requirement): Just return
3106 boolean_true_node on success.
3107 (tsubst_type_requirement): Likewise.
3108 (tsubst_compound_requirement): Likewise.
3109 (tsubst_nested_requirement): Likewise.
3110 (tsubst_requirement_body): Remove.
3111 (check_constaint_variables): Rename to ...
3112 (check_constraint_variables): ... this.
3113 (tsubst_constraint_variables): Adjust.
3114 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
3115
88938886
GA
31162021-03-01 Nathan Sidwell <nathan@acm.org>
3117
3118 PR c++/99294
3119 * class.c (fixup_type_variants): Propagate mode, precision,
3120 alignment & emptiness.
3121 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
3122 (trees_in::tree_node): Rematerialize alignment here.
3123
ec9dc4fa
GA
31242021-02-27 Jason Merrill <jason@redhat.com>
3125
3126 PR c++/90333
3127 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
3128 between () and ->.
3129
06a9f20f
GA
31302021-02-26 Jakub Jelinek <jakub@redhat.com>
3131
3132 * parser.c (cp_parser_lambda_declarator_opt): Implement
3133 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
3134 for -std={c,gnu}++2b or with pedwarn in earlier versions.
3135
31362021-02-26 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR c++/95451
3139 * lambda.c (is_lambda_ignored_entity): Before checking for
3140 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
3141
31422021-02-26 Jason Merrill <jason@redhat.com>
3143
3144 PR c++/98810
3145 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
3146 to a class non-type template argument that needs it.
3147
31482021-02-26 Patrick Palka <ppalka@redhat.com>
3149
3150 PR c++/98990
3151 * pt.c (splice_late_return_type): Rebuild the entire return type
3152 if we have to adjust the level of an auto within.
3153 (type_uses_auto): Adjust call to find_type_usage.
3154 * type-utils.h (find_type_usage): Revert r10-6571 change that
3155 made this function return a pointer to the auto node.
3156
daa68844
GA
31572021-02-25 Patrick Palka <ppalka@redhat.com>
3158
3159 PR c++/99213
3160 PR c++/94521
3161 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
3162 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
3163
31642021-02-25 Patrick Palka <ppalka@redhat.com>
3165
3166 PR c++/99103
3167 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
3168 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
3169
31702021-02-25 Marek Polacek <polacek@redhat.com>
3171
3172 DR 1312
3173 PR c++/99176
3174 * constexpr.c (is_std_construct_at): New overload.
3175 (is_std_allocator_allocate): New overload.
3176 (cxx_eval_call_expression): Use the new overloads.
3177 (cxx_eval_constant_expression): Reject casting
3178 from void * as per DR 1312. Don't check can_convert.
3179
31802021-02-25 Iain Sandoe <iain@sandoe.co.uk>
3181
3182 PR c++/97587
3183 * coroutines.cc (struct param_info): Track rvalue refs.
3184 (morph_fn_to_coro): Track rvalue refs, and call the promise
3185 CTOR with the frame copy of passed parms.
3186
31872021-02-25 Iain Sandoe <iain@sandoe.co.uk>
3188
3189 PR c++/95822
3190 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
3191 set throwing_cleanup marker.
3192
31932021-02-25 Nathan Sidwell <nathan@acm.org>
3194
3195 PR c++/99166
3196 * module.cc (module_state::inform_cmi_p): Renamed field.
3197 (module_state::do_import): Adjust.
3198 (init_modules, finish_module_processing): Likewise.
3199 (handle_module_option): Likewise.
3200
32012021-02-25 Nathan Sidwell <nathan@acm.org>
3202
3203 PR c++/98318
3204 * mapper-client.cc (module_client::open_module_client): Fix typo
3205 of fd init.
3206
4028d01a
GA
32072021-02-24 Nathan Sidwell <nathan@acm.org>
3208
3209 PR c++/98718
3210 * module.cc (ool): New indirection vector.
3211 (loc_spans::maybe_propagate): Location is not optional.
3212 (loc_spans::open): Likewise. Assert monotonically advancing.
3213 (module_for_ordinary_loc): Use ool indirection vector.
3214 (module_state::write_prepare_maps): Do not count empty macro
3215 expansions. Elide empty spans.
3216 (module_state::write_macro_maps): Skip empty expansions.
3217 (ool_cmp): New qsort comparator.
3218 (module_state::write): Create and destroy ool vector.
3219 (name_pending_imports): Fix dump push/pop.
3220 (preprocess_module): Likewise. Add more dumping.
3221 (preprocessed_module): Likewise.
3222
32232021-02-24 Iain Sandoe <iain@sandoe.co.uk>
3224
3225 PR c++/96251
3226 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
3227 error reporting when instantiating for a constexpr.
3228
71e24b06
GA
32292021-02-23 Nathan Sidwell <nathan@acm.org>
3230
3231 PR c++/99208
3232 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
3233 identity.
3234
32352021-02-23 Patrick Palka <ppalka@redhat.com>
3236
3237 PR c++/95468
3238 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
3239 over from tsubst_copy.
3240
32412021-02-23 Patrick Palka <ppalka@redhat.com>
3242
3243 * pt.c (instantiation_dependent_expression_p): Check
3244 processing_template_decl before calling
3245 potential_constant_expression.
3246
2f5765cf
GA
32472021-02-22 Nathan Sidwell <nathan@acm.org>
3248
3249 PR c++/99174
3250 * module.cc (struct module_state): Add visited_p flag.
3251 (name_pending_imports): Use it to avoid duplicate requests.
3252 (preprocess_module): Don't read preprocessor state if we failed to
3253 load a module's config.
3254
32552021-02-22 Nathan Sidwell <nathan@acm.org>
3256
3257 PR c++/99153
3258 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
3259 to common-path.
3260 * module.cc (set_defining_module): Add assert.
3261
50352c6c
GA
32622021-02-19 Nathan Sidwell <nathan@acm.org>
3263
3264 PR c++/98741
3265 * module.cc (pending_imports): New.
3266 (declare_module): Adjust test condition.
3267 (name_pending_imports): New.
3268 (preprocess_module): Reimplement using pending_imports.
3269 (preprocessed_module): Move name-getting to name_pending_imports.
3270 * name-lookup.c (append_imported_binding_slot): Assert module
3271 ordering is increasing.
3272
32732021-02-19 Nathan Sidwell <nathan@acm.org>
3274
3275 * module.cc (note_cmis): New.
3276 (struct module_state): Add inform_read_p bit.
3277 (module_state::do_import): Inform of CMI location, if enabled.
3278 (init_modules): Canonicalize note_cmis entries.
3279 (handle_module_option): Handle -flang-info-module-read=FOO.
3280
32812021-02-19 Jason Merrill <jason@redhat.com>
3282
3283 PR c++/96926
3284 * call.c (perfect_conversion_p): Limit rvalueness
3285 test to reference bindings.
3286
32872021-02-19 Jason Merrill <jason@redhat.com>
3288
3289 PR c++/96926
3290 * call.c (perfect_conversion_p): New.
3291 (perfect_candidate_p): New.
3292 (add_candidates): Ignore templates after a perfect non-template.
3293
bf81237e
GA
32942021-02-18 Nathan Sidwell <nathan@acm.org>
3295
3296 PR c++/99023
3297 * module.cc (canonicalize_header_name): Use
3298 cpp_probe_header_unit.
3299 (maybe_translate_include): Fix note_includes comparison.
3300 (init_modules): Fix note_includes string termination.
3301
33022021-02-18 Jakub Jelinek <jakub@redhat.com>
3303
3304 PR c++/99132
3305 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
3306 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
3307 for immediate function calls.
3308
acc0ee5c
GA
33092021-02-17 Nathan Sidwell <nathan@acm.org>
3310
3311 PR c++/99023
3312 * module.cc (struct macro_export): Add GTY markers.
3313 (macro_exports): Likewise, us a va_gc Vector.
3314
33152021-02-17 Jakub Jelinek <jakub@redhat.com>
3316
3317 PR sanitizer/99106
3318 * init.c (build_zero_init_1): For flexible array members just return
3319 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
3320 ARRAY_TYPE.
3321
33222021-02-17 Nathan Sidwell <nathan@acm.org>
3323
3324 PR c++/99116
3325 * name-lookup.c (do_pushdecl): Don't peek under template_parm
3326 bindings here ...
3327 (set_identifier_type_value_with_scope): ... or here.
3328 (do_pushtag): Only set_identifier_type_value_with_scope at
3329 non-class template parm scope, and use parent scope.
3330
33312021-02-17 Nathan Sidwell <nathan@acm.org>
3332
3333 PR c++/99071
3334 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
3335 pointer.
3336
33372021-02-17 Patrick Palka <ppalka@redhat.com>
3338
3339 PR debug/96997
3340 PR c++/94034
3341 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
3342
fab095da
GA
33432021-02-12 Nathan Sidwell <nathan@acm.org>
3344
3345 * module.cc (module_state::write_cluster): Check bindings for
3346 imported using-decls.
3347
33482021-02-12 Nathan Sidwell <nathan@acm.org>
3349
3350 PR c++/99040
3351 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
3352 for new namespace-scope entities.
3353 (module_state::read_cluster): Don't call add_module_decl here.
3354 * name-lookup.h (add_module_decl): Rename to ...
3355 (add_module_namespace_decl): ... this.
3356 * name-lookup.c (newbinding_bookkeeping): Move into ...
3357 (do_pushdecl): ... here. Its only remaining caller.
3358 (add_module_decl): Rename to ...
3359 (add_module_namespace_decl): ... here. Add checking-assert for
3360 circularity. Don't call newbinding_bookkeeping, just extern_c
3361 checking and incomplete var checking.
3362
33632021-02-12 Nathan Sidwell <nathan@acm.org>
3364
3365 PR c++/99039
3366 PR c++/99040
3367 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
3368 (global_type_node): Delete.
3369 (IDENTIFIER_TYPE_VALUE): Delete.
3370 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
3371 (get_type_value): Delete.
3372 * name-lookup.h (identifier_type_value): Delete.
3373 * name-lookup.c (check_module_override): Don't
3374 SET_IDENTIFIER_TYPE_VALUE here.
3375 (do_pushdecl): Nor here.
3376 (identifier_type_value_1, identifier_type_value): Delete.
3377 (set_identifier_type_value_with_scope): Only
3378 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
3379 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
3380 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
3381 * call.c (check_dtor_name): Use lookup_name.
3382 * decl.c (cxx_init_decl_processing): Drop global_type_node.
3383 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
3384 here.
3385 * init.c (get_type_value): Delete.
3386 * pt.c (instantiate_class_template_1): Don't call pushtag or
3387 SET_IDENTIFIER_TYPE_VALUE here.
3388 (tsubst): Assert never an identifier.
3389 (dependent_type_p): Drop global_type_node assert.
3390 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
3391 to determine ctorness.
3392
33932021-02-12 Jakub Jelinek <jakub@redhat.com>
3394
3395 PR c++/97742
3396 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
3397 CPP_EOF.
3398
33992021-02-12 Jason Merrill <jason@redhat.com>
3400
3401 PR c++/97246
3402 PR c++/94546
3403 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
3404 (register_parameter_specializations): Not here.
3405
0c5cdb31
GA
34062021-02-11 Marek Polacek <polacek@redhat.com>
3407
3408 PR c++/95888
3409 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
3410 for the partial instantiation.
3411
34122021-02-11 Jakub Jelinek <jakub@redhat.com>
3413
3414 PR c++/99033
3415 * init.c (build_zero_init_1): Handle zero initialiation of
3416 flexible array members like initialization of [0] arrays.
3417 Use integer_minus_onep instead of comparison to integer_minus_one_node
3418 and integer_zerop instead of comparison against size_zero_node.
3419 Formatting fixes.
3420
34212021-02-11 Marek Polacek <polacek@redhat.com>
3422
3423 PR c++/99063
3424 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
3425
34262021-02-11 Patrick Palka <ppalka@redhat.com>
3427
3428 PR c++/97582
3429 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
3430 lookup result by discarding it if the first element is a
3431 class-scope declaration, otherwise return it.
3432 (push_operator_bindings): Handle an ambiguous lookup result by
3433 doing push_local_binding on each element in the list.
3434
34352021-02-11 Marek Polacek <polacek@redhat.com>
3436
3437 * parser.c (cp_parser_selection_statement): Use vec_free.
3438
4b37c3ea
GA
34392021-02-10 Jakub Jelinek <jakub@redhat.com>
3440
3441 PR c++/98988
3442 PR c++/99031
3443 * constexpr.c: Include cgraph.h.
3444 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
3445 heap artificial vars.
3446 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
3447 heap artificial vars.
3448
34492021-02-10 Nathan Sidwell <nathan@acm.org>
3450
3451 PR c++/99030
3452 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
3453 answer if there's no local specialization.
3454
0a91b73e
GA
34552021-02-09 Nathan Sidwell <nathan@acm.org>
3456
3457 PR c++/98944
3458 * module.cc (module_state::is_rooted): Rename to ...
3459 (module_state::has_location): ... here. Adjust callers.
3460 (module_state::read_partitions): Adjust validity check.
3461 Don't overwrite a known location.
3462
34632021-02-09 Jason Merrill <jason@redhat.com>
3464
3465 PR c++/96905
3466 * pt.c (mark_decl_instantiated): Exit early if consteval.
3467
34682021-02-09 Jason Merrill <jason@redhat.com>
3469
3470 PR c++/98326
3471 PR c++/20408
3472 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
3473 parm.
3474
34752021-02-09 Jason Merrill <jason@redhat.com>
3476
3477 PR c++/98994
3478 PR c++/97566
3479 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
3480 RECORD_TYPE.
3481
2da7ce23
GA
34822021-02-08 Nathan Sidwell <nathan@acm.org>
3483
3484 * decl.c (start_cleanup_fn): Push function into
3485 namespace.
3486
34872021-02-08 Nathan Sidwell <nathan@acm.org>
3488
3489 PR c++/98531
3490 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
3491 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
3492 from rtti.c, add default namespace arg.
3493 (check_redeclaration_exception_specification): Allow a lazy
3494 builtin's eh spec to differ from an lready-declared user
3495 declaration.
3496 (declare_global_var): Use push/pop_abi_namespace.
3497 (get_atexit_node): Push the fndecl into a namespace.
3498 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
3499 decl.c.
3500
35012021-02-08 Marek Polacek <polacek@redhat.com>
3502
3503 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
3504
1ed59127
GA
35052021-02-05 Marek Polacek <polacek@redhat.com>
3506
3507 PR c++/98947
3508 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
3509 on arg2/arg3.
3510 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
3511 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
3512 a warning was emitted.
3513
35142021-02-05 Marek Polacek <polacek@redhat.com>
3515
3516 PR c++/96462
3517 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
3518
35192021-02-05 Jakub Jelinek <jakub@redhat.com>
3520
3521 PR c++/97878
3522 * decl.c (check_array_initializer): For structured bindings, require
3523 the array type to be complete.
3524
a19dd5e6
GA
35252021-02-04 Jason Merrill <jason@redhat.com>
3526
3527 PR c++/98717
3528 * constraint.cc (build_concept_check_arguments): Remove assert.
3529 (build_concept_check): Allow empty args.
3530
35312021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
3532
3533 PR c++/90926
3534 * call.c (can_convert_array): Extend to handle all valid aggregate
3535 initializers of an array; including by string literals, not just by
3536 brace-init-list.
3537 (build_aggr_conv): Call can_convert_array more often, not just in
3538 brace-init-list case.
3539 * typeck2.c (array_string_literal_compatible_p): New function.
3540 (digest_init_r): call array_string_literal_compatible_p
3541 * cp-tree.h: (array_string_literal_compatible_p): Declare.
3542
35432021-02-04 Jason Merrill <jason@redhat.com>
3544
3545 PR c++/98802
3546 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
3547
35482021-02-04 Jason Merrill <jason@redhat.com>
3549
3550 PR c++/95192
3551 * pt.c (tsubst_attribute): Handle error.
3552 (apply_late_template_attributes): Return false on error.
3553 (tsubst_function_decl): Check its return value.
3554 (tsubst_decl): Likewise.
3555 (push_template_decl): Assert current_template_parms.
3556 (tsubst_template_decl): Set current_template_parms.
3557
9faaa807
GA
35582021-02-03 Marek Polacek <polacek@redhat.com>
3559
3560 PR c++/98951
3561 * call.c (struct z_candidate): Mark rewritten and reversed as const.
3562 (struct NonPublicField): Mark operator() as const.
3563 (struct NonTrivialField): Likewise.
3564
35652021-02-03 Jason Merrill <jason@redhat.com>
3566
3567 PR c++/98926
3568 PR c++/98570
3569 * pt.c (spec_hasher::equal): Set processing_template_decl.
3570 * Make-lang.in (check-g++-strict-gc): Add --param
3571 hash-table-verification-limit=10000.
3572
35732021-02-03 Marek Polacek <polacek@redhat.com>
3574
3575 PR c++/98899
3576 * parser.c (cp_parser_class_specifier_1): Use any possible
3577 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
3578 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
3579 * pt.c (tsubst_exception_specification): Stash new_specs into
3580 DEFPARSE_INSTANTIATIONS.
3581 * tree.c (fixup_deferred_exception_variants): Use
3582 UNPARSED_NOEXCEPT_SPEC_P.
3583
548b75d8
GA
35842021-02-02 Jason Merrill <jason@redhat.com>
3585
3586 PR c++/98929
3587 PR c++/96199
3588 * error.c (dump_expr): Ignore dummy object.
3589 * pt.c (tsubst_baselink): Handle dependent scope.
3590
f7884fb1
GA
35912021-02-01 Patrick Palka <ppalka@redhat.com>
3592
3593 PR c++/98295
3594 * constexpr.c (cxx_eval_array_reference): Also set
3595 new_ctx.object when setting new_ctx.ctor.
3596
35972021-02-01 Marek Polacek <polacek@redhat.com>
3598
3599 PR c++/98355
3600 * parser.c (cp_parser_has_attribute_expression): Use
3601 uses_template_parms instead of type_dependent_expression_p.
3602
36032021-02-01 Jason Merrill <jason@redhat.com>
3604
3605 PR c++/98570
3606 * cp-tree.h: Declare it.
3607 * pt.c (comparing_dependent_aliases): New flag.
3608 (template_args_equal, spec_hasher::equal): Set it.
3609 (dependent_alias_template_spec_p): Assert that we don't
3610 get non-types other than error_mark_node.
3611 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
3612 on complex alias specializations. Set TYPE_DEPENDENT_P here.
3613 (tsubst_decl): Not here.
3614 * module.cc (module_state::read_cluster): Set
3615 comparing_dependent_aliases instead of
3616 comparing_specializations.
3617 * tree.c (cp_tree_equal): Remove comparing_specializations
3618 module handling.
3619 * typeck.c (structural_comptypes): Adjust.
3620 (comptypes): Remove comparing_specializations handling.
3621
2900f2f2
GA
36222021-01-29 Nathan Sidwell <nathan@acm.org>
3623
3624 PR c++/98843
3625 * module.cc (module_state_config): Add num_entities field.
3626 (module_state::read_entities): The entity_ary span is
3627 already allocated.
3628 (module_state::write_config): Write num_entities.
3629 (module_state::read_config): Read num_entities.
3630 (module_state::write): Set config's num_entities.
3631 (module_state::read_initial): Allocate the entity ary
3632 span here.
3633 (module_state::read_language): Do not set entity_lwm
3634 here.
3635
36362021-01-29 Marek Polacek <polacek@redhat.com>
3637
3638 PR c++/96137
3639 * parser.c (cp_parser_class_name): If parser->scope is
3640 error_mark_node, return it, otherwise continue.
3641
85d04a2e
GA
36422021-01-28 Jakub Jelinek <jakub@redhat.com>
3643
3644 PR c++/98841
3645 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
3646
36472021-01-28 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR c++/33661
3650 PR c++/98847
3651 * decl.c (cp_finish_decl): For register vars with asmspec in templates
3652 call set_user_assembler_name and set DECL_HARD_REGISTER.
3653 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
3654 pass asmspec_tree to cp_finish_decl.
3655
36562021-01-28 Nathan Sidwell <nathan@acm.org>
3657
3658 PR c++/98770
3659 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
3660 check order.
3661 (trees_in::decl_value): Do typedef frobbing only when installing
3662 a new typedef, adjust is_matching_decl call. Swap is_typedef
3663 & TYPE_NAME check.
3664 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
3665 names and deal with typedef checking.
3666
aa69f0a8
GA
36672021-01-27 Jason Merrill <jason@redhat.com>
3668
3669 PR c++/97874
3670 * name-lookup.c (lookup_using_decl): Clean up handling
3671 of dependency and inherited constructors.
3672 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
3673 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
3674
e62bb7f0
GA
36752021-01-26 Jason Merrill <jason@redhat.com>
3676
3677 PR c++/97474
3678 * call.c (type_passed_as): Don't mark invisiref restrict.
3679
36802021-01-26 Jason Merrill <jason@redhat.com>
3681
3682 PR c++/97566
3683 PR c++/98463
3684 * class.c (layout_class_type): An empty field gets size 0.
3685 (is_empty_field): New.
3686 (check_bases): Check it.
3687 * cp-tree.h (is_empty_field): Declare it.
3688 * constexpr.c (cxx_eval_store_expression): Check it.
3689 (cx_check_missing_mem_inits): Likewise.
3690 * init.c (perform_member_init): Likewise.
3691 * typeck2.c (process_init_constructor_record): Likewise.
3692
161e4c08
GA
36932021-01-25 Martin Sebor <msebor@redhat.com>
3694
3695 PR c++/98646
3696 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
3697
36982021-01-25 Jason Merrill <jason@redhat.com>
3699
3700 PR c++/98463
3701 * constexpr.c (get_or_insert_ctor_field): Add check.
3702 (cxx_eval_store_expression): Handle discontinuity of refs.
3703
6b163337
GA
37042021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
3705
3706 * call.c (complain_about_access): Altered function.
3707 * cp-tree.h (complain_about_access): Changed parameters of function.
3708 (get_parent_with_private_access): Declared new function.
3709 * search.c (get_parent_with_private_access): Defined new function.
3710 * semantics.c (enforce_access): Modified function.
3711 * typeck.c (complain_about_unrecognized_member): Updated function
3712 arguments in complain_about_access.
3713
37142021-01-23 Patrick Palka <ppalka@redhat.com>
3715
3716 PR c++/97399
3717 * cp-tree.h (shared_member_p): Adjust declaration.
3718 * parser.c (cp_parser_init_declarator): If the storage class
3719 specifier is sc_static, pass true for static_p to
3720 cp_parser_declarator.
3721 (cp_parser_direct_declarator): Don't do inject_this_parm when
3722 the declarator is a friend.
3723 * search.c (shared_member_p): Change return type to bool and
3724 adjust function body accordingly. Return false for a dependent
3725 USING_DECL instead of aborting.
3726 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
3727 even when type-dependent.
3728
8502e23d
GA
37292021-01-22 Marek Polacek <polacek@redhat.com>
3730
3731 PR c++/96623
3732 * parser.c (inject_parm_decls): Remove a redundant assignment.
3733 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
3734 before calling inject_parm_decls.
3735
37362021-01-22 Jason Merrill <jason@redhat.com>
3737
3738 PR c++/98744
3739 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
3740
37412021-01-22 Jakub Jelinek <jakub@redhat.com>
3742
3743 PR sanitizer/95693
3744 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
3745 return build_zero_cst for reference types.
3746 * typeck2.c (process_init_constructor_record): Instead call
3747 build_zero_cst here during error recovery instead of build_zero_init.
3748
37492021-01-22 Marek Polacek <polacek@redhat.com>
3750
3751 PR c++/98545
3752 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
3753 warnings regardless of abi_version_at_least.
3754 (write_expression): When the expression is a dependent name
3755 and an operator name, write "on" before writing its name.
3756
37572021-01-22 Marek Polacek <polacek@redhat.com>
3758
3759 PR c++/97966
3760 * pt.c (instantiate_class_template_1): Instantiate members
3761 marked with attribute used only after we're done instantiating
3762 the class.
3763
7559d465
GA
37642021-01-21 Patrick Palka <ppalka@redhat.com>
3765
3766 PR c++/71879
3767 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
3768 sentinel at the start of the function. Remove a now-redundant
3769 manual adjustment of cp_unevaluated_operand.
3770
37712021-01-21 Nathan Sidwell <nathan@acm.org>
3772
3773 PR c++/98624
3774 * module.cc (depset::hash::find_dependencies): Add
3775 module arg.
3776 (trees_out::core_vals): Check state before calling
3777 write_location.
3778 (sort_cluster, module_state::write): Adjust
3779 find_dependencies call.
3780
37812021-01-21 Jakub Jelinek <jakub@redhat.com>
3782
3783 PR c++/98672
3784 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
3785 (check_for_return_continue): Also look for BREAK_STMT. Handle
3786 SWITCH_STMT by ignoring break_stmt from its body.
3787 (potential_constant_expression_1) <case FOR_STMT>,
3788 <case WHILE_STMT>: If the condition isn't constant true, check if
3789 the loop body can contain a return stmt.
3790 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
3791 <case IF_STMT>: If recursion with tf_none is successful,
3792 merge *jump_target from the branches - returns with highest priority,
3793 breaks or continues lower. If then branch is potentially constant and
3794 doesn't return, check the else branch if it could return, break or
3795 continue.
3796
37972021-01-21 Nathan Sidwell <nathan@acm.org>
3798
3799 PR c++/98530
3800 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
3801
b93d0e36
GA
38022021-01-20 Nathan Sidwell <nathan@acm.org>
3803
3804 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
3805 signed type.
3806
38072021-01-20 Patrick Palka <ppalka@redhat.com>
3808
3809 PR c++/95434
3810 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
3811 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
3812 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3813
38142021-01-20 Patrick Palka <ppalka@redhat.com>
3815
3816 PR c++/82613
3817 * parser.c (cp_parser_class_head): Defer access checking when
3818 parsing the base-clause until all bases are seen and attached
3819 to the class type.
3820 * pt.c (instantiate_class_template): Likewise when substituting
3821 into dependent bases.
3822
38232021-01-20 Jakub Jelinek <jakub@redhat.com>
3824
3825 PR c++/98742
3826 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
3827 error_operand_p, remove clause without further checking. Check
3828 for non-NULL TYPE_NAME.
3829
f35a4f96
GA
38302021-01-19 Marek Polacek <polacek@redhat.com>
3831
3832 PR c++/98659
3833 * pt.c (maybe_instantiate_noexcept): Return false if FN is
3834 error_mark_node.
3835
38362021-01-19 Marek Polacek <polacek@redhat.com>
3837
3838 PR c++/98687
3839 * name-lookup.c (push_using_decl_bindings): New, broken out of...
3840 (finish_nonmember_using_decl): ...here.
3841 * name-lookup.h (push_using_decl_bindings): Update declaration.
3842 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
3843
38442021-01-19 Patrick Palka <ppalka@redhat.com>
3845
3846 PR c++/41437
3847 PR c++/58993
3848 * search.c (friend_accessible_p): If scope is a hidden friend
3849 defined inside a dependent class, consider access from the
3850 class.
3851 * parser.c (cp_parser_late_parsing_for_member): Don't push a
3852 dk_no_check access state.
3853
38542021-01-19 Marek Polacek <polacek@redhat.com>
3855
3856 PR c++/98333
3857 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
3858 of NSDMIs before late-parsing of noexcept-specifiers.
3859
38602021-01-19 Nathan Sidwell <nathan@acm.org>
3861
3862 * module.cc (identifier): Merge overloads.
3863
38642021-01-19 Nathan Sidwell <nathan@acm.org>
3865
3866 PR c++/98624
3867 * module.cc (trees_out::write_location): Make static.
3868
59cf67d1
GA
38692021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
3870
3871 * parser.c (cp_parser_omp_clause_detach): New.
3872 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
3873 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
3874 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3875 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3876 Prevent use of detach with mergeable and overriding the data sharing
3877 mode of the event handle.
3878
2f7f0d32
GA
38792021-01-15 Nathan Sidwell <nathan@acm.org>
3880
3881 PR c++/98538
3882 * tree.c (cp_build_qualified_type_real): Propagate an array's
3883 dependentness to the copy, if known.
3884
38852021-01-15 Jason Merrill <jason@redhat.com>
3886
3887 PR c++/98642
3888 * call.c (unsafe_return_slot_p): Return int.
3889 (init_by_return_slot_p): Split out from...
3890 (unsafe_copy_elision_p): ...here.
3891 (unsafe_copy_elision_p_opt): New name for old meaning.
3892 (build_over_call): Adjust.
3893 (make_safe_copy_elision): New.
3894 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
3895 list-initialization.
3896 * cp-tree.h: Adjust.
3897
38982021-01-15 Jason Merrill <jason@redhat.com>
3899
3900 * call.c (base_ctor_for, make_base_init_ok): New.
3901 (build_over_call): Use make_base_init_ok.
3902
39032021-01-15 Jason Merrill <jason@redhat.com>
3904
3905 PR c++/63707
3906 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
3907 if we got a CONSTRUCTOR.
3908
39092021-01-15 Nathan Sidwell <nathan@acm.org>
3910
3911 PR c++/98591
3912 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
3913
5fff80fd
GA
39142021-01-14 Jason Merrill <jason@redhat.com>
3915
3916 * typeck2.c (process_init_constructor_record): Use fldtype
3917 variable consistently.
3918
39192021-01-14 Nathan Sidwell <nathan@acm.org>
3920
3921 PR c++/98372
3922 * tree.c (cp_tree_equal): Correct map_context logic.
3923
be0851b8
GA
39242021-01-13 Marek Polacek <polacek@redhat.com>
3925
3926 PR c++/98231
3927 * name-lookup.c (push_using_decl_bindings): New.
3928 * name-lookup.h (push_using_decl_bindings): Declare.
3929 * pt.c (tsubst_expr): Call push_using_decl_bindings.
3930
39312021-01-13 Nathan Sidwell <nathan@acm.org>
3932
3933 PR c++/98626
3934 * module.cc (module_add_import_initializers): Pass a
3935 zero-element argument vector.
3936
6851dda2
GA
39372021-01-12 Patrick Palka <ppalka@redhat.com>
3938
3939 PR c++/98611
3940 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
3941 the template of a CTAD placeholder.
3942
39432021-01-12 Marek Polacek <polacek@redhat.com>
3944
3945 PR c++/98620
3946 * typeck2.c (process_init_constructor_record): Don't emit
3947 -Wmissing-field-initializers warnings in unevaluated contexts.
3948
67fbb7f0
GA
39492021-01-11 Jakub Jelinek <jakub@redhat.com>
3950
3951 PR c++/98481
3952 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
3953 for types.
3954 (mark_abi_tags_r): Likewise.
3955 * decl2.c (min_vis_r): Likewise.
3956 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
3957 typedefs.
3958
bf5cbb9e
GA
39592021-01-08 Patrick Palka <ppalka@redhat.com>
3960
3961 PR c++/98551
3962 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
3963 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
3964
39652021-01-08 Patrick Palka <ppalka@redhat.com>
3966
3967 PR c++/98515
3968 * semantics.c (check_accessibility_of_qualified_id): Punt if
3969 we're checking access of a scoped non-static member inside a
3970 class template.
3971
7d187e4f
GA
39722021-01-07 Jakub Jelinek <jakub@redhat.com>
3973
3974 PR c++/98329
3975 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
3976 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
3977 its location.
3978 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
3979
39802021-01-07 Marek Polacek <polacek@redhat.com>
3981
3982 PR c++/98441
3983 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
3984 !late_return_type block.
3985
39862021-01-07 Jason Merrill <jason@redhat.com>
3987
3988 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
3989 (cxx_eval_store_expression): Add comment.
3990
39912021-01-07 Jason Merrill <jason@redhat.com>
3992
3993 * call.c (has_next): Factor out from...
3994 (next_conversion): ...here.
3995 (strip_standard_conversion): And here.
3996 (is_subseq): And here.
3997 (build_conv): Check it.
3998 (standard_conversion): Don't call build_conv
3999 for ck_identity.
4000
942ae5be
GA
40012021-01-06 Martin Sebor <msebor@redhat.com>
4002
4003 PR c++/95768
4004 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
4005
651b8a50
GA
40062021-01-05 Patrick Palka <ppalka@redhat.com>
4007
4008 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
4009 the type of the NTTP, substitute into the type again. If the
4010 type is still dependent, don't unify the NTTP.
4011
40122021-01-05 Jakub Jelinek <jakub@redhat.com>
4013
4014 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
4015 $(CODYLIB) after $(BACKEND).
4016
40172021-01-05 Jakub Jelinek <jakub@redhat.com>
4018
4019 PR c++/98469
4020 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
4021 Punt if lval is true.
4022 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
4023 the result if it has a class type.
4024
40252021-01-05 Marek Polacek <polacek@redhat.com>
4026
4027 PR c++/82099
4028 * pt.c (resolve_overloaded_unification): Call
4029 maybe_instantiate_noexcept after instantiating the function
4030 decl.
4031
40322021-01-05 Nathan Sidwell <nathan@acm.org>
4033
4034 * parser.c (cp_parser_module_declaration): Alter diagnostic
4035 text to say where is permissable.
4036
40372021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4038
4039 PR c++/98316
4040 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
4041
2eacfdbd
GA
40422021-01-02 Jan Hubicka <jh@suse.cz>
4043
4044 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
4045 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
4046 * tree.c (cp_tree_c_finish_parsing): New function.
4047
b6dd195a
GA
40482021-01-01 Jakub Jelinek <jakub@redhat.com>
4049
4050 * ChangeLog-2020: Rotate ChangeLog. New file.
4051
ad41bd84 4052\f
618e665a 4053Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
4054
4055Copying and distribution of this file, with or without modification,
4056are permitted in any medium without royalty provided the copyright
4057notice and this notice are preserved.
This page took 4.200254 seconds and 5 git commands to generate.