]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2021-01-27 Jason Merrill <jason@redhat.com>
2
3 PR c++/97874
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.
8
9 2021-01-26 Jason Merrill <jason@redhat.com>
10
11 PR c++/97474
12 * call.c (type_passed_as): Don't mark invisiref restrict.
13
14 2021-01-26 Jason Merrill <jason@redhat.com>
15
16 PR c++/97566
17 PR c++/98463
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.
26
27 2021-01-25 Martin Sebor <msebor@redhat.com>
28
29 PR c++/98646
30 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
31
32 2021-01-25 Jason Merrill <jason@redhat.com>
33
34 PR c++/98463
35 * constexpr.c (get_or_insert_ctor_field): Add check.
36 (cxx_eval_store_expression): Handle discontinuity of refs.
37
38 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
39
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.
47
48 2021-01-23 Patrick Palka <ppalka@redhat.com>
49
50 PR c++/97399
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
54 cp_parser_declarator.
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.
62
63 2021-01-22 Marek Polacek <polacek@redhat.com>
64
65 PR c++/96623
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.
69
70 2021-01-22 Jason Merrill <jason@redhat.com>
71
72 PR c++/98744
73 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
74
75 2021-01-22 Jakub Jelinek <jakub@redhat.com>
76
77 PR sanitizer/95693
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.
82
83 2021-01-22 Marek Polacek <polacek@redhat.com>
84
85 PR c++/98545
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.
90
91 2021-01-22 Marek Polacek <polacek@redhat.com>
92
93 PR c++/97966
94 * pt.c (instantiate_class_template_1): Instantiate members
95 marked with attribute used only after we're done instantiating
96 the class.
97
98 2021-01-21 Patrick Palka <ppalka@redhat.com>
99
100 PR c++/71879
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.
104
105 2021-01-21 Nathan Sidwell <nathan@acm.org>
106
107 PR c++/98624
108 * module.cc (depset::hash::find_dependencies): Add
109 module arg.
110 (trees_out::core_vals): Check state before calling
111 write_location.
112 (sort_cluster, module_state::write): Adjust
113 find_dependencies call.
114
115 2021-01-21 Jakub Jelinek <jakub@redhat.com>
116
117 PR c++/98672
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
129 continue.
130
131 2021-01-21 Nathan Sidwell <nathan@acm.org>
132
133 PR c++/98530
134 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
135
136 2021-01-20 Nathan Sidwell <nathan@acm.org>
137
138 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
139 signed type.
140
141 2021-01-20 Patrick Palka <ppalka@redhat.com>
142
143 PR c++/95434
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.
147
148 2021-01-20 Patrick Palka <ppalka@redhat.com>
149
150 PR c++/82613
151 * parser.c (cp_parser_class_head): Defer access checking when
152 parsing the base-clause until all bases are seen and attached
153 to the class type.
154 * pt.c (instantiate_class_template): Likewise when substituting
155 into dependent bases.
156
157 2021-01-20 Jakub Jelinek <jakub@redhat.com>
158
159 PR c++/98742
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.
163
164 2021-01-19 Marek Polacek <polacek@redhat.com>
165
166 PR c++/98659
167 * pt.c (maybe_instantiate_noexcept): Return false if FN is
168 error_mark_node.
169
170 2021-01-19 Marek Polacek <polacek@redhat.com>
171
172 PR c++/98687
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.
177
178 2021-01-19 Patrick Palka <ppalka@redhat.com>
179
180 PR c++/41437
181 PR c++/58993
182 * search.c (friend_accessible_p): If scope is a hidden friend
183 defined inside a dependent class, consider access from the
184 class.
185 * parser.c (cp_parser_late_parsing_for_member): Don't push a
186 dk_no_check access state.
187
188 2021-01-19 Marek Polacek <polacek@redhat.com>
189
190 PR c++/98333
191 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
192 of NSDMIs before late-parsing of noexcept-specifiers.
193
194 2021-01-19 Nathan Sidwell <nathan@acm.org>
195
196 * module.cc (identifier): Merge overloads.
197
198 2021-01-19 Nathan Sidwell <nathan@acm.org>
199
200 PR c++/98624
201 * module.cc (trees_out::write_location): Make static.
202
203 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
204
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.
212
213 2021-01-15 Nathan Sidwell <nathan@acm.org>
214
215 PR c++/98538
216 * tree.c (cp_build_qualified_type_real): Propagate an array's
217 dependentness to the copy, if known.
218
219 2021-01-15 Jason Merrill <jason@redhat.com>
220
221 PR c++/98642
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
229 list-initialization.
230 * cp-tree.h: Adjust.
231
232 2021-01-15 Jason Merrill <jason@redhat.com>
233
234 * call.c (base_ctor_for, make_base_init_ok): New.
235 (build_over_call): Use make_base_init_ok.
236
237 2021-01-15 Jason Merrill <jason@redhat.com>
238
239 PR c++/63707
240 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
241 if we got a CONSTRUCTOR.
242
243 2021-01-15 Nathan Sidwell <nathan@acm.org>
244
245 PR c++/98591
246 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
247
248 2021-01-14 Jason Merrill <jason@redhat.com>
249
250 * typeck2.c (process_init_constructor_record): Use fldtype
251 variable consistently.
252
253 2021-01-14 Nathan Sidwell <nathan@acm.org>
254
255 PR c++/98372
256 * tree.c (cp_tree_equal): Correct map_context logic.
257
258 2021-01-13 Marek Polacek <polacek@redhat.com>
259
260 PR c++/98231
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.
264
265 2021-01-13 Nathan Sidwell <nathan@acm.org>
266
267 PR c++/98626
268 * module.cc (module_add_import_initializers): Pass a
269 zero-element argument vector.
270
271 2021-01-12 Patrick Palka <ppalka@redhat.com>
272
273 PR c++/98611
274 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
275 the template of a CTAD placeholder.
276
277 2021-01-12 Marek Polacek <polacek@redhat.com>
278
279 PR c++/98620
280 * typeck2.c (process_init_constructor_record): Don't emit
281 -Wmissing-field-initializers warnings in unevaluated contexts.
282
283 2021-01-11 Jakub Jelinek <jakub@redhat.com>
284
285 PR c++/98481
286 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
287 for types.
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
291 typedefs.
292
293 2021-01-08 Patrick Palka <ppalka@redhat.com>
294
295 PR c++/98551
296 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
297 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
298
299 2021-01-08 Patrick Palka <ppalka@redhat.com>
300
301 PR c++/98515
302 * semantics.c (check_accessibility_of_qualified_id): Punt if
303 we're checking access of a scoped non-static member inside a
304 class template.
305
306 2021-01-07 Jakub Jelinek <jakub@redhat.com>
307
308 PR c++/98329
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
311 its location.
312 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
313
314 2021-01-07 Marek Polacek <polacek@redhat.com>
315
316 PR c++/98441
317 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
318 !late_return_type block.
319
320 2021-01-07 Jason Merrill <jason@redhat.com>
321
322 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
323 (cxx_eval_store_expression): Add comment.
324
325 2021-01-07 Jason Merrill <jason@redhat.com>
326
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
333 for ck_identity.
334
335 2021-01-06 Martin Sebor <msebor@redhat.com>
336
337 PR c++/95768
338 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
339
340 2021-01-05 Patrick Palka <ppalka@redhat.com>
341
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.
345
346 2021-01-05 Jakub Jelinek <jakub@redhat.com>
347
348 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
349 $(CODYLIB) after $(BACKEND).
350
351 2021-01-05 Jakub Jelinek <jakub@redhat.com>
352
353 PR c++/98469
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.
358
359 2021-01-05 Marek Polacek <polacek@redhat.com>
360
361 PR c++/82099
362 * pt.c (resolve_overloaded_unification): Call
363 maybe_instantiate_noexcept after instantiating the function
364 decl.
365
366 2021-01-05 Nathan Sidwell <nathan@acm.org>
367
368 * parser.c (cp_parser_module_declaration): Alter diagnostic
369 text to say where is permissable.
370
371 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
372
373 PR c++/98316
374 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
375
376 2021-01-02 Jan Hubicka <jh@suse.cz>
377
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.
381
382 2021-01-01 Jakub Jelinek <jakub@redhat.com>
383
384 * ChangeLog-2020: Rotate ChangeLog. New file.
385
386 \f
387 Copyright (C) 2021 Free Software Foundation, Inc.
388
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.