1 2021-01-27 Jason Merrill <jason@redhat.com>
4 * name-lookup.c (lookup_using_decl): Clean up handling
5 of dependency and inherited constructors.
6 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
7 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
9 2021-01-26 Jason Merrill <jason@redhat.com>
12 * call.c (type_passed_as): Don't mark invisiref restrict.
14 2021-01-26 Jason Merrill <jason@redhat.com>
18 * class.c (layout_class_type): An empty field gets size 0.
19 (is_empty_field): New.
20 (check_bases): Check it.
21 * cp-tree.h (is_empty_field): Declare it.
22 * constexpr.c (cxx_eval_store_expression): Check it.
23 (cx_check_missing_mem_inits): Likewise.
24 * init.c (perform_member_init): Likewise.
25 * typeck2.c (process_init_constructor_record): Likewise.
27 2021-01-25 Martin Sebor <msebor@redhat.com>
30 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
32 2021-01-25 Jason Merrill <jason@redhat.com>
35 * constexpr.c (get_or_insert_ctor_field): Add check.
36 (cxx_eval_store_expression): Handle discontinuity of refs.
38 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
40 * call.c (complain_about_access): Altered function.
41 * cp-tree.h (complain_about_access): Changed parameters of function.
42 (get_parent_with_private_access): Declared new function.
43 * search.c (get_parent_with_private_access): Defined new function.
44 * semantics.c (enforce_access): Modified function.
45 * typeck.c (complain_about_unrecognized_member): Updated function
46 arguments in complain_about_access.
48 2021-01-23 Patrick Palka <ppalka@redhat.com>
51 * cp-tree.h (shared_member_p): Adjust declaration.
52 * parser.c (cp_parser_init_declarator): If the storage class
53 specifier is sc_static, pass true for static_p to
55 (cp_parser_direct_declarator): Don't do inject_this_parm when
56 the declarator is a friend.
57 * search.c (shared_member_p): Change return type to bool and
58 adjust function body accordingly. Return false for a dependent
59 USING_DECL instead of aborting.
60 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
61 even when type-dependent.
63 2021-01-22 Marek Polacek <polacek@redhat.com>
66 * parser.c (inject_parm_decls): Remove a redundant assignment.
67 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
68 before calling inject_parm_decls.
70 2021-01-22 Jason Merrill <jason@redhat.com>
73 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
75 2021-01-22 Jakub Jelinek <jakub@redhat.com>
78 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
79 return build_zero_cst for reference types.
80 * typeck2.c (process_init_constructor_record): Instead call
81 build_zero_cst here during error recovery instead of build_zero_init.
83 2021-01-22 Marek Polacek <polacek@redhat.com>
86 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
87 warnings regardless of abi_version_at_least.
88 (write_expression): When the expression is a dependent name
89 and an operator name, write "on" before writing its name.
91 2021-01-22 Marek Polacek <polacek@redhat.com>
94 * pt.c (instantiate_class_template_1): Instantiate members
95 marked with attribute used only after we're done instantiating
98 2021-01-21 Patrick Palka <ppalka@redhat.com>
101 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
102 sentinel at the start of the function. Remove a now-redundant
103 manual adjustment of cp_unevaluated_operand.
105 2021-01-21 Nathan Sidwell <nathan@acm.org>
108 * module.cc (depset::hash::find_dependencies): Add
110 (trees_out::core_vals): Check state before calling
112 (sort_cluster, module_state::write): Adjust
113 find_dependencies call.
115 2021-01-21 Jakub Jelinek <jakub@redhat.com>
118 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
119 (check_for_return_continue): Also look for BREAK_STMT. Handle
120 SWITCH_STMT by ignoring break_stmt from its body.
121 (potential_constant_expression_1) <case FOR_STMT>,
122 <case WHILE_STMT>: If the condition isn't constant true, check if
123 the loop body can contain a return stmt.
124 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
125 <case IF_STMT>: If recursion with tf_none is successful,
126 merge *jump_target from the branches - returns with highest priority,
127 breaks or continues lower. If then branch is potentially constant and
128 doesn't return, check the else branch if it could return, break or
131 2021-01-21 Nathan Sidwell <nathan@acm.org>
134 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
136 2021-01-20 Nathan Sidwell <nathan@acm.org>
138 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
141 2021-01-20 Patrick Palka <ppalka@redhat.com>
144 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
145 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
146 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
148 2021-01-20 Patrick Palka <ppalka@redhat.com>
151 * parser.c (cp_parser_class_head): Defer access checking when
152 parsing the base-clause until all bases are seen and attached
154 * pt.c (instantiate_class_template): Likewise when substituting
155 into dependent bases.
157 2021-01-20 Jakub Jelinek <jakub@redhat.com>
160 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
161 error_operand_p, remove clause without further checking. Check
162 for non-NULL TYPE_NAME.
164 2021-01-19 Marek Polacek <polacek@redhat.com>
167 * pt.c (maybe_instantiate_noexcept): Return false if FN is
170 2021-01-19 Marek Polacek <polacek@redhat.com>
173 * name-lookup.c (push_using_decl_bindings): New, broken out of...
174 (finish_nonmember_using_decl): ...here.
175 * name-lookup.h (push_using_decl_bindings): Update declaration.
176 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
178 2021-01-19 Patrick Palka <ppalka@redhat.com>
182 * search.c (friend_accessible_p): If scope is a hidden friend
183 defined inside a dependent class, consider access from the
185 * parser.c (cp_parser_late_parsing_for_member): Don't push a
186 dk_no_check access state.
188 2021-01-19 Marek Polacek <polacek@redhat.com>
191 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
192 of NSDMIs before late-parsing of noexcept-specifiers.
194 2021-01-19 Nathan Sidwell <nathan@acm.org>
196 * module.cc (identifier): Merge overloads.
198 2021-01-19 Nathan Sidwell <nathan@acm.org>
201 * module.cc (trees_out::write_location): Make static.
203 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
205 * parser.c (cp_parser_omp_clause_detach): New.
206 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
207 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
208 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
209 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
210 Prevent use of detach with mergeable and overriding the data sharing
211 mode of the event handle.
213 2021-01-15 Nathan Sidwell <nathan@acm.org>
216 * tree.c (cp_build_qualified_type_real): Propagate an array's
217 dependentness to the copy, if known.
219 2021-01-15 Jason Merrill <jason@redhat.com>
222 * call.c (unsafe_return_slot_p): Return int.
223 (init_by_return_slot_p): Split out from...
224 (unsafe_copy_elision_p): ...here.
225 (unsafe_copy_elision_p_opt): New name for old meaning.
226 (build_over_call): Adjust.
227 (make_safe_copy_elision): New.
228 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
232 2021-01-15 Jason Merrill <jason@redhat.com>
234 * call.c (base_ctor_for, make_base_init_ok): New.
235 (build_over_call): Use make_base_init_ok.
237 2021-01-15 Jason Merrill <jason@redhat.com>
240 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
241 if we got a CONSTRUCTOR.
243 2021-01-15 Nathan Sidwell <nathan@acm.org>
246 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
248 2021-01-14 Jason Merrill <jason@redhat.com>
250 * typeck2.c (process_init_constructor_record): Use fldtype
251 variable consistently.
253 2021-01-14 Nathan Sidwell <nathan@acm.org>
256 * tree.c (cp_tree_equal): Correct map_context logic.
258 2021-01-13 Marek Polacek <polacek@redhat.com>
261 * name-lookup.c (push_using_decl_bindings): New.
262 * name-lookup.h (push_using_decl_bindings): Declare.
263 * pt.c (tsubst_expr): Call push_using_decl_bindings.
265 2021-01-13 Nathan Sidwell <nathan@acm.org>
268 * module.cc (module_add_import_initializers): Pass a
269 zero-element argument vector.
271 2021-01-12 Patrick Palka <ppalka@redhat.com>
274 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
275 the template of a CTAD placeholder.
277 2021-01-12 Marek Polacek <polacek@redhat.com>
280 * typeck2.c (process_init_constructor_record): Don't emit
281 -Wmissing-field-initializers warnings in unevaluated contexts.
283 2021-01-11 Jakub Jelinek <jakub@redhat.com>
286 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
288 (mark_abi_tags_r): Likewise.
289 * decl2.c (min_vis_r): Likewise.
290 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
293 2021-01-08 Patrick Palka <ppalka@redhat.com>
296 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
297 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
299 2021-01-08 Patrick Palka <ppalka@redhat.com>
302 * semantics.c (check_accessibility_of_qualified_id): Punt if
303 we're checking access of a scoped non-static member inside a
306 2021-01-07 Jakub Jelinek <jakub@redhat.com>
309 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
310 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
312 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
314 2021-01-07 Marek Polacek <polacek@redhat.com>
317 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
318 !late_return_type block.
320 2021-01-07 Jason Merrill <jason@redhat.com>
322 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
323 (cxx_eval_store_expression): Add comment.
325 2021-01-07 Jason Merrill <jason@redhat.com>
327 * call.c (has_next): Factor out from...
328 (next_conversion): ...here.
329 (strip_standard_conversion): And here.
330 (is_subseq): And here.
331 (build_conv): Check it.
332 (standard_conversion): Don't call build_conv
335 2021-01-06 Martin Sebor <msebor@redhat.com>
338 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
340 2021-01-05 Patrick Palka <ppalka@redhat.com>
342 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
343 the type of the NTTP, substitute into the type again. If the
344 type is still dependent, don't unify the NTTP.
346 2021-01-05 Jakub Jelinek <jakub@redhat.com>
348 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
349 $(CODYLIB) after $(BACKEND).
351 2021-01-05 Jakub Jelinek <jakub@redhat.com>
354 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
355 Punt if lval is true.
356 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
357 the result if it has a class type.
359 2021-01-05 Marek Polacek <polacek@redhat.com>
362 * pt.c (resolve_overloaded_unification): Call
363 maybe_instantiate_noexcept after instantiating the function
366 2021-01-05 Nathan Sidwell <nathan@acm.org>
368 * parser.c (cp_parser_module_declaration): Alter diagnostic
369 text to say where is permissable.
371 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
374 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
376 2021-01-02 Jan Hubicka <jh@suse.cz>
378 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
379 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
380 * tree.c (cp_tree_c_finish_parsing): New function.
382 2021-01-01 Jakub Jelinek <jakub@redhat.com>
384 * ChangeLog-2020: Rotate ChangeLog. New file.
387 Copyright (C) 2021 Free Software Foundation, Inc.
389 Copying and distribution of this file, with or without modification,
390 are permitted in any medium without royalty provided the copyright
391 notice and this notice are preserved.