]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
IRA: Process digital constraints containing more one digit
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
6405b40f
GA
12021-03-08 Nathan Sidwell <nathan@acm.org>
2
3 PR c++/99436
4 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
5
62021-03-08 Nathan Sidwell <nathan@acm.org>
7
8 * lex.c (module_token_filter::resume): Ignore module-decls inside
9 header-unit.
10 * parser.c (cp_parser_module_declaration): Reject in header-unit.
11
122021-03-08 Nathan Sidwell <nathan@acm.org>
13
14 PR c++/99285
15 * cp-tree.h (match_mergeable_specialization)
16 (add_mergeable_specialization): Adjust parms.
17 * module.cc (trees_in::decl_value): Adjust
18 add_mergeable_specialization calls.
19 (trees_out::key_mergeable): Adjust match_mergeable_specialization
20 calls.
21 (specialization_add): Likewise.
22 * pt.c (match_mergeable_specialization): Do not insert.
23 (add_mergeable_specialization): Add to hash table here.
24
0ad6a2e2
GA
252021-03-06 Patrick Palka <ppalka@redhat.com>
26 Jakub Jelinek <jakub@redhat.com>
27
28 PR c++/99287
29 * constexpr.c (cxx_eval_increment_expression): Pass lval when
30 evaluating the MODIFY_EXPR, and update 'mod' with the result of
31 this evaluation. Check *non_constant_p afterwards. For prefix
32 ops, just return 'mod'.
33
342021-03-06 Patrick Palka <ppalka@redhat.com>
35 Jakub Jelinek <jakub@redhat.com>
36
37 PR c++/96330
38 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
39 variable 'fn' to 'tmpl'. Handle a variable template-id by
40 calling lookup_template_variable.
41
422021-03-06 Patrick Palka <ppalka@redhat.com>
43
44 PR c++/99365
45 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
46 outer_targs to do_auto_deduction.
47 (placeholder_type_constraint_dependent_p): Define.
48 (do_auto_deduction): When processing_template_decl != 0
49 and context is adc_unify and we have constraints, pretend the
50 constraints are satisfied instead of punting. Otherwise don't
51 punt unless placeholder_type_constraint_dependent_p holds.
52 Add some clarifying sanity checks. Add a hack to add missing
53 outermost template levels to outer_args before checking
54 satisfaction. Don't substitute outer_targs into type if it's
55 already been done.
56
ceae9533
GA
572021-03-05 Marek Polacek <polacek@redhat.com>
58
59 PR c++/99374
60 * call.c (standard_conversion): When converting pointers to
61 member, don't return NULL when the bases are equivalent but
62 incomplete.
63
642021-03-05 Marek Polacek <polacek@redhat.com>
65
66 PR c++/99120
67 * name-lookup.c (check_local_shadow): Check if the type of decl
68 is non-null before checking TYPE_PTR*.
69
702021-03-05 Nathan Sidwell <nathan@acm.org>
71
72 PR c++/99245
73 * module.cc (module_state::write_cluster): Relax binding assert.
74
752021-03-05 Nathan Sidwell <nathan@acm.org>
76
77 PR c++/99377
78 * pt.c (instantiate_decl): Call set_instantiating_module.
79
802021-03-05 Iain Sandoe <iain@sandoe.co.uk>
81
82 PR c++/98118
83 * coroutines.cc (build_co_await): Use type_build_ctor_call()
84 to determine cases when a CTOR needs to be built.
85 (flatten_await_stmt): Likewise.
86 (morph_fn_to_coro): Likewise.
87
882021-03-05 Iain Sandoe <iain@sandoe.co.uk>
89
90 PR c++/95616
91 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
92 (coro_diagnose_throwing_final_aw_expr): New helper.
93 (build_co_await): Diagnose throwing final await expression
94 components.
95 (build_init_or_final_await): Diagnose a throwing promise
96 final_suspend() call.
97
982021-03-05 Iain Sandoe <iain@sandoe.co.uk>
99
100 PR c++/95615
101 * coroutines.cc (struct param_info): Track parameter copies that need
102 a DTOR.
103 (coro_get_frame_dtor): New helper function factored from build_actor().
104 (build_actor_fn): Use coro_get_frame_dtor().
105 (morph_fn_to_coro): Track parameters that need DTORs on exception,
106 likewise the frame promise and the return object. On exception, run the
107 DTORs for these, destroy the frame and then rethrow the exception.
108
1092021-03-05 Nathan Sidwell <nathan@acm.org>
110
111 PR c++/99389
112 * pt.c (instantiate_class_template_1): Set instantiating module
113 here.
114
1152021-03-05 Tobias Burnus <tobias@codesourcery.com>
116
117 PR c/99137
118 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
119
67f10d28
GA
1202021-03-04 Jakub Jelinek <jakub@redhat.com>
121
122 PR c++/88146
123 PR c++/99362
124 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
125 comment.
126
1272021-03-04 Nathan Sidwell <nathan@acm.org>
128
129 PR c++/99170
130 * module.cc (class uintset): Delete.
131 (typedef attached_map_t): A hash map.
132 (attached_table): Use attached_map_t. Adjust uses ...
133 (trees_out::decl_value, trees_in::decl_value): ... here ...
134 (trees_out::key_mergeable): ... here ...
135 (trees_in::key_mergeable): ... here ...
136 (maybe_attach_decl): ... here ...
137 (direct_import): ... and here.
138
1392021-03-04 Nathan Sidwell <nathan@acm.org>
140
141 PR c++/99170
142 * cp-tree.h
143 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
144 rename.
145 * module.cc (class pending_key): New.
146 (default_hash_traits<pending_key>): New specialization.
147 (pending_map_t): New typedef.
148 (pending_table): Replace old table.
149 (trees_out::lang_decl_bools): Adjust.
150 (trees_in::lang_decl_bools): Adjust.
151 (trees_in::install_entity): Drop pending member and specialization
152 handling.
153 (find_pending_key): New.
154 (depset::hash::fiund_dependencies): Use it.
155 (pendset_lazy_load): Delete.
156 (module_state::write_cluster): Don't count pendings here. Bye
157 Duff's device-like thing.
158 (module_state::write_pendings): Reimplement.
159 (module_state::read_pendings): Reimplement.
160 (lazy_specializations_p): Delete.
161 (module_state::write): Adjust write_pendings call.
162 (lazy_load_pendings): New.
163 (lazy_load_specializations): Delete.
164 (lazy_load_members): Delete.
165 (init_modules): Adjust.
166 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
167 not lazy_load_members.
168 (note_pending_specializations): Delete.
169 (load_pending_specializations): Delete.
170 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
171 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
172 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
173 (note_pending_specializations): Delete.
174 (load_pending_specializations): Delete.
175 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
176 lazy_load_specializations.
177 (instantiate_template_class_1): Likewise.
178 (instantiate_decl): Call lazy_load_pendings.
179 * typeck.c (complete_type): Likewise.
180
f3641ac7
GA
1812021-03-03 Nathan Sidwell <nathan@acm.org>
182
183 PR c++/99170
184 * module.cc (post_load_decls): New.
185 (lazy_snum, recursive_lazy): Move earlier.
186 (module_state::read_cluster): Push cloning onto post_load_decls.
187 (post_load_processing): New. Do the cloning here.
188 (module_state::read_inits): Call post_load_processing.
189 (module_state::read_language): Likewise.
190 (lazy_load_binding, lazy_load_specializations): Likewise
191 (lazy_load_members): Likewise
192
1932021-03-03 Nathan Sidwell <nathan@acm.org>
194
195 PR c++/99170
196 * module.cc (trees_out::decl_value): Stream specialization keys
197 after decl.
198 (trees_in::decl_value): Stream them back and insert after
199 completing the decl.
200 (trees_out::key_mergeable): Drop some streaming here ...
201 (trees_in::key_mergeable): ... and here. Don't insert into
202 specialization tables.
203
2042021-03-03 Patrick Palka <ppalka@redhat.com>
205
206 * constraint.cc (struct sat_info): Document the different
207 meanings of noisy() and diagnose_unsatisfaction_p() during
208 satisfaction and requires-expression evaluation.
209 (tsubst_valid_expression_requirement): Take a sat_info instead
210 of a subst_info. Perform the substitution quietly first. Fold
211 in error-replaying code from diagnose_valid_expression.
212 (tsubst_simple_requirement): Take a sat_info instead of a
213 subst_info.
214 (tsubst_type_requirement_1): New. Fold in error-replaying code
215 from diagnose_valid_type.
216 (tsubst_type_requirement): Use the above. Take a sat_info
217 instead of a subst_info.
218 (tsubst_compound_requirement): Likewise. Fold in
219 error-replaying code from diagnose_compound_requirement.
220 (tsubst_nested_requirement): Take a sat_info instead of a
221 subst_info. Fold in error-replaying code from
222 diagnose_nested_requirement.
223 (tsubst_requirement): Take a sat_info instead of a subst_info.
224 (tsubst_requires_expr): Split into two versions, one that takes
225 a sat_info argument and another that takes a complain and
226 in_decl argument. Remove outdated documentation. Document the
227 effects of the sat_info argument. Don't short-circuit
228 processing of requirements when diagnosing unsatisfaction,
229 mirroring diagnose_requires_expr.
230 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
231 assert, and se the three-parameter version of tsubst_requires_expr.
232 (diagnose_trait_expr): Make static. Take a template argument
233 vector instead of a parameter mapping.
234 (diagnose_valid_expression): Remove.
235 (diagnose_valid_type): Remove.
236 (diagnose_simple_requirement): Remove.
237 (diagnose_compound_requirement): Remove.
238 (diagnose_type_requirement): Remove.
239 (diagnose_nested_requirement): Remove.
240 (diagnose_requirement): Remove.
241 (diagnose_requires_expr): Remove.
242 (diagnose_atomic_constraint): Take a sat_info instead of a
243 subst_info. Adjust call to diagnose_trait_expr. Call
244 tsubst_requires_expr instead of diagnose_requires_expr.
245 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
246 and just always call constraint_satisfaction_value.
247
2482021-03-03 Patrick Palka <ppalka@redhat.com>
249
250 * constexpr.c (cxx_eval_call_expression): Adjust call to
251 evaluate_concept_check.
252 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
253 evaluate_requires_expression instead of
254 satisfy_constraint_expression.
255 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
256 * constraint.cc (struct sat_info): Adjust comment about which
257 satisfaction entrypoints use noisy-unsat.
258 (normalize_template_requirements): Remove (and adjust callers
259 appropriately).
260 (normalize_nontemplate_requirements): Likewise.
261 (tsubst_nested_requirement): Use constraint_satisfaction_value
262 instead of satisfy_constraint_expression, which'll do the
263 noisy replaying of ill-formed quiet satisfaction for us.
264 (decl_satisfied_cache): Adjust comment.
265 (satisfy_constraint): Rename to ...
266 (satisfy_normalized_constraints): ... this.
267 (satisfy_associated_constraints): Remove (and make its
268 callers check for dependent arguments).
269 (satisfy_constraint_expression): Rename to ...
270 (satisfy_nondeclaration_constraints): ... this. Assert that
271 'args' is empty when 't' is a concept-id. Removing handling
272 bare constraint-expressions, and handle REQUIRES_EXPRs
273 specially. Adjust comment accordingly.
274 (satisfy_declaration_constraints): Assert in the two-parameter
275 version that 't' is not a TEMPLATE_DECL. Adjust following
276 removal of normalize_(non)?template_requirements and
277 satisfy_asociated_constraints.
278 (constraint_satisfaction_value): Combine the two- and
279 three-parameter versions in the natural way.
280 (constraints_satisfied_p): Combine the one- and two-parameter
281 versions in the natural way. Improve documentation.
282 (evaluate_requires_expr): Define.
283 (evaluate_concept_check): Remove 'complain' parameter. Use
284 constraint_satisfaction_value instead of
285 satisfy_constraint_expression.
286 (diagnose_nested_requirement): Adjust following renaming of
287 satisfy_constraint_expression.
288 (diagnose_constraints): Handle REQUIRES_EXPR by going through
289 diagnose_requires_expr directly instead of treating it as a
290 constraint-expression. Improve documentation.
291 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
292 to evaluate_concept_check.
293 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
294 constraints_satisfied_p.
295 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
296 * cp-tree.h (evaluate_requires_expr): Declare.
297 (evaluate_concept_check): Remove tsubst_flag_t parameter.
298 (satisfy_constraint_expression): Remove declaration.
299 (constraints_satisfied_p): Remove one-parameter declaration.
300 Add a default argument to the two-parameter declaration.
301 * cvt.c (convert_to_void): Adjust call to
302 evaluate_concept_check.
303
3042021-03-03 Jakub Jelinek <jakub@redhat.com>
305
306 PR c++/82959
307 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
308 and COMPOUND_EXPR.
309
3102021-03-03 Marek Polacek <polacek@redhat.com>
311
312 PR c++/97034
313 PR c++/99009
314 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
315 (maybe_aggr_guide): Use the original template type where needed. In
316 a class member template, partially instantiate the result of
317 collect_ctor_idx_types.
318 (do_class_deduction): Defer the deduction until the enclosing
319 scope is non-dependent.
320
3212021-03-03 Jason Merrill <jason@redhat.com>
322
323 PR c++/95675
324 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
325 if it didn't get one before.
326
3272021-03-03 Nathan Sidwell <nathan@acm.org>
328
329 PR c++/99344
330 * module.cc (trees_out::decl_node): Small refactor.
331 (depset::hash::add_binding_entity): Return true on meeting an
332 import. Set namespace's import here.
333 (module_state:write_namespaces): Inform of purview too.
334 (module_state:read_namespaces): Adjust.
335 * name-lookup.c (implicitly_export_namespace): Delete.
336 (do_pushdecl): Don't call it.
337 (push_namespace): Likewise, set purview.
338 (add_imported_namespace): Reorder parms.
339 * name-lookup.h (add_imported_namespace): Alter param ordering.
340
d97a92dc
GA
3412021-03-02 Martin Sebor <msebor@redhat.com>
342
343 PR c++/99251
344 * class.c (build_base_path): Call build_if_nonnull.
345 * cp-tree.h (build_if_nonnull): Declare.
346 * rtti.c (ifnonnull): Rename...
347 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
348 (build_dynamic_cast_1): Adjust to name change.
349
3502021-03-02 Patrick Palka <ppalka@redhat.com>
351
352 PR c++/96443
353 PR c++/96960
354 * constraint.cc (type_deducible_p): Don't substitute into the
355 constraints, and instead just pass 'args' to do_auto_deduction
356 as the outer template arguments.
357 (tsubst_parameter_mapping): Remove confused code for handling
358 placeholder type arguments.
359 (normalize_placeholder_type_constraint): Define.
360 (satisfy_constraint_expression): Use it to handle placeholder
361 'auto' types.
362 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
363 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
364 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
365 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
366 (make_constrained_placeholder_type): Set
367 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
368 (do_auto_deduction): Clarify comments about the outer_targs
369 parameter. Rework satisfaction of a placeholder type constraint
370 to pass in the complete set of template arguments directly to
371 constraints_satisfied_p.
372 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
373 instead. Also rebuild the the constraint info on the new auto.
374
3752021-03-02 Patrick Palka <ppalka@redhat.com>
376
377 * constraint.cc (build_parameter_mapping): Rely on the caller to
378 determine the in-scope template parameters.
379 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
380 to the two-parameter constructor. In the two-parameter
381 constructor, fold in the definition of make_context, set
382 initial_parms appropriately, and don't set the now-removed
383 orig_decl member.
384 (norm_info::make_context): Remove, now that its only use is
385 inlined into the caller.
386 (norm_info::update_context): Adjust call to
387 build_parameter_mapping to pass in the relevant set of in-scope
388 template parameters.
389 (norm_info::ctx_parms): Define this member function.
390 (norm_info::context): Initialize to NULL_TREE.
391 (norm_info::orig_decl): Remove this data member.
392 (norm_info::initial_parms): Define this data member.
393 (normalize_atom): Adjust call to build_parameter_mapping to pass
394 in the relevant set of in-scope template parameters. Use
395 info.initial_parms instead of info.orig_decl.
396 (normalize_constraint_expression): Take a norm_info object
397 instead of a bool. Cache the result of normalization.
398 (tsubst_nested_requirement): Call satisfy_constraint_expression
399 instead of satisfy_constraint, so that we normalize on demand.
400 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
401 Adjust call to normalize_constraint_expression.
402 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
403 to current_template_parms.
404 (diagnose_nested_requirements): Go through
405 satisfy_constraint_expression, as with tsubst_nested_requirement.
406
4072021-03-02 Patrick Palka <ppalka@redhat.com>
408
409 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
410 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
411 started with a TYPE_ARGUMENT_PACK.
412 (finish_requires_expr): Don't set DECL_CONTEXT and
413 CONSTRAINT_VAR_P on each of the introduced parameters here.
414 * parser.c (cp_parser_requirement_parameter_list): Instead set
415 these fields earlier, here.
416 * pt.c (do_auto_deduction): Canonicalize the result of
417 do_auto_deduction. Pass 'complain' to finish_decltype_type.
418
4192021-03-02 Patrick Palka <ppalka@redhat.com>
420
421 * constraint.cc (tsubst_simple_requirement): Just return
422 boolean_true_node on success.
423 (tsubst_type_requirement): Likewise.
424 (tsubst_compound_requirement): Likewise.
425 (tsubst_nested_requirement): Likewise.
426 (tsubst_requirement_body): Remove.
427 (check_constaint_variables): Rename to ...
428 (check_constraint_variables): ... this.
429 (tsubst_constraint_variables): Adjust.
430 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
431
88938886
GA
4322021-03-01 Nathan Sidwell <nathan@acm.org>
433
434 PR c++/99294
435 * class.c (fixup_type_variants): Propagate mode, precision,
436 alignment & emptiness.
437 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
438 (trees_in::tree_node): Rematerialize alignment here.
439
ec9dc4fa
GA
4402021-02-27 Jason Merrill <jason@redhat.com>
441
442 PR c++/90333
443 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
444 between () and ->.
445
06a9f20f
GA
4462021-02-26 Jakub Jelinek <jakub@redhat.com>
447
448 * parser.c (cp_parser_lambda_declarator_opt): Implement
449 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
450 for -std={c,gnu}++2b or with pedwarn in earlier versions.
451
4522021-02-26 Jakub Jelinek <jakub@redhat.com>
453
454 PR c++/95451
455 * lambda.c (is_lambda_ignored_entity): Before checking for
456 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
457
4582021-02-26 Jason Merrill <jason@redhat.com>
459
460 PR c++/98810
461 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
462 to a class non-type template argument that needs it.
463
4642021-02-26 Patrick Palka <ppalka@redhat.com>
465
466 PR c++/98990
467 * pt.c (splice_late_return_type): Rebuild the entire return type
468 if we have to adjust the level of an auto within.
469 (type_uses_auto): Adjust call to find_type_usage.
470 * type-utils.h (find_type_usage): Revert r10-6571 change that
471 made this function return a pointer to the auto node.
472
daa68844
GA
4732021-02-25 Patrick Palka <ppalka@redhat.com>
474
475 PR c++/99213
476 PR c++/94521
477 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
478 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
479
4802021-02-25 Patrick Palka <ppalka@redhat.com>
481
482 PR c++/99103
483 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
484 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
485
4862021-02-25 Marek Polacek <polacek@redhat.com>
487
488 DR 1312
489 PR c++/99176
490 * constexpr.c (is_std_construct_at): New overload.
491 (is_std_allocator_allocate): New overload.
492 (cxx_eval_call_expression): Use the new overloads.
493 (cxx_eval_constant_expression): Reject casting
494 from void * as per DR 1312. Don't check can_convert.
495
4962021-02-25 Iain Sandoe <iain@sandoe.co.uk>
497
498 PR c++/97587
499 * coroutines.cc (struct param_info): Track rvalue refs.
500 (morph_fn_to_coro): Track rvalue refs, and call the promise
501 CTOR with the frame copy of passed parms.
502
5032021-02-25 Iain Sandoe <iain@sandoe.co.uk>
504
505 PR c++/95822
506 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
507 set throwing_cleanup marker.
508
5092021-02-25 Nathan Sidwell <nathan@acm.org>
510
511 PR c++/99166
512 * module.cc (module_state::inform_cmi_p): Renamed field.
513 (module_state::do_import): Adjust.
514 (init_modules, finish_module_processing): Likewise.
515 (handle_module_option): Likewise.
516
5172021-02-25 Nathan Sidwell <nathan@acm.org>
518
519 PR c++/98318
520 * mapper-client.cc (module_client::open_module_client): Fix typo
521 of fd init.
522
4028d01a
GA
5232021-02-24 Nathan Sidwell <nathan@acm.org>
524
525 PR c++/98718
526 * module.cc (ool): New indirection vector.
527 (loc_spans::maybe_propagate): Location is not optional.
528 (loc_spans::open): Likewise. Assert monotonically advancing.
529 (module_for_ordinary_loc): Use ool indirection vector.
530 (module_state::write_prepare_maps): Do not count empty macro
531 expansions. Elide empty spans.
532 (module_state::write_macro_maps): Skip empty expansions.
533 (ool_cmp): New qsort comparator.
534 (module_state::write): Create and destroy ool vector.
535 (name_pending_imports): Fix dump push/pop.
536 (preprocess_module): Likewise. Add more dumping.
537 (preprocessed_module): Likewise.
538
5392021-02-24 Iain Sandoe <iain@sandoe.co.uk>
540
541 PR c++/96251
542 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
543 error reporting when instantiating for a constexpr.
544
71e24b06
GA
5452021-02-23 Nathan Sidwell <nathan@acm.org>
546
547 PR c++/99208
548 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
549 identity.
550
5512021-02-23 Patrick Palka <ppalka@redhat.com>
552
553 PR c++/95468
554 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
555 over from tsubst_copy.
556
5572021-02-23 Patrick Palka <ppalka@redhat.com>
558
559 * pt.c (instantiation_dependent_expression_p): Check
560 processing_template_decl before calling
561 potential_constant_expression.
562
2f5765cf
GA
5632021-02-22 Nathan Sidwell <nathan@acm.org>
564
565 PR c++/99174
566 * module.cc (struct module_state): Add visited_p flag.
567 (name_pending_imports): Use it to avoid duplicate requests.
568 (preprocess_module): Don't read preprocessor state if we failed to
569 load a module's config.
570
5712021-02-22 Nathan Sidwell <nathan@acm.org>
572
573 PR c++/99153
574 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
575 to common-path.
576 * module.cc (set_defining_module): Add assert.
577
50352c6c
GA
5782021-02-19 Nathan Sidwell <nathan@acm.org>
579
580 PR c++/98741
581 * module.cc (pending_imports): New.
582 (declare_module): Adjust test condition.
583 (name_pending_imports): New.
584 (preprocess_module): Reimplement using pending_imports.
585 (preprocessed_module): Move name-getting to name_pending_imports.
586 * name-lookup.c (append_imported_binding_slot): Assert module
587 ordering is increasing.
588
5892021-02-19 Nathan Sidwell <nathan@acm.org>
590
591 * module.cc (note_cmis): New.
592 (struct module_state): Add inform_read_p bit.
593 (module_state::do_import): Inform of CMI location, if enabled.
594 (init_modules): Canonicalize note_cmis entries.
595 (handle_module_option): Handle -flang-info-module-read=FOO.
596
5972021-02-19 Jason Merrill <jason@redhat.com>
598
599 PR c++/96926
600 * call.c (perfect_conversion_p): Limit rvalueness
601 test to reference bindings.
602
6032021-02-19 Jason Merrill <jason@redhat.com>
604
605 PR c++/96926
606 * call.c (perfect_conversion_p): New.
607 (perfect_candidate_p): New.
608 (add_candidates): Ignore templates after a perfect non-template.
609
bf81237e
GA
6102021-02-18 Nathan Sidwell <nathan@acm.org>
611
612 PR c++/99023
613 * module.cc (canonicalize_header_name): Use
614 cpp_probe_header_unit.
615 (maybe_translate_include): Fix note_includes comparison.
616 (init_modules): Fix note_includes string termination.
617
6182021-02-18 Jakub Jelinek <jakub@redhat.com>
619
620 PR c++/99132
621 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
622 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
623 for immediate function calls.
624
acc0ee5c
GA
6252021-02-17 Nathan Sidwell <nathan@acm.org>
626
627 PR c++/99023
628 * module.cc (struct macro_export): Add GTY markers.
629 (macro_exports): Likewise, us a va_gc Vector.
630
6312021-02-17 Jakub Jelinek <jakub@redhat.com>
632
633 PR sanitizer/99106
634 * init.c (build_zero_init_1): For flexible array members just return
635 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
636 ARRAY_TYPE.
637
6382021-02-17 Nathan Sidwell <nathan@acm.org>
639
640 PR c++/99116
641 * name-lookup.c (do_pushdecl): Don't peek under template_parm
642 bindings here ...
643 (set_identifier_type_value_with_scope): ... or here.
644 (do_pushtag): Only set_identifier_type_value_with_scope at
645 non-class template parm scope, and use parent scope.
646
6472021-02-17 Nathan Sidwell <nathan@acm.org>
648
649 PR c++/99071
650 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
651 pointer.
652
6532021-02-17 Patrick Palka <ppalka@redhat.com>
654
655 PR debug/96997
656 PR c++/94034
657 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
658
fab095da
GA
6592021-02-12 Nathan Sidwell <nathan@acm.org>
660
661 * module.cc (module_state::write_cluster): Check bindings for
662 imported using-decls.
663
6642021-02-12 Nathan Sidwell <nathan@acm.org>
665
666 PR c++/99040
667 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
668 for new namespace-scope entities.
669 (module_state::read_cluster): Don't call add_module_decl here.
670 * name-lookup.h (add_module_decl): Rename to ...
671 (add_module_namespace_decl): ... this.
672 * name-lookup.c (newbinding_bookkeeping): Move into ...
673 (do_pushdecl): ... here. Its only remaining caller.
674 (add_module_decl): Rename to ...
675 (add_module_namespace_decl): ... here. Add checking-assert for
676 circularity. Don't call newbinding_bookkeeping, just extern_c
677 checking and incomplete var checking.
678
6792021-02-12 Nathan Sidwell <nathan@acm.org>
680
681 PR c++/99039
682 PR c++/99040
683 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
684 (global_type_node): Delete.
685 (IDENTIFIER_TYPE_VALUE): Delete.
686 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
687 (get_type_value): Delete.
688 * name-lookup.h (identifier_type_value): Delete.
689 * name-lookup.c (check_module_override): Don't
690 SET_IDENTIFIER_TYPE_VALUE here.
691 (do_pushdecl): Nor here.
692 (identifier_type_value_1, identifier_type_value): Delete.
693 (set_identifier_type_value_with_scope): Only
694 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
695 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
696 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
697 * call.c (check_dtor_name): Use lookup_name.
698 * decl.c (cxx_init_decl_processing): Drop global_type_node.
699 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
700 here.
701 * init.c (get_type_value): Delete.
702 * pt.c (instantiate_class_template_1): Don't call pushtag or
703 SET_IDENTIFIER_TYPE_VALUE here.
704 (tsubst): Assert never an identifier.
705 (dependent_type_p): Drop global_type_node assert.
706 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
707 to determine ctorness.
708
7092021-02-12 Jakub Jelinek <jakub@redhat.com>
710
711 PR c++/97742
712 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
713 CPP_EOF.
714
7152021-02-12 Jason Merrill <jason@redhat.com>
716
717 PR c++/97246
718 PR c++/94546
719 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
720 (register_parameter_specializations): Not here.
721
0c5cdb31
GA
7222021-02-11 Marek Polacek <polacek@redhat.com>
723
724 PR c++/95888
725 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
726 for the partial instantiation.
727
7282021-02-11 Jakub Jelinek <jakub@redhat.com>
729
730 PR c++/99033
731 * init.c (build_zero_init_1): Handle zero initialiation of
732 flexible array members like initialization of [0] arrays.
733 Use integer_minus_onep instead of comparison to integer_minus_one_node
734 and integer_zerop instead of comparison against size_zero_node.
735 Formatting fixes.
736
7372021-02-11 Marek Polacek <polacek@redhat.com>
738
739 PR c++/99063
740 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
741
7422021-02-11 Patrick Palka <ppalka@redhat.com>
743
744 PR c++/97582
745 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
746 lookup result by discarding it if the first element is a
747 class-scope declaration, otherwise return it.
748 (push_operator_bindings): Handle an ambiguous lookup result by
749 doing push_local_binding on each element in the list.
750
7512021-02-11 Marek Polacek <polacek@redhat.com>
752
753 * parser.c (cp_parser_selection_statement): Use vec_free.
754
4b37c3ea
GA
7552021-02-10 Jakub Jelinek <jakub@redhat.com>
756
757 PR c++/98988
758 PR c++/99031
759 * constexpr.c: Include cgraph.h.
760 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
761 heap artificial vars.
762 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
763 heap artificial vars.
764
7652021-02-10 Nathan Sidwell <nathan@acm.org>
766
767 PR c++/99030
768 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
769 answer if there's no local specialization.
770
0a91b73e
GA
7712021-02-09 Nathan Sidwell <nathan@acm.org>
772
773 PR c++/98944
774 * module.cc (module_state::is_rooted): Rename to ...
775 (module_state::has_location): ... here. Adjust callers.
776 (module_state::read_partitions): Adjust validity check.
777 Don't overwrite a known location.
778
7792021-02-09 Jason Merrill <jason@redhat.com>
780
781 PR c++/96905
782 * pt.c (mark_decl_instantiated): Exit early if consteval.
783
7842021-02-09 Jason Merrill <jason@redhat.com>
785
786 PR c++/98326
787 PR c++/20408
788 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
789 parm.
790
7912021-02-09 Jason Merrill <jason@redhat.com>
792
793 PR c++/98994
794 PR c++/97566
795 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
796 RECORD_TYPE.
797
2da7ce23
GA
7982021-02-08 Nathan Sidwell <nathan@acm.org>
799
800 * decl.c (start_cleanup_fn): Push function into
801 namespace.
802
8032021-02-08 Nathan Sidwell <nathan@acm.org>
804
805 PR c++/98531
806 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
807 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
808 from rtti.c, add default namespace arg.
809 (check_redeclaration_exception_specification): Allow a lazy
810 builtin's eh spec to differ from an lready-declared user
811 declaration.
812 (declare_global_var): Use push/pop_abi_namespace.
813 (get_atexit_node): Push the fndecl into a namespace.
814 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
815 decl.c.
816
8172021-02-08 Marek Polacek <polacek@redhat.com>
818
819 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
820
1ed59127
GA
8212021-02-05 Marek Polacek <polacek@redhat.com>
822
823 PR c++/98947
824 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
825 on arg2/arg3.
826 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
827 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
828 a warning was emitted.
829
8302021-02-05 Marek Polacek <polacek@redhat.com>
831
832 PR c++/96462
833 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
834
8352021-02-05 Jakub Jelinek <jakub@redhat.com>
836
837 PR c++/97878
838 * decl.c (check_array_initializer): For structured bindings, require
839 the array type to be complete.
840
a19dd5e6
GA
8412021-02-04 Jason Merrill <jason@redhat.com>
842
843 PR c++/98717
844 * constraint.cc (build_concept_check_arguments): Remove assert.
845 (build_concept_check): Allow empty args.
846
8472021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
848
849 PR c++/90926
850 * call.c (can_convert_array): Extend to handle all valid aggregate
851 initializers of an array; including by string literals, not just by
852 brace-init-list.
853 (build_aggr_conv): Call can_convert_array more often, not just in
854 brace-init-list case.
855 * typeck2.c (array_string_literal_compatible_p): New function.
856 (digest_init_r): call array_string_literal_compatible_p
857 * cp-tree.h: (array_string_literal_compatible_p): Declare.
858
8592021-02-04 Jason Merrill <jason@redhat.com>
860
861 PR c++/98802
862 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
863
8642021-02-04 Jason Merrill <jason@redhat.com>
865
866 PR c++/95192
867 * pt.c (tsubst_attribute): Handle error.
868 (apply_late_template_attributes): Return false on error.
869 (tsubst_function_decl): Check its return value.
870 (tsubst_decl): Likewise.
871 (push_template_decl): Assert current_template_parms.
872 (tsubst_template_decl): Set current_template_parms.
873
9faaa807
GA
8742021-02-03 Marek Polacek <polacek@redhat.com>
875
876 PR c++/98951
877 * call.c (struct z_candidate): Mark rewritten and reversed as const.
878 (struct NonPublicField): Mark operator() as const.
879 (struct NonTrivialField): Likewise.
880
8812021-02-03 Jason Merrill <jason@redhat.com>
882
883 PR c++/98926
884 PR c++/98570
885 * pt.c (spec_hasher::equal): Set processing_template_decl.
886 * Make-lang.in (check-g++-strict-gc): Add --param
887 hash-table-verification-limit=10000.
888
8892021-02-03 Marek Polacek <polacek@redhat.com>
890
891 PR c++/98899
892 * parser.c (cp_parser_class_specifier_1): Use any possible
893 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
894 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
895 * pt.c (tsubst_exception_specification): Stash new_specs into
896 DEFPARSE_INSTANTIATIONS.
897 * tree.c (fixup_deferred_exception_variants): Use
898 UNPARSED_NOEXCEPT_SPEC_P.
899
548b75d8
GA
9002021-02-02 Jason Merrill <jason@redhat.com>
901
902 PR c++/98929
903 PR c++/96199
904 * error.c (dump_expr): Ignore dummy object.
905 * pt.c (tsubst_baselink): Handle dependent scope.
906
f7884fb1
GA
9072021-02-01 Patrick Palka <ppalka@redhat.com>
908
909 PR c++/98295
910 * constexpr.c (cxx_eval_array_reference): Also set
911 new_ctx.object when setting new_ctx.ctor.
912
9132021-02-01 Marek Polacek <polacek@redhat.com>
914
915 PR c++/98355
916 * parser.c (cp_parser_has_attribute_expression): Use
917 uses_template_parms instead of type_dependent_expression_p.
918
9192021-02-01 Jason Merrill <jason@redhat.com>
920
921 PR c++/98570
922 * cp-tree.h: Declare it.
923 * pt.c (comparing_dependent_aliases): New flag.
924 (template_args_equal, spec_hasher::equal): Set it.
925 (dependent_alias_template_spec_p): Assert that we don't
926 get non-types other than error_mark_node.
927 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
928 on complex alias specializations. Set TYPE_DEPENDENT_P here.
929 (tsubst_decl): Not here.
930 * module.cc (module_state::read_cluster): Set
931 comparing_dependent_aliases instead of
932 comparing_specializations.
933 * tree.c (cp_tree_equal): Remove comparing_specializations
934 module handling.
935 * typeck.c (structural_comptypes): Adjust.
936 (comptypes): Remove comparing_specializations handling.
937
2900f2f2
GA
9382021-01-29 Nathan Sidwell <nathan@acm.org>
939
940 PR c++/98843
941 * module.cc (module_state_config): Add num_entities field.
942 (module_state::read_entities): The entity_ary span is
943 already allocated.
944 (module_state::write_config): Write num_entities.
945 (module_state::read_config): Read num_entities.
946 (module_state::write): Set config's num_entities.
947 (module_state::read_initial): Allocate the entity ary
948 span here.
949 (module_state::read_language): Do not set entity_lwm
950 here.
951
9522021-01-29 Marek Polacek <polacek@redhat.com>
953
954 PR c++/96137
955 * parser.c (cp_parser_class_name): If parser->scope is
956 error_mark_node, return it, otherwise continue.
957
85d04a2e
GA
9582021-01-28 Jakub Jelinek <jakub@redhat.com>
959
960 PR c++/98841
961 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
962
9632021-01-28 Jakub Jelinek <jakub@redhat.com>
964
965 PR c++/33661
966 PR c++/98847
967 * decl.c (cp_finish_decl): For register vars with asmspec in templates
968 call set_user_assembler_name and set DECL_HARD_REGISTER.
969 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
970 pass asmspec_tree to cp_finish_decl.
971
9722021-01-28 Nathan Sidwell <nathan@acm.org>
973
974 PR c++/98770
975 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
976 check order.
977 (trees_in::decl_value): Do typedef frobbing only when installing
978 a new typedef, adjust is_matching_decl call. Swap is_typedef
979 & TYPE_NAME check.
980 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
981 names and deal with typedef checking.
982
aa69f0a8
GA
9832021-01-27 Jason Merrill <jason@redhat.com>
984
985 PR c++/97874
986 * name-lookup.c (lookup_using_decl): Clean up handling
987 of dependency and inherited constructors.
988 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
989 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
990
e62bb7f0
GA
9912021-01-26 Jason Merrill <jason@redhat.com>
992
993 PR c++/97474
994 * call.c (type_passed_as): Don't mark invisiref restrict.
995
9962021-01-26 Jason Merrill <jason@redhat.com>
997
998 PR c++/97566
999 PR c++/98463
1000 * class.c (layout_class_type): An empty field gets size 0.
1001 (is_empty_field): New.
1002 (check_bases): Check it.
1003 * cp-tree.h (is_empty_field): Declare it.
1004 * constexpr.c (cxx_eval_store_expression): Check it.
1005 (cx_check_missing_mem_inits): Likewise.
1006 * init.c (perform_member_init): Likewise.
1007 * typeck2.c (process_init_constructor_record): Likewise.
1008
161e4c08
GA
10092021-01-25 Martin Sebor <msebor@redhat.com>
1010
1011 PR c++/98646
1012 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
1013
10142021-01-25 Jason Merrill <jason@redhat.com>
1015
1016 PR c++/98463
1017 * constexpr.c (get_or_insert_ctor_field): Add check.
1018 (cxx_eval_store_expression): Handle discontinuity of refs.
1019
6b163337
GA
10202021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
1021
1022 * call.c (complain_about_access): Altered function.
1023 * cp-tree.h (complain_about_access): Changed parameters of function.
1024 (get_parent_with_private_access): Declared new function.
1025 * search.c (get_parent_with_private_access): Defined new function.
1026 * semantics.c (enforce_access): Modified function.
1027 * typeck.c (complain_about_unrecognized_member): Updated function
1028 arguments in complain_about_access.
1029
10302021-01-23 Patrick Palka <ppalka@redhat.com>
1031
1032 PR c++/97399
1033 * cp-tree.h (shared_member_p): Adjust declaration.
1034 * parser.c (cp_parser_init_declarator): If the storage class
1035 specifier is sc_static, pass true for static_p to
1036 cp_parser_declarator.
1037 (cp_parser_direct_declarator): Don't do inject_this_parm when
1038 the declarator is a friend.
1039 * search.c (shared_member_p): Change return type to bool and
1040 adjust function body accordingly. Return false for a dependent
1041 USING_DECL instead of aborting.
1042 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
1043 even when type-dependent.
1044
8502e23d
GA
10452021-01-22 Marek Polacek <polacek@redhat.com>
1046
1047 PR c++/96623
1048 * parser.c (inject_parm_decls): Remove a redundant assignment.
1049 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
1050 before calling inject_parm_decls.
1051
10522021-01-22 Jason Merrill <jason@redhat.com>
1053
1054 PR c++/98744
1055 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
1056
10572021-01-22 Jakub Jelinek <jakub@redhat.com>
1058
1059 PR sanitizer/95693
1060 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
1061 return build_zero_cst for reference types.
1062 * typeck2.c (process_init_constructor_record): Instead call
1063 build_zero_cst here during error recovery instead of build_zero_init.
1064
10652021-01-22 Marek Polacek <polacek@redhat.com>
1066
1067 PR c++/98545
1068 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
1069 warnings regardless of abi_version_at_least.
1070 (write_expression): When the expression is a dependent name
1071 and an operator name, write "on" before writing its name.
1072
10732021-01-22 Marek Polacek <polacek@redhat.com>
1074
1075 PR c++/97966
1076 * pt.c (instantiate_class_template_1): Instantiate members
1077 marked with attribute used only after we're done instantiating
1078 the class.
1079
7559d465
GA
10802021-01-21 Patrick Palka <ppalka@redhat.com>
1081
1082 PR c++/71879
1083 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
1084 sentinel at the start of the function. Remove a now-redundant
1085 manual adjustment of cp_unevaluated_operand.
1086
10872021-01-21 Nathan Sidwell <nathan@acm.org>
1088
1089 PR c++/98624
1090 * module.cc (depset::hash::find_dependencies): Add
1091 module arg.
1092 (trees_out::core_vals): Check state before calling
1093 write_location.
1094 (sort_cluster, module_state::write): Adjust
1095 find_dependencies call.
1096
10972021-01-21 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c++/98672
1100 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
1101 (check_for_return_continue): Also look for BREAK_STMT. Handle
1102 SWITCH_STMT by ignoring break_stmt from its body.
1103 (potential_constant_expression_1) <case FOR_STMT>,
1104 <case WHILE_STMT>: If the condition isn't constant true, check if
1105 the loop body can contain a return stmt.
1106 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
1107 <case IF_STMT>: If recursion with tf_none is successful,
1108 merge *jump_target from the branches - returns with highest priority,
1109 breaks or continues lower. If then branch is potentially constant and
1110 doesn't return, check the else branch if it could return, break or
1111 continue.
1112
11132021-01-21 Nathan Sidwell <nathan@acm.org>
1114
1115 PR c++/98530
1116 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
1117
b93d0e36
GA
11182021-01-20 Nathan Sidwell <nathan@acm.org>
1119
1120 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
1121 signed type.
1122
11232021-01-20 Patrick Palka <ppalka@redhat.com>
1124
1125 PR c++/95434
1126 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
1127 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
1128 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1129
11302021-01-20 Patrick Palka <ppalka@redhat.com>
1131
1132 PR c++/82613
1133 * parser.c (cp_parser_class_head): Defer access checking when
1134 parsing the base-clause until all bases are seen and attached
1135 to the class type.
1136 * pt.c (instantiate_class_template): Likewise when substituting
1137 into dependent bases.
1138
11392021-01-20 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR c++/98742
1142 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
1143 error_operand_p, remove clause without further checking. Check
1144 for non-NULL TYPE_NAME.
1145
f35a4f96
GA
11462021-01-19 Marek Polacek <polacek@redhat.com>
1147
1148 PR c++/98659
1149 * pt.c (maybe_instantiate_noexcept): Return false if FN is
1150 error_mark_node.
1151
11522021-01-19 Marek Polacek <polacek@redhat.com>
1153
1154 PR c++/98687
1155 * name-lookup.c (push_using_decl_bindings): New, broken out of...
1156 (finish_nonmember_using_decl): ...here.
1157 * name-lookup.h (push_using_decl_bindings): Update declaration.
1158 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
1159
11602021-01-19 Patrick Palka <ppalka@redhat.com>
1161
1162 PR c++/41437
1163 PR c++/58993
1164 * search.c (friend_accessible_p): If scope is a hidden friend
1165 defined inside a dependent class, consider access from the
1166 class.
1167 * parser.c (cp_parser_late_parsing_for_member): Don't push a
1168 dk_no_check access state.
1169
11702021-01-19 Marek Polacek <polacek@redhat.com>
1171
1172 PR c++/98333
1173 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
1174 of NSDMIs before late-parsing of noexcept-specifiers.
1175
11762021-01-19 Nathan Sidwell <nathan@acm.org>
1177
1178 * module.cc (identifier): Merge overloads.
1179
11802021-01-19 Nathan Sidwell <nathan@acm.org>
1181
1182 PR c++/98624
1183 * module.cc (trees_out::write_location): Make static.
1184
59cf67d1
GA
11852021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1186
1187 * parser.c (cp_parser_omp_clause_detach): New.
1188 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
1189 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1190 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
1191 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
1192 Prevent use of detach with mergeable and overriding the data sharing
1193 mode of the event handle.
1194
2f7f0d32
GA
11952021-01-15 Nathan Sidwell <nathan@acm.org>
1196
1197 PR c++/98538
1198 * tree.c (cp_build_qualified_type_real): Propagate an array's
1199 dependentness to the copy, if known.
1200
12012021-01-15 Jason Merrill <jason@redhat.com>
1202
1203 PR c++/98642
1204 * call.c (unsafe_return_slot_p): Return int.
1205 (init_by_return_slot_p): Split out from...
1206 (unsafe_copy_elision_p): ...here.
1207 (unsafe_copy_elision_p_opt): New name for old meaning.
1208 (build_over_call): Adjust.
1209 (make_safe_copy_elision): New.
1210 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
1211 list-initialization.
1212 * cp-tree.h: Adjust.
1213
12142021-01-15 Jason Merrill <jason@redhat.com>
1215
1216 * call.c (base_ctor_for, make_base_init_ok): New.
1217 (build_over_call): Use make_base_init_ok.
1218
12192021-01-15 Jason Merrill <jason@redhat.com>
1220
1221 PR c++/63707
1222 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
1223 if we got a CONSTRUCTOR.
1224
12252021-01-15 Nathan Sidwell <nathan@acm.org>
1226
1227 PR c++/98591
1228 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
1229
5fff80fd
GA
12302021-01-14 Jason Merrill <jason@redhat.com>
1231
1232 * typeck2.c (process_init_constructor_record): Use fldtype
1233 variable consistently.
1234
12352021-01-14 Nathan Sidwell <nathan@acm.org>
1236
1237 PR c++/98372
1238 * tree.c (cp_tree_equal): Correct map_context logic.
1239
be0851b8
GA
12402021-01-13 Marek Polacek <polacek@redhat.com>
1241
1242 PR c++/98231
1243 * name-lookup.c (push_using_decl_bindings): New.
1244 * name-lookup.h (push_using_decl_bindings): Declare.
1245 * pt.c (tsubst_expr): Call push_using_decl_bindings.
1246
12472021-01-13 Nathan Sidwell <nathan@acm.org>
1248
1249 PR c++/98626
1250 * module.cc (module_add_import_initializers): Pass a
1251 zero-element argument vector.
1252
6851dda2
GA
12532021-01-12 Patrick Palka <ppalka@redhat.com>
1254
1255 PR c++/98611
1256 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
1257 the template of a CTAD placeholder.
1258
12592021-01-12 Marek Polacek <polacek@redhat.com>
1260
1261 PR c++/98620
1262 * typeck2.c (process_init_constructor_record): Don't emit
1263 -Wmissing-field-initializers warnings in unevaluated contexts.
1264
67fbb7f0
GA
12652021-01-11 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR c++/98481
1268 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
1269 for types.
1270 (mark_abi_tags_r): Likewise.
1271 * decl2.c (min_vis_r): Likewise.
1272 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
1273 typedefs.
1274
bf5cbb9e
GA
12752021-01-08 Patrick Palka <ppalka@redhat.com>
1276
1277 PR c++/98551
1278 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
1279 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
1280
12812021-01-08 Patrick Palka <ppalka@redhat.com>
1282
1283 PR c++/98515
1284 * semantics.c (check_accessibility_of_qualified_id): Punt if
1285 we're checking access of a scoped non-static member inside a
1286 class template.
1287
7d187e4f
GA
12882021-01-07 Jakub Jelinek <jakub@redhat.com>
1289
1290 PR c++/98329
1291 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
1292 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
1293 its location.
1294 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
1295
12962021-01-07 Marek Polacek <polacek@redhat.com>
1297
1298 PR c++/98441
1299 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
1300 !late_return_type block.
1301
13022021-01-07 Jason Merrill <jason@redhat.com>
1303
1304 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
1305 (cxx_eval_store_expression): Add comment.
1306
13072021-01-07 Jason Merrill <jason@redhat.com>
1308
1309 * call.c (has_next): Factor out from...
1310 (next_conversion): ...here.
1311 (strip_standard_conversion): And here.
1312 (is_subseq): And here.
1313 (build_conv): Check it.
1314 (standard_conversion): Don't call build_conv
1315 for ck_identity.
1316
942ae5be
GA
13172021-01-06 Martin Sebor <msebor@redhat.com>
1318
1319 PR c++/95768
1320 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
1321
651b8a50
GA
13222021-01-05 Patrick Palka <ppalka@redhat.com>
1323
1324 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
1325 the type of the NTTP, substitute into the type again. If the
1326 type is still dependent, don't unify the NTTP.
1327
13282021-01-05 Jakub Jelinek <jakub@redhat.com>
1329
1330 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
1331 $(CODYLIB) after $(BACKEND).
1332
13332021-01-05 Jakub Jelinek <jakub@redhat.com>
1334
1335 PR c++/98469
1336 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
1337 Punt if lval is true.
1338 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
1339 the result if it has a class type.
1340
13412021-01-05 Marek Polacek <polacek@redhat.com>
1342
1343 PR c++/82099
1344 * pt.c (resolve_overloaded_unification): Call
1345 maybe_instantiate_noexcept after instantiating the function
1346 decl.
1347
13482021-01-05 Nathan Sidwell <nathan@acm.org>
1349
1350 * parser.c (cp_parser_module_declaration): Alter diagnostic
1351 text to say where is permissable.
1352
13532021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1354
1355 PR c++/98316
1356 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
1357
2eacfdbd
GA
13582021-01-02 Jan Hubicka <jh@suse.cz>
1359
1360 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
1361 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
1362 * tree.c (cp_tree_c_finish_parsing): New function.
1363
b6dd195a
GA
13642021-01-01 Jakub Jelinek <jakub@redhat.com>
1365
1366 * ChangeLog-2020: Rotate ChangeLog. New file.
1367
ad41bd84 1368\f
618e665a 1369Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
1370
1371Copying and distribution of this file, with or without modification,
1372are permitted in any medium without royalty provided the copyright
1373notice and this notice are preserved.
This page took 4.281215 seconds and 5 git commands to generate.