1 2021-01-28 Jakub Jelinek <jakub@redhat.com>
4 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
6 2021-01-28 Jakub Jelinek <jakub@redhat.com>
10 * decl.c (cp_finish_decl): For register vars with asmspec in templates
11 call set_user_assembler_name and set DECL_HARD_REGISTER.
12 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
13 pass asmspec_tree to cp_finish_decl.
15 2021-01-28 Nathan Sidwell <nathan@acm.org>
18 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
20 (trees_in::decl_value): Do typedef frobbing only when installing
21 a new typedef, adjust is_matching_decl call. Swap is_typedef
23 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
24 names and deal with typedef checking.
26 2021-01-27 Jason Merrill <jason@redhat.com>
29 * name-lookup.c (lookup_using_decl): Clean up handling
30 of dependency and inherited constructors.
31 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
32 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
34 2021-01-26 Jason Merrill <jason@redhat.com>
37 * call.c (type_passed_as): Don't mark invisiref restrict.
39 2021-01-26 Jason Merrill <jason@redhat.com>
43 * class.c (layout_class_type): An empty field gets size 0.
44 (is_empty_field): New.
45 (check_bases): Check it.
46 * cp-tree.h (is_empty_field): Declare it.
47 * constexpr.c (cxx_eval_store_expression): Check it.
48 (cx_check_missing_mem_inits): Likewise.
49 * init.c (perform_member_init): Likewise.
50 * typeck2.c (process_init_constructor_record): Likewise.
52 2021-01-25 Martin Sebor <msebor@redhat.com>
55 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
57 2021-01-25 Jason Merrill <jason@redhat.com>
60 * constexpr.c (get_or_insert_ctor_field): Add check.
61 (cxx_eval_store_expression): Handle discontinuity of refs.
63 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
65 * call.c (complain_about_access): Altered function.
66 * cp-tree.h (complain_about_access): Changed parameters of function.
67 (get_parent_with_private_access): Declared new function.
68 * search.c (get_parent_with_private_access): Defined new function.
69 * semantics.c (enforce_access): Modified function.
70 * typeck.c (complain_about_unrecognized_member): Updated function
71 arguments in complain_about_access.
73 2021-01-23 Patrick Palka <ppalka@redhat.com>
76 * cp-tree.h (shared_member_p): Adjust declaration.
77 * parser.c (cp_parser_init_declarator): If the storage class
78 specifier is sc_static, pass true for static_p to
80 (cp_parser_direct_declarator): Don't do inject_this_parm when
81 the declarator is a friend.
82 * search.c (shared_member_p): Change return type to bool and
83 adjust function body accordingly. Return false for a dependent
84 USING_DECL instead of aborting.
85 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
86 even when type-dependent.
88 2021-01-22 Marek Polacek <polacek@redhat.com>
91 * parser.c (inject_parm_decls): Remove a redundant assignment.
92 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
93 before calling inject_parm_decls.
95 2021-01-22 Jason Merrill <jason@redhat.com>
98 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
100 2021-01-22 Jakub Jelinek <jakub@redhat.com>
103 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
104 return build_zero_cst for reference types.
105 * typeck2.c (process_init_constructor_record): Instead call
106 build_zero_cst here during error recovery instead of build_zero_init.
108 2021-01-22 Marek Polacek <polacek@redhat.com>
111 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
112 warnings regardless of abi_version_at_least.
113 (write_expression): When the expression is a dependent name
114 and an operator name, write "on" before writing its name.
116 2021-01-22 Marek Polacek <polacek@redhat.com>
119 * pt.c (instantiate_class_template_1): Instantiate members
120 marked with attribute used only after we're done instantiating
123 2021-01-21 Patrick Palka <ppalka@redhat.com>
126 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
127 sentinel at the start of the function. Remove a now-redundant
128 manual adjustment of cp_unevaluated_operand.
130 2021-01-21 Nathan Sidwell <nathan@acm.org>
133 * module.cc (depset::hash::find_dependencies): Add
135 (trees_out::core_vals): Check state before calling
137 (sort_cluster, module_state::write): Adjust
138 find_dependencies call.
140 2021-01-21 Jakub Jelinek <jakub@redhat.com>
143 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
144 (check_for_return_continue): Also look for BREAK_STMT. Handle
145 SWITCH_STMT by ignoring break_stmt from its body.
146 (potential_constant_expression_1) <case FOR_STMT>,
147 <case WHILE_STMT>: If the condition isn't constant true, check if
148 the loop body can contain a return stmt.
149 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
150 <case IF_STMT>: If recursion with tf_none is successful,
151 merge *jump_target from the branches - returns with highest priority,
152 breaks or continues lower. If then branch is potentially constant and
153 doesn't return, check the else branch if it could return, break or
156 2021-01-21 Nathan Sidwell <nathan@acm.org>
159 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
161 2021-01-20 Nathan Sidwell <nathan@acm.org>
163 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
166 2021-01-20 Patrick Palka <ppalka@redhat.com>
169 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
170 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
171 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
173 2021-01-20 Patrick Palka <ppalka@redhat.com>
176 * parser.c (cp_parser_class_head): Defer access checking when
177 parsing the base-clause until all bases are seen and attached
179 * pt.c (instantiate_class_template): Likewise when substituting
180 into dependent bases.
182 2021-01-20 Jakub Jelinek <jakub@redhat.com>
185 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
186 error_operand_p, remove clause without further checking. Check
187 for non-NULL TYPE_NAME.
189 2021-01-19 Marek Polacek <polacek@redhat.com>
192 * pt.c (maybe_instantiate_noexcept): Return false if FN is
195 2021-01-19 Marek Polacek <polacek@redhat.com>
198 * name-lookup.c (push_using_decl_bindings): New, broken out of...
199 (finish_nonmember_using_decl): ...here.
200 * name-lookup.h (push_using_decl_bindings): Update declaration.
201 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
203 2021-01-19 Patrick Palka <ppalka@redhat.com>
207 * search.c (friend_accessible_p): If scope is a hidden friend
208 defined inside a dependent class, consider access from the
210 * parser.c (cp_parser_late_parsing_for_member): Don't push a
211 dk_no_check access state.
213 2021-01-19 Marek Polacek <polacek@redhat.com>
216 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
217 of NSDMIs before late-parsing of noexcept-specifiers.
219 2021-01-19 Nathan Sidwell <nathan@acm.org>
221 * module.cc (identifier): Merge overloads.
223 2021-01-19 Nathan Sidwell <nathan@acm.org>
226 * module.cc (trees_out::write_location): Make static.
228 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
230 * parser.c (cp_parser_omp_clause_detach): New.
231 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
232 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
233 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
234 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
235 Prevent use of detach with mergeable and overriding the data sharing
236 mode of the event handle.
238 2021-01-15 Nathan Sidwell <nathan@acm.org>
241 * tree.c (cp_build_qualified_type_real): Propagate an array's
242 dependentness to the copy, if known.
244 2021-01-15 Jason Merrill <jason@redhat.com>
247 * call.c (unsafe_return_slot_p): Return int.
248 (init_by_return_slot_p): Split out from...
249 (unsafe_copy_elision_p): ...here.
250 (unsafe_copy_elision_p_opt): New name for old meaning.
251 (build_over_call): Adjust.
252 (make_safe_copy_elision): New.
253 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
257 2021-01-15 Jason Merrill <jason@redhat.com>
259 * call.c (base_ctor_for, make_base_init_ok): New.
260 (build_over_call): Use make_base_init_ok.
262 2021-01-15 Jason Merrill <jason@redhat.com>
265 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
266 if we got a CONSTRUCTOR.
268 2021-01-15 Nathan Sidwell <nathan@acm.org>
271 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
273 2021-01-14 Jason Merrill <jason@redhat.com>
275 * typeck2.c (process_init_constructor_record): Use fldtype
276 variable consistently.
278 2021-01-14 Nathan Sidwell <nathan@acm.org>
281 * tree.c (cp_tree_equal): Correct map_context logic.
283 2021-01-13 Marek Polacek <polacek@redhat.com>
286 * name-lookup.c (push_using_decl_bindings): New.
287 * name-lookup.h (push_using_decl_bindings): Declare.
288 * pt.c (tsubst_expr): Call push_using_decl_bindings.
290 2021-01-13 Nathan Sidwell <nathan@acm.org>
293 * module.cc (module_add_import_initializers): Pass a
294 zero-element argument vector.
296 2021-01-12 Patrick Palka <ppalka@redhat.com>
299 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
300 the template of a CTAD placeholder.
302 2021-01-12 Marek Polacek <polacek@redhat.com>
305 * typeck2.c (process_init_constructor_record): Don't emit
306 -Wmissing-field-initializers warnings in unevaluated contexts.
308 2021-01-11 Jakub Jelinek <jakub@redhat.com>
311 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
313 (mark_abi_tags_r): Likewise.
314 * decl2.c (min_vis_r): Likewise.
315 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
318 2021-01-08 Patrick Palka <ppalka@redhat.com>
321 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
322 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
324 2021-01-08 Patrick Palka <ppalka@redhat.com>
327 * semantics.c (check_accessibility_of_qualified_id): Punt if
328 we're checking access of a scoped non-static member inside a
331 2021-01-07 Jakub Jelinek <jakub@redhat.com>
334 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
335 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
337 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
339 2021-01-07 Marek Polacek <polacek@redhat.com>
342 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
343 !late_return_type block.
345 2021-01-07 Jason Merrill <jason@redhat.com>
347 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
348 (cxx_eval_store_expression): Add comment.
350 2021-01-07 Jason Merrill <jason@redhat.com>
352 * call.c (has_next): Factor out from...
353 (next_conversion): ...here.
354 (strip_standard_conversion): And here.
355 (is_subseq): And here.
356 (build_conv): Check it.
357 (standard_conversion): Don't call build_conv
360 2021-01-06 Martin Sebor <msebor@redhat.com>
363 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
365 2021-01-05 Patrick Palka <ppalka@redhat.com>
367 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
368 the type of the NTTP, substitute into the type again. If the
369 type is still dependent, don't unify the NTTP.
371 2021-01-05 Jakub Jelinek <jakub@redhat.com>
373 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
374 $(CODYLIB) after $(BACKEND).
376 2021-01-05 Jakub Jelinek <jakub@redhat.com>
379 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
380 Punt if lval is true.
381 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
382 the result if it has a class type.
384 2021-01-05 Marek Polacek <polacek@redhat.com>
387 * pt.c (resolve_overloaded_unification): Call
388 maybe_instantiate_noexcept after instantiating the function
391 2021-01-05 Nathan Sidwell <nathan@acm.org>
393 * parser.c (cp_parser_module_declaration): Alter diagnostic
394 text to say where is permissable.
396 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
399 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
401 2021-01-02 Jan Hubicka <jh@suse.cz>
403 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
404 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
405 * tree.c (cp_tree_c_finish_parsing): New function.
407 2021-01-01 Jakub Jelinek <jakub@redhat.com>
409 * ChangeLog-2020: Rotate ChangeLog. New file.
412 Copyright (C) 2021 Free Software Foundation, Inc.
414 Copying and distribution of this file, with or without modification,
415 are permitted in any medium without royalty provided the copyright
416 notice and this notice are preserved.