]>
Commit | Line | Data |
---|---|---|
247bbed1 GA |
1 | 2022-04-13 Jason Merrill <jason@redhat.com> |
2 | ||
3 | PR c++/105245 | |
4 | PR c++/100111 | |
5 | * constexpr.cc (cxx_eval_store_expression): Build a CONSTRUCTOR | |
6 | as needed in empty base handling. | |
7 | ||
8 | 2022-04-13 Jakub Jelinek <jakub@redhat.com> | |
9 | ||
10 | PR c++/105233 | |
11 | * decl2.cc (cp_check_const_attributes): For aligned attribute | |
12 | pass manifestly_const_eval=true to fold_non_dependent_expr. | |
13 | ||
14 | 2022-04-13 Marek Polacek <polacek@redhat.com> | |
15 | ||
16 | PR c++/97296 | |
17 | * call.cc (direct_reference_binding): strip_top_quals when creating | |
18 | a ck_qual. | |
19 | ||
504dae1d GA |
20 | 2022-04-12 Jason Merrill <jason@redhat.com> |
21 | ||
22 | PR c++/104669 | |
23 | * decl.cc (decls_match): Compare versions even if not recording. | |
24 | (duplicate_decls): Propagate attributes to alias. | |
25 | * decl2.cc (find_last_decl): Give up if versioned. | |
26 | ||
27 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
28 | ||
29 | PR c++/102071 | |
30 | * init.cc (build_new_1): Check array_p for alignment. | |
31 | ||
32 | 2022-04-12 Patrick Palka <ppalka@redhat.com> | |
33 | ||
34 | PR c++/103105 | |
35 | * pt.cc (build_extra_args): Call preserve_args. | |
36 | ||
37 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
38 | ||
39 | PR c++/104142 | |
40 | * decl.cc (check_initializer): Check TREE_SIDE_EFFECTS. | |
41 | ||
42 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
43 | ||
44 | PR c++/105223 | |
45 | PR c++/92918 | |
46 | * class.cc (finish_struct): Always using op=. | |
47 | ||
da066c42 GA |
48 | 2022-04-11 Jason Merrill <jason@redhat.com> |
49 | ||
50 | PR c++/98249 | |
51 | * call.cc (build_operator_new_call): Just look in ::. | |
52 | ||
53 | 2022-04-11 Alexandre Oliva <oliva@adacore.com> | |
54 | ||
55 | * constexpr.cc (cxx_eval_call_expression): Disregard dtor | |
56 | result. | |
57 | ||
58 | 2022-04-11 Alexandre Oliva <oliva@adacore.com> | |
59 | ||
60 | * semantics.cc (set_cleanup_locs): Propagate locus to call | |
61 | wrapped in cast-to-void. | |
62 | ||
63 | 2022-04-11 Jason Merrill <jason@redhat.com> | |
64 | ||
65 | PR c++/100370 | |
66 | * init.cc (warn_placement_new_too_small): Check deref. | |
67 | ||
71cac7de GA |
68 | 2022-04-09 Jason Merrill <jason@redhat.com> |
69 | ||
70 | PR c++/105191 | |
71 | PR c++/92385 | |
72 | * tree.cc (build_vec_init_elt): Do {}-init for aggregates. | |
73 | * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init | |
74 | for non-aggregate types. | |
75 | (build_vec_init_expr): Also check constancy of explicit | |
76 | initializer elements. | |
77 | ||
78 | 2022-04-09 Jason Merrill <jason@redhat.com> | |
79 | ||
80 | PR c++/91618 | |
81 | PR c++/96604 | |
82 | * name-lookup.cc (set_decl_namespace): Set | |
83 | DECL_IMPLICIT_INSTANTIATION if no non-template match. | |
84 | * pt.cc (check_explicit_specialization): Check it. | |
85 | * decl2.cc (check_classfn): Call it. | |
86 | ||
df00d103 GA |
87 | 2022-04-07 Patrick Palka <ppalka@redhat.com> |
88 | ||
89 | PR c++/99479 | |
90 | * name-lookup.cc (name_lookup::using_queue): Change to an | |
91 | auto_vec (with 16 elements of internal storage). | |
92 | (name_lookup::queue_namespace): Change return type to void, | |
93 | take queue parameter by reference and adjust function body | |
94 | accordingly. | |
95 | (name_lookup::do_queue_usings): Inline into ... | |
96 | (name_lookup::queue_usings): ... here. As in queue_namespace. | |
97 | (name_lookup::search_unqualified): Don't make queue static, | |
98 | remove length variable, and adjust function body accordingly. | |
99 | ||
100 | 2022-04-07 Jakub Jelinek <jakub@redhat.com> | |
101 | ||
102 | PR tree-optimization/102586 | |
103 | * cp-objcp-common.h (cp_classtype_as_base): Declare. | |
104 | (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine. | |
105 | * cp-objcp-common.cc (cp_classtype_as_base): New function. | |
106 | ||
107 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
108 | ||
109 | PR c++/101051 | |
110 | * decl.cc (grokdeclarator): Reject conversion with trailing return | |
111 | sooner. | |
112 | ||
113 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
114 | ||
115 | PR c++/101717 | |
116 | * lambda.cc (lambda_expr_this_capture): Check all enclosing | |
117 | lambdas for completeness. | |
118 | ||
119 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
120 | ||
121 | PR c++/105187 | |
122 | * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for | |
123 | vectors. | |
124 | ||
80eb8ec6 GA |
125 | 2022-04-06 Jakub Jelinek <jakub@redhat.com> |
126 | ||
127 | PR c++/104668 | |
128 | * decl2.cc (splice_template_attributes): Return NULL if *p is | |
129 | error_mark_node. | |
130 | (cplus_decl_attributes): Return early if attributes is | |
131 | error_mark_node. Don't check that later. | |
132 | ||
133 | 2022-04-06 Patrick Palka <ppalka@redhat.com> | |
134 | ||
135 | PR c++/105143 | |
136 | * pt.cc (do_class_deduction): Check complain before attempting | |
137 | to issue a -Wctad-maybe-unsupported warning. | |
138 | ||
139 | 2022-04-06 Jason Merrill <jason@redhat.com> | |
140 | ||
141 | PR c++/104702 | |
142 | * init.cc (build_vec_init): Use a reference for the result. | |
143 | ||
144 | 2022-04-06 Jason Merrill <jason@redhat.com> | |
145 | ||
146 | PR c++/100608 | |
147 | * name-lookup.cc (check_local_shadow): Use -Wshadow=local | |
148 | if exactly one of 'old' and 'decl' is a type. | |
149 | ||
9d84ed68 GA |
150 | 2022-04-05 Jason Merrill <jason@redhat.com> |
151 | ||
152 | PR c++/103852 | |
153 | DR 1286 | |
154 | * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17. | |
155 | ||
156 | 2022-04-05 Jason Merrill <jason@redhat.com> | |
157 | ||
158 | PR c++/101677 | |
159 | * name-lookup.h (struct cp_binding_level): Add requires_expression | |
160 | bit-field. | |
161 | * parser.cc (cp_parser_requires_expression): Set it. | |
162 | (synthesize_implicit_template_parm): Check it. | |
163 | ||
5e09bb1b GA |
164 | 2022-04-04 Jason Merrill <jason@redhat.com> |
165 | ||
166 | PR c++/101894 | |
167 | * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT. | |
168 | ||
169 | 2022-04-04 Jason Merrill <jason@redhat.com> | |
170 | ||
171 | PR c++/103852 | |
172 | DR 1286 | |
173 | * pt.cc (get_underlying_template): Compare default template args. | |
174 | ||
8af4270d GA |
175 | 2022-04-03 Benno Evers <benno.evers@tenzir.com> |
176 | Iain Sandoe <iain@sandoe.co.uk> | |
177 | ||
178 | PR c++/103328 | |
179 | * coroutines.cc (morph_fn_to_coro): Reset | |
180 | current_binding_level->blocks. | |
181 | ||
447ac3c5 ML |
182 | 2022-04-01 Jason Merrill <jason@redhat.com> |
183 | ||
184 | Revert: | |
185 | 2022-03-31 Jason Merrill <jason@redhat.com> | |
186 | ||
187 | PR c++/96645 | |
188 | * parser.cc (cp_parser_early_parsing_nsdmi): New. | |
189 | (cp_parser_member_declaration): Call it. | |
190 | ||
191 | 2022-04-01 Jason Merrill <jason@redhat.com> | |
192 | ||
193 | Revert: | |
194 | 2022-03-24 Jason Merrill <jason@redhat.com> | |
195 | ||
196 | PR c++/96645 | |
197 | * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. | |
198 | * class.cc (type_has_default_ctor_to_be_synthesized): New. | |
199 | (type_has_non_user_provided_default_constructor_1): Support it. | |
200 | (type_has_non_user_provided_default_constructor): Now a wrapper. | |
201 | * method.cc (complain_about_unparsed_dmi): New. | |
202 | (constructible_expr): Call it. | |
203 | ||
8af4270d GA |
204 | 2022-04-01 Patrick Palka <ppalka@redhat.com> |
205 | ||
206 | PR c++/105110 | |
207 | * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from | |
208 | the argument type of an NTTP before deducing from it. | |
209 | ||
57ad4462 GA |
210 | 2022-03-31 Jason Merrill <jason@redhat.com> |
211 | ||
212 | PR c++/96645 | |
213 | * parser.cc (cp_parser_early_parsing_nsdmi): New. | |
214 | (cp_parser_member_declaration): Call it. | |
215 | ||
150ab50f GA |
216 | 2022-03-30 Patrick Palka <ppalka@redhat.com> |
217 | ||
218 | PR c++/100474 | |
219 | * constraint.cc (diagnose_trait_expr): Handle all remaining | |
220 | traits appropriately. Remove default case. | |
221 | ||
222 | 2022-03-30 Marek Polacek <polacek@redhat.com> | |
223 | ||
224 | PR c++/93280 | |
225 | PR c++/104583 | |
226 | * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor. | |
227 | ||
228 | 2022-03-30 Jakub Jelinek <jakub@redhat.com> | |
229 | ||
230 | PR c++/105092 | |
231 | * pt.cc (tsubst_omp_clause_decl): When handling iterators, set | |
232 | DECL_CONTEXT of the iterator var to current_function_decl and | |
233 | call pushdecl. | |
234 | ||
235 | 2022-03-30 Jakub Jelinek <jakub@redhat.com> | |
236 | ||
237 | PR c++/105061 | |
238 | * parser.cc (cp_parser_template_introduction): If member_p, temporarily | |
239 | clear parser->colon_corrects_to_scope_p around tentative parsing of | |
240 | nested name specifier. | |
241 | ||
aab0127d GA |
242 | 2022-03-28 Jason Merrill <jason@redhat.com> |
243 | ||
244 | * pt.cc (determine_specialization): Add comment. | |
245 | ||
246 | 2022-03-28 Patrick Palka <ppalka@redhat.com> | |
247 | ||
248 | PR c++/105067 | |
249 | * pt.cc (finish_concept_definition): Check that a concept is | |
250 | declared with exactly one template parameter list. | |
251 | ||
252 | 2022-03-28 Patrick Palka <ppalka@redhat.com> | |
253 | ||
254 | PR c++/105064 | |
255 | * constraint.cc (maybe_substitute_reqs_for): Don't assume | |
256 | DECL_TEMPLATE_INFO is available. | |
257 | ||
258 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
259 | ||
260 | PR c++/105003 | |
261 | PR c++/104008 | |
262 | PR c++/102869 | |
263 | * pt.cc (complex_alias_template_r): walk_tree callback, replacing | |
264 | uses_all_template_parms_r, complex_pack_expansion_r. | |
265 | (complex_alias_template_p): Adjust. | |
266 | * tree.cc (strip_typedefs): Revert r12-7710 change. | |
267 | ||
268 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
269 | ||
270 | PR c++/102071 | |
271 | * init.cc (build_new_1): Include cookie in alignment. Omit | |
272 | constexpr wrapper from alloc_call. | |
273 | ||
274 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
275 | ||
276 | PR c++/103291 | |
277 | * name-lookup.cc (push_local_extern_decl_alias): Call | |
278 | determine_visibility. | |
279 | ||
280 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
281 | ||
282 | PR c++/102123 | |
283 | * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting | |
284 | a type template reference. | |
285 | ||
286 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
287 | ||
288 | PR c++/103968 | |
289 | * pt.cc (value_dependent_expression_p): Check | |
290 | has_value_dependent_address for conversion to reference. | |
291 | ||
292 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
293 | ||
294 | PR c++/103943 | |
295 | * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from | |
296 | tsubst_baselink. | |
297 | (instantiation_dependent_scope_ref_p): Check dependent_scope_p. | |
298 | ||
299 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
300 | ||
301 | PR c++/102045 | |
302 | * call.cc (make_base_init_ok): Call make_used. | |
303 | ||
304 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
305 | ||
306 | PR c++/104847 | |
307 | * mangle.cc (write_expression): Don't write a union designator when | |
308 | undigested. | |
309 | ||
310 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
311 | ||
312 | PR c++/99445 | |
313 | PR c++/103769 | |
314 | * tree.cc (strip_typedefs): Use build_distinct_type_copy. | |
315 | ||
d2906412 GA |
316 | 2022-03-26 Patrick Palka <ppalka@redhat.com> |
317 | ||
318 | PR c++/105050 | |
319 | * constexpr.cc (potential_constant_expression_1) <case IF_STMT>: | |
320 | Clarify error message when a if-stmt is non-constant because its | |
321 | branches are non-constant. | |
322 | ||
323 | 2022-03-26 Patrick Palka <ppalka@redhat.com> | |
324 | ||
325 | PR c++/103455 | |
326 | * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test | |
327 | CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P. | |
328 | ||
31e989a2 GA |
329 | 2022-03-26 Jakub Jelinek <jakub@redhat.com> |
330 | ||
331 | * parser.cc (cp_parser_postfix_expression) | |
332 | <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't | |
333 | return cp_build_{vec,convert,bit_cast} result right away, instead | |
334 | set postfix_expression to it and break. | |
335 | ||
336 | 2022-03-25 Marek Polacek <polacek@redhat.com> | |
337 | ||
338 | PR c++/104944 | |
339 | * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void). | |
340 | (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with | |
341 | complain == true. | |
342 | ||
6fc4a993 GA |
343 | 2022-03-24 Marek Polacek <polacek@redhat.com> |
344 | ||
345 | PR c++/104284 | |
346 | * decl.cc (check_initializer): Don't call build_aggr_init in | |
347 | a template. | |
348 | ||
349 | 2022-03-24 Jason Merrill <jason@redhat.com> | |
350 | ||
351 | PR c++/96645 | |
352 | * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. | |
353 | * class.cc (type_has_default_ctor_to_be_synthesized): New. | |
354 | (type_has_non_user_provided_default_constructor_1): Support it. | |
355 | (type_has_non_user_provided_default_constructor): Now a wrapper. | |
356 | * method.cc (complain_about_unparsed_dmi): New. | |
357 | (constructible_expr): Call it. | |
358 | ||
359 | 2022-03-24 Marek Polacek <polacek@redhat.com> | |
360 | ||
361 | PR c++/102990 | |
362 | * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs. | |
363 | ||
364 | 2022-03-24 Patrick Palka <ppalka@redhat.com> | |
365 | ||
366 | PR c++/104620 | |
367 | * call.cc (build_over_call): Use cxx_constant_value_sfinae | |
368 | instead of cxx_constant_value to evaluate a consteval call. | |
369 | * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter | |
370 | and pass it to cxx_eval_outermost_constant_expr. | |
371 | * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter. | |
372 | * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to | |
373 | cxx_constant_value_sfinae. | |
374 | ||
375 | 2022-03-24 Jakub Jelinek <jakub@redhat.com> | |
376 | ||
377 | PR c++/104994 | |
378 | * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing | |
379 | through extern thread_local declarations. Change wording from | |
380 | declaration to definition. | |
381 | (potential_constant_expression_1): Don't diagnose extern thread_local | |
382 | declarations. Change wording from declared to defined. | |
383 | * decl.cc (start_decl): Likewise. | |
384 | ||
d1ca63a1 GA |
385 | 2022-03-23 Jason Merrill <jason@redhat.com> |
386 | ||
387 | PR c++/103337 | |
388 | * decl.cc (reshape_single_init): New. | |
389 | (reshape_init_class): Use it. | |
390 | ||
391 | 2022-03-23 Jason Merrill <jason@redhat.com> | |
392 | ||
393 | PR c++/105006 | |
394 | * name-lookup.cc (lookup_using_decl): Check that scope is | |
395 | a dependent type before looking for dependent using. | |
396 | ||
397 | 2022-03-23 Jason Merrill <jason@redhat.com> | |
398 | ||
399 | PR c++/105006 | |
400 | * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup | |
401 | finds a dependent using. | |
402 | ||
d156bb87 GA |
403 | 2022-03-21 Jason Merrill <jason@redhat.com> |
404 | ||
405 | PR c++/58646 | |
406 | * init.cc (build_vec_init): Check for vla element type. | |
407 | ||
408 | 2022-03-21 Jason Merrill <jason@redhat.com> | |
409 | ||
410 | PR c++/103337 | |
411 | PR c++/102740 | |
412 | PR c++/103299 | |
413 | PR c++/102538 | |
414 | * decl.cc (reshape_init_class): Avoid looking for designator | |
415 | after we found it. | |
416 | (reshape_init_r): Keep looking for designator. | |
417 | ||
418 | 2022-03-21 Jason Merrill <jason@redhat.com> | |
419 | ||
420 | PR c++/101767 | |
421 | * decl.cc (reshape_init_class): Back out of anon struct | |
422 | if a designator doesn't match. | |
423 | ||
8ca61ad1 GA |
424 | 2022-03-18 Jason Merrill <jason@redhat.com> |
425 | ||
426 | PR c++/92918 | |
427 | PR c++/104476 | |
428 | * class.cc (add_method): Avoid adding the same used function twice. | |
429 | (handle_using_decl): Don't add_method. | |
430 | (finish_struct): Don't using op= if we have one already. | |
431 | (maybe_push_used_methods): New. | |
432 | * semantics.cc (finish_member_declaration): Call it. | |
433 | * name-lookup.cc (diagnose_name_conflict): No longer static. | |
434 | (push_class_level_binding): Revert 92918 patch, limit | |
435 | to dependent using. | |
436 | * cp-tree.h: Adjust. | |
437 | ||
438 | 2022-03-18 Jakub Jelinek <jakub@redhat.com> | |
439 | ||
440 | PR c++/104568 | |
441 | * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE | |
442 | argument and its handling, instead add ITYPE2 argument. Only | |
443 | support COOKIE_SIZE != NULL. | |
444 | (build_new_1): If size is 0, change it to 0 * outer_nelts if | |
445 | outer_nelts is non-NULL. Pass type rather than elt_type to | |
446 | maybe_wrap_new_for_constexpr. | |
447 | * constexpr.cc (build_new_constexpr_heap_type): New function. | |
448 | (cxx_eval_constant_expression) <case CONVERT_EXPR>: | |
449 | If elt_size is zero sized type, try to recover outer_nelts from | |
450 | the size argument to operator new/new[] and pass that as | |
451 | arg_size to build_new_constexpr_heap_type. Pass ctx, | |
452 | non_constant_p and overflow_p to that call too. | |
453 | ||
454 | 2022-03-18 Marek Polacek <polacek@redhat.com> | |
455 | ||
456 | PR c++/104008 | |
457 | * tree.cc (strip_typedefs): Don't strip an alias template when | |
458 | doing so would result in losing a parameter pack. | |
459 | ||
9fc8f278 GA |
460 | 2022-03-16 Patrick Palka <ppalka@redhat.com> |
461 | ||
462 | * search.cc (lookup_member): Simplify by handling all values | |
463 | of protect together in the ambiguous case. Don't modify protect. | |
464 | ||
465 | 2022-03-16 Patrick Palka <ppalka@redhat.com> | |
466 | ||
467 | PR c++/96780 | |
468 | * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to | |
469 | std::move/forward and other cast-like functions into simple | |
470 | casts. | |
471 | ||
14d2ac82 GA |
472 | 2022-03-15 Patrick Palka <ppalka@redhat.com> |
473 | ||
474 | PR c++/103177 | |
475 | * search.cc (lookup_field_info::errstr): Remove this data | |
476 | member. | |
477 | (lookup_field_r): Don't set errstr. | |
478 | (lookup_member): Check ambiguity before checking access. | |
479 | Simplify accordingly after errstr removal. Exit early upon | |
480 | error or empty result. | |
481 | ||
482 | 2022-03-15 Jakub Jelinek <jakub@redhat.com> | |
483 | ||
484 | PR c++/104623 | |
485 | * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens. | |
486 | ||
510613e7 GA |
487 | 2022-03-14 Jakub Jelinek <jakub@redhat.com> |
488 | ||
489 | PR tree-optimization/102586 | |
490 | * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where | |
491 | first argument's type is pointer to non-trivially-copyable type unless | |
492 | it is address of a variable or parameter. | |
493 | ||
57eeedda GA |
494 | 2022-03-12 Patrick Palka <ppalka@redhat.com> |
495 | ||
496 | PR c++/104641 | |
497 | * cp-tree.h (tsubst_flags::tf_tst_ok): New flag. | |
498 | * decl.cc (make_typename_type): Allow a typename-specifier to | |
499 | resolve to a template when tf_tst_ok, in which case return | |
500 | a CTAD placeholder for the template. | |
501 | * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when | |
502 | substituting the type. | |
503 | (tsubst): Clear tf_tst_ok and remember if it was set. | |
504 | <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type | |
505 | appropriately. | |
506 | (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting | |
507 | the type. | |
508 | (tsubst_copy_and_build) <case CAST_EXPR>: Likewise. | |
509 | <case CONSTRUCTOR>: Likewise. | |
510 | ||
511 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
512 | ||
513 | PR c++/104622 | |
514 | * call.cc (missing_conversion_p): Define. | |
515 | (add_candidates): Use it. | |
516 | * pt.cc (check_non_deducible_conversion): Change type of strict | |
517 | parameter to unification_kind_t and directly test for DEDUCE_CALL. | |
518 | ||
519 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
520 | ||
521 | PR c++/104527 | |
522 | * constraint.cc (normalize_atom): Set | |
523 | ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately. | |
524 | (get_mapped_args): Make static, adjust parameters. Always | |
525 | return a vector whose depth corresponds to the template depth of | |
526 | the context of the atomic constraint expression. Micro-optimize | |
527 | by passing false as exact to safe_grow_cleared and by collapsing | |
528 | a multi-level depth-one argument vector. | |
529 | (satisfy_atom): Adjust call to get_mapped_args and | |
530 | diagnose_atomic_constraint. | |
531 | (diagnose_atomic_constraint): Replace map parameter with an args | |
532 | parameter. | |
533 | * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define. | |
534 | (get_mapped_args): Remove declaration. | |
535 | ||
536 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
537 | Jason Merrill <jason@redhat.com> | |
538 | ||
539 | PR c++/98644 | |
540 | * constexpr.cc (mark_non_constant): Define, split out from ... | |
541 | (cxx_eval_outermost_constant_expr): ... here. | |
542 | (maybe_constant_value): Use it. | |
543 | ||
544 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
545 | ||
546 | * semantics.cc (finish_unary_fold_expr): Use input_location | |
547 | instead of UNKNOWN_LOCATION. | |
548 | (finish_binary_fold_expr): Likewise. | |
549 | ||
550 | 2022-03-12 Thomas Schwinge <thomas@codesourcery.com> | |
551 | ||
552 | PR other/65095 | |
553 | * semantics.cc (handle_omp_array_sections_1) | |
554 | (cp_oacc_check_attachments): Call 'user_omp_clause_code_name' | |
555 | instead of 'c_omp_map_clause_name'. | |
556 | ||
5e28be89 GA |
557 | 2022-03-10 Marek Polacek <polacek@redhat.com> |
558 | ||
559 | PR c++/104608 | |
560 | * parser.cc (cp_parser_template_name): Repeat lookup of | |
561 | TYPE_DECLs. | |
562 | ||
563 | 2022-03-10 Marek Polacek <polacek@redhat.com> | |
564 | ||
565 | PR c++/104752 | |
566 | * semantics.cc (finish_compound_literal): Disallow auto{x} for | |
567 | is_constrained_auto. | |
568 | * typeck2.cc (build_functional_cast_1): Likewise. | |
569 | ||
570 | 2022-03-10 Marek Polacek <polacek@redhat.com> | |
571 | ||
572 | PR c++/104846 | |
573 | * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving | |
574 | data member errors. | |
575 | ||
576 | 2022-03-10 Jakub Jelinek <jakub@redhat.com> | |
577 | ||
578 | PR c++/103460 | |
579 | * decl.cc (grok_op_properties): Allow variadic operator[] for | |
580 | C++23. | |
581 | ||
582 | 2022-03-10 Roger Sayle <roger@nextmovesoftware.com> | |
583 | ||
584 | PR c++/95999 | |
585 | * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST | |
586 | consider it to be zero (i.e. treat it like error_mark_node). | |
587 | (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST, | |
588 | set VALUE to error_mark_node. | |
589 | ||
590 | 2022-03-10 Roger Sayle <roger@nextmovesoftware.com> | |
591 | ||
592 | PR c++/39751 | |
593 | * parser.cc (cp_parser_late_parsing_for_member): Confirm the token | |
594 | stream hasn't been purged before processing DECL_PENDING_INLINE. | |
595 | ||
8cc4f9cd GA |
596 | 2022-03-09 Patrick Palka <ppalka@redhat.com> |
597 | ||
598 | PR c++/104823 | |
599 | * except.cc (build_noexcept_spec): Strengthen dependence check | |
600 | to instantiation_dependent_expression_p. | |
601 | * parser.cc (cp_parser_parenthesized_expression_list_elt): | |
602 | Remove fold_expr_p parameter, and don't call | |
603 | instantiate_non_dependent_expr. | |
604 | (cp_parser_parenthesized_expression_list): Adjust accordingly. | |
605 | * pt.cc (expand_integer_pack): Strengthen dependence check | |
606 | to instantiation_dependent_expression_p. | |
607 | (instantiate_non_dependent_expr_internal): Adjust comment. | |
608 | (instantiate_non_dependent_expr_sfinae): Likewise. Drop | |
609 | the potentially-constant check, and relax and turn the | |
610 | dependence check into a checking assert. | |
611 | (instantiate_non_dependent_or_null): Adjust comment. | |
612 | * semantics.cc (finish_decltype_type): Keep | |
613 | processing_template_decl cleared after calling | |
614 | instantiate_non_dependent_expr_sfinae. | |
615 | ||
616 | 2022-03-09 Patrick Palka <ppalka@redhat.com> | |
617 | ||
618 | PR c++/102137 | |
619 | PR c++/87820 | |
620 | * cp-tree.h (is_copy_initialization): Declare. | |
621 | * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING | |
622 | when is_copy_initialization is true. | |
623 | * init.cc (build_aggr_init): Split out copy-initialization | |
624 | check into ... | |
625 | (is_copy_initialization): ... here. | |
626 | * pt.cc (instantiate_decl): Pass 0 instead of | |
627 | LOOKUP_ONLYCONVERTING as flags to cp_finish_decl. | |
628 | ||
629 | 2022-03-09 Patrick Palka <ppalka@redhat.com> | |
630 | ||
631 | PR c++/65396 | |
632 | * cp-tree.h (merge_default_template_args): Declare. | |
633 | * decl.cc (merge_default_template_args): Define, factored out | |
634 | from redeclare_class_template. | |
635 | (duplicate_decls): Use it when merging member function template | |
636 | and free function declarations. | |
637 | * pt.cc (redeclare_class_template): Factor out default argument | |
638 | merging logic into merge_default_template_args. Improve location | |
639 | of a note when there's a template parameter kind mismatch. | |
640 | ||
641 | 2022-03-09 Jakub Jelinek <jakub@redhat.com> | |
642 | ||
643 | PR c/104711 | |
644 | * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS | |
645 | instead of TYPE_UNSIGNED. | |
646 | * typeck.cc (cp_build_binary_op): Don't emit | |
647 | -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS. | |
648 | ||
8d038a84 GA |
649 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> |
650 | ||
651 | PR c++/96440 | |
652 | * decl.cc (start_decl): Defend against prefix_attributes being | |
653 | error_mark_node. | |
654 | ||
655 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> | |
656 | ||
657 | PR c++/96437 | |
658 | * parser.cc (synthesize_implicit_template_parm): Check that | |
659 | TREE_VALUE (new_parm) isn't error_mark_node before setting its | |
660 | DECL_VIRTUAL_P. | |
661 | ||
662 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> | |
663 | ||
664 | PR c++/96329 | |
665 | * parser.cc (cp_parser_linkage_specification): Treat the case where | |
666 | linkage is error_mark_node as "invalid linkage-specification". | |
667 | ||
668 | 2022-03-08 Marek Polacek <polacek@redhat.com> | |
669 | ||
670 | PR c++/104108 | |
671 | * pt.cc (convert_nontype_argument): Recompute | |
672 | value_dependent_expression_p after build_converted_constant_expr. | |
673 | ||
674 | 2022-03-08 Marek Polacek <polacek@redhat.com> | |
675 | ||
676 | * decl2.cc (is_late_template_attribute): Do not defer attribute | |
677 | unavailable. | |
678 | * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE. | |
679 | ||
680 | 2022-03-08 Jakub Jelinek <jakub@redhat.com> | |
681 | ||
682 | PR c++/104806 | |
683 | * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore | |
684 | identifiers with space at the end. | |
685 | ||
e6533e2e GA |
686 | 2022-03-07 Jason Merrill <jason@redhat.com> |
687 | ||
688 | PR c++/104618 | |
689 | * decl2.cc (mark_single_function): Look through parens and location | |
690 | wrapper. | |
691 | * typeck.cc (cp_build_addr_expr_1): Not here. | |
692 | ||
693 | 2022-03-07 Jakub Jelinek <jakub@redhat.com> | |
694 | ||
695 | * parser.cc (cp_parser_omp_clause_map): Add missing space in string | |
696 | literal. | |
697 | ||
698 | 2022-03-07 Jakub Jelinek <jakub@redhat.com> | |
699 | ||
700 | * cvt.cc: Fix up duplicated word issue in a comment. | |
701 | * pt.cc: Likewise. | |
702 | * module.cc: Likewise. | |
703 | * coroutines.cc: Likewise. | |
704 | ||
8d96e14c GA |
705 | 2022-03-04 Nathan Sidwell <nathan@acm.org> |
706 | ||
707 | * mangle.cc (is_std_substitution): Check global module. | |
708 | (is_std_substitution_char): Return bool. | |
709 | ||
710 | 2022-03-04 Nathan Sidwell <nathan@acm.org> | |
711 | ||
712 | * cp-tree.h (mangle_identifier): Replace with ... | |
713 | (mangle_module_component): ... this. | |
714 | * mangle.cc (dump_substitution_candidates): Adjust. | |
715 | (add_substitution): Likewise. | |
716 | (find_substitution): Likewise. | |
717 | (unmangled_name_p): Likewise. | |
718 | (mangle_module_substitution): Reimplement. | |
719 | (mangle_module_component): New. | |
720 | (write_module, maybe_write_module): Adjust. | |
721 | (write_name): Drop modules here. | |
722 | (write_unqualified): Do them here instead. | |
723 | (mangle_global_init): Adjust. | |
724 | * module.cc (module_state::mangle): Adjust. | |
725 | (mangle_module): Likewise. | |
726 | (get_originating_module): Adjust. | |
727 | ||
a35f1697 GA |
728 | 2022-02-28 Marek Polacek <polacek@redhat.com> |
729 | ||
730 | PR c++/104682 | |
731 | * cp-tree.h (build_enumerator): Adjust. | |
732 | * decl.cc (finish_enum): Make it return the new decl. | |
733 | * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE. | |
734 | ||
735 | 2022-02-28 Marek Polacek <polacek@redhat.com> | |
736 | ||
737 | PR c++/104667 | |
738 | * decl2.cc (is_late_template_attribute): Cope with a decl without | |
739 | a type. | |
740 | ||
88c1b038 GA |
741 | 2022-02-27 Jason Merrill <jason@redhat.com> |
742 | ||
743 | PR c++/104618 | |
744 | * typeck.cc (cp_build_addr_expr_1): Also | |
745 | maybe_undo_parenthesized_ref. | |
746 | ||
756a6185 GA |
747 | 2022-02-24 Martin Liska <mliska@suse.cz> |
748 | ||
749 | * pt.cc (defarg_insts_for): Use braces for subobject. | |
750 | ||
5a9ba3f2 GA |
751 | 2022-02-18 Patrick Palka <ppalka@redhat.com> |
752 | ||
753 | PR c++/94944 | |
754 | * pt.cc (maybe_instantiate_noexcept): For non-static member | |
755 | functions, set current_class_ptr/ref to the specialized 'this' | |
756 | instead. | |
757 | ||
0bdb0498 GA |
758 | 2022-02-17 Jason Merrill <jason@redhat.com> |
759 | ||
760 | PR c++/104539 | |
761 | * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT. | |
762 | ||
763 | 2022-02-17 Jason Merrill <jason@redhat.com> | |
764 | ||
765 | PR c++/90451 | |
766 | * decl2.cc (mark_single_function): New. | |
767 | * cp-tree.h: Declare it. | |
768 | * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF. | |
769 | * semantics.cc (finish_qualified_id_expr): Not here. | |
770 | (finish_id_expression_1): Or here. | |
771 | (finish_decltype_type): Call mark_single_function. | |
772 | * cvt.cc (convert_to_void): And here. | |
773 | * pt.cc (convert_nontype_argument): And here. | |
774 | * init.cc (build_offset_ref): Adjust assert. | |
775 | ||
776 | 2022-02-17 Patrick Palka <ppalka@redhat.com> | |
777 | ||
778 | PR c++/104565 | |
779 | * semantics.cc (finish_compound_literal): Don't perform | |
780 | non-dependent expr folding before calling check_narrowing. | |
781 | ||
cb3afcd2 GA |
782 | 2022-02-16 Patrick Palka <ppalka@redhat.com> |
783 | ||
784 | PR c++/104507 | |
785 | * constexpr.cc (potential_constant_expression_1) | |
786 | <case NON_DEPENDENT_EXPR>: Return false instead of recursing. | |
787 | Assert tf_error isn't set. | |
788 | ||
875e493b GA |
789 | 2022-02-15 Jason Merrill <jason@redhat.com> |
790 | ||
791 | PR c++/104107 | |
792 | PR c++/95036 | |
793 | * pt.cc (coerce_template_template_parms): Take full parms. | |
794 | Avoid adding too much of outer_args. | |
795 | (coerce_template_template_parm): Adjust. | |
796 | (template_template_parm_bindings_ok_p): Adjust. | |
797 | (convert_template_argument): Adjust. | |
798 | ||
1f8a09d2 GA |
799 | 2022-02-14 Jakub Jelinek <jakub@redhat.com> |
800 | ||
801 | PR c++/104513 | |
802 | * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>: | |
803 | Don't punt if returns (target). | |
804 | ||
e8d68f0a GA |
805 | 2022-02-11 Jakub Jelinek <jakub@redhat.com> |
806 | ||
807 | PR c++/104472 | |
808 | * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>: | |
809 | Only return fold_const_call result if it is non-NULL. Otherwise | |
810 | fall through into the default: case to return t, set *non_constant_p | |
811 | and emit diagnostics if needed. | |
812 | ||
a645583d GA |
813 | 2022-02-10 Jason Merrill <jason@redhat.com> |
814 | ||
815 | * module.cc (depset::hash::add_specializations): Use | |
816 | STRIP_TEMPLATE. | |
817 | ||
818 | 2022-02-10 Tobias Burnus <tobias@codesourcery.com> | |
819 | ||
820 | PR c++/102204 | |
821 | * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual | |
822 | members as those are permitted since OpenMP 5.0. | |
823 | ||
824 | 2022-02-10 Patrick Palka <ppalka@redhat.com> | |
825 | ||
826 | * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL | |
827 | better. | |
828 | ||
829 | 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com> | |
830 | ||
831 | * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause. | |
832 | (cp_parser_omp_var_list_no_open): Handle array sections. | |
833 | (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR | |
834 | case. | |
835 | (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK. | |
836 | * semantics.cc (handle_omp_array_sections): Handle clause restrictions. | |
837 | (finish_omp_clauses): Handle array sections. | |
838 | ||
3adf509f GA |
839 | 2022-02-09 Patrick Palka <ppalka@redhat.com> |
840 | ||
841 | PR c++/104432 | |
842 | * call.cc (build_new_method_call): When a non-dependent call | |
843 | resolves to a specialization of a member template, always build | |
844 | the pruned overload set using the member template, not the | |
845 | specialization. | |
846 | * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify | |
847 | and correct how members from the new lookup set are matched to | |
848 | those from the old one. | |
849 | (tsubst_baselink): Pass binfo_type as newtype to | |
850 | filter_memfn_lookup. | |
851 | ||
852 | 2022-02-09 Jason Merrill <jason@redhat.com> | |
853 | ||
854 | PR c++/103752 | |
855 | * module.cc (trees_out::core_vals): Stream explicit specifier. | |
856 | (trees_in::core_vals): Likewise. | |
857 | * pt.cc (store_explicit_specifier): No longer static. | |
858 | (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P. | |
859 | * cp-tree.h (lookup_explicit_specifier): Declare. | |
860 | ||
861 | 2022-02-09 Jason Merrill <jason@redhat.com> | |
862 | ||
863 | PR c++/96876 | |
864 | * typeck2.cc (split_nonconstant_init_1): Push cleanups for | |
865 | preceding members with constant initialization. | |
866 | (maybe_push_temp_cleanup): Do nothing if -fno-exceptions. | |
867 | ||
2a2fda2d GA |
868 | 2022-02-08 Jakub Jelinek <jakub@redhat.com> |
869 | ||
870 | PR c++/104379 | |
871 | * name-lookup.cc (check_local_shadow): When diagnosing shadowing | |
872 | of a member or global declaration, add warning suppression for | |
873 | the decl and don't warn again on it. | |
874 | ||
875 | 2022-02-08 Jakub Jelinek <jakub@redhat.com> | |
876 | ||
877 | PR c++/104403 | |
878 | * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs | |
879 | of TREE_STATIC vars may only appear in -std=c++23. | |
880 | ||
881 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
882 | ||
883 | PR c++/80951 | |
884 | * pt.cc (uses_deducible_template_parms): Consider the | |
885 | noexcept-spec of a function type. | |
886 | ||
887 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
888 | ||
889 | PR c++/104410 | |
890 | * constraint.cc (satisfaction_value): Relax assert to accept | |
891 | cv-qualified bool. | |
892 | ||
893 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
894 | ||
895 | PR c++/103706 | |
896 | * pt.cc (preserve_args): New function. | |
897 | (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO. | |
898 | ||
899 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
900 | ||
901 | PR c++/103706 | |
902 | * constraint.cc (satisfy_declaration_constraints): Use | |
903 | lambda_regenerating_args instead. | |
904 | * cp-tree.h (lambda_regenerating_args): Declare. | |
905 | * pt.cc (lambda_regenerating_args): Define, split out from | |
906 | satisfy_declaration_constraints. | |
907 | (do_auto_deduction): Use lambda_regenerating_args to obtain the | |
908 | full set of outer template arguments for satisfaction when | |
909 | inside a lambda. | |
910 | ||
353f8fcc GA |
911 | 2022-02-06 Patrick Palka <ppalka@redhat.com> |
912 | ||
913 | PR c++/96242 | |
914 | * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED | |
915 | fn by calling maybe_synthesize_method instead of relying on | |
916 | maybe_instantiate_noexcept. Move call to m_i_n after the | |
917 | DECL_DELETED_FN handling. | |
918 | * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED | |
919 | fn synthesis to only those with an implicit noexcept-spec, and | |
920 | return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards. | |
921 | ||
922 | 2022-02-06 Jakub Jelinek <jakub@redhat.com> | |
923 | ||
924 | PR c++/89074 | |
925 | PR c++/104033 | |
926 | * constexpr.cc (cxx_eval_binary_expression): Temporarily set | |
927 | folding_cxx_constexpr. | |
928 | ||
661109b0 GA |
929 | 2022-02-05 Jason Merrill <jason@redhat.com> |
930 | ||
931 | PR c++/104300 | |
932 | PR c++/92385 | |
933 | * cp-tree.h (get_vec_init_expr): New. | |
934 | (target_expr_needs_replace): New. | |
935 | * cp-gimplify.cc (cp_gimplify_init_expr): Use it. | |
936 | (struct cp_fold_data): New. | |
937 | (cp_fold_r): Only genericize inits at end of fn. | |
938 | (cp_fold_function): Here. | |
939 | (cp_fully_fold_init): Not here. | |
940 | * init.cc (build_vec_init): Use get_vec_init_expr. | |
941 | * tree.cc (build_vec_init_expr): Likewise. | |
942 | * typeck2.cc (split_nonconstant_init_1): Likewise. | |
943 | (process_init_constructor): Wrap VEC_INIT_EXPR in | |
944 | TARGET_EXPR. | |
945 | ||
946 | 2022-02-05 Jason Merrill <jason@redhat.com> | |
947 | ||
948 | * pt.cc (iterative_hash_template_arg): Add comment. | |
949 | ||
682ede39 GA |
950 | 2022-02-03 Patrick Palka <ppalka@redhat.com> |
951 | ||
952 | PR c++/104079 | |
953 | * pt.cc (value_dependent_noexcept_spec_p): New predicate split | |
954 | out from ... | |
955 | (dependent_type_p_r): ... here. | |
956 | (instantiation_dependent_r): Use value_dependent_noexcept_spec_p | |
957 | to consider dependence of a noexcept-spec before C++17. | |
958 | * tree.cc (fixup_deferred_exception_variants): Clear | |
959 | TYPE_DEPENDENT_P_VALID. | |
960 | ||
961 | 2022-02-03 Jason Merrill <jason@redhat.com> | |
962 | ||
963 | PR c++/104302 | |
964 | * decl.cc (maybe_deduce_size_from_array_init): Give up | |
965 | on type-dependent init. | |
966 | (cp_complete_array_type): Only call reshape_init for character | |
967 | array. | |
968 | ||
ae7e4af9 GA |
969 | 2022-02-01 Jason Merrill <jason@redhat.com> |
970 | ||
971 | PR c++/103186 | |
972 | * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher. | |
973 | (defarg_insts_for): New. | |
974 | (tsubst_default_argument): Adjust. | |
975 | ||
1bb52662 GA |
976 | 2022-01-31 Marek Polacek <polacek@redhat.com> |
977 | ||
978 | PR c++/102414 | |
979 | PR c++/101874 | |
980 | * decl.cc (create_array_type_for_decl): Use template_placeholder_p. | |
981 | Sorry on a variable-length array of auto. | |
982 | ||
983 | 2022-01-31 Marek Polacek <polacek@redhat.com> | |
984 | ||
985 | PR c++/102434 | |
986 | * class.cc (finish_struct): Don't allow union initializer_list. | |
987 | ||
988 | 2022-01-31 Patrick Palka <ppalka@redhat.com> | |
989 | ||
990 | PR c++/104294 | |
991 | * pt.cc (ctor_deduction_guides_for): Correct computation of | |
992 | outer_args. | |
993 | ||
994 | 2022-01-31 Patrick Palka <ppalka@redhat.com> | |
995 | ||
996 | PR c++/104291 | |
997 | * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear | |
998 | walk_subtrees if !include_nondeduced_p. Simplify given that | |
999 | cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW. | |
1000 | ||
f6f2d6cf GA |
1001 | 2022-01-28 Patrick Palka <ppalka@redhat.com> |
1002 | Jason Merrill <jason@redhat.com> | |
1003 | ||
1004 | PR c++/92752 | |
1005 | * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the | |
1006 | unqualified pointer type not the qualified one. | |
1007 | ||
1008 | 2022-01-28 Patrick Palka <ppalka@redhat.com> | |
1009 | ||
1010 | PR c++/103341 | |
1011 | * decl.cc (cp_finish_decl): Pass the template arguments of a | |
1012 | variable template specialization or a templated static data | |
1013 | member to do_auto_deduction when the auto is constrained. | |
1014 | ||
1015 | 2022-01-28 Jason Merrill <jason@redhat.com> | |
1016 | ||
1017 | PR c++/100198 | |
1018 | PR c++/100030 | |
1019 | PR c++/100282 | |
1020 | * parser.cc (cp_parser_enumerator_definition): Sorry on parameter | |
1021 | pack in lambda. | |
1022 | (cp_parser_class_head): And in class attributes. | |
1023 | * pt.cc (check_for_bare_parameter_packs): Sorry instead of error | |
1024 | in lambda. | |
1025 | ||
99f17e99 GA |
1026 | 2022-01-27 Jason Merrill <jason@redhat.com> |
1027 | ||
1028 | PR c++/104245 | |
1029 | PR c++/51344 | |
1030 | * decl2.cc (save_template_attributes): Take late attrs as parm. | |
1031 | (cplus_decl_attributes): Call it after decl_attributes, | |
1032 | splice_template_attributes before. | |
1033 | ||
1034 | 2022-01-27 Patrick Palka <ppalka@redhat.com> | |
1035 | ||
1036 | PR c++/99895 | |
1037 | * call.cc (build_over_call): For a non-dependent member call, | |
1038 | build up a CALL_EXPR using a COMPONENT_REF callee, as in | |
1039 | build_new_method_call. | |
1040 | * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either. | |
1041 | * tree.cc (build_min_non_dep_op_overload): Adjust accordingly | |
1042 | after the build_over_call change. | |
1043 | ||
1044 | 2022-01-27 Patrick Palka <ppalka@redhat.com> | |
1045 | ||
1046 | PR c++/92944 | |
1047 | PR c++/103678 | |
1048 | * parser.cc (cp_parser_class_head): Update 'type' with the result | |
1049 | of maybe_process_partial_specialization in the | |
1050 | nested_name_specifier branch. Refactor nearby code to accomodate | |
1051 | that maybe_process_partial_specialization returns a _TYPE, not a | |
1052 | TYPE_DECL, and eliminate local variable 'class_type' in passing. | |
1053 | ||
1054 | 2022-01-27 Marek Polacek <polacek@redhat.com> | |
1055 | ||
1056 | PR c++/101988 | |
1057 | * decl.cc (create_array_type_for_decl): Reject forming an array of | |
1058 | placeholder for a deduced class type. | |
1059 | ||
eaa59070 GA |
1060 | 2022-01-26 Jason Merrill <jason@redhat.com> |
1061 | ||
1062 | PR c++/104206 | |
1063 | PR c++/101072 | |
1064 | * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check. | |
1065 | ||
1066 | 2022-01-26 Jakub Jelinek <jakub@redhat.com> | |
1067 | ||
1068 | PR c++/104226 | |
1069 | * constexpr.cc (init_subob_ctx): For vector ctors containing | |
1070 | vector elements, ensure appending to the same ctor instead of | |
1071 | creating another one. | |
1072 | ||
1073 | 2022-01-26 Marek Polacek <polacek@redhat.com> | |
1074 | ||
1075 | PR target/104213 | |
1076 | * decl.cc (finish_constructor_body): Suppress -Wuse-after-free. | |
1077 | (finish_destructor_body): Likewise. | |
1078 | * optimize.cc (build_delete_destructor_body): Likewise. | |
1079 | ||
1080 | 2022-01-26 Jason Merrill <jason@redhat.com> | |
1081 | ||
1082 | PR c++/104235 | |
1083 | * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL. | |
1084 | ||
1085 | 2022-01-26 Jason Merrill <jason@redhat.com> | |
1086 | ||
1087 | PR c++/103057 | |
1088 | * pt.cc (tsubst_aggr_type): Call tsubst for alias template | |
1089 | specialization. | |
1090 | ||
e0b8716f GA |
1091 | 2022-01-25 Patrick Palka <ppalka@redhat.com> |
1092 | ||
1093 | PR c++/101532 | |
1094 | PR c++/104225 | |
1095 | * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept | |
1096 | on a deleted function. | |
1097 | ||
1098 | 2022-01-25 Jason Merrill <jason@redhat.com> | |
1099 | ||
1100 | PR c++/59950 | |
1101 | * call.cc (build_over_call): Use cp_build_indirect_ref. | |
1102 | ||
bb99171b GA |
1103 | 2022-01-24 Patrick Palka <ppalka@redhat.com> |
1104 | ||
1105 | PR c++/104197 | |
1106 | * pt.cc (make_auto_1): Use -1 as a placeholder default argument | |
1107 | for level. | |
1108 | ||
1109 | 2022-01-24 Patrick Palka <ppalka@redhat.com> | |
1110 | ||
1111 | PR c++/104173 | |
1112 | * typeck.cc (build_class_member_access_expr): Extend | |
1113 | unary_complex_lvalue result adjustment to preserve all | |
1114 | rvalues, not just xvalues. | |
1115 | ||
0c940703 GA |
1116 | 2022-01-23 Will Wray <wjwray@gmail.com> |
1117 | ||
1118 | PR c++/55227 | |
1119 | * decl.cc (reshape_init_r): Only call has_designator_check when | |
1120 | first_initializer_p or for the inner constructor element. | |
1121 | (cp_complete_array_type): Call reshape_init on braced-init-list. | |
1122 | ||
1123 | 2022-01-23 Jason Merrill <jason@redhat.com> | |
1124 | ||
1125 | PR c++/104182 | |
1126 | * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing | |
1127 | has set DECL_INITIAL on a TARGET_EXPR slot. | |
1128 | * tree.cc (is_local_temp): Don't check DECL_CONTEXT. | |
1129 | ||
1130 | 2022-01-23 Jason Merrill <jason@redhat.com> | |
1131 | ||
1132 | PR c++/101072 | |
1133 | * cp-tree.h (build_implicit_conv_flags): Declare. | |
1134 | * call.cc (build_implicit_conv_flags): Split out from... | |
1135 | (perform_implicit_conversion_flags): ...here. | |
1136 | * decl.cc (check_initializer): Use it. | |
1137 | * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling. | |
1138 | * semantics.cc (finish_compound_literal): Don't treat | |
1139 | scalar values like CONSTRUCTORs. | |
1140 | ||
9dd44357 GA |
1141 | 2022-01-21 Jason Merrill <jason@redhat.com> |
1142 | ||
1143 | * semantics.cc (find_failing_clause): Return expr if not | |
1144 | decomposable. | |
1145 | (finish_static_assert): Show constant values in failing | |
1146 | comparison. | |
1147 | ||
1148 | 2022-01-21 Jason Merrill <jason@redhat.com> | |
1149 | ||
1150 | PR c++/104084 | |
1151 | PR c++/20040 | |
1152 | * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if | |
1153 | alloc_expr is a TARGET_EXPR. | |
1154 | ||
1155 | 2022-01-21 Marek Polacek <polacek@redhat.com> | |
1156 | ||
1157 | PR c++/101715 | |
1158 | * tree.cc (fixup_deferred_exception_variants): Remove duplicate | |
1159 | variants after parsing the exception specifications. | |
1160 | ||
1161 | 2022-01-21 Jason Merrill <jason@redhat.com> | |
1162 | ||
1163 | PR c++/104139 | |
1164 | PR c++/103681 | |
1165 | * class.cc (end_of_class): Use base_binfo. | |
1166 | ||
5fa55d55 GA |
1167 | 2022-01-20 Jason Merrill <jason@redhat.com> |
1168 | ||
1169 | PR c++/101405 | |
1170 | * decl.cc (reshape_init_class): Reject designator for a member of | |
1171 | another class. | |
1172 | ||
1173 | 2022-01-20 Patrick Palka <ppalka@redhat.com> | |
1174 | ||
1175 | PR c++/91911 | |
1176 | PR c++/103672 | |
1177 | * pt.cc (keep_template_parm): Punt on a level 0 template parm. | |
1178 | (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard. | |
1179 | (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders | |
1180 | specially. | |
1181 | (make_auto_1): Add defaulted 'level' parameter. | |
1182 | (make_template_placeholder): Pass 0 as 'level' to make_auto_1. | |
1183 | ||
1184 | 2022-01-20 Patrick Palka <ppalka@redhat.com> | |
1185 | ||
1186 | * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as | |
1187 | function return type even when !funcdecl_p. | |
1188 | ||
1189 | 2022-01-20 Martin Liska <mliska@suse.cz> | |
1190 | ||
1191 | PR c++/104134 | |
1192 | * error.cc (dump_aggr_type): Partially disable the warning. | |
1193 | ||
1194 | 2022-01-20 Jason Merrill <jason@redhat.com> | |
1195 | ||
1196 | PR c++/102300 | |
1197 | * parser.cc (cp_parser_template_name): Use dependent_scope_p. | |
1198 | ||
fe1ad141 GA |
1199 | 2022-01-19 David Malcolm <dmalcolm@redhat.com> |
1200 | ||
1201 | * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc | |
1202 | renaming. | |
1203 | * cp-tree.h (cp_pt_c_tests): Rename to... | |
1204 | (cp_pt_cc_tests): ...this. | |
1205 | (cp_tree_c_tests): Rename to... | |
1206 | (cp_tree_cc_tests): ...this. | |
1207 | * pt.cc (cp_pt_c_tests): Rename to... | |
1208 | (cp_pt_cc_tests): ...this. | |
1209 | * tree.cc (cp_tree_c_tests): Rename to... | |
1210 | (cp_tree_cc_tests): ...this. | |
1211 | ||
1212 | 2022-01-19 Jason Merrill <jason@redhat.com> | |
1213 | ||
1214 | * parser.cc (saved_token_sentinel::rollback): Use | |
1215 | cp_lexer_previous_token. | |
1216 | ||
7a761ae6 GA |
1217 | 2022-01-18 Jakub Jelinek <jakub@redhat.com> |
1218 | ||
1219 | PR c++/104055 | |
1220 | * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a | |
1221 | TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather | |
1222 | than get_target_expr_sfinae with tf_no_cleanup, and don't set | |
1223 | TREE_CONSTANT. | |
1224 | ||
1225 | 2022-01-18 Jason Merrill <jason@redhat.com> | |
1226 | Jakub Jelinek <jakub@redhat.com> | |
1227 | ||
1228 | PR c++/104025 | |
1229 | * parser.cc (saved_token_sentinel::rollback): Call | |
1230 | cp_lexer_set_source_position. | |
1231 | (~saved_token_sentinel): Call rollback. | |
1232 | ||
1233 | 2022-01-18 Patrick Palka <ppalka@redhat.com> | |
1234 | ||
1235 | PR c++/104074 | |
1236 | * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so | |
1237 | that we return false for DEPENDENT_OPERATOR_TYPE too. | |
1238 | ||
fc829782 GA |
1239 | 2022-01-17 Martin Liska <mliska@suse.cz> |
1240 | ||
1241 | * Make-lang.in: Rename .c names to .cc. | |
1242 | * config-lang.in: Likewise. | |
1243 | * constexpr.cc (cxx_eval_constant_expression): Likewise. | |
1244 | * coroutines.cc (morph_fn_to_coro): Likewise. | |
1245 | * cp-gimplify.cc (cp_gimplify_expr): Likewise. | |
1246 | * cp-lang.cc (struct lang_hooks): Likewise. | |
1247 | (get_template_argument_pack_elems_folded): Likewise. | |
1248 | * cp-objcp-common.cc (cp_tree_size): Likewise. | |
1249 | (cp_unit_size_without_reusable_padding): Likewise. | |
1250 | (pop_file_scope): Likewise. | |
1251 | (cp_pushdecl): Likewise. | |
1252 | * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise. | |
1253 | (cxx_simulate_record_decl): Likewise. | |
1254 | * cp-tree.h (struct named_label_entry): Likewise. | |
1255 | (current_function_return_value): Likewise. | |
1256 | (more_aggr_init_expr_args_p): Likewise. | |
1257 | (get_function_version_dispatcher): Likewise. | |
1258 | (common_enclosing_class): Likewise. | |
1259 | (strip_fnptr_conv): Likewise. | |
1260 | (current_decl_namespace): Likewise. | |
1261 | (do_aggregate_paren_init): Likewise. | |
1262 | (cp_check_const_attributes): Likewise. | |
1263 | (qualified_name_lookup_error): Likewise. | |
1264 | (generic_targs_for): Likewise. | |
1265 | (mark_exp_read): Likewise. | |
1266 | (is_global_friend): Likewise. | |
1267 | (maybe_reject_flexarray_init): Likewise. | |
1268 | (module_token_lang): Likewise. | |
1269 | (handle_module_option): Likewise. | |
1270 | (literal_integer_zerop): Likewise. | |
1271 | (build_extra_args): Likewise. | |
1272 | (build_if_nonnull): Likewise. | |
1273 | (maybe_check_overriding_exception_spec): Likewise. | |
1274 | (finish_omp_target_clauses): Likewise. | |
1275 | (maybe_warn_zero_as_null_pointer_constant): Likewise. | |
1276 | (cxx_print_error_function): Likewise. | |
1277 | (decl_in_std_namespace_p): Likewise. | |
1278 | (merge_exception_specifiers): Likewise. | |
1279 | (mangle_module_global_init): Likewise. | |
1280 | (cxx_block_may_fallthru): Likewise. | |
1281 | (fold_builtin_source_location): Likewise. | |
1282 | (enum cp_oracle_request): Likewise. | |
1283 | (subsumes): Likewise. | |
1284 | (cp_finish_injected_record_type): Likewise. | |
1285 | (vtv_build_vtable_verify_fndecl): Likewise. | |
1286 | (cp_tree_c_finish_parsing): Likewise. | |
1287 | * cvt.cc (diagnose_ref_binding): Likewise. | |
1288 | (convert_to_void): Likewise. | |
1289 | (convert_force): Likewise. | |
1290 | (type_promotes_to): Likewise. | |
1291 | * decl.cc (make_unbound_class_template_raw): Likewise. | |
1292 | (cxx_init_decl_processing): Likewise. | |
1293 | (check_class_member_definition_namespace): Likewise. | |
1294 | (cxx_maybe_build_cleanup): Likewise. | |
1295 | * decl2.cc (maybe_emit_vtables): Likewise. | |
1296 | * error.cc (dump_function_name): Likewise. | |
1297 | * init.cc (is_class_type): Likewise. | |
1298 | (build_new_1): Likewise. | |
1299 | * lang-specs.h: Likewise. | |
1300 | * method.cc (make_alias_for_thunk): Likewise. | |
1301 | * module.cc (specialization_add): Likewise. | |
1302 | (module_state::read_cluster): Likewise. | |
1303 | * name-lookup.cc (check_extern_c_conflict): Likewise. | |
1304 | * name-lookup.h (struct cxx_binding): Likewise. | |
1305 | * parser.cc (cp_parser_identifier): Likewise. | |
1306 | * parser.h (struct cp_parser): Likewise. | |
1307 | * pt.cc (has_value_dependent_address): Likewise. | |
1308 | (push_tinst_level_loc): Likewise. | |
1309 | * semantics.cc (finish_omp_clauses): Likewise. | |
1310 | (finish_omp_atomic): Likewise. | |
1311 | * tree.cc (cp_save_expr): Likewise. | |
1312 | (cp_free_lang_data): Likewise. | |
1313 | * typeck.cc (cp_common_type): Likewise. | |
1314 | (strip_array_domain): Likewise. | |
1315 | (rationalize_conditional_expr): Likewise. | |
1316 | (check_return_expr): Likewise. | |
1317 | * vtable-class-hierarchy.cc: Likewise. | |
1318 | ||
1319 | 2022-01-17 Martin Liska <mliska@suse.cz> | |
1320 | ||
1321 | * call.c: Moved to... | |
1322 | * call.cc: ...here. | |
1323 | * class.c: Moved to... | |
1324 | * class.cc: ...here. | |
1325 | * constexpr.c: Moved to... | |
1326 | * constexpr.cc: ...here. | |
1327 | * cp-gimplify.c: Moved to... | |
1328 | * cp-gimplify.cc: ...here. | |
1329 | * cp-lang.c: Moved to... | |
1330 | * cp-lang.cc: ...here. | |
1331 | * cp-objcp-common.c: Moved to... | |
1332 | * cp-objcp-common.cc: ...here. | |
1333 | * cp-ubsan.c: Moved to... | |
1334 | * cp-ubsan.cc: ...here. | |
1335 | * cvt.c: Moved to... | |
1336 | * cvt.cc: ...here. | |
1337 | * cxx-pretty-print.c: Moved to... | |
1338 | * cxx-pretty-print.cc: ...here. | |
1339 | * decl.c: Moved to... | |
1340 | * decl.cc: ...here. | |
1341 | * decl2.c: Moved to... | |
1342 | * decl2.cc: ...here. | |
1343 | * dump.c: Moved to... | |
1344 | * dump.cc: ...here. | |
1345 | * error.c: Moved to... | |
1346 | * error.cc: ...here. | |
1347 | * except.c: Moved to... | |
1348 | * except.cc: ...here. | |
1349 | * expr.c: Moved to... | |
1350 | * expr.cc: ...here. | |
1351 | * friend.c: Moved to... | |
1352 | * friend.cc: ...here. | |
1353 | * g++spec.c: Moved to... | |
1354 | * g++spec.cc: ...here. | |
1355 | * init.c: Moved to... | |
1356 | * init.cc: ...here. | |
1357 | * lambda.c: Moved to... | |
1358 | * lambda.cc: ...here. | |
1359 | * lex.c: Moved to... | |
1360 | * lex.cc: ...here. | |
1361 | * mangle.c: Moved to... | |
1362 | * mangle.cc: ...here. | |
1363 | * method.c: Moved to... | |
1364 | * method.cc: ...here. | |
1365 | * name-lookup.c: Moved to... | |
1366 | * name-lookup.cc: ...here. | |
1367 | * optimize.c: Moved to... | |
1368 | * optimize.cc: ...here. | |
1369 | * parser.c: Moved to... | |
1370 | * parser.cc: ...here. | |
1371 | * pt.c: Moved to... | |
1372 | * pt.cc: ...here. | |
1373 | * ptree.c: Moved to... | |
1374 | * ptree.cc: ...here. | |
1375 | * rtti.c: Moved to... | |
1376 | * rtti.cc: ...here. | |
1377 | * search.c: Moved to... | |
1378 | * search.cc: ...here. | |
1379 | * semantics.c: Moved to... | |
1380 | * semantics.cc: ...here. | |
1381 | * tree.c: Moved to... | |
1382 | * tree.cc: ...here. | |
1383 | * typeck.c: Moved to... | |
1384 | * typeck.cc: ...here. | |
1385 | * typeck2.c: Moved to... | |
1386 | * typeck2.cc: ...here. | |
1387 | * vtable-class-hierarchy.c: Moved to... | |
1388 | * vtable-class-hierarchy.cc: ...here. | |
1389 | ||
1390 | 2022-01-17 Jakub Jelinek <jakub@redhat.com> | |
1391 | ||
1392 | PR c++/104031 | |
1393 | * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of | |
1394 | TARGET_EXPR_SLOT to current_function_decl if it was NULL. | |
1395 | ||
1396 | 2022-01-17 Andrew Stubbs <ams@codesourcery.com> | |
1397 | ||
1398 | * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators. | |
1399 | ||
617db51d GA |
1400 | 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com> |
1401 | ||
1402 | PR c++/103705 | |
1403 | * semantics.c (finish_omp_clauses): Also continue peeling off of | |
1404 | outer node for ARRAY_REFs. | |
1405 | ||
1406 | 2022-01-14 Jakub Jelinek <jakub@redhat.com> | |
1407 | ||
1408 | PR c++/103991 | |
1409 | * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For | |
1410 | IF_STMT_CONSTEXPR_P with constant false or true condition only | |
1411 | check if the taken clause may fall through. | |
1412 | * cp-gimplify.c (genericize_if_stmt): For consteval if, revert | |
1413 | to r12-5638^ behavior if then_ block can't fall through. For | |
1414 | constexpr if, revert to r12-5638^ behavior. | |
1415 | ||
ad3f0d08 GA |
1416 | 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com> |
1417 | Jason Merrill <jason@redhat.com> | |
1418 | ||
1419 | PR c++/70417 | |
1420 | * parser.c (cp_parser_id_expression): Handle | |
1421 | -Wmissing-template-keyword. | |
1422 | (struct saved_token_sentinel): Add modes to control what happens | |
1423 | on destruction. | |
1424 | (cp_parser_statement): Adjust. | |
1425 | (cp_parser_skip_entire_template_parameter_list): New function that | |
1426 | skips an entire template parameter list. | |
1427 | (cp_parser_require_end_of_template_parameter_list): Rename old | |
1428 | cp_parser_skip_to_end_of_template_parameter_list. | |
1429 | (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be | |
1430 | called from one of the above two functions. | |
1431 | (cp_parser_lambda_declarator_opt) | |
1432 | (cp_parser_explicit_template_declaration) | |
1433 | (cp_parser_enclosed_template_argument_list): Adjust. | |
1434 | ||
02a8a01b GA |
1435 | 2022-01-12 Jakub Jelinek <jakub@redhat.com> |
1436 | Jason Merrill <jason@redhat.com> | |
1437 | ||
1438 | PR c++/103480 | |
1439 | * tree.c (move): If expr is xvalue_p, just return expr without | |
1440 | build_static_cast. | |
1441 | ||
01a254e3 GA |
1442 | 2022-01-11 Jakub Jelinek <jakub@redhat.com> |
1443 | ||
1444 | PR c++/101597 | |
1445 | * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST | |
1446 | OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type. | |
1447 | * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of | |
1448 | OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as | |
1449 | obj_type. | |
1450 | ||
1451 | 2022-01-11 Patrick Palka <ppalka@redhat.com> | |
1452 | ||
1453 | PR c++/103831 | |
1454 | * call.c (build_new_method_call): Consider dependent bases only | |
1455 | if 'this' is available. | |
1456 | ||
1457 | 2022-01-11 Olivier Hainque <hainque@adacore.com> | |
1458 | ||
1459 | * decl.c (cxx_init_decl_processing): Move code possibly | |
1460 | altering flag_weak before code testing it. | |
1461 | ||
d9450aa0 GA |
1462 | 2022-01-10 Patrick Palka <ppalka@redhat.com> |
1463 | ||
1464 | PR c++/103879 | |
1465 | * constexpr.c (cxx_fold_indirect_ref): Split out object/offset | |
1466 | canonicalization step into a local lambda. Strengthen it to | |
1467 | absorb more components at position 0. Use it before both calls | |
1468 | to cxx_fold_indirect_ref_1. | |
1469 | ||
1470 | 2022-01-10 Patrick Palka <ppalka@redhat.com> | |
1471 | ||
1472 | PR c++/103783 | |
1473 | * call.c (cand_parms_match): Skip over 'this' when given one | |
1474 | static and one non-static member function. | |
1475 | ||
1476 | 2022-01-10 Jakub Jelinek <jakub@redhat.com> | |
1477 | ||
1478 | PR c++/103912 | |
1479 | * semantics.c (expand_or_defer_fn): For immediate functions, set | |
1480 | node->body_removed to true and clear analyzed, definition and | |
1481 | force_output. | |
1482 | * decl2.c (c_parse_final_cleanups): Ignore immediate functions for | |
1483 | expand_or_defer_fn. | |
1484 | ||
2848ef14 GA |
1485 | 2022-01-08 Jakub Jelinek <jakub@redhat.com> |
1486 | ||
1487 | PR c++/89074 | |
1488 | * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function. | |
1489 | (cxx_eval_binary_expression): Use it. | |
1490 | ||
1491 | 2022-01-08 Jason Merrill <jason@redhat.com> | |
1492 | ||
1493 | PR c++/103946 | |
1494 | * init.c (build_vec_init): Remove assert. | |
1495 | * tree.c (build_vec_init_expr): Likewise. | |
1496 | ||
1497 | 2022-01-08 Jason Merrill <jason@redhat.com> | |
1498 | ||
1499 | PR c++/100588 | |
1500 | * call.c (build_op_delete_call): Ignore destroying delete | |
1501 | if alloc_fn. | |
1502 | ||
55e96bf9 GA |
1503 | 2022-01-07 Jason Merrill <jason@redhat.com> |
1504 | ||
1505 | PR c++/20040 | |
1506 | * init.c (build_new_1): Also build pointer cleanup if | |
1507 | TYPE_GETS_DELETE. | |
1508 | * cp-tree.h (TYPE_GETS_VEC_DELETE): New. | |
1509 | ||
1510 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1511 | ||
1512 | PR c++/103936 | |
1513 | PR c++/65591 | |
1514 | * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling. | |
1515 | ||
1516 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1517 | ||
1518 | PR c++/103711 | |
1519 | * init.c (perform_target_ctor): Select destructor by in_chrg. | |
1520 | ||
1521 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1522 | ||
1523 | PR c++/61611 | |
1524 | * except.c (in_nested_catch): New. | |
1525 | (expand_end_catch_block): Check it. | |
1526 | ||
1527 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1528 | ||
1529 | PR c++/33799 | |
1530 | PR c++/102191 | |
1531 | * except.c (maybe_splice_retval_cleanup): Check | |
1532 | current_binding_level. | |
1533 | * semantics.c (do_poplevel): Call it here. | |
1534 | * parser.c (cp_parser_compound_statement): Not here. | |
1535 | ||
1536 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1537 | ||
1538 | PR c++/53868 | |
1539 | * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for | |
1540 | cleanups from set_up_extended_ref_temp. | |
1541 | (wrap_temporary_cleanups): Ignore array cleanups. | |
1542 | (initialize_local_var): Don't check for array here. | |
1543 | * cp-tree.h (BIND_EXPR_VEC_DTOR): New. | |
1544 | * init.c (build_vec_delete_1): Set it. | |
1545 | ||
1546 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1547 | ||
1548 | PR c++/66451 | |
1549 | * init.c (build_vec_delete_1): Handle throwing dtor. | |
1550 | (build_vec_init): Tell it we're in a cleanup already. | |
1551 | ||
1552 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1553 | ||
1554 | * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt. | |
1555 | (split_nonconstant_init): Adjust. | |
1556 | ||
1557 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1558 | ||
1559 | PR c++/66139 | |
1560 | PR c++/52320 | |
1561 | * constexpr.c (replace_decl): Rename from replace_result_decl. | |
1562 | * cp-tree.h (replace_decl): Declare it. | |
1563 | * cp-gimplify.c (cp_gimplify_init_expr): Call it. | |
1564 | (cp_gimplify_expr): Don't handle VEC_INIT_EXPR. | |
1565 | (cp_genericize_init, cp_genericize_init_expr) | |
1566 | (cp_genericize_target_expr): New. | |
1567 | (cp_fold_r): Call them. | |
1568 | * tree.c (build_array_copy): Add a TARGET_EXPR. | |
1569 | * typeck2.c (digest_init_r): Look through a TARGET_EXPR. | |
1570 | ||
1571 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1572 | ||
1573 | PR c++/94041 | |
1574 | * decl.c (initialize_local_var): Fix comment. | |
1575 | * init.c (build_new_1): Do stabilize array init. | |
1576 | (build_vec_init): Use TARGET_EXPR for cleanup. Initialization | |
1577 | of an element from an explicit initializer is not a | |
1578 | full-expression. | |
1579 | * tree.c (expand_vec_init_expr): Pass flags through. | |
1580 | * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR. | |
1581 | (split_nonconstant_init): Handle array cleanups. | |
1582 | * cp-tree.h: Adjust. | |
1583 | ||
1584 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1585 | ||
1586 | PR c++/94041 | |
1587 | * decl.c (check_initializer): Remove obsolete comment. | |
1588 | (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY. | |
1589 | (initialize_local_var): Change assert to test. | |
1590 | * typeck2.c (maybe_push_temp_cleanup): New. | |
1591 | (split_nonconstant_init_1): Use it. | |
1592 | (split_nonconstant_init): Clear cleanup flags. | |
1593 | ||
1594 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1595 | ||
1596 | PR c++/92385 | |
1597 | * typeck2.c (PICFLAG_VEC_INIT): New. | |
1598 | (process_init_constructor_array): Set it. | |
1599 | (process_init_constructor): Handle it. | |
1600 | (split_nonconstant_init_1): Handle VEC_INIT_EXPR. | |
1601 | * init.c (build_vec_init): Likewise. | |
1602 | * cp-gimplify.c (cp_gimplify_expr): Factor out... | |
1603 | * tree.c (expand_vec_init_expr): ...this function. | |
1604 | (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P. | |
1605 | (build_vec_init_expr): Likewise. | |
1606 | * constexpr.c (cxx_eval_vec_init): Likewise. | |
1607 | (reduced_constant_expression_p): Check arrays before C++20. | |
1608 | * cp-tree.h (expand_vec_init_expr): Declare. | |
1609 | ||
1610 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
1611 | ||
1612 | * init.c (build_new_1): Remove preevaluation code. | |
1613 | ||
0fbefa25 GA |
1614 | 2022-01-05 Nathan Sidwell <nathan@acm.org> |
1615 | ||
1616 | * pt.c (instantiate_class_template_1): Process attribute((used)) set | |
1617 | in class's context. | |
1618 | ||
1619 | 2022-01-05 Nathan Sidwell <nathan@acm.org> | |
1620 | ||
1621 | * init.c (build_new_1): Check complain before alignment warning. | |
1622 | ||
7d11b64b GA |
1623 | 2022-01-04 Jason Merrill <jason@redhat.com> |
1624 | ||
1625 | * cp-tree.h (class releasing_vec): Add begin/end fns. | |
1626 | ||
1627 | 2022-01-04 Jason Merrill <jason@redhat.com> | |
1628 | ||
1629 | * init.c: Include -*- C++ -*- on first line. | |
1630 | ||
a4ae8c37 GA |
1631 | 2022-01-03 Marek Polacek <polacek@redhat.com> |
1632 | ||
1633 | PR c++/103758 | |
1634 | * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%> | |
1635 | with %qD. | |
1636 | ||
1637 | 2022-01-03 Marek Polacek <polacek@redhat.com> | |
1638 | ||
1639 | * parser.c (make_char_string_pack): Add a cast to const unsigned | |
1640 | char *. | |
1641 | ||
1642 | 2022-01-03 Jakub Jelinek <jakub@redhat.com> | |
1643 | ||
1644 | PR c++/103600 | |
1645 | * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute | |
1646 | to DECL_TINFO_P VAR_DECLs. | |
1647 | ||
5da23a13 GA |
1648 | 2022-01-02 Jason Merrill <jason@redhat.com> |
1649 | ||
1650 | * init.c (build_vec_init): Append the decrement to elt_init. | |
1651 | ||
1652 | 2022-01-02 Jason Merrill <jason@redhat.com> | |
1653 | ||
1654 | * decl.c (wrap_cleanups_r): Don't wrap if noexcept. | |
1655 | ||
ad41bd84 | 1656 | \f |
6123f29a | 1657 | Copyright (C) 2022 Free Software Foundation, Inc. |
ad41bd84 JM |
1658 | |
1659 | Copying and distribution of this file, with or without modification, | |
1660 | are permitted in any medium without royalty provided the copyright | |
1661 | notice and this notice are preserved. |