Daily bump.
[gcc.git] / gcc / cp / ChangeLog
1 2021-01-22 Marek Polacek <polacek@redhat.com>
2
3 PR c++/96623
4 * parser.c (inject_parm_decls): Remove a redundant assignment.
5 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
6 before calling inject_parm_decls.
7
8 2021-01-22 Jason Merrill <jason@redhat.com>
9
10 PR c++/98744
11 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
12
13 2021-01-22 Jakub Jelinek <jakub@redhat.com>
14
15 PR sanitizer/95693
16 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
17 return build_zero_cst for reference types.
18 * typeck2.c (process_init_constructor_record): Instead call
19 build_zero_cst here during error recovery instead of build_zero_init.
20
21 2021-01-22 Marek Polacek <polacek@redhat.com>
22
23 PR c++/98545
24 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
25 warnings regardless of abi_version_at_least.
26 (write_expression): When the expression is a dependent name
27 and an operator name, write "on" before writing its name.
28
29 2021-01-22 Marek Polacek <polacek@redhat.com>
30
31 PR c++/97966
32 * pt.c (instantiate_class_template_1): Instantiate members
33 marked with attribute used only after we're done instantiating
34 the class.
35
36 2021-01-21 Patrick Palka <ppalka@redhat.com>
37
38 PR c++/71879
39 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
40 sentinel at the start of the function. Remove a now-redundant
41 manual adjustment of cp_unevaluated_operand.
42
43 2021-01-21 Nathan Sidwell <nathan@acm.org>
44
45 PR c++/98624
46 * module.cc (depset::hash::find_dependencies): Add
47 module arg.
48 (trees_out::core_vals): Check state before calling
49 write_location.
50 (sort_cluster, module_state::write): Adjust
51 find_dependencies call.
52
53 2021-01-21 Jakub Jelinek <jakub@redhat.com>
54
55 PR c++/98672
56 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
57 (check_for_return_continue): Also look for BREAK_STMT. Handle
58 SWITCH_STMT by ignoring break_stmt from its body.
59 (potential_constant_expression_1) <case FOR_STMT>,
60 <case WHILE_STMT>: If the condition isn't constant true, check if
61 the loop body can contain a return stmt.
62 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
63 <case IF_STMT>: If recursion with tf_none is successful,
64 merge *jump_target from the branches - returns with highest priority,
65 breaks or continues lower. If then branch is potentially constant and
66 doesn't return, check the else branch if it could return, break or
67 continue.
68
69 2021-01-21 Nathan Sidwell <nathan@acm.org>
70
71 PR c++/98530
72 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
73
74 2021-01-20 Nathan Sidwell <nathan@acm.org>
75
76 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
77 signed type.
78
79 2021-01-20 Patrick Palka <ppalka@redhat.com>
80
81 PR c++/95434
82 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
83 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
84 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
85
86 2021-01-20 Patrick Palka <ppalka@redhat.com>
87
88 PR c++/82613
89 * parser.c (cp_parser_class_head): Defer access checking when
90 parsing the base-clause until all bases are seen and attached
91 to the class type.
92 * pt.c (instantiate_class_template): Likewise when substituting
93 into dependent bases.
94
95 2021-01-20 Jakub Jelinek <jakub@redhat.com>
96
97 PR c++/98742
98 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
99 error_operand_p, remove clause without further checking. Check
100 for non-NULL TYPE_NAME.
101
102 2021-01-19 Marek Polacek <polacek@redhat.com>
103
104 PR c++/98659
105 * pt.c (maybe_instantiate_noexcept): Return false if FN is
106 error_mark_node.
107
108 2021-01-19 Marek Polacek <polacek@redhat.com>
109
110 PR c++/98687
111 * name-lookup.c (push_using_decl_bindings): New, broken out of...
112 (finish_nonmember_using_decl): ...here.
113 * name-lookup.h (push_using_decl_bindings): Update declaration.
114 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
115
116 2021-01-19 Patrick Palka <ppalka@redhat.com>
117
118 PR c++/41437
119 PR c++/58993
120 * search.c (friend_accessible_p): If scope is a hidden friend
121 defined inside a dependent class, consider access from the
122 class.
123 * parser.c (cp_parser_late_parsing_for_member): Don't push a
124 dk_no_check access state.
125
126 2021-01-19 Marek Polacek <polacek@redhat.com>
127
128 PR c++/98333
129 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
130 of NSDMIs before late-parsing of noexcept-specifiers.
131
132 2021-01-19 Nathan Sidwell <nathan@acm.org>
133
134 * module.cc (identifier): Merge overloads.
135
136 2021-01-19 Nathan Sidwell <nathan@acm.org>
137
138 PR c++/98624
139 * module.cc (trees_out::write_location): Make static.
140
141 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
142
143 * parser.c (cp_parser_omp_clause_detach): New.
144 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
145 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
146 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
147 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
148 Prevent use of detach with mergeable and overriding the data sharing
149 mode of the event handle.
150
151 2021-01-15 Nathan Sidwell <nathan@acm.org>
152
153 PR c++/98538
154 * tree.c (cp_build_qualified_type_real): Propagate an array's
155 dependentness to the copy, if known.
156
157 2021-01-15 Jason Merrill <jason@redhat.com>
158
159 PR c++/98642
160 * call.c (unsafe_return_slot_p): Return int.
161 (init_by_return_slot_p): Split out from...
162 (unsafe_copy_elision_p): ...here.
163 (unsafe_copy_elision_p_opt): New name for old meaning.
164 (build_over_call): Adjust.
165 (make_safe_copy_elision): New.
166 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
167 list-initialization.
168 * cp-tree.h: Adjust.
169
170 2021-01-15 Jason Merrill <jason@redhat.com>
171
172 * call.c (base_ctor_for, make_base_init_ok): New.
173 (build_over_call): Use make_base_init_ok.
174
175 2021-01-15 Jason Merrill <jason@redhat.com>
176
177 PR c++/63707
178 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
179 if we got a CONSTRUCTOR.
180
181 2021-01-15 Nathan Sidwell <nathan@acm.org>
182
183 PR c++/98591
184 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
185
186 2021-01-14 Jason Merrill <jason@redhat.com>
187
188 * typeck2.c (process_init_constructor_record): Use fldtype
189 variable consistently.
190
191 2021-01-14 Nathan Sidwell <nathan@acm.org>
192
193 PR c++/98372
194 * tree.c (cp_tree_equal): Correct map_context logic.
195
196 2021-01-13 Marek Polacek <polacek@redhat.com>
197
198 PR c++/98231
199 * name-lookup.c (push_using_decl_bindings): New.
200 * name-lookup.h (push_using_decl_bindings): Declare.
201 * pt.c (tsubst_expr): Call push_using_decl_bindings.
202
203 2021-01-13 Nathan Sidwell <nathan@acm.org>
204
205 PR c++/98626
206 * module.cc (module_add_import_initializers): Pass a
207 zero-element argument vector.
208
209 2021-01-12 Patrick Palka <ppalka@redhat.com>
210
211 PR c++/98611
212 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
213 the template of a CTAD placeholder.
214
215 2021-01-12 Marek Polacek <polacek@redhat.com>
216
217 PR c++/98620
218 * typeck2.c (process_init_constructor_record): Don't emit
219 -Wmissing-field-initializers warnings in unevaluated contexts.
220
221 2021-01-11 Jakub Jelinek <jakub@redhat.com>
222
223 PR c++/98481
224 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
225 for types.
226 (mark_abi_tags_r): Likewise.
227 * decl2.c (min_vis_r): Likewise.
228 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
229 typedefs.
230
231 2021-01-08 Patrick Palka <ppalka@redhat.com>
232
233 PR c++/98551
234 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
235 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
236
237 2021-01-08 Patrick Palka <ppalka@redhat.com>
238
239 PR c++/98515
240 * semantics.c (check_accessibility_of_qualified_id): Punt if
241 we're checking access of a scoped non-static member inside a
242 class template.
243
244 2021-01-07 Jakub Jelinek <jakub@redhat.com>
245
246 PR c++/98329
247 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
248 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
249 its location.
250 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
251
252 2021-01-07 Marek Polacek <polacek@redhat.com>
253
254 PR c++/98441
255 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
256 !late_return_type block.
257
258 2021-01-07 Jason Merrill <jason@redhat.com>
259
260 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
261 (cxx_eval_store_expression): Add comment.
262
263 2021-01-07 Jason Merrill <jason@redhat.com>
264
265 * call.c (has_next): Factor out from...
266 (next_conversion): ...here.
267 (strip_standard_conversion): And here.
268 (is_subseq): And here.
269 (build_conv): Check it.
270 (standard_conversion): Don't call build_conv
271 for ck_identity.
272
273 2021-01-06 Martin Sebor <msebor@redhat.com>
274
275 PR c++/95768
276 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
277
278 2021-01-05 Patrick Palka <ppalka@redhat.com>
279
280 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
281 the type of the NTTP, substitute into the type again. If the
282 type is still dependent, don't unify the NTTP.
283
284 2021-01-05 Jakub Jelinek <jakub@redhat.com>
285
286 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
287 $(CODYLIB) after $(BACKEND).
288
289 2021-01-05 Jakub Jelinek <jakub@redhat.com>
290
291 PR c++/98469
292 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
293 Punt if lval is true.
294 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
295 the result if it has a class type.
296
297 2021-01-05 Marek Polacek <polacek@redhat.com>
298
299 PR c++/82099
300 * pt.c (resolve_overloaded_unification): Call
301 maybe_instantiate_noexcept after instantiating the function
302 decl.
303
304 2021-01-05 Nathan Sidwell <nathan@acm.org>
305
306 * parser.c (cp_parser_module_declaration): Alter diagnostic
307 text to say where is permissable.
308
309 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
310
311 PR c++/98316
312 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
313
314 2021-01-02 Jan Hubicka <jh@suse.cz>
315
316 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
317 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
318 * tree.c (cp_tree_c_finish_parsing): New function.
319
320 2021-01-01 Jakub Jelinek <jakub@redhat.com>
321
322 * ChangeLog-2020: Rotate ChangeLog. New file.
323
324 \f
325 Copyright (C) 2021 Free Software Foundation, Inc.
326
327 Copying and distribution of this file, with or without modification,
328 are permitted in any medium without royalty provided the copyright
329 notice and this notice are preserved.