]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2021-02-01 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/98295
4 * constexpr.c (cxx_eval_array_reference): Also set
5 new_ctx.object when setting new_ctx.ctor.
6
7 2021-02-01 Marek Polacek <polacek@redhat.com>
8
9 PR c++/98355
10 * parser.c (cp_parser_has_attribute_expression): Use
11 uses_template_parms instead of type_dependent_expression_p.
12
13 2021-02-01 Jason Merrill <jason@redhat.com>
14
15 PR c++/98570
16 * cp-tree.h: Declare it.
17 * pt.c (comparing_dependent_aliases): New flag.
18 (template_args_equal, spec_hasher::equal): Set it.
19 (dependent_alias_template_spec_p): Assert that we don't
20 get non-types other than error_mark_node.
21 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
22 on complex alias specializations. Set TYPE_DEPENDENT_P here.
23 (tsubst_decl): Not here.
24 * module.cc (module_state::read_cluster): Set
25 comparing_dependent_aliases instead of
26 comparing_specializations.
27 * tree.c (cp_tree_equal): Remove comparing_specializations
28 module handling.
29 * typeck.c (structural_comptypes): Adjust.
30 (comptypes): Remove comparing_specializations handling.
31
32 2021-01-29 Nathan Sidwell <nathan@acm.org>
33
34 PR c++/98843
35 * module.cc (module_state_config): Add num_entities field.
36 (module_state::read_entities): The entity_ary span is
37 already allocated.
38 (module_state::write_config): Write num_entities.
39 (module_state::read_config): Read num_entities.
40 (module_state::write): Set config's num_entities.
41 (module_state::read_initial): Allocate the entity ary
42 span here.
43 (module_state::read_language): Do not set entity_lwm
44 here.
45
46 2021-01-29 Marek Polacek <polacek@redhat.com>
47
48 PR c++/96137
49 * parser.c (cp_parser_class_name): If parser->scope is
50 error_mark_node, return it, otherwise continue.
51
52 2021-01-28 Jakub Jelinek <jakub@redhat.com>
53
54 PR c++/98841
55 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
56
57 2021-01-28 Jakub Jelinek <jakub@redhat.com>
58
59 PR c++/33661
60 PR c++/98847
61 * decl.c (cp_finish_decl): For register vars with asmspec in templates
62 call set_user_assembler_name and set DECL_HARD_REGISTER.
63 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
64 pass asmspec_tree to cp_finish_decl.
65
66 2021-01-28 Nathan Sidwell <nathan@acm.org>
67
68 PR c++/98770
69 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
70 check order.
71 (trees_in::decl_value): Do typedef frobbing only when installing
72 a new typedef, adjust is_matching_decl call. Swap is_typedef
73 & TYPE_NAME check.
74 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
75 names and deal with typedef checking.
76
77 2021-01-27 Jason Merrill <jason@redhat.com>
78
79 PR c++/97874
80 * name-lookup.c (lookup_using_decl): Clean up handling
81 of dependency and inherited constructors.
82 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
83 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
84
85 2021-01-26 Jason Merrill <jason@redhat.com>
86
87 PR c++/97474
88 * call.c (type_passed_as): Don't mark invisiref restrict.
89
90 2021-01-26 Jason Merrill <jason@redhat.com>
91
92 PR c++/97566
93 PR c++/98463
94 * class.c (layout_class_type): An empty field gets size 0.
95 (is_empty_field): New.
96 (check_bases): Check it.
97 * cp-tree.h (is_empty_field): Declare it.
98 * constexpr.c (cxx_eval_store_expression): Check it.
99 (cx_check_missing_mem_inits): Likewise.
100 * init.c (perform_member_init): Likewise.
101 * typeck2.c (process_init_constructor_record): Likewise.
102
103 2021-01-25 Martin Sebor <msebor@redhat.com>
104
105 PR c++/98646
106 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
107
108 2021-01-25 Jason Merrill <jason@redhat.com>
109
110 PR c++/98463
111 * constexpr.c (get_or_insert_ctor_field): Add check.
112 (cxx_eval_store_expression): Handle discontinuity of refs.
113
114 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
115
116 * call.c (complain_about_access): Altered function.
117 * cp-tree.h (complain_about_access): Changed parameters of function.
118 (get_parent_with_private_access): Declared new function.
119 * search.c (get_parent_with_private_access): Defined new function.
120 * semantics.c (enforce_access): Modified function.
121 * typeck.c (complain_about_unrecognized_member): Updated function
122 arguments in complain_about_access.
123
124 2021-01-23 Patrick Palka <ppalka@redhat.com>
125
126 PR c++/97399
127 * cp-tree.h (shared_member_p): Adjust declaration.
128 * parser.c (cp_parser_init_declarator): If the storage class
129 specifier is sc_static, pass true for static_p to
130 cp_parser_declarator.
131 (cp_parser_direct_declarator): Don't do inject_this_parm when
132 the declarator is a friend.
133 * search.c (shared_member_p): Change return type to bool and
134 adjust function body accordingly. Return false for a dependent
135 USING_DECL instead of aborting.
136 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
137 even when type-dependent.
138
139 2021-01-22 Marek Polacek <polacek@redhat.com>
140
141 PR c++/96623
142 * parser.c (inject_parm_decls): Remove a redundant assignment.
143 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
144 before calling inject_parm_decls.
145
146 2021-01-22 Jason Merrill <jason@redhat.com>
147
148 PR c++/98744
149 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
150
151 2021-01-22 Jakub Jelinek <jakub@redhat.com>
152
153 PR sanitizer/95693
154 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
155 return build_zero_cst for reference types.
156 * typeck2.c (process_init_constructor_record): Instead call
157 build_zero_cst here during error recovery instead of build_zero_init.
158
159 2021-01-22 Marek Polacek <polacek@redhat.com>
160
161 PR c++/98545
162 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
163 warnings regardless of abi_version_at_least.
164 (write_expression): When the expression is a dependent name
165 and an operator name, write "on" before writing its name.
166
167 2021-01-22 Marek Polacek <polacek@redhat.com>
168
169 PR c++/97966
170 * pt.c (instantiate_class_template_1): Instantiate members
171 marked with attribute used only after we're done instantiating
172 the class.
173
174 2021-01-21 Patrick Palka <ppalka@redhat.com>
175
176 PR c++/71879
177 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
178 sentinel at the start of the function. Remove a now-redundant
179 manual adjustment of cp_unevaluated_operand.
180
181 2021-01-21 Nathan Sidwell <nathan@acm.org>
182
183 PR c++/98624
184 * module.cc (depset::hash::find_dependencies): Add
185 module arg.
186 (trees_out::core_vals): Check state before calling
187 write_location.
188 (sort_cluster, module_state::write): Adjust
189 find_dependencies call.
190
191 2021-01-21 Jakub Jelinek <jakub@redhat.com>
192
193 PR c++/98672
194 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
195 (check_for_return_continue): Also look for BREAK_STMT. Handle
196 SWITCH_STMT by ignoring break_stmt from its body.
197 (potential_constant_expression_1) <case FOR_STMT>,
198 <case WHILE_STMT>: If the condition isn't constant true, check if
199 the loop body can contain a return stmt.
200 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
201 <case IF_STMT>: If recursion with tf_none is successful,
202 merge *jump_target from the branches - returns with highest priority,
203 breaks or continues lower. If then branch is potentially constant and
204 doesn't return, check the else branch if it could return, break or
205 continue.
206
207 2021-01-21 Nathan Sidwell <nathan@acm.org>
208
209 PR c++/98530
210 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
211
212 2021-01-20 Nathan Sidwell <nathan@acm.org>
213
214 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
215 signed type.
216
217 2021-01-20 Patrick Palka <ppalka@redhat.com>
218
219 PR c++/95434
220 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
221 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
222 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
223
224 2021-01-20 Patrick Palka <ppalka@redhat.com>
225
226 PR c++/82613
227 * parser.c (cp_parser_class_head): Defer access checking when
228 parsing the base-clause until all bases are seen and attached
229 to the class type.
230 * pt.c (instantiate_class_template): Likewise when substituting
231 into dependent bases.
232
233 2021-01-20 Jakub Jelinek <jakub@redhat.com>
234
235 PR c++/98742
236 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
237 error_operand_p, remove clause without further checking. Check
238 for non-NULL TYPE_NAME.
239
240 2021-01-19 Marek Polacek <polacek@redhat.com>
241
242 PR c++/98659
243 * pt.c (maybe_instantiate_noexcept): Return false if FN is
244 error_mark_node.
245
246 2021-01-19 Marek Polacek <polacek@redhat.com>
247
248 PR c++/98687
249 * name-lookup.c (push_using_decl_bindings): New, broken out of...
250 (finish_nonmember_using_decl): ...here.
251 * name-lookup.h (push_using_decl_bindings): Update declaration.
252 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
253
254 2021-01-19 Patrick Palka <ppalka@redhat.com>
255
256 PR c++/41437
257 PR c++/58993
258 * search.c (friend_accessible_p): If scope is a hidden friend
259 defined inside a dependent class, consider access from the
260 class.
261 * parser.c (cp_parser_late_parsing_for_member): Don't push a
262 dk_no_check access state.
263
264 2021-01-19 Marek Polacek <polacek@redhat.com>
265
266 PR c++/98333
267 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
268 of NSDMIs before late-parsing of noexcept-specifiers.
269
270 2021-01-19 Nathan Sidwell <nathan@acm.org>
271
272 * module.cc (identifier): Merge overloads.
273
274 2021-01-19 Nathan Sidwell <nathan@acm.org>
275
276 PR c++/98624
277 * module.cc (trees_out::write_location): Make static.
278
279 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
280
281 * parser.c (cp_parser_omp_clause_detach): New.
282 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
283 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
284 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
285 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
286 Prevent use of detach with mergeable and overriding the data sharing
287 mode of the event handle.
288
289 2021-01-15 Nathan Sidwell <nathan@acm.org>
290
291 PR c++/98538
292 * tree.c (cp_build_qualified_type_real): Propagate an array's
293 dependentness to the copy, if known.
294
295 2021-01-15 Jason Merrill <jason@redhat.com>
296
297 PR c++/98642
298 * call.c (unsafe_return_slot_p): Return int.
299 (init_by_return_slot_p): Split out from...
300 (unsafe_copy_elision_p): ...here.
301 (unsafe_copy_elision_p_opt): New name for old meaning.
302 (build_over_call): Adjust.
303 (make_safe_copy_elision): New.
304 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
305 list-initialization.
306 * cp-tree.h: Adjust.
307
308 2021-01-15 Jason Merrill <jason@redhat.com>
309
310 * call.c (base_ctor_for, make_base_init_ok): New.
311 (build_over_call): Use make_base_init_ok.
312
313 2021-01-15 Jason Merrill <jason@redhat.com>
314
315 PR c++/63707
316 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
317 if we got a CONSTRUCTOR.
318
319 2021-01-15 Nathan Sidwell <nathan@acm.org>
320
321 PR c++/98591
322 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
323
324 2021-01-14 Jason Merrill <jason@redhat.com>
325
326 * typeck2.c (process_init_constructor_record): Use fldtype
327 variable consistently.
328
329 2021-01-14 Nathan Sidwell <nathan@acm.org>
330
331 PR c++/98372
332 * tree.c (cp_tree_equal): Correct map_context logic.
333
334 2021-01-13 Marek Polacek <polacek@redhat.com>
335
336 PR c++/98231
337 * name-lookup.c (push_using_decl_bindings): New.
338 * name-lookup.h (push_using_decl_bindings): Declare.
339 * pt.c (tsubst_expr): Call push_using_decl_bindings.
340
341 2021-01-13 Nathan Sidwell <nathan@acm.org>
342
343 PR c++/98626
344 * module.cc (module_add_import_initializers): Pass a
345 zero-element argument vector.
346
347 2021-01-12 Patrick Palka <ppalka@redhat.com>
348
349 PR c++/98611
350 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
351 the template of a CTAD placeholder.
352
353 2021-01-12 Marek Polacek <polacek@redhat.com>
354
355 PR c++/98620
356 * typeck2.c (process_init_constructor_record): Don't emit
357 -Wmissing-field-initializers warnings in unevaluated contexts.
358
359 2021-01-11 Jakub Jelinek <jakub@redhat.com>
360
361 PR c++/98481
362 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
363 for types.
364 (mark_abi_tags_r): Likewise.
365 * decl2.c (min_vis_r): Likewise.
366 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
367 typedefs.
368
369 2021-01-08 Patrick Palka <ppalka@redhat.com>
370
371 PR c++/98551
372 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
373 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
374
375 2021-01-08 Patrick Palka <ppalka@redhat.com>
376
377 PR c++/98515
378 * semantics.c (check_accessibility_of_qualified_id): Punt if
379 we're checking access of a scoped non-static member inside a
380 class template.
381
382 2021-01-07 Jakub Jelinek <jakub@redhat.com>
383
384 PR c++/98329
385 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
386 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
387 its location.
388 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
389
390 2021-01-07 Marek Polacek <polacek@redhat.com>
391
392 PR c++/98441
393 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
394 !late_return_type block.
395
396 2021-01-07 Jason Merrill <jason@redhat.com>
397
398 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
399 (cxx_eval_store_expression): Add comment.
400
401 2021-01-07 Jason Merrill <jason@redhat.com>
402
403 * call.c (has_next): Factor out from...
404 (next_conversion): ...here.
405 (strip_standard_conversion): And here.
406 (is_subseq): And here.
407 (build_conv): Check it.
408 (standard_conversion): Don't call build_conv
409 for ck_identity.
410
411 2021-01-06 Martin Sebor <msebor@redhat.com>
412
413 PR c++/95768
414 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
415
416 2021-01-05 Patrick Palka <ppalka@redhat.com>
417
418 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
419 the type of the NTTP, substitute into the type again. If the
420 type is still dependent, don't unify the NTTP.
421
422 2021-01-05 Jakub Jelinek <jakub@redhat.com>
423
424 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
425 $(CODYLIB) after $(BACKEND).
426
427 2021-01-05 Jakub Jelinek <jakub@redhat.com>
428
429 PR c++/98469
430 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
431 Punt if lval is true.
432 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
433 the result if it has a class type.
434
435 2021-01-05 Marek Polacek <polacek@redhat.com>
436
437 PR c++/82099
438 * pt.c (resolve_overloaded_unification): Call
439 maybe_instantiate_noexcept after instantiating the function
440 decl.
441
442 2021-01-05 Nathan Sidwell <nathan@acm.org>
443
444 * parser.c (cp_parser_module_declaration): Alter diagnostic
445 text to say where is permissable.
446
447 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
448
449 PR c++/98316
450 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
451
452 2021-01-02 Jan Hubicka <jh@suse.cz>
453
454 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
455 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
456 * tree.c (cp_tree_c_finish_parsing): New function.
457
458 2021-01-01 Jakub Jelinek <jakub@redhat.com>
459
460 * ChangeLog-2020: Rotate ChangeLog. New file.
461
462 \f
463 Copyright (C) 2021 Free Software Foundation, Inc.
464
465 Copying and distribution of this file, with or without modification,
466 are permitted in any medium without royalty provided the copyright
467 notice and this notice are preserved.