]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2021-02-25 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/99213
4 PR c++/94521
5 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
6 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
7
8 2021-02-25 Patrick Palka <ppalka@redhat.com>
9
10 PR c++/99103
11 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
12 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
13
14 2021-02-25 Marek Polacek <polacek@redhat.com>
15
16 DR 1312
17 PR c++/99176
18 * constexpr.c (is_std_construct_at): New overload.
19 (is_std_allocator_allocate): New overload.
20 (cxx_eval_call_expression): Use the new overloads.
21 (cxx_eval_constant_expression): Reject casting
22 from void * as per DR 1312. Don't check can_convert.
23
24 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
25
26 PR c++/97587
27 * coroutines.cc (struct param_info): Track rvalue refs.
28 (morph_fn_to_coro): Track rvalue refs, and call the promise
29 CTOR with the frame copy of passed parms.
30
31 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
32
33 PR c++/95822
34 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
35 set throwing_cleanup marker.
36
37 2021-02-25 Nathan Sidwell <nathan@acm.org>
38
39 PR c++/99166
40 * module.cc (module_state::inform_cmi_p): Renamed field.
41 (module_state::do_import): Adjust.
42 (init_modules, finish_module_processing): Likewise.
43 (handle_module_option): Likewise.
44
45 2021-02-25 Nathan Sidwell <nathan@acm.org>
46
47 PR c++/98318
48 * mapper-client.cc (module_client::open_module_client): Fix typo
49 of fd init.
50
51 2021-02-24 Nathan Sidwell <nathan@acm.org>
52
53 PR c++/98718
54 * module.cc (ool): New indirection vector.
55 (loc_spans::maybe_propagate): Location is not optional.
56 (loc_spans::open): Likewise. Assert monotonically advancing.
57 (module_for_ordinary_loc): Use ool indirection vector.
58 (module_state::write_prepare_maps): Do not count empty macro
59 expansions. Elide empty spans.
60 (module_state::write_macro_maps): Skip empty expansions.
61 (ool_cmp): New qsort comparator.
62 (module_state::write): Create and destroy ool vector.
63 (name_pending_imports): Fix dump push/pop.
64 (preprocess_module): Likewise. Add more dumping.
65 (preprocessed_module): Likewise.
66
67 2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
68
69 PR c++/96251
70 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
71 error reporting when instantiating for a constexpr.
72
73 2021-02-23 Nathan Sidwell <nathan@acm.org>
74
75 PR c++/99208
76 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
77 identity.
78
79 2021-02-23 Patrick Palka <ppalka@redhat.com>
80
81 PR c++/95468
82 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
83 over from tsubst_copy.
84
85 2021-02-23 Patrick Palka <ppalka@redhat.com>
86
87 * pt.c (instantiation_dependent_expression_p): Check
88 processing_template_decl before calling
89 potential_constant_expression.
90
91 2021-02-22 Nathan Sidwell <nathan@acm.org>
92
93 PR c++/99174
94 * module.cc (struct module_state): Add visited_p flag.
95 (name_pending_imports): Use it to avoid duplicate requests.
96 (preprocess_module): Don't read preprocessor state if we failed to
97 load a module's config.
98
99 2021-02-22 Nathan Sidwell <nathan@acm.org>
100
101 PR c++/99153
102 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
103 to common-path.
104 * module.cc (set_defining_module): Add assert.
105
106 2021-02-19 Nathan Sidwell <nathan@acm.org>
107
108 PR c++/98741
109 * module.cc (pending_imports): New.
110 (declare_module): Adjust test condition.
111 (name_pending_imports): New.
112 (preprocess_module): Reimplement using pending_imports.
113 (preprocessed_module): Move name-getting to name_pending_imports.
114 * name-lookup.c (append_imported_binding_slot): Assert module
115 ordering is increasing.
116
117 2021-02-19 Nathan Sidwell <nathan@acm.org>
118
119 * module.cc (note_cmis): New.
120 (struct module_state): Add inform_read_p bit.
121 (module_state::do_import): Inform of CMI location, if enabled.
122 (init_modules): Canonicalize note_cmis entries.
123 (handle_module_option): Handle -flang-info-module-read=FOO.
124
125 2021-02-19 Jason Merrill <jason@redhat.com>
126
127 PR c++/96926
128 * call.c (perfect_conversion_p): Limit rvalueness
129 test to reference bindings.
130
131 2021-02-19 Jason Merrill <jason@redhat.com>
132
133 PR c++/96926
134 * call.c (perfect_conversion_p): New.
135 (perfect_candidate_p): New.
136 (add_candidates): Ignore templates after a perfect non-template.
137
138 2021-02-18 Nathan Sidwell <nathan@acm.org>
139
140 PR c++/99023
141 * module.cc (canonicalize_header_name): Use
142 cpp_probe_header_unit.
143 (maybe_translate_include): Fix note_includes comparison.
144 (init_modules): Fix note_includes string termination.
145
146 2021-02-18 Jakub Jelinek <jakub@redhat.com>
147
148 PR c++/99132
149 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
150 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
151 for immediate function calls.
152
153 2021-02-17 Nathan Sidwell <nathan@acm.org>
154
155 PR c++/99023
156 * module.cc (struct macro_export): Add GTY markers.
157 (macro_exports): Likewise, us a va_gc Vector.
158
159 2021-02-17 Jakub Jelinek <jakub@redhat.com>
160
161 PR sanitizer/99106
162 * init.c (build_zero_init_1): For flexible array members just return
163 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
164 ARRAY_TYPE.
165
166 2021-02-17 Nathan Sidwell <nathan@acm.org>
167
168 PR c++/99116
169 * name-lookup.c (do_pushdecl): Don't peek under template_parm
170 bindings here ...
171 (set_identifier_type_value_with_scope): ... or here.
172 (do_pushtag): Only set_identifier_type_value_with_scope at
173 non-class template parm scope, and use parent scope.
174
175 2021-02-17 Nathan Sidwell <nathan@acm.org>
176
177 PR c++/99071
178 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
179 pointer.
180
181 2021-02-17 Patrick Palka <ppalka@redhat.com>
182
183 PR debug/96997
184 PR c++/94034
185 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
186
187 2021-02-12 Nathan Sidwell <nathan@acm.org>
188
189 * module.cc (module_state::write_cluster): Check bindings for
190 imported using-decls.
191
192 2021-02-12 Nathan Sidwell <nathan@acm.org>
193
194 PR c++/99040
195 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
196 for new namespace-scope entities.
197 (module_state::read_cluster): Don't call add_module_decl here.
198 * name-lookup.h (add_module_decl): Rename to ...
199 (add_module_namespace_decl): ... this.
200 * name-lookup.c (newbinding_bookkeeping): Move into ...
201 (do_pushdecl): ... here. Its only remaining caller.
202 (add_module_decl): Rename to ...
203 (add_module_namespace_decl): ... here. Add checking-assert for
204 circularity. Don't call newbinding_bookkeeping, just extern_c
205 checking and incomplete var checking.
206
207 2021-02-12 Nathan Sidwell <nathan@acm.org>
208
209 PR c++/99039
210 PR c++/99040
211 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
212 (global_type_node): Delete.
213 (IDENTIFIER_TYPE_VALUE): Delete.
214 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
215 (get_type_value): Delete.
216 * name-lookup.h (identifier_type_value): Delete.
217 * name-lookup.c (check_module_override): Don't
218 SET_IDENTIFIER_TYPE_VALUE here.
219 (do_pushdecl): Nor here.
220 (identifier_type_value_1, identifier_type_value): Delete.
221 (set_identifier_type_value_with_scope): Only
222 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
223 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
224 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
225 * call.c (check_dtor_name): Use lookup_name.
226 * decl.c (cxx_init_decl_processing): Drop global_type_node.
227 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
228 here.
229 * init.c (get_type_value): Delete.
230 * pt.c (instantiate_class_template_1): Don't call pushtag or
231 SET_IDENTIFIER_TYPE_VALUE here.
232 (tsubst): Assert never an identifier.
233 (dependent_type_p): Drop global_type_node assert.
234 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
235 to determine ctorness.
236
237 2021-02-12 Jakub Jelinek <jakub@redhat.com>
238
239 PR c++/97742
240 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
241 CPP_EOF.
242
243 2021-02-12 Jason Merrill <jason@redhat.com>
244
245 PR c++/97246
246 PR c++/94546
247 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
248 (register_parameter_specializations): Not here.
249
250 2021-02-11 Marek Polacek <polacek@redhat.com>
251
252 PR c++/95888
253 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
254 for the partial instantiation.
255
256 2021-02-11 Jakub Jelinek <jakub@redhat.com>
257
258 PR c++/99033
259 * init.c (build_zero_init_1): Handle zero initialiation of
260 flexible array members like initialization of [0] arrays.
261 Use integer_minus_onep instead of comparison to integer_minus_one_node
262 and integer_zerop instead of comparison against size_zero_node.
263 Formatting fixes.
264
265 2021-02-11 Marek Polacek <polacek@redhat.com>
266
267 PR c++/99063
268 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
269
270 2021-02-11 Patrick Palka <ppalka@redhat.com>
271
272 PR c++/97582
273 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
274 lookup result by discarding it if the first element is a
275 class-scope declaration, otherwise return it.
276 (push_operator_bindings): Handle an ambiguous lookup result by
277 doing push_local_binding on each element in the list.
278
279 2021-02-11 Marek Polacek <polacek@redhat.com>
280
281 * parser.c (cp_parser_selection_statement): Use vec_free.
282
283 2021-02-10 Jakub Jelinek <jakub@redhat.com>
284
285 PR c++/98988
286 PR c++/99031
287 * constexpr.c: Include cgraph.h.
288 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
289 heap artificial vars.
290 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
291 heap artificial vars.
292
293 2021-02-10 Nathan Sidwell <nathan@acm.org>
294
295 PR c++/99030
296 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
297 answer if there's no local specialization.
298
299 2021-02-09 Nathan Sidwell <nathan@acm.org>
300
301 PR c++/98944
302 * module.cc (module_state::is_rooted): Rename to ...
303 (module_state::has_location): ... here. Adjust callers.
304 (module_state::read_partitions): Adjust validity check.
305 Don't overwrite a known location.
306
307 2021-02-09 Jason Merrill <jason@redhat.com>
308
309 PR c++/96905
310 * pt.c (mark_decl_instantiated): Exit early if consteval.
311
312 2021-02-09 Jason Merrill <jason@redhat.com>
313
314 PR c++/98326
315 PR c++/20408
316 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
317 parm.
318
319 2021-02-09 Jason Merrill <jason@redhat.com>
320
321 PR c++/98994
322 PR c++/97566
323 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
324 RECORD_TYPE.
325
326 2021-02-08 Nathan Sidwell <nathan@acm.org>
327
328 * decl.c (start_cleanup_fn): Push function into
329 namespace.
330
331 2021-02-08 Nathan Sidwell <nathan@acm.org>
332
333 PR c++/98531
334 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
335 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
336 from rtti.c, add default namespace arg.
337 (check_redeclaration_exception_specification): Allow a lazy
338 builtin's eh spec to differ from an lready-declared user
339 declaration.
340 (declare_global_var): Use push/pop_abi_namespace.
341 (get_atexit_node): Push the fndecl into a namespace.
342 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
343 decl.c.
344
345 2021-02-08 Marek Polacek <polacek@redhat.com>
346
347 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
348
349 2021-02-05 Marek Polacek <polacek@redhat.com>
350
351 PR c++/98947
352 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
353 on arg2/arg3.
354 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
355 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
356 a warning was emitted.
357
358 2021-02-05 Marek Polacek <polacek@redhat.com>
359
360 PR c++/96462
361 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
362
363 2021-02-05 Jakub Jelinek <jakub@redhat.com>
364
365 PR c++/97878
366 * decl.c (check_array_initializer): For structured bindings, require
367 the array type to be complete.
368
369 2021-02-04 Jason Merrill <jason@redhat.com>
370
371 PR c++/98717
372 * constraint.cc (build_concept_check_arguments): Remove assert.
373 (build_concept_check): Allow empty args.
374
375 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
376
377 PR c++/90926
378 * call.c (can_convert_array): Extend to handle all valid aggregate
379 initializers of an array; including by string literals, not just by
380 brace-init-list.
381 (build_aggr_conv): Call can_convert_array more often, not just in
382 brace-init-list case.
383 * typeck2.c (array_string_literal_compatible_p): New function.
384 (digest_init_r): call array_string_literal_compatible_p
385 * cp-tree.h: (array_string_literal_compatible_p): Declare.
386
387 2021-02-04 Jason Merrill <jason@redhat.com>
388
389 PR c++/98802
390 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
391
392 2021-02-04 Jason Merrill <jason@redhat.com>
393
394 PR c++/95192
395 * pt.c (tsubst_attribute): Handle error.
396 (apply_late_template_attributes): Return false on error.
397 (tsubst_function_decl): Check its return value.
398 (tsubst_decl): Likewise.
399 (push_template_decl): Assert current_template_parms.
400 (tsubst_template_decl): Set current_template_parms.
401
402 2021-02-03 Marek Polacek <polacek@redhat.com>
403
404 PR c++/98951
405 * call.c (struct z_candidate): Mark rewritten and reversed as const.
406 (struct NonPublicField): Mark operator() as const.
407 (struct NonTrivialField): Likewise.
408
409 2021-02-03 Jason Merrill <jason@redhat.com>
410
411 PR c++/98926
412 PR c++/98570
413 * pt.c (spec_hasher::equal): Set processing_template_decl.
414 * Make-lang.in (check-g++-strict-gc): Add --param
415 hash-table-verification-limit=10000.
416
417 2021-02-03 Marek Polacek <polacek@redhat.com>
418
419 PR c++/98899
420 * parser.c (cp_parser_class_specifier_1): Use any possible
421 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
422 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
423 * pt.c (tsubst_exception_specification): Stash new_specs into
424 DEFPARSE_INSTANTIATIONS.
425 * tree.c (fixup_deferred_exception_variants): Use
426 UNPARSED_NOEXCEPT_SPEC_P.
427
428 2021-02-02 Jason Merrill <jason@redhat.com>
429
430 PR c++/98929
431 PR c++/96199
432 * error.c (dump_expr): Ignore dummy object.
433 * pt.c (tsubst_baselink): Handle dependent scope.
434
435 2021-02-01 Patrick Palka <ppalka@redhat.com>
436
437 PR c++/98295
438 * constexpr.c (cxx_eval_array_reference): Also set
439 new_ctx.object when setting new_ctx.ctor.
440
441 2021-02-01 Marek Polacek <polacek@redhat.com>
442
443 PR c++/98355
444 * parser.c (cp_parser_has_attribute_expression): Use
445 uses_template_parms instead of type_dependent_expression_p.
446
447 2021-02-01 Jason Merrill <jason@redhat.com>
448
449 PR c++/98570
450 * cp-tree.h: Declare it.
451 * pt.c (comparing_dependent_aliases): New flag.
452 (template_args_equal, spec_hasher::equal): Set it.
453 (dependent_alias_template_spec_p): Assert that we don't
454 get non-types other than error_mark_node.
455 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
456 on complex alias specializations. Set TYPE_DEPENDENT_P here.
457 (tsubst_decl): Not here.
458 * module.cc (module_state::read_cluster): Set
459 comparing_dependent_aliases instead of
460 comparing_specializations.
461 * tree.c (cp_tree_equal): Remove comparing_specializations
462 module handling.
463 * typeck.c (structural_comptypes): Adjust.
464 (comptypes): Remove comparing_specializations handling.
465
466 2021-01-29 Nathan Sidwell <nathan@acm.org>
467
468 PR c++/98843
469 * module.cc (module_state_config): Add num_entities field.
470 (module_state::read_entities): The entity_ary span is
471 already allocated.
472 (module_state::write_config): Write num_entities.
473 (module_state::read_config): Read num_entities.
474 (module_state::write): Set config's num_entities.
475 (module_state::read_initial): Allocate the entity ary
476 span here.
477 (module_state::read_language): Do not set entity_lwm
478 here.
479
480 2021-01-29 Marek Polacek <polacek@redhat.com>
481
482 PR c++/96137
483 * parser.c (cp_parser_class_name): If parser->scope is
484 error_mark_node, return it, otherwise continue.
485
486 2021-01-28 Jakub Jelinek <jakub@redhat.com>
487
488 PR c++/98841
489 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
490
491 2021-01-28 Jakub Jelinek <jakub@redhat.com>
492
493 PR c++/33661
494 PR c++/98847
495 * decl.c (cp_finish_decl): For register vars with asmspec in templates
496 call set_user_assembler_name and set DECL_HARD_REGISTER.
497 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
498 pass asmspec_tree to cp_finish_decl.
499
500 2021-01-28 Nathan Sidwell <nathan@acm.org>
501
502 PR c++/98770
503 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
504 check order.
505 (trees_in::decl_value): Do typedef frobbing only when installing
506 a new typedef, adjust is_matching_decl call. Swap is_typedef
507 & TYPE_NAME check.
508 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
509 names and deal with typedef checking.
510
511 2021-01-27 Jason Merrill <jason@redhat.com>
512
513 PR c++/97874
514 * name-lookup.c (lookup_using_decl): Clean up handling
515 of dependency and inherited constructors.
516 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
517 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
518
519 2021-01-26 Jason Merrill <jason@redhat.com>
520
521 PR c++/97474
522 * call.c (type_passed_as): Don't mark invisiref restrict.
523
524 2021-01-26 Jason Merrill <jason@redhat.com>
525
526 PR c++/97566
527 PR c++/98463
528 * class.c (layout_class_type): An empty field gets size 0.
529 (is_empty_field): New.
530 (check_bases): Check it.
531 * cp-tree.h (is_empty_field): Declare it.
532 * constexpr.c (cxx_eval_store_expression): Check it.
533 (cx_check_missing_mem_inits): Likewise.
534 * init.c (perform_member_init): Likewise.
535 * typeck2.c (process_init_constructor_record): Likewise.
536
537 2021-01-25 Martin Sebor <msebor@redhat.com>
538
539 PR c++/98646
540 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
541
542 2021-01-25 Jason Merrill <jason@redhat.com>
543
544 PR c++/98463
545 * constexpr.c (get_or_insert_ctor_field): Add check.
546 (cxx_eval_store_expression): Handle discontinuity of refs.
547
548 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
549
550 * call.c (complain_about_access): Altered function.
551 * cp-tree.h (complain_about_access): Changed parameters of function.
552 (get_parent_with_private_access): Declared new function.
553 * search.c (get_parent_with_private_access): Defined new function.
554 * semantics.c (enforce_access): Modified function.
555 * typeck.c (complain_about_unrecognized_member): Updated function
556 arguments in complain_about_access.
557
558 2021-01-23 Patrick Palka <ppalka@redhat.com>
559
560 PR c++/97399
561 * cp-tree.h (shared_member_p): Adjust declaration.
562 * parser.c (cp_parser_init_declarator): If the storage class
563 specifier is sc_static, pass true for static_p to
564 cp_parser_declarator.
565 (cp_parser_direct_declarator): Don't do inject_this_parm when
566 the declarator is a friend.
567 * search.c (shared_member_p): Change return type to bool and
568 adjust function body accordingly. Return false for a dependent
569 USING_DECL instead of aborting.
570 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
571 even when type-dependent.
572
573 2021-01-22 Marek Polacek <polacek@redhat.com>
574
575 PR c++/96623
576 * parser.c (inject_parm_decls): Remove a redundant assignment.
577 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
578 before calling inject_parm_decls.
579
580 2021-01-22 Jason Merrill <jason@redhat.com>
581
582 PR c++/98744
583 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
584
585 2021-01-22 Jakub Jelinek <jakub@redhat.com>
586
587 PR sanitizer/95693
588 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
589 return build_zero_cst for reference types.
590 * typeck2.c (process_init_constructor_record): Instead call
591 build_zero_cst here during error recovery instead of build_zero_init.
592
593 2021-01-22 Marek Polacek <polacek@redhat.com>
594
595 PR c++/98545
596 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
597 warnings regardless of abi_version_at_least.
598 (write_expression): When the expression is a dependent name
599 and an operator name, write "on" before writing its name.
600
601 2021-01-22 Marek Polacek <polacek@redhat.com>
602
603 PR c++/97966
604 * pt.c (instantiate_class_template_1): Instantiate members
605 marked with attribute used only after we're done instantiating
606 the class.
607
608 2021-01-21 Patrick Palka <ppalka@redhat.com>
609
610 PR c++/71879
611 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
612 sentinel at the start of the function. Remove a now-redundant
613 manual adjustment of cp_unevaluated_operand.
614
615 2021-01-21 Nathan Sidwell <nathan@acm.org>
616
617 PR c++/98624
618 * module.cc (depset::hash::find_dependencies): Add
619 module arg.
620 (trees_out::core_vals): Check state before calling
621 write_location.
622 (sort_cluster, module_state::write): Adjust
623 find_dependencies call.
624
625 2021-01-21 Jakub Jelinek <jakub@redhat.com>
626
627 PR c++/98672
628 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
629 (check_for_return_continue): Also look for BREAK_STMT. Handle
630 SWITCH_STMT by ignoring break_stmt from its body.
631 (potential_constant_expression_1) <case FOR_STMT>,
632 <case WHILE_STMT>: If the condition isn't constant true, check if
633 the loop body can contain a return stmt.
634 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
635 <case IF_STMT>: If recursion with tf_none is successful,
636 merge *jump_target from the branches - returns with highest priority,
637 breaks or continues lower. If then branch is potentially constant and
638 doesn't return, check the else branch if it could return, break or
639 continue.
640
641 2021-01-21 Nathan Sidwell <nathan@acm.org>
642
643 PR c++/98530
644 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
645
646 2021-01-20 Nathan Sidwell <nathan@acm.org>
647
648 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
649 signed type.
650
651 2021-01-20 Patrick Palka <ppalka@redhat.com>
652
653 PR c++/95434
654 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
655 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
656 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
657
658 2021-01-20 Patrick Palka <ppalka@redhat.com>
659
660 PR c++/82613
661 * parser.c (cp_parser_class_head): Defer access checking when
662 parsing the base-clause until all bases are seen and attached
663 to the class type.
664 * pt.c (instantiate_class_template): Likewise when substituting
665 into dependent bases.
666
667 2021-01-20 Jakub Jelinek <jakub@redhat.com>
668
669 PR c++/98742
670 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
671 error_operand_p, remove clause without further checking. Check
672 for non-NULL TYPE_NAME.
673
674 2021-01-19 Marek Polacek <polacek@redhat.com>
675
676 PR c++/98659
677 * pt.c (maybe_instantiate_noexcept): Return false if FN is
678 error_mark_node.
679
680 2021-01-19 Marek Polacek <polacek@redhat.com>
681
682 PR c++/98687
683 * name-lookup.c (push_using_decl_bindings): New, broken out of...
684 (finish_nonmember_using_decl): ...here.
685 * name-lookup.h (push_using_decl_bindings): Update declaration.
686 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
687
688 2021-01-19 Patrick Palka <ppalka@redhat.com>
689
690 PR c++/41437
691 PR c++/58993
692 * search.c (friend_accessible_p): If scope is a hidden friend
693 defined inside a dependent class, consider access from the
694 class.
695 * parser.c (cp_parser_late_parsing_for_member): Don't push a
696 dk_no_check access state.
697
698 2021-01-19 Marek Polacek <polacek@redhat.com>
699
700 PR c++/98333
701 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
702 of NSDMIs before late-parsing of noexcept-specifiers.
703
704 2021-01-19 Nathan Sidwell <nathan@acm.org>
705
706 * module.cc (identifier): Merge overloads.
707
708 2021-01-19 Nathan Sidwell <nathan@acm.org>
709
710 PR c++/98624
711 * module.cc (trees_out::write_location): Make static.
712
713 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
714
715 * parser.c (cp_parser_omp_clause_detach): New.
716 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
717 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
718 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
719 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
720 Prevent use of detach with mergeable and overriding the data sharing
721 mode of the event handle.
722
723 2021-01-15 Nathan Sidwell <nathan@acm.org>
724
725 PR c++/98538
726 * tree.c (cp_build_qualified_type_real): Propagate an array's
727 dependentness to the copy, if known.
728
729 2021-01-15 Jason Merrill <jason@redhat.com>
730
731 PR c++/98642
732 * call.c (unsafe_return_slot_p): Return int.
733 (init_by_return_slot_p): Split out from...
734 (unsafe_copy_elision_p): ...here.
735 (unsafe_copy_elision_p_opt): New name for old meaning.
736 (build_over_call): Adjust.
737 (make_safe_copy_elision): New.
738 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
739 list-initialization.
740 * cp-tree.h: Adjust.
741
742 2021-01-15 Jason Merrill <jason@redhat.com>
743
744 * call.c (base_ctor_for, make_base_init_ok): New.
745 (build_over_call): Use make_base_init_ok.
746
747 2021-01-15 Jason Merrill <jason@redhat.com>
748
749 PR c++/63707
750 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
751 if we got a CONSTRUCTOR.
752
753 2021-01-15 Nathan Sidwell <nathan@acm.org>
754
755 PR c++/98591
756 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
757
758 2021-01-14 Jason Merrill <jason@redhat.com>
759
760 * typeck2.c (process_init_constructor_record): Use fldtype
761 variable consistently.
762
763 2021-01-14 Nathan Sidwell <nathan@acm.org>
764
765 PR c++/98372
766 * tree.c (cp_tree_equal): Correct map_context logic.
767
768 2021-01-13 Marek Polacek <polacek@redhat.com>
769
770 PR c++/98231
771 * name-lookup.c (push_using_decl_bindings): New.
772 * name-lookup.h (push_using_decl_bindings): Declare.
773 * pt.c (tsubst_expr): Call push_using_decl_bindings.
774
775 2021-01-13 Nathan Sidwell <nathan@acm.org>
776
777 PR c++/98626
778 * module.cc (module_add_import_initializers): Pass a
779 zero-element argument vector.
780
781 2021-01-12 Patrick Palka <ppalka@redhat.com>
782
783 PR c++/98611
784 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
785 the template of a CTAD placeholder.
786
787 2021-01-12 Marek Polacek <polacek@redhat.com>
788
789 PR c++/98620
790 * typeck2.c (process_init_constructor_record): Don't emit
791 -Wmissing-field-initializers warnings in unevaluated contexts.
792
793 2021-01-11 Jakub Jelinek <jakub@redhat.com>
794
795 PR c++/98481
796 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
797 for types.
798 (mark_abi_tags_r): Likewise.
799 * decl2.c (min_vis_r): Likewise.
800 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
801 typedefs.
802
803 2021-01-08 Patrick Palka <ppalka@redhat.com>
804
805 PR c++/98551
806 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
807 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
808
809 2021-01-08 Patrick Palka <ppalka@redhat.com>
810
811 PR c++/98515
812 * semantics.c (check_accessibility_of_qualified_id): Punt if
813 we're checking access of a scoped non-static member inside a
814 class template.
815
816 2021-01-07 Jakub Jelinek <jakub@redhat.com>
817
818 PR c++/98329
819 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
820 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
821 its location.
822 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
823
824 2021-01-07 Marek Polacek <polacek@redhat.com>
825
826 PR c++/98441
827 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
828 !late_return_type block.
829
830 2021-01-07 Jason Merrill <jason@redhat.com>
831
832 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
833 (cxx_eval_store_expression): Add comment.
834
835 2021-01-07 Jason Merrill <jason@redhat.com>
836
837 * call.c (has_next): Factor out from...
838 (next_conversion): ...here.
839 (strip_standard_conversion): And here.
840 (is_subseq): And here.
841 (build_conv): Check it.
842 (standard_conversion): Don't call build_conv
843 for ck_identity.
844
845 2021-01-06 Martin Sebor <msebor@redhat.com>
846
847 PR c++/95768
848 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
849
850 2021-01-05 Patrick Palka <ppalka@redhat.com>
851
852 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
853 the type of the NTTP, substitute into the type again. If the
854 type is still dependent, don't unify the NTTP.
855
856 2021-01-05 Jakub Jelinek <jakub@redhat.com>
857
858 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
859 $(CODYLIB) after $(BACKEND).
860
861 2021-01-05 Jakub Jelinek <jakub@redhat.com>
862
863 PR c++/98469
864 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
865 Punt if lval is true.
866 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
867 the result if it has a class type.
868
869 2021-01-05 Marek Polacek <polacek@redhat.com>
870
871 PR c++/82099
872 * pt.c (resolve_overloaded_unification): Call
873 maybe_instantiate_noexcept after instantiating the function
874 decl.
875
876 2021-01-05 Nathan Sidwell <nathan@acm.org>
877
878 * parser.c (cp_parser_module_declaration): Alter diagnostic
879 text to say where is permissable.
880
881 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
882
883 PR c++/98316
884 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
885
886 2021-01-02 Jan Hubicka <jh@suse.cz>
887
888 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
889 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
890 * tree.c (cp_tree_c_finish_parsing): New function.
891
892 2021-01-01 Jakub Jelinek <jakub@redhat.com>
893
894 * ChangeLog-2020: Rotate ChangeLog. New file.
895
896 \f
897 Copyright (C) 2021 Free Software Foundation, Inc.
898
899 Copying and distribution of this file, with or without modification,
900 are permitted in any medium without royalty provided the copyright
901 notice and this notice are preserved.