]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
e62bb7f0
GA
12021-01-26 Jason Merrill <jason@redhat.com>
2
3 PR c++/97474
4 * call.c (type_passed_as): Don't mark invisiref restrict.
5
62021-01-26 Jason Merrill <jason@redhat.com>
7
8 PR c++/97566
9 PR c++/98463
10 * class.c (layout_class_type): An empty field gets size 0.
11 (is_empty_field): New.
12 (check_bases): Check it.
13 * cp-tree.h (is_empty_field): Declare it.
14 * constexpr.c (cxx_eval_store_expression): Check it.
15 (cx_check_missing_mem_inits): Likewise.
16 * init.c (perform_member_init): Likewise.
17 * typeck2.c (process_init_constructor_record): Likewise.
18
161e4c08
GA
192021-01-25 Martin Sebor <msebor@redhat.com>
20
21 PR c++/98646
22 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
23
242021-01-25 Jason Merrill <jason@redhat.com>
25
26 PR c++/98463
27 * constexpr.c (get_or_insert_ctor_field): Add check.
28 (cxx_eval_store_expression): Handle discontinuity of refs.
29
6b163337
GA
302021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
31
32 * call.c (complain_about_access): Altered function.
33 * cp-tree.h (complain_about_access): Changed parameters of function.
34 (get_parent_with_private_access): Declared new function.
35 * search.c (get_parent_with_private_access): Defined new function.
36 * semantics.c (enforce_access): Modified function.
37 * typeck.c (complain_about_unrecognized_member): Updated function
38 arguments in complain_about_access.
39
402021-01-23 Patrick Palka <ppalka@redhat.com>
41
42 PR c++/97399
43 * cp-tree.h (shared_member_p): Adjust declaration.
44 * parser.c (cp_parser_init_declarator): If the storage class
45 specifier is sc_static, pass true for static_p to
46 cp_parser_declarator.
47 (cp_parser_direct_declarator): Don't do inject_this_parm when
48 the declarator is a friend.
49 * search.c (shared_member_p): Change return type to bool and
50 adjust function body accordingly. Return false for a dependent
51 USING_DECL instead of aborting.
52 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
53 even when type-dependent.
54
8502e23d
GA
552021-01-22 Marek Polacek <polacek@redhat.com>
56
57 PR c++/96623
58 * parser.c (inject_parm_decls): Remove a redundant assignment.
59 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
60 before calling inject_parm_decls.
61
622021-01-22 Jason Merrill <jason@redhat.com>
63
64 PR c++/98744
65 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
66
672021-01-22 Jakub Jelinek <jakub@redhat.com>
68
69 PR sanitizer/95693
70 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
71 return build_zero_cst for reference types.
72 * typeck2.c (process_init_constructor_record): Instead call
73 build_zero_cst here during error recovery instead of build_zero_init.
74
752021-01-22 Marek Polacek <polacek@redhat.com>
76
77 PR c++/98545
78 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
79 warnings regardless of abi_version_at_least.
80 (write_expression): When the expression is a dependent name
81 and an operator name, write "on" before writing its name.
82
832021-01-22 Marek Polacek <polacek@redhat.com>
84
85 PR c++/97966
86 * pt.c (instantiate_class_template_1): Instantiate members
87 marked with attribute used only after we're done instantiating
88 the class.
89
7559d465
GA
902021-01-21 Patrick Palka <ppalka@redhat.com>
91
92 PR c++/71879
93 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
94 sentinel at the start of the function. Remove a now-redundant
95 manual adjustment of cp_unevaluated_operand.
96
972021-01-21 Nathan Sidwell <nathan@acm.org>
98
99 PR c++/98624
100 * module.cc (depset::hash::find_dependencies): Add
101 module arg.
102 (trees_out::core_vals): Check state before calling
103 write_location.
104 (sort_cluster, module_state::write): Adjust
105 find_dependencies call.
106
1072021-01-21 Jakub Jelinek <jakub@redhat.com>
108
109 PR c++/98672
110 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
111 (check_for_return_continue): Also look for BREAK_STMT. Handle
112 SWITCH_STMT by ignoring break_stmt from its body.
113 (potential_constant_expression_1) <case FOR_STMT>,
114 <case WHILE_STMT>: If the condition isn't constant true, check if
115 the loop body can contain a return stmt.
116 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
117 <case IF_STMT>: If recursion with tf_none is successful,
118 merge *jump_target from the branches - returns with highest priority,
119 breaks or continues lower. If then branch is potentially constant and
120 doesn't return, check the else branch if it could return, break or
121 continue.
122
1232021-01-21 Nathan Sidwell <nathan@acm.org>
124
125 PR c++/98530
126 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
127
b93d0e36
GA
1282021-01-20 Nathan Sidwell <nathan@acm.org>
129
130 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
131 signed type.
132
1332021-01-20 Patrick Palka <ppalka@redhat.com>
134
135 PR c++/95434
136 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
137 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
138 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
139
1402021-01-20 Patrick Palka <ppalka@redhat.com>
141
142 PR c++/82613
143 * parser.c (cp_parser_class_head): Defer access checking when
144 parsing the base-clause until all bases are seen and attached
145 to the class type.
146 * pt.c (instantiate_class_template): Likewise when substituting
147 into dependent bases.
148
1492021-01-20 Jakub Jelinek <jakub@redhat.com>
150
151 PR c++/98742
152 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
153 error_operand_p, remove clause without further checking. Check
154 for non-NULL TYPE_NAME.
155
f35a4f96
GA
1562021-01-19 Marek Polacek <polacek@redhat.com>
157
158 PR c++/98659
159 * pt.c (maybe_instantiate_noexcept): Return false if FN is
160 error_mark_node.
161
1622021-01-19 Marek Polacek <polacek@redhat.com>
163
164 PR c++/98687
165 * name-lookup.c (push_using_decl_bindings): New, broken out of...
166 (finish_nonmember_using_decl): ...here.
167 * name-lookup.h (push_using_decl_bindings): Update declaration.
168 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
169
1702021-01-19 Patrick Palka <ppalka@redhat.com>
171
172 PR c++/41437
173 PR c++/58993
174 * search.c (friend_accessible_p): If scope is a hidden friend
175 defined inside a dependent class, consider access from the
176 class.
177 * parser.c (cp_parser_late_parsing_for_member): Don't push a
178 dk_no_check access state.
179
1802021-01-19 Marek Polacek <polacek@redhat.com>
181
182 PR c++/98333
183 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
184 of NSDMIs before late-parsing of noexcept-specifiers.
185
1862021-01-19 Nathan Sidwell <nathan@acm.org>
187
188 * module.cc (identifier): Merge overloads.
189
1902021-01-19 Nathan Sidwell <nathan@acm.org>
191
192 PR c++/98624
193 * module.cc (trees_out::write_location): Make static.
194
59cf67d1
GA
1952021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
196
197 * parser.c (cp_parser_omp_clause_detach): New.
198 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
199 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
200 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
201 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
202 Prevent use of detach with mergeable and overriding the data sharing
203 mode of the event handle.
204
2f7f0d32
GA
2052021-01-15 Nathan Sidwell <nathan@acm.org>
206
207 PR c++/98538
208 * tree.c (cp_build_qualified_type_real): Propagate an array's
209 dependentness to the copy, if known.
210
2112021-01-15 Jason Merrill <jason@redhat.com>
212
213 PR c++/98642
214 * call.c (unsafe_return_slot_p): Return int.
215 (init_by_return_slot_p): Split out from...
216 (unsafe_copy_elision_p): ...here.
217 (unsafe_copy_elision_p_opt): New name for old meaning.
218 (build_over_call): Adjust.
219 (make_safe_copy_elision): New.
220 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
221 list-initialization.
222 * cp-tree.h: Adjust.
223
2242021-01-15 Jason Merrill <jason@redhat.com>
225
226 * call.c (base_ctor_for, make_base_init_ok): New.
227 (build_over_call): Use make_base_init_ok.
228
2292021-01-15 Jason Merrill <jason@redhat.com>
230
231 PR c++/63707
232 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
233 if we got a CONSTRUCTOR.
234
2352021-01-15 Nathan Sidwell <nathan@acm.org>
236
237 PR c++/98591
238 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
239
5fff80fd
GA
2402021-01-14 Jason Merrill <jason@redhat.com>
241
242 * typeck2.c (process_init_constructor_record): Use fldtype
243 variable consistently.
244
2452021-01-14 Nathan Sidwell <nathan@acm.org>
246
247 PR c++/98372
248 * tree.c (cp_tree_equal): Correct map_context logic.
249
be0851b8
GA
2502021-01-13 Marek Polacek <polacek@redhat.com>
251
252 PR c++/98231
253 * name-lookup.c (push_using_decl_bindings): New.
254 * name-lookup.h (push_using_decl_bindings): Declare.
255 * pt.c (tsubst_expr): Call push_using_decl_bindings.
256
2572021-01-13 Nathan Sidwell <nathan@acm.org>
258
259 PR c++/98626
260 * module.cc (module_add_import_initializers): Pass a
261 zero-element argument vector.
262
6851dda2
GA
2632021-01-12 Patrick Palka <ppalka@redhat.com>
264
265 PR c++/98611
266 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
267 the template of a CTAD placeholder.
268
2692021-01-12 Marek Polacek <polacek@redhat.com>
270
271 PR c++/98620
272 * typeck2.c (process_init_constructor_record): Don't emit
273 -Wmissing-field-initializers warnings in unevaluated contexts.
274
67fbb7f0
GA
2752021-01-11 Jakub Jelinek <jakub@redhat.com>
276
277 PR c++/98481
278 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
279 for types.
280 (mark_abi_tags_r): Likewise.
281 * decl2.c (min_vis_r): Likewise.
282 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
283 typedefs.
284
bf5cbb9e
GA
2852021-01-08 Patrick Palka <ppalka@redhat.com>
286
287 PR c++/98551
288 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
289 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
290
2912021-01-08 Patrick Palka <ppalka@redhat.com>
292
293 PR c++/98515
294 * semantics.c (check_accessibility_of_qualified_id): Punt if
295 we're checking access of a scoped non-static member inside a
296 class template.
297
7d187e4f
GA
2982021-01-07 Jakub Jelinek <jakub@redhat.com>
299
300 PR c++/98329
301 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
302 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
303 its location.
304 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
305
3062021-01-07 Marek Polacek <polacek@redhat.com>
307
308 PR c++/98441
309 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
310 !late_return_type block.
311
3122021-01-07 Jason Merrill <jason@redhat.com>
313
314 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
315 (cxx_eval_store_expression): Add comment.
316
3172021-01-07 Jason Merrill <jason@redhat.com>
318
319 * call.c (has_next): Factor out from...
320 (next_conversion): ...here.
321 (strip_standard_conversion): And here.
322 (is_subseq): And here.
323 (build_conv): Check it.
324 (standard_conversion): Don't call build_conv
325 for ck_identity.
326
942ae5be
GA
3272021-01-06 Martin Sebor <msebor@redhat.com>
328
329 PR c++/95768
330 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
331
651b8a50
GA
3322021-01-05 Patrick Palka <ppalka@redhat.com>
333
334 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
335 the type of the NTTP, substitute into the type again. If the
336 type is still dependent, don't unify the NTTP.
337
3382021-01-05 Jakub Jelinek <jakub@redhat.com>
339
340 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
341 $(CODYLIB) after $(BACKEND).
342
3432021-01-05 Jakub Jelinek <jakub@redhat.com>
344
345 PR c++/98469
346 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
347 Punt if lval is true.
348 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
349 the result if it has a class type.
350
3512021-01-05 Marek Polacek <polacek@redhat.com>
352
353 PR c++/82099
354 * pt.c (resolve_overloaded_unification): Call
355 maybe_instantiate_noexcept after instantiating the function
356 decl.
357
3582021-01-05 Nathan Sidwell <nathan@acm.org>
359
360 * parser.c (cp_parser_module_declaration): Alter diagnostic
361 text to say where is permissable.
362
3632021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
364
365 PR c++/98316
366 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
367
2eacfdbd
GA
3682021-01-02 Jan Hubicka <jh@suse.cz>
369
370 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
371 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
372 * tree.c (cp_tree_c_finish_parsing): New function.
373
b6dd195a
GA
3742021-01-01 Jakub Jelinek <jakub@redhat.com>
375
376 * ChangeLog-2020: Rotate ChangeLog. New file.
377
ad41bd84 378\f
618e665a 379Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
380
381Copying and distribution of this file, with or without modification,
382are permitted in any medium without royalty provided the copyright
383notice and this notice are preserved.