1 2021-02-25 Patrick Palka <ppalka@redhat.com>
5 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
6 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
8 2021-02-25 Patrick Palka <ppalka@redhat.com>
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.
14 2021-02-25 Marek Polacek <polacek@redhat.com>
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.
24 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
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.
31 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
34 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
35 set throwing_cleanup marker.
37 2021-02-25 Nathan Sidwell <nathan@acm.org>
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.
45 2021-02-25 Nathan Sidwell <nathan@acm.org>
48 * mapper-client.cc (module_client::open_module_client): Fix typo
51 2021-02-24 Nathan Sidwell <nathan@acm.org>
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.
67 2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
70 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
71 error reporting when instantiating for a constexpr.
73 2021-02-23 Nathan Sidwell <nathan@acm.org>
76 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
79 2021-02-23 Patrick Palka <ppalka@redhat.com>
82 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
83 over from tsubst_copy.
85 2021-02-23 Patrick Palka <ppalka@redhat.com>
87 * pt.c (instantiation_dependent_expression_p): Check
88 processing_template_decl before calling
89 potential_constant_expression.
91 2021-02-22 Nathan Sidwell <nathan@acm.org>
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.
99 2021-02-22 Nathan Sidwell <nathan@acm.org>
102 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
104 * module.cc (set_defining_module): Add assert.
106 2021-02-19 Nathan Sidwell <nathan@acm.org>
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.
117 2021-02-19 Nathan Sidwell <nathan@acm.org>
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.
125 2021-02-19 Jason Merrill <jason@redhat.com>
128 * call.c (perfect_conversion_p): Limit rvalueness
129 test to reference bindings.
131 2021-02-19 Jason Merrill <jason@redhat.com>
134 * call.c (perfect_conversion_p): New.
135 (perfect_candidate_p): New.
136 (add_candidates): Ignore templates after a perfect non-template.
138 2021-02-18 Nathan Sidwell <nathan@acm.org>
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.
146 2021-02-18 Jakub Jelinek <jakub@redhat.com>
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.
153 2021-02-17 Nathan Sidwell <nathan@acm.org>
156 * module.cc (struct macro_export): Add GTY markers.
157 (macro_exports): Likewise, us a va_gc Vector.
159 2021-02-17 Jakub Jelinek <jakub@redhat.com>
162 * init.c (build_zero_init_1): For flexible array members just return
163 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
166 2021-02-17 Nathan Sidwell <nathan@acm.org>
169 * name-lookup.c (do_pushdecl): Don't peek under template_parm
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.
175 2021-02-17 Nathan Sidwell <nathan@acm.org>
178 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
181 2021-02-17 Patrick Palka <ppalka@redhat.com>
185 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
187 2021-02-12 Nathan Sidwell <nathan@acm.org>
189 * module.cc (module_state::write_cluster): Check bindings for
190 imported using-decls.
192 2021-02-12 Nathan Sidwell <nathan@acm.org>
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.
207 2021-02-12 Nathan Sidwell <nathan@acm.org>
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
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.
237 2021-02-12 Jakub Jelinek <jakub@redhat.com>
240 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
243 2021-02-12 Jason Merrill <jason@redhat.com>
247 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
248 (register_parameter_specializations): Not here.
250 2021-02-11 Marek Polacek <polacek@redhat.com>
253 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
254 for the partial instantiation.
256 2021-02-11 Jakub Jelinek <jakub@redhat.com>
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.
265 2021-02-11 Marek Polacek <polacek@redhat.com>
268 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
270 2021-02-11 Patrick Palka <ppalka@redhat.com>
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.
279 2021-02-11 Marek Polacek <polacek@redhat.com>
281 * parser.c (cp_parser_selection_statement): Use vec_free.
283 2021-02-10 Jakub Jelinek <jakub@redhat.com>
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.
293 2021-02-10 Nathan Sidwell <nathan@acm.org>
296 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
297 answer if there's no local specialization.
299 2021-02-09 Nathan Sidwell <nathan@acm.org>
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.
307 2021-02-09 Jason Merrill <jason@redhat.com>
310 * pt.c (mark_decl_instantiated): Exit early if consteval.
312 2021-02-09 Jason Merrill <jason@redhat.com>
316 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
319 2021-02-09 Jason Merrill <jason@redhat.com>
323 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
326 2021-02-08 Nathan Sidwell <nathan@acm.org>
328 * decl.c (start_cleanup_fn): Push function into
331 2021-02-08 Nathan Sidwell <nathan@acm.org>
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
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
345 2021-02-08 Marek Polacek <polacek@redhat.com>
347 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
349 2021-02-05 Marek Polacek <polacek@redhat.com>
352 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
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.
358 2021-02-05 Marek Polacek <polacek@redhat.com>
361 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
363 2021-02-05 Jakub Jelinek <jakub@redhat.com>
366 * decl.c (check_array_initializer): For structured bindings, require
367 the array type to be complete.
369 2021-02-04 Jason Merrill <jason@redhat.com>
372 * constraint.cc (build_concept_check_arguments): Remove assert.
373 (build_concept_check): Allow empty args.
375 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
378 * call.c (can_convert_array): Extend to handle all valid aggregate
379 initializers of an array; including by string literals, not just by
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.
387 2021-02-04 Jason Merrill <jason@redhat.com>
390 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
392 2021-02-04 Jason Merrill <jason@redhat.com>
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.
402 2021-02-03 Marek Polacek <polacek@redhat.com>
405 * call.c (struct z_candidate): Mark rewritten and reversed as const.
406 (struct NonPublicField): Mark operator() as const.
407 (struct NonTrivialField): Likewise.
409 2021-02-03 Jason Merrill <jason@redhat.com>
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.
417 2021-02-03 Marek Polacek <polacek@redhat.com>
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.
428 2021-02-02 Jason Merrill <jason@redhat.com>
432 * error.c (dump_expr): Ignore dummy object.
433 * pt.c (tsubst_baselink): Handle dependent scope.
435 2021-02-01 Patrick Palka <ppalka@redhat.com>
438 * constexpr.c (cxx_eval_array_reference): Also set
439 new_ctx.object when setting new_ctx.ctor.
441 2021-02-01 Marek Polacek <polacek@redhat.com>
444 * parser.c (cp_parser_has_attribute_expression): Use
445 uses_template_parms instead of type_dependent_expression_p.
447 2021-02-01 Jason Merrill <jason@redhat.com>
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
463 * typeck.c (structural_comptypes): Adjust.
464 (comptypes): Remove comparing_specializations handling.
466 2021-01-29 Nathan Sidwell <nathan@acm.org>
469 * module.cc (module_state_config): Add num_entities field.
470 (module_state::read_entities): The entity_ary span is
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
477 (module_state::read_language): Do not set entity_lwm
480 2021-01-29 Marek Polacek <polacek@redhat.com>
483 * parser.c (cp_parser_class_name): If parser->scope is
484 error_mark_node, return it, otherwise continue.
486 2021-01-28 Jakub Jelinek <jakub@redhat.com>
489 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
491 2021-01-28 Jakub Jelinek <jakub@redhat.com>
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.
500 2021-01-28 Nathan Sidwell <nathan@acm.org>
503 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
505 (trees_in::decl_value): Do typedef frobbing only when installing
506 a new typedef, adjust is_matching_decl call. Swap is_typedef
508 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
509 names and deal with typedef checking.
511 2021-01-27 Jason Merrill <jason@redhat.com>
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.
519 2021-01-26 Jason Merrill <jason@redhat.com>
522 * call.c (type_passed_as): Don't mark invisiref restrict.
524 2021-01-26 Jason Merrill <jason@redhat.com>
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.
537 2021-01-25 Martin Sebor <msebor@redhat.com>
540 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
542 2021-01-25 Jason Merrill <jason@redhat.com>
545 * constexpr.c (get_or_insert_ctor_field): Add check.
546 (cxx_eval_store_expression): Handle discontinuity of refs.
548 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
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.
558 2021-01-23 Patrick Palka <ppalka@redhat.com>
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.
573 2021-01-22 Marek Polacek <polacek@redhat.com>
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.
580 2021-01-22 Jason Merrill <jason@redhat.com>
583 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
585 2021-01-22 Jakub Jelinek <jakub@redhat.com>
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.
593 2021-01-22 Marek Polacek <polacek@redhat.com>
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.
601 2021-01-22 Marek Polacek <polacek@redhat.com>
604 * pt.c (instantiate_class_template_1): Instantiate members
605 marked with attribute used only after we're done instantiating
608 2021-01-21 Patrick Palka <ppalka@redhat.com>
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.
615 2021-01-21 Nathan Sidwell <nathan@acm.org>
618 * module.cc (depset::hash::find_dependencies): Add
620 (trees_out::core_vals): Check state before calling
622 (sort_cluster, module_state::write): Adjust
623 find_dependencies call.
625 2021-01-21 Jakub Jelinek <jakub@redhat.com>
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
641 2021-01-21 Nathan Sidwell <nathan@acm.org>
644 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
646 2021-01-20 Nathan Sidwell <nathan@acm.org>
648 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
651 2021-01-20 Patrick Palka <ppalka@redhat.com>
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.
658 2021-01-20 Patrick Palka <ppalka@redhat.com>
661 * parser.c (cp_parser_class_head): Defer access checking when
662 parsing the base-clause until all bases are seen and attached
664 * pt.c (instantiate_class_template): Likewise when substituting
665 into dependent bases.
667 2021-01-20 Jakub Jelinek <jakub@redhat.com>
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.
674 2021-01-19 Marek Polacek <polacek@redhat.com>
677 * pt.c (maybe_instantiate_noexcept): Return false if FN is
680 2021-01-19 Marek Polacek <polacek@redhat.com>
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.
688 2021-01-19 Patrick Palka <ppalka@redhat.com>
692 * search.c (friend_accessible_p): If scope is a hidden friend
693 defined inside a dependent class, consider access from the
695 * parser.c (cp_parser_late_parsing_for_member): Don't push a
696 dk_no_check access state.
698 2021-01-19 Marek Polacek <polacek@redhat.com>
701 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
702 of NSDMIs before late-parsing of noexcept-specifiers.
704 2021-01-19 Nathan Sidwell <nathan@acm.org>
706 * module.cc (identifier): Merge overloads.
708 2021-01-19 Nathan Sidwell <nathan@acm.org>
711 * module.cc (trees_out::write_location): Make static.
713 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
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.
723 2021-01-15 Nathan Sidwell <nathan@acm.org>
726 * tree.c (cp_build_qualified_type_real): Propagate an array's
727 dependentness to the copy, if known.
729 2021-01-15 Jason Merrill <jason@redhat.com>
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
742 2021-01-15 Jason Merrill <jason@redhat.com>
744 * call.c (base_ctor_for, make_base_init_ok): New.
745 (build_over_call): Use make_base_init_ok.
747 2021-01-15 Jason Merrill <jason@redhat.com>
750 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
751 if we got a CONSTRUCTOR.
753 2021-01-15 Nathan Sidwell <nathan@acm.org>
756 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
758 2021-01-14 Jason Merrill <jason@redhat.com>
760 * typeck2.c (process_init_constructor_record): Use fldtype
761 variable consistently.
763 2021-01-14 Nathan Sidwell <nathan@acm.org>
766 * tree.c (cp_tree_equal): Correct map_context logic.
768 2021-01-13 Marek Polacek <polacek@redhat.com>
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.
775 2021-01-13 Nathan Sidwell <nathan@acm.org>
778 * module.cc (module_add_import_initializers): Pass a
779 zero-element argument vector.
781 2021-01-12 Patrick Palka <ppalka@redhat.com>
784 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
785 the template of a CTAD placeholder.
787 2021-01-12 Marek Polacek <polacek@redhat.com>
790 * typeck2.c (process_init_constructor_record): Don't emit
791 -Wmissing-field-initializers warnings in unevaluated contexts.
793 2021-01-11 Jakub Jelinek <jakub@redhat.com>
796 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
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
803 2021-01-08 Patrick Palka <ppalka@redhat.com>
806 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
807 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
809 2021-01-08 Patrick Palka <ppalka@redhat.com>
812 * semantics.c (check_accessibility_of_qualified_id): Punt if
813 we're checking access of a scoped non-static member inside a
816 2021-01-07 Jakub Jelinek <jakub@redhat.com>
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
822 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
824 2021-01-07 Marek Polacek <polacek@redhat.com>
827 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
828 !late_return_type block.
830 2021-01-07 Jason Merrill <jason@redhat.com>
832 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
833 (cxx_eval_store_expression): Add comment.
835 2021-01-07 Jason Merrill <jason@redhat.com>
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
845 2021-01-06 Martin Sebor <msebor@redhat.com>
848 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
850 2021-01-05 Patrick Palka <ppalka@redhat.com>
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.
856 2021-01-05 Jakub Jelinek <jakub@redhat.com>
858 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
859 $(CODYLIB) after $(BACKEND).
861 2021-01-05 Jakub Jelinek <jakub@redhat.com>
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.
869 2021-01-05 Marek Polacek <polacek@redhat.com>
872 * pt.c (resolve_overloaded_unification): Call
873 maybe_instantiate_noexcept after instantiating the function
876 2021-01-05 Nathan Sidwell <nathan@acm.org>
878 * parser.c (cp_parser_module_declaration): Alter diagnostic
879 text to say where is permissable.
881 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
884 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
886 2021-01-02 Jan Hubicka <jh@suse.cz>
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.
892 2021-01-01 Jakub Jelinek <jakub@redhat.com>
894 * ChangeLog-2020: Rotate ChangeLog. New file.
897 Copyright (C) 2021 Free Software Foundation, Inc.
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.