]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[gcc.git] / gcc / cp / ChangeLog
1 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/98841
4 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
5
6 2021-01-28 Jakub Jelinek <jakub@redhat.com>
7
8 PR c++/33661
9 PR c++/98847
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.
14
15 2021-01-28 Nathan Sidwell <nathan@acm.org>
16
17 PR c++/98770
18 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
19 check order.
20 (trees_in::decl_value): Do typedef frobbing only when installing
21 a new typedef, adjust is_matching_decl call. Swap is_typedef
22 & TYPE_NAME check.
23 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
24 names and deal with typedef checking.
25
26 2021-01-27 Jason Merrill <jason@redhat.com>
27
28 PR c++/97874
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.
33
34 2021-01-26 Jason Merrill <jason@redhat.com>
35
36 PR c++/97474
37 * call.c (type_passed_as): Don't mark invisiref restrict.
38
39 2021-01-26 Jason Merrill <jason@redhat.com>
40
41 PR c++/97566
42 PR c++/98463
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.
51
52 2021-01-25 Martin Sebor <msebor@redhat.com>
53
54 PR c++/98646
55 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
56
57 2021-01-25 Jason Merrill <jason@redhat.com>
58
59 PR c++/98463
60 * constexpr.c (get_or_insert_ctor_field): Add check.
61 (cxx_eval_store_expression): Handle discontinuity of refs.
62
63 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
64
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.
72
73 2021-01-23 Patrick Palka <ppalka@redhat.com>
74
75 PR c++/97399
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
79 cp_parser_declarator.
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.
87
88 2021-01-22 Marek Polacek <polacek@redhat.com>
89
90 PR c++/96623
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.
94
95 2021-01-22 Jason Merrill <jason@redhat.com>
96
97 PR c++/98744
98 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
99
100 2021-01-22 Jakub Jelinek <jakub@redhat.com>
101
102 PR sanitizer/95693
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.
107
108 2021-01-22 Marek Polacek <polacek@redhat.com>
109
110 PR c++/98545
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.
115
116 2021-01-22 Marek Polacek <polacek@redhat.com>
117
118 PR c++/97966
119 * pt.c (instantiate_class_template_1): Instantiate members
120 marked with attribute used only after we're done instantiating
121 the class.
122
123 2021-01-21 Patrick Palka <ppalka@redhat.com>
124
125 PR c++/71879
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.
129
130 2021-01-21 Nathan Sidwell <nathan@acm.org>
131
132 PR c++/98624
133 * module.cc (depset::hash::find_dependencies): Add
134 module arg.
135 (trees_out::core_vals): Check state before calling
136 write_location.
137 (sort_cluster, module_state::write): Adjust
138 find_dependencies call.
139
140 2021-01-21 Jakub Jelinek <jakub@redhat.com>
141
142 PR c++/98672
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
154 continue.
155
156 2021-01-21 Nathan Sidwell <nathan@acm.org>
157
158 PR c++/98530
159 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
160
161 2021-01-20 Nathan Sidwell <nathan@acm.org>
162
163 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
164 signed type.
165
166 2021-01-20 Patrick Palka <ppalka@redhat.com>
167
168 PR c++/95434
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.
172
173 2021-01-20 Patrick Palka <ppalka@redhat.com>
174
175 PR c++/82613
176 * parser.c (cp_parser_class_head): Defer access checking when
177 parsing the base-clause until all bases are seen and attached
178 to the class type.
179 * pt.c (instantiate_class_template): Likewise when substituting
180 into dependent bases.
181
182 2021-01-20 Jakub Jelinek <jakub@redhat.com>
183
184 PR c++/98742
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.
188
189 2021-01-19 Marek Polacek <polacek@redhat.com>
190
191 PR c++/98659
192 * pt.c (maybe_instantiate_noexcept): Return false if FN is
193 error_mark_node.
194
195 2021-01-19 Marek Polacek <polacek@redhat.com>
196
197 PR c++/98687
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.
202
203 2021-01-19 Patrick Palka <ppalka@redhat.com>
204
205 PR c++/41437
206 PR c++/58993
207 * search.c (friend_accessible_p): If scope is a hidden friend
208 defined inside a dependent class, consider access from the
209 class.
210 * parser.c (cp_parser_late_parsing_for_member): Don't push a
211 dk_no_check access state.
212
213 2021-01-19 Marek Polacek <polacek@redhat.com>
214
215 PR c++/98333
216 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
217 of NSDMIs before late-parsing of noexcept-specifiers.
218
219 2021-01-19 Nathan Sidwell <nathan@acm.org>
220
221 * module.cc (identifier): Merge overloads.
222
223 2021-01-19 Nathan Sidwell <nathan@acm.org>
224
225 PR c++/98624
226 * module.cc (trees_out::write_location): Make static.
227
228 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
229
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.
237
238 2021-01-15 Nathan Sidwell <nathan@acm.org>
239
240 PR c++/98538
241 * tree.c (cp_build_qualified_type_real): Propagate an array's
242 dependentness to the copy, if known.
243
244 2021-01-15 Jason Merrill <jason@redhat.com>
245
246 PR c++/98642
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
254 list-initialization.
255 * cp-tree.h: Adjust.
256
257 2021-01-15 Jason Merrill <jason@redhat.com>
258
259 * call.c (base_ctor_for, make_base_init_ok): New.
260 (build_over_call): Use make_base_init_ok.
261
262 2021-01-15 Jason Merrill <jason@redhat.com>
263
264 PR c++/63707
265 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
266 if we got a CONSTRUCTOR.
267
268 2021-01-15 Nathan Sidwell <nathan@acm.org>
269
270 PR c++/98591
271 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
272
273 2021-01-14 Jason Merrill <jason@redhat.com>
274
275 * typeck2.c (process_init_constructor_record): Use fldtype
276 variable consistently.
277
278 2021-01-14 Nathan Sidwell <nathan@acm.org>
279
280 PR c++/98372
281 * tree.c (cp_tree_equal): Correct map_context logic.
282
283 2021-01-13 Marek Polacek <polacek@redhat.com>
284
285 PR c++/98231
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.
289
290 2021-01-13 Nathan Sidwell <nathan@acm.org>
291
292 PR c++/98626
293 * module.cc (module_add_import_initializers): Pass a
294 zero-element argument vector.
295
296 2021-01-12 Patrick Palka <ppalka@redhat.com>
297
298 PR c++/98611
299 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
300 the template of a CTAD placeholder.
301
302 2021-01-12 Marek Polacek <polacek@redhat.com>
303
304 PR c++/98620
305 * typeck2.c (process_init_constructor_record): Don't emit
306 -Wmissing-field-initializers warnings in unevaluated contexts.
307
308 2021-01-11 Jakub Jelinek <jakub@redhat.com>
309
310 PR c++/98481
311 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
312 for types.
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
316 typedefs.
317
318 2021-01-08 Patrick Palka <ppalka@redhat.com>
319
320 PR c++/98551
321 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
322 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
323
324 2021-01-08 Patrick Palka <ppalka@redhat.com>
325
326 PR c++/98515
327 * semantics.c (check_accessibility_of_qualified_id): Punt if
328 we're checking access of a scoped non-static member inside a
329 class template.
330
331 2021-01-07 Jakub Jelinek <jakub@redhat.com>
332
333 PR c++/98329
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
336 its location.
337 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
338
339 2021-01-07 Marek Polacek <polacek@redhat.com>
340
341 PR c++/98441
342 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
343 !late_return_type block.
344
345 2021-01-07 Jason Merrill <jason@redhat.com>
346
347 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
348 (cxx_eval_store_expression): Add comment.
349
350 2021-01-07 Jason Merrill <jason@redhat.com>
351
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
358 for ck_identity.
359
360 2021-01-06 Martin Sebor <msebor@redhat.com>
361
362 PR c++/95768
363 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
364
365 2021-01-05 Patrick Palka <ppalka@redhat.com>
366
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.
370
371 2021-01-05 Jakub Jelinek <jakub@redhat.com>
372
373 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
374 $(CODYLIB) after $(BACKEND).
375
376 2021-01-05 Jakub Jelinek <jakub@redhat.com>
377
378 PR c++/98469
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.
383
384 2021-01-05 Marek Polacek <polacek@redhat.com>
385
386 PR c++/82099
387 * pt.c (resolve_overloaded_unification): Call
388 maybe_instantiate_noexcept after instantiating the function
389 decl.
390
391 2021-01-05 Nathan Sidwell <nathan@acm.org>
392
393 * parser.c (cp_parser_module_declaration): Alter diagnostic
394 text to say where is permissable.
395
396 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
397
398 PR c++/98316
399 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
400
401 2021-01-02 Jan Hubicka <jh@suse.cz>
402
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.
406
407 2021-01-01 Jakub Jelinek <jakub@redhat.com>
408
409 * ChangeLog-2020: Rotate ChangeLog. New file.
410
411 \f
412 Copyright (C) 2021 Free Software Foundation, Inc.
413
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.
This page took 0.060712 seconds and 6 git commands to generate.