12023-05-08 Release Manager 2 3 * GCC 12.3.0 released. 4 52023-05-04 Jason Merrill <jason@redhat.com> 6 7 Revert: 8 2023-04-18 Jason Merrill <jason@redhat.com> 9 10 PR c++/106890 11 * init.cc (maybe_instantiate_nsdmi_init): Don't leave 12 current_function_decl set to a constructor. 13 142023-05-03 Jakub Jelinek <jakub@redhat.com> 15 16 Backported from master: 17 2023-05-03 Jakub Jelinek <jakub@redhat.com> 18 19 * cp-gimplify.cc (cp_fold_data): Move definition earlier. 20 (cp_gimplify_expr): Pass address of genericize = true 21 constructed data rather than &pset to cp_walk_tree with cp_fold_r. 22 232023-04-30 Iain Sandoe <iain@sandoe.co.uk> 24 25 Backported from master: 26 2023-04-09 Iain Sandoe <iain@sandoe.co.uk> 27 28 * coroutines.cc (coro_rewrite_function_body): Ensure that added 29 bind expressions have scope blocks. 30 312023-04-30 Iain Sandoe <iain@sandoe.co.uk> 32 33 Backported from master: 34 2023-04-01 Iain Sandoe <iain@sandoe.co.uk> 35 36 PR c++/101118 37 * coroutines.cc (flatten_await_stmt): Use the current count of 38 promoted temporaries to build a unique name for the frame entries. 39 402023-04-30 Andrew Pinski <pinskia@gmail.com> 41 42 Backported from master: 43 2022-12-16 Andrew Pinski <pinskia@gmail.com> 44 Iain Sandoe <iain@sandoe.co.uk> 45 46 PR c++/107768 47 * coroutines.cc (coro_rewrite_function_body): Initialize pointers 48 from nullptr_node. (morph_fn_to_coro): Likewise. 49 502023-04-28 Patrick Palka <ppalka@redhat.com> 51 52 Backported from master: 53 2023-03-24 Patrick Palka <ppalka@redhat.com> 54 55 PR c++/106969 56 * parser.cc (cp_parser_class_specifier): Clear current_class_ptr 57 and current_class_ref sooner, before parsing a class definition. 58 592023-04-28 Patrick Palka <ppalka@redhat.com> 60 61 Backported from master: 62 2023-03-01 Patrick Palka <ppalka@redhat.com> 63 Jason Merrill <jason@redhat.com> 64 65 PR c++/108219 66 PR c++/108218 67 * constexpr.cc (fold_to_constant): Define. 68 (maybe_constant_value): Move up early exit test for unevaluated 69 operands. Try reducing an unevaluated operand to a constant via 70 fold_to_constant. 71 (fold_non_dependent_expr_template): Add early exit test for 72 CONSTANT_CLASS_P nodes. Try reducing an unevaluated operand 73 to a constant via fold_to_constant. 74 * cp-tree.h (fold_to_constant): Declare. 75 762023-04-21 Jason Merrill <jason@redhat.com> 77 78 PR c++/108795 79 * semantics.cc (finish_id_expression_1): Check scope before 80 returning id_expression. 81 822023-04-20 Jason Merrill <jason@redhat.com> 83 84 Revert: 85 2023-04-18 Jason Merrill <jason@redhat.com> 86 87 PR c++/108099 88 * decl.cc (grokdeclarator): Handle non-typedef typedef_decl. 89 902023-04-19 Jason Merrill <jason@redhat.com> 91 92 PR c++/108099 93 * decl.cc (grokdeclarator): Keep typedef_decl for __int128_t. 94 952023-04-18 Jason Merrill <jason@redhat.com> 96 97 PR c++/109357 98 * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: 99 Check for complex initializer. 100 1012023-04-18 Jason Merrill <jason@redhat.com> 102 103 PR c++/105481 104 * pt.cc (type_unification_real): Adjust for partial ordering. 105 1062023-04-18 Jason Merrill <jason@redhat.com> 107 108 PR c++/105996 109 * typeck.cc (build_ptrmemfunc): Drop 0-offset optimization 110 and location wrappers. 111 1122023-04-18 Jason Merrill <jason@redhat.com> 113 114 PR c++/106890 115 * init.cc (maybe_instantiate_nsdmi_init): Don't leave 116 current_function_decl set to a constructor. 117 1182023-04-18 Jason Merrill <jason@redhat.com> 119 120 PR c++/108975 121 * lambda.cc (prune_lambda_captures): Don't bother in a template. 122 1232023-04-18 Jason Merrill <jason@redhat.com> 124 125 PR c++/69410 126 * friend.cc (do_friend): Handle namespace as scope argument. 127 * decl.cc (grokdeclarator): Pass down in_namespace. 128 1292023-04-18 Jason Merrill <jason@redhat.com> 130 131 PR c++/105809 132 * init.cc (get_nsdmi): Split out... 133 (maybe_instantiate_nsdmi_init): ...this function. 134 * cp-tree.h: Declare it. 135 * pt.cc (tsubst_expr): Use it. 136 1372023-04-18 Jason Merrill <jason@redhat.com> 138 139 PR c++/108242 140 * pt.cc (tsubst_expr) [TAG_DEFN]: Handle partial instantiation. 141 1422023-04-18 Jason Merrill <jason@redhat.com> 143 144 PR c++/101869 145 * semantics.cc (finish_qualified_id_expr): Don't try to build a 146 pointer-to-member if the scope is an enumeration. 147 1482023-04-18 Jason Merrill <jason@redhat.com> 149 150 PR c++/105406 151 * coroutines.cc (build_co_await): Handle lvalue 'o'. 152 1532023-04-18 Jason Merrill <jason@redhat.com> 154 155 PR c++/103871 156 PR c++/98056 157 * typeck.cc (cp_build_modify_expr): Allow array initialization of 158 DECL_ARTIFICIAL variable. 159 1602023-04-18 Jason Merrill <jason@redhat.com> 161 162 PR c++/108468 163 * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE 164 is non-null. 165 1662023-04-18 Jason Merrill <jason@redhat.com> 167 168 PR c++/107310 169 * cp-gimplify.cc (genericize_if_stmt): Restore folding 170 of constant conditions. 171 1722023-04-18 Jason Merrill <jason@redhat.com> 173 174 PR c++/108566 175 * mangle.cc (anon_aggr_naming_decl): New. 176 (write_unqualified_name): Use it. 177 1782023-04-18 Jason Merrill <jason@redhat.com> 179 180 PR c++/107154 181 * cp-gimplify.cc (cp_genericize_init_expr): Use iloc_sentinel. 182 (cp_genericize_target_expr): Likewise. 183 1842023-04-18 Jason Merrill <jason@redhat.com> 185 186 PR c++/108099 187 * decl.cc (grokdeclarator): Handle non-typedef typedef_decl. 188 1892023-04-18 Jakub Jelinek <jakub@redhat.com> 190 191 Backported from master: 192 2023-04-12 Jakub Jelinek <jakub@redhat.com> 193 194 * Make-lang.in (s-cp-module-version): New target. 195 (cp/module.o): Depend on it. 196 (MODULE_VERSION): Remove variable. 197 (CFLAGS-cp/module.o): For -DMODULE_VERSION= argument just 198 cat s-cp-module-version. 199 2002023-04-18 Jakub Jelinek <jakub@redhat.com> 201 202 Backported from master: 203 2023-03-30 Jakub Jelinek <jakub@redhat.com> 204 205 PR c++/109319 206 * decl2.cc (grok_array_decl): After emitting a pedwarn for 207 -Wcomma-subscript, if processing_template_decl set orig_index_exp 208 to compound expr from orig_index_exp_list. 209 2102023-04-18 Jakub Jelinek <jakub@redhat.com> 211 212 Backported from master: 213 2023-03-20 Jakub Jelinek <jakub@redhat.com> 214 215 PR c++/109164 216 * cp-tree.h (var_needs_tls_wrapper): Declare. 217 * decl2.cc (var_needs_tls_wrapper): No longer static. 218 * decl.cc (cp_finish_decl): Clear TREE_READONLY on TLS variables 219 for which a TLS wrapper will be needed. 220 2212023-03-19 Jakub Jelinek <jakub@redhat.com> 222 223 Backported from master: 224 2023-03-14 Jakub Jelinek <jakub@redhat.com> 225 226 PR c++/109096 227 * tree.cc (record_has_unique_obj_representations): Ignore unnamed 228 bitfields. 229 2302023-03-19 Jakub Jelinek <jakub@redhat.com> 231 232 Backported from master: 233 2023-03-10 Jakub Jelinek <jakub@redhat.com> 234 235 PR c++/107558 236 * decl.cc (cp_finish_decl): Don't clear TREE_READONLY on 237 automatic non-aggregate variables just because of 238 -fmerge-all-constants. 239 2402023-03-19 Jakub Jelinek <jakub@redhat.com> 241 242 Backported from master: 243 2023-03-10 Jakub Jelinek <jakub@redhat.com> 244 245 PR c++/109039 246 * class.cc (end_of_class): For bit-fields, instead of computing 247 offset as sum of byte_position (field) and DECL_SIZE_UNIT (field), 248 compute it as sum of bit_position (field) and DECL_SIZE (field) 249 divided by BITS_PER_UNIT rounded up. 250 2512023-03-19 Jakub Jelinek <jakub@redhat.com> 252 253 Backported from master: 254 2023-03-10 Jakub Jelinek <jakub@redhat.com> 255 256 PR c/108079 257 * decl.cc (poplevel): Suppress OPT_Wunused_variable warning 258 after diagnosing it. 259 2602023-03-19 Jakub Jelinek <jakub@redhat.com> 261 262 Backported from master: 263 2023-03-02 Jakub Jelinek <jakub@redhat.com> 264 265 PR debug/108716 266 * cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set 267 DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location 268 of USING_STMT or input_location. 269 2702023-03-15 Marek Polacek <polacek@redhat.com> 271 272 Backported from master: 273 2023-03-15 Marek Polacek <polacek@redhat.com> 274 275 PR c++/107280 276 * constexpr.cc (cxx_eval_store_expression): Strip location wrappers. 277 2782023-03-13 Arsen Arsenovi�� <arsen@aarsen.me> 279 280 PR c++/106188 281 PR c++/106713 282 * coroutines.cc (coro_rewrite_function_body): Ensure we have a 283 BIND_EXPR wrapping the function body. 284 2852023-03-07 Marek Polacek <polacek@redhat.com> 286 287 Backported from master: 288 2023-02-10 Marek Polacek <polacek@redhat.com> 289 290 PR c++/107079 291 * call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init. 292 2932023-03-07 Marek Polacek <polacek@redhat.com> 294 295 Backported from master: 296 2023-03-07 Marek Polacek <polacek@redhat.com> 297 298 PR c++/107939 299 * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: Pass 300 'any' when recursing on a VAR_DECL and not a pointer to function. 301 3022023-03-07 Patrick Palka <ppalka@redhat.com> 303 304 Backported from master: 305 2023-03-03 Patrick Palka <ppalka@redhat.com> 306 307 PR c++/108998 308 * pt.cc (el_data::skipped_trees): New data member. 309 (extract_locals_r): Push to skipped_trees any unevaluated 310 contexts that we skipped over. 311 (extract_local_specs): For the second walk, start from each 312 tree in skipped_trees. 313 3142023-03-07 Patrick Palka <ppalka@redhat.com> 315 316 Backported from master: 317 2022-12-23 Patrick Palka <ppalka@redhat.com> 318 319 PR c++/108116 320 * constexpr.cc (maybe_constant_value): Clear 321 processing_template_decl before calling break_out_target_exprs. 322 * init.cc (get_nsdmi): Likewise. 323 * tree.cc (break_out_target_exprs): Assert processing_template_decl 324 is cleared. 325 3262023-03-07 Patrick Palka <ppalka@redhat.com> 327 328 Backported from master: 329 2022-12-23 Patrick Palka <ppalka@redhat.com> 330 331 PR c++/107853 332 * constraint.cc (maybe_substitute_reqs_for): Substitute into 333 the template-head requirements of a template friend using only 334 its outer arguments via outer_template_args. 335 * cp-tree.h (outer_template_args): Declare. 336 * pt.cc (outer_template_args): Define, factored out and 337 generalized from ... 338 (ctor_deduction_guides_for): ... here. 339 3402023-03-07 Patrick Palka <ppalka@redhat.com> 341 342 Backported from master: 343 2022-11-29 Patrick Palka <ppalka@redhat.com> 344 345 PR c++/107864 346 * decl.cc (function_requirements_equivalent_p): Don't check 347 DECL_TEMPLATE_SPECIALIZATION. 348 * pt.cc (determine_specialization): Propagate constraints when 349 specializing a function template too. Simplify by using 350 add_outermost_template_args. 351 3522023-03-07 Patrick Palka <ppalka@redhat.com> 353 354 Backported from master: 355 2022-11-03 Patrick Palka <ppalka@redhat.com> 356 357 PR c++/107179 358 * constraint.cc (tsubst_requires_expr): Make sure we're not 359 deferring access checks. 360 3612023-03-04 Marek Polacek <polacek@redhat.com> 362 363 PR c++/108550 364 * pt.cc (lookup_and_finish_template_variable): Clear tf_partial. 365 3662023-03-04 Marek Polacek <polacek@redhat.com> 367 368 Backported from master: 369 2023-03-02 Marek Polacek <polacek@redhat.com> 370 371 PR c++/106259 372 * parser.cc (class_decl_loc_t::diag_mismatched_tags): If the first 373 lookup of SPEC didn't find anything, try to look for 374 most_general_template. 375 3762023-03-04 Marek Polacek <polacek@redhat.com> 377 378 Backported from master: 379 2023-03-01 Marek Polacek <polacek@redhat.com> 380 381 PR c++/107574 382 * constexpr.cc (cxx_eval_constant_expression): Emit an error when 383 a PTRMEM_CST cannot be evaluated. 384 3852023-02-20 Marek Polacek <polacek@redhat.com> 386 387 Backported from master: 388 2023-02-20 Marek Polacek <polacek@redhat.com> 389 390 PR c++/108829 391 * pt.cc (prepend_one_capture): Set LAMBDA_CAPTURE_EXPLICIT_P. 392 (tsubst_lambda_expr): Pass LAMBDA_CAPTURE_EXPLICIT_P to 393 prepend_one_capture. 394 3952023-02-15 Marek Polacek <polacek@redhat.com> 396 397 Backported from master: 398 2023-02-15 Marek Polacek <polacek@redhat.com> 399 400 PR c++/106675 401 * call.cc (joust_maybe_elide_copy): Return false for ck_ambig. 402 4032023-02-10 Jakub Jelinek <jakub@redhat.com> 404 405 Backported from master: 406 2023-01-16 Jakub Jelinek <jakub@redhat.com> 407 408 PR c++/105593 409 * decl.cc (cp_finish_decl): Check warning_enabled_at 410 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead 411 of warn_init_self. 412 4132023-02-10 Marek Polacek <polacek@redhat.com> 414 415 Backported from master: 416 2022-08-11 Marek Polacek <polacek@redhat.com> 417 418 PR middle-end/102633 419 * decl.cc (cp_finish_decl): Call suppress_warning. 420 4212023-02-10 Jakub Jelinek <jakub@redhat.com> 422 423 Backported from master: 424 2023-01-24 Jakub Jelinek <jakub@redhat.com> 425 426 PR c++/108474 427 * cp-gimplify.cc (cp_fold_r): Handle structured bindings 428 vars like anon union artificial vars. 429 4302023-02-10 Jakub Jelinek <jakub@redhat.com> 431 432 Backported from master: 433 2023-01-14 Jakub Jelinek <jakub@redhat.com> 434 435 PR c++/108365 436 * typeck.cc (cp_build_binary_op): For integral division or modulo, 437 shorten if type0 is unsigned, or op0 is cast from narrower unsigned 438 integral type or stripped_op1 is INTEGER_CST other than -1. 439 4402023-02-10 Jakub Jelinek <jakub@redhat.com> 441 442 Backported from master: 443 2023-02-01 Jakub Jelinek <jakub@redhat.com> 444 445 PR c++/108607 446 * constexpr.cc (cxx_eval_constant_expression): Handle OMP_* 447 and OACC_* constructs as non-constant. 448 (potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE. 449 4502023-02-10 Jakub Jelinek <jakub@redhat.com> 451 452 Backported from master: 453 2023-01-19 Jakub Jelinek <jakub@redhat.com> 454 455 PR c++/53932 456 * cp-gimplify.cc (cp_fold_r): During cp_fully_fold_init replace 457 DECL_ANON_UNION_VAR_P VAR_DECLs with their corresponding 458 DECL_VALUE_EXPR. 459 4602023-02-10 Jakub Jelinek <jakub@redhat.com> 461 462 Backported from master: 463 2023-01-05 Jakub Jelinek <jakub@redhat.com> 464 465 PR c++/108286 466 * semantics.cc (finish_omp_target_clauses): Ignore clauses other than 467 OMP_CLAUSE_MAP. 468 4692023-02-10 Jakub Jelinek <jakub@redhat.com> 470 471 Backported from master: 472 2023-01-04 Jakub Jelinek <jakub@redhat.com> 473 474 PR c++/108206 475 * decl.cc (merge_default_template_args): Return false if either 476 new_parm or old_parm are erroneous. 477 4782023-02-10 Jakub Jelinek <jakub@redhat.com> 479 480 Backported from master: 481 2022-12-21 Jakub Jelinek <jakub@redhat.com> 482 483 PR c++/108180 484 * pt.cc (tsubst_expr): Don't call cp_finish_decl on 485 DECL_OMP_PRIVATIZED_MEMBER vars. 486 4872023-02-10 Jakub Jelinek <jakub@redhat.com> 488 489 Backported from master: 490 2022-12-15 Jakub Jelinek <jakub@redhat.com> 491 492 PR c++/107065 493 * typeck.cc (cp_build_unary_op) <case TRUTH_NOT_EXPR>: If 494 invert_truthvalue_loc returns obvalue_p, wrap it into NON_LVALUE_EXPR. 495 * parser.cc (cp_parser_binary_expression): Don't call 496 warn_logical_not_parentheses if current.lhs is a NON_LVALUE_EXPR 497 of a decl with boolean type. 498 4992023-02-06 Patrick Palka <ppalka@redhat.com> 500 501 Backported from master: 502 2023-02-06 Patrick Palka <ppalka@redhat.com> 503 504 PR c++/107461 505 * cp-tree.h (call_expr_dependent_name): Declare. 506 * pt.cc (iterative_hash_template_arg) <case CALL_EXPR>: Use 507 call_expr_dependent_name instead of dependent_name. 508 * tree.cc (call_expr_dependent_name): Define. 509 (called_fns_equal): Adjust to take two CALL_EXPRs instead of 510 CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead 511 of dependent_name. 512 (cp_tree_equal) <case CALL_EXPR>: Adjust call to called_fns_equal. 513 5142023-02-03 Patrick Palka <ppalka@redhat.com> 515 516 Backported from master: 517 2023-02-03 Patrick Palka <ppalka@redhat.com> 518 519 PR c++/107461 520 * semantics.cc (finish_call_expr): Strip ADDR_EXPR from 521 the selected callee during overload set pruning. 522 5232023-02-01 Marek Polacek <polacek@redhat.com> 524 525 Backported from master: 526 2023-02-01 Marek Polacek <polacek@redhat.com> 527 528 PR c++/107755 529 * call.cc (build_new_op): Don't call warn_logical_operator when 530 processing a template. 531 5322023-01-31 Marek Polacek <polacek@redhat.com> 533 534 PR c++/107593 535 PR c++/108597 536 * cp-tree.h (instantiation_dependent_expression_p): Don't 537 declare here. 538 5392023-01-04 Patrick Palka <ppalka@redhat.com> 540 541 Backported from master: 542 2023-01-04 Patrick Palka <ppalka@redhat.com> 543 544 PR c++/108282 545 * decl2.cc (mark_single_function): Ignore mark_used failure 546 only in a non-SFINAE context rather than in a SFINAE one. 547 5482022-12-19 Patrick Palka <ppalka@redhat.com> 549 550 Backported from master: 551 2022-12-15 Patrick Palka <ppalka@redhat.com> 552 553 PR c++/100295 554 PR c++/107579 555 * pt.cc (el_data::skip_unevaluated_operands): New data member. 556 (extract_locals_r): If skip_unevaluated_operands is true, 557 don't walk into unevaluated contexts. 558 (extract_local_specs): Walk the pattern twice, first with 559 skip_unevaluated_operands true followed by it set to false. 560 5612022-12-19 Patrick Palka <ppalka@redhat.com> 562 563 Backported from master: 564 2022-12-15 Patrick Palka <ppalka@redhat.com> 565 566 PR c++/108104 567 * pt.cc (unify) <default>: Relax assert to accept any 568 CONSTRUCTOR parm, not just COMPOUND_LITERAL_P one. 569 5702022-12-19 Patrick Palka <ppalka@redhat.com> 571 572 Backported from master: 573 2022-12-04 Patrick Palka <ppalka@redhat.com> 574 575 PR c++/107417 576 * pt.cc (for_each_template_parm_r) <case REQUIRES_EXPR>: Move 577 walking of the TREE_TYPE of each parameter to ... 578 * tree.cc (cp_walk_subtrees) <case REQUIRES_EXPR>: ... here. 579 5802022-12-19 Patrick Palka <ppalka@redhat.com> 581 582 Backported from master: 583 2022-12-03 Patrick Palka <ppalka@redhat.com> 584 585 PR c++/103081 586 * pt.cc (tsubst_copy) <case CONST_DECL>: Generalize 587 early exit test for namespace-scope decls to check dependence of 588 the enclosing scope instead. Remove dead early exit test. 589 5902022-12-19 Patrick Palka <ppalka@redhat.com> 591 592 Backported from master: 593 2022-11-30 Patrick Palka <ppalka@redhat.com> 594 595 PR c++/107542 596 * typeck.cc (cp_build_binary_op): In the SPACESHIP_EXPR case, 597 handle an error_mark_node result type. 598 5992022-11-20 Jakub Jelinek <jakub@redhat.com> 600 601 Backported from master: 602 2022-11-15 Jakub Jelinek <jakub@redhat.com> 603 604 * cp-tree.h (next_common_initial_seqence): Rename to ... 605 (next_common_initial_sequence): ... this. 606 * typeck.cc (next_common_initial_seqence): Rename to ... 607 (next_common_initial_sequence): ... this. 608 (layout_compatible_type_p): Call next_common_initial_sequence 609 rather than next_common_initial_seqence. 610 * semantics.cc (is_corresponding_member_aggr): Likewise. 611 6122022-11-18 Marek Polacek <polacek@redhat.com> 613 614 Backported from master: 615 2022-11-18 Marek Polacek <polacek@redhat.com> 616 617 PR c++/104066 618 * decl.cc (grokdeclarator): Check funcdecl_p before complaining 619 about constinit. 620 6212022-11-03 Jakub Jelinek <jakub@redhat.com> 622 623 Backported from master: 624 2022-10-24 Jakub Jelinek <jakub@redhat.com> 625 626 PR c++/105774 627 * constexpr.cc (cxx_eval_increment_expression): For signed types 628 that promote to int, evaluate PLUS_EXPR or MINUS_EXPR in int type. 629 6302022-11-03 Jakub Jelinek <jakub@redhat.com> 631 632 Backported from master: 633 2022-09-07 Jakub Jelinek <jakub@redhat.com> 634 635 PR c++/106829 636 * semantics.cc (finish_omp_target_clauses): If current_function_decl 637 isn't a nonstatic member function, don't set data.current_object to 638 non-NULL. 639 6402022-10-13 Marek Polacek <polacek@redhat.com> 641 642 Backported from master: 643 2022-10-13 Marek Polacek <polacek@redhat.com> 644 645 PR c++/106925 646 * except.cc (maybe_splice_retval_cleanup): Check current_function_decl. 647 Make the bool const. 648 6492022-09-29 Jason Merrill <jason@redhat.com> 650 651 * class.cc (check_methods): Call constraints_satisfied_p. 652 6532022-09-12 Jason Merrill <jason@redhat.com> 654 655 PR c++/93259 656 * pt.cc (type_dependent_expression_p): Treat a compound 657 literal of array-of-unknown-bound type like a variable. 658 6592022-09-12 Jason Merrill <jason@redhat.com> 660 661 PR c++/106893 662 PR c++/90451 663 * decl.cc (cp_finish_decl): Call mark_single_function. 664 6652022-08-30 Marek Polacek <polacek@redhat.com> 666 667 Backported from master: 668 2022-08-30 Marek Polacek <polacek@redhat.com> 669 670 PR c++/106759 671 * cp-objcp-common.cc (names_builtin_p): Handle RID_IS_NOTHROW_ASSIGNABLE 672 and RID_IS_NOTHROW_CONSTRUCTIBLE. 673 6742022-08-29 Jakub Jelinek <jakub@redhat.com> 675 676 Backported from master: 677 2022-08-16 Jakub Jelinek <jakub@redhat.com> 678 679 * typeck.cc (cp_build_modify_expr): Implement 680 P2327R1 - De-deprecating volatile compound operations. Don't warn 681 for |=, &= or ^= with volatile lhs. 682 * expr.cc (mark_use) <case MODIFY_EXPR>: Adjust warning wording, 683 leave out simple. 684 6852022-08-19 Release Manager 686 687 * GCC 12.2.0 released. 688 6892022-08-12 Jason Merrill <jason@redhat.com> 690 691 Backported from master: 692 2022-07-31 Jason Merrill <jason@redhat.com> 693 694 PR c++/106369 695 * constexpr.cc (reduced_constant_expression_p): Return false 696 if a CONSTRUCTOR initializes an empty field. 697 6982022-08-12 Marek Polacek <polacek@redhat.com> 699 700 Backported from master: 701 2022-04-29 Marek Polacek <polacek@redhat.com> 702 703 PR c++/67048 704 * parser.cc (cp_parser_enum_specifier): Warn about empty unnamed enum 705 only when it's followed by a semicolon. 706 7072022-07-26 Marek Polacek <polacek@redhat.com> 708 709 Backported from master: 710 2022-07-26 Marek Polacek <polacek@redhat.com> 711 712 PR c++/106311 713 * pt.cc (redeclare_class_template): Check DECL_P before accessing 714 DECL_SOURCE_LOCATION. 715 7162022-07-26 Jason Merrill <jason@redhat.com> 717 718 PR c++/106230 719 * semantics.cc (finish_for_stmt): Check stmts_are_full_exprs_p. 720 7212022-07-21 Jason Merrill <jason@redhat.com> 722 723 PR c++/106361 724 * decl.cc (move_fn_p): Remove assert. 725 7262022-07-21 Patrick Palka <ppalka@redhat.com> 727 728 Backported from master: 729 2022-07-13 Patrick Palka <ppalka@redhat.com> 730 731 PR c++/105912 732 * call.cc (extract_call_expr): Return a NULL_TREE on failure 733 instead of asserting. 734 * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Guard against 735 NULL_TREE extract_call_expr result. 736 7372022-07-21 Patrick Palka <ppalka@redhat.com> 738 739 Backported from master: 740 2022-07-13 Patrick Palka <ppalka@redhat.com> 741 742 PR c++/105842 743 * constraint.cc (satisfy_declaration_constraints): Refine early 744 exit test for argument dependence. 745 * cp-tree.h (uses_outer_template_parms_in_constraints): Declare. 746 * pt.cc (template_class_depth): Handle TI_TEMPLATE being a 747 FIELD_DECL. 748 (usse_outer_template_parms): Factor out constraint dependence 749 test into ... 750 (uses_outer_template_parms_in_constraints): ... here. 751 (type_dependent_expression_p): Use it for FUNCTION_DECL. 752 7532022-07-21 Patrick Palka <ppalka@redhat.com> 754 755 Backported from master: 756 2022-06-06 Patrick Palka <ppalka@redhat.com> 757 758 PR c++/53164 759 PR c++/105848 760 * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Look through an 761 ADDR_EXPR callee when calling mark_used. 762 7632022-07-21 Patrick Palka <ppalka@redhat.com> 764 765 Backported from master: 766 2022-06-03 Patrick Palka <ppalka@redhat.com> 767 768 PR c++/105637 769 * tree.cc (maybe_dummy_object): When returning a dummy 770 object, respect the cv-quals of 'this' if available. 771 7722022-07-21 Patrick Palka <ppalka@redhat.com> 773 774 Backported from master: 775 2022-06-03 Patrick Palka <ppalka@redhat.com> 776 777 PR c++/100374 778 * pt.cc (determine_specialization): Compare overall constraints 779 not just the trailing constraints. 780 (tsubst_each_template_parm_constraints): Define. 781 (tsubst_friend_function): Use it. 782 (tsubst_friend_class): Use it. 783 (tsubst_template_parm): Don't substitute TEMPLATE_PARM_CONSTRAINTS. 784 7852022-07-21 Patrick Palka <ppalka@redhat.com> 786 787 Backported from master: 788 2022-05-31 Patrick Palka <ppalka@redhat.com> 789 790 PR c++/105758 791 * call.cc (build_over_call): Use z_candidate::conversion_path 792 and ::access_path instead of TYPE_BINFO when building the 793 BASELINK for the templated form. 794 7952022-07-21 Patrick Palka <ppalka@redhat.com> 796 797 Backported from master: 798 2022-05-26 Patrick Palka <ppalka@redhat.com> 799 800 PR c++/96363 801 * decl.cc (shadow_tag): Use the return value of 802 maybe_process_partial_specialization. 803 * parser.cc (cp_parser_single_declaration): Call shadow_tag 804 before associate_classtype_constraints. 805 * pt.cc (maybe_new_partial_specialization): Change return type 806 to bool. Take 'type' argument by mutable reference. Set 'type' 807 to point to the correct constrained specialization when 808 appropriate. 809 (maybe_process_partial_specialization): Adjust accordingly. 810 8112022-07-19 Marek Polacek <polacek@redhat.com> 812 813 PR c++/105634 814 * call.cc (maybe_warn_class_memaccess): Avoid % by zero. 815 8162022-07-02 Sergei Trofimovich <siarheit@google.com> 817 818 Backported from master: 819 2022-06-27 Sergei Trofimovich <siarheit@google.com> 820 821 PR c++/106102 822 * mapper-client.cc: Include <memory> via "system.h". 823 * mapper-resolver.cc: Ditto. 824 * module.cc: Ditto. 825 8262022-07-01 Jason Merrill <jason@redhat.com> 827 828 PR c++/106024 829 * parser.cc (cp_parser_lookup_name): Limit previous change to 830 lambdas. 831 8322022-07-01 Jason Merrill <jason@redhat.com> 833 834 PR c++/105541 835 * cp-tree.h (TMPL_ARGS_DEPTH): 0 for null args. 836 * parser.cc (cp_parser_enclosed_template_argument_list): 837 Use 0-length TREE_VEC for <>. 838 8392022-07-01 Jason Merrill <jason@redhat.com> 840 841 PR c++/105779 842 * call.cc (resolve_args): Use complain. 843 8442022-07-01 Jason Merrill <jason@redhat.com> 845 846 PR c++/106024 847 * parser.cc (missing_template_diag): Factor out... 848 (cp_parser_id_expression): ...from here. 849 (cp_parser_lookup_name): Don't look in dependent object_type. 850 8512022-06-24 Patrick Palka <ppalka@redhat.com> 852 853 Backported from master: 854 2022-06-23 Patrick Palka <ppalka@redhat.com> 855 856 PR c++/105931 857 * expr.cc (fold_for_warn): Don't fold when in an unevaluated 858 context. 859 8602022-06-23 Jason Merrill <jason@redhat.com> 861 862 PR c++/105925 863 * decl.cc (reshape_init_array_1): Set 864 CONSTRUCTOR_IS_DESIGNATED_INIT here. 865 (reshape_init_class): And here. 866 8672022-06-23 Jason Merrill <jason@redhat.com> 868 869 PR c++/105885 870 * pt.cc (tsubst_copy_and_build): Also suppress -Waddress for 871 comparison of dependent operands. 872 8732022-06-23 Jason Merrill <jason@redhat.com> 874 875 PR c++/105964 876 * pt.cc (type_dependent_expression_p): Look through BASELINK. 877 8782022-06-23 Jason Merrill <jason@redhat.com> 879 880 PR c++/105908 881 * name-lookup.cc (outer_binding): Strip BASELINK. 882 8832022-06-19 Jakub Jelinek <jakub@redhat.com> 884 885 Backported from master: 886 2022-06-17 Jakub Jelinek <jakub@redhat.com> 887 888 PR c++/106001 889 * typeck.cc (build_x_shufflevector): Use fold_non_dependent_expr 890 instead of maybe_constant_value. 891 8922022-06-19 Jakub Jelinek <jakub@redhat.com> 893 894 Backported from master: 895 2022-06-09 Jakub Jelinek <jakub@redhat.com> 896 897 PR c++/105871 898 * constexpr.cc (cxx_eval_bit_field_ref): For BIT_FIELD_REF with 899 non-integral result type use fold_ternary too like for BIT_FIELD_REFs 900 from VECTOR_CST. If fold_ternary returns NULL, diagnose non-constant 901 expression, set *non_constant_p and return t, instead of returning 902 NULL. 903 9042022-06-11 Patrick Palka <ppalka@redhat.com> 905 906 Backported from master: 907 2022-06-03 Patrick Palka <ppalka@redhat.com> 908 909 PR c++/105756 910 * typeck.cc (cp_build_binary_op): Don't fold operands 911 when c_inhibit_evaluation_warnings. 912 9132022-06-08 Jason Merrill <jason@redhat.com> 914 915 PR c++/105852 916 PR c++/105761 917 * decl.cc (duplicate_decls): Avoid copying template info 918 from non-templated friend even if newdecl isn't a definition. 919 Correct handling of DECL_UNIQUE_FRIEND_P on templates. 920 * pt.cc (non_templated_friend_p): New. 921 * cp-tree.h (non_templated_friend_p): Declare it. 922 9232022-06-03 Jason Merrill <jason@redhat.com> 924 925 PR c++/105761 926 * decl.cc (duplicate_decls): Don't copy DECL_TEMPLATE_INFO 927 from a hidden friend. 928 9292022-06-02 Jason Merrill <jason@redhat.com> 930 931 PR c++/105795 932 * constexpr.cc (cxx_eval_bare_aggregate): Always call 933 init_subob_ctx. 934 9352022-06-01 Jason Merrill <jason@redhat.com> 936 937 PR c++/105734 938 * parser.cc (cp_parser_postfix_dot_deref_expression): Use typeof 939 if the expression has auto type. 940 9412022-06-01 Jason Merrill <jason@redhat.com> 942 943 PR c++/105779 944 * call.cc (resolve_args): Call mark_single_function here. 945 * pt.cc (unify_one_argument): Not here. 946 9472022-06-01 Patrick Palka <ppalka@redhat.com> 948 949 Backported from master: 950 2022-05-09 Patrick Palka <ppalka@redhat.com> 951 952 PR c++/105491 953 * constexpr.cc (reduced_constant_expression_p): Use 954 next_subobject_field instead. 955 * cp-tree.h (next_subobject_field): Declare. 956 * decl.cc (next_subobject_field): Define. 957 9582022-05-31 Jason Merrill <jason@redhat.com> 959 960 PR c++/105652 961 * pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda 962 instantiate into a class-scope lambda. 963 9642022-05-31 Jason Merrill <jason@redhat.com> 965 966 PR c++/105655 967 * pt.cc (build_template_decl): Add assert. 968 (tsubst_function_decl): Don't return a template. 969 9702022-05-31 Jason Merrill <jason@redhat.com> 971 972 PR c++/105623 973 * decl2.cc (mark_used): Copy type from fn to BASELINK. 974 * pt.cc (unify_one_argument): Call mark_single_function. 975 9762022-05-31 Jason Merrill <jason@redhat.com> 977 978 PR c++/102307 979 * decl.cc (check_initializer): Use build_cplus_new in case of 980 constexpr failure. 981 9822022-05-27 Marek Polacek <polacek@redhat.com> 983 984 Backported from master: 985 2022-05-27 Marek Polacek <polacek@redhat.com> 986 987 PR c++/105725 988 * parser.cc (class_decl_loc_t::add): Check CLASS_TYPE_P. 989 9902022-05-15 Jason Merrill <jason@redhat.com> 991 992 PR c++/105589 993 PR c++/105191 994 PR c++/92385 995 * init.cc (build_value_init): Handle class in template. 996 9972022-05-15 Jason Merrill <jason@redhat.com> 998 999 PR c++/104470 1000 * cp-tree.h (enum tsubst_flags): Add tf_dguide. 1001 * pt.cc (tsubst_aggr_type): Check it. 1002 (tsubst_baselink, tsubst_copy): Check it. 1003 (maybe_dependent_member_ref): Check it. 1004 (instantiate_alias_template): Handle it. 1005 (build_deduction_guide): Set it. 1006 10072022-05-15 Jason Merrill <jason@redhat.com> 1008 1009 PR c++/102651 1010 PR c++/49387 1011 * rtti.cc (get_tinfo_decl_direct): Don't complete_type. 1012 (emit_tinfo_decl): Update tdesc type if needed. 1013 10142022-05-06 Patrick Palka <ppalka@redhat.com> 1015 1016 Backported from master: 1017 2022-05-04 Patrick Palka <ppalka@redhat.com> 1018 1019 PR c++/105476 1020 * pt.cc (maybe_aggr_guide): Set processing_template_decl when 1021 partially instantiating the guide's parameter list. 1022 10232022-05-06 Jakub Jelinek <jakub@redhat.com> 1024 1025 Backported from master: 1026 2022-05-04 Jakub Jelinek <jakub@redhat.com> 1027 1028 * lambda.cc: Include decl.h. 1029 (maybe_add_lambda_conv_op): Temporarily override deprecated_state to 1030 UNAVAILABLE_DEPRECATED_SUPPRESS. 1031 10322022-05-06 Release Manager 1033 1034 * GCC 12.1.0 released. 1035 10362022-04-29 Iain Sandoe <iain@sandoe.co.uk> 1037 1038 Backported from master: 1039 2022-04-29 Iain Sandoe <iain@sandoe.co.uk> 1040 1041 PR c++/105426 1042 * coroutines.cc (register_local_var_uses): Allow promotion of unnamed 1043 temporaries to coroutine frame copies. 1044 10452022-04-28 Patrick Palka <ppalka@redhat.com> 1046 1047 Backported from master: 1048 2022-04-28 Patrick Palka <ppalka@redhat.com> 1049 1050 PR c++/105425 1051 * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Treat 1052 DEPENDENT_OPERATOR_TYPE like an empty type. 1053 10542022-04-28 Iain Sandoe <iain@sandoe.co.uk> 1055 1056 PR c++/104051 1057 * coroutines.cc (coro_diagnose_throwing_final_aw_expr): Handle 1058 non-target expression inputs. 1059 10602022-04-28 Iain Sandoe <iain@sandoe.co.uk> 1061 1062 PR c++/105301 1063 * coroutines.cc (coro_promise_type_found_p): Account for possible 1064 mutliple overloads of the promise return_value() method. 1065 10662022-04-28 Iain Sandoe <iain@sandoe.co.uk> 1067 1068 PR c++/105287 1069 * coroutines.cc (maybe_promote_temps): Ensure generated temporaries 1070 are added to the bind expr. 1071 (add_var_to_bind): Fix local var naming to use portable punctuation. 1072 (register_local_var_uses): Do not add synthetic names to unnamed 1073 temporaries. 1074 10752022-04-28 Nathan Sidwell <nathan@acm.org> 1076 Iain Sandoe <iain@sandoe.co.uk> 1077 1078 PR c++/103868 1079 * coroutines.cc (finish_co_await_expr): Do not process non-dependent 1080 coroutine expressions at template definition time. 1081 (finish_co_yield_expr): Likewise. 1082 (finish_co_return_stmt): Likewise. 1083 10842022-04-28 Marek Polacek <polacek@redhat.com> 1085 1086 PR c++/90107 1087 * parser.cc (cp_parser_class_specifier_1): Accept :: after a class 1088 definition. 1089 10902022-04-27 Jason Merrill <jason@redhat.com> 1091 1092 * tree.cc (strip_typedefs): Add default argument comments. 1093 10942022-04-27 Marek Polacek <polacek@redhat.com> 1095 1096 PR c++/105398 1097 * pt.cc (uses_template_parms): Return false for any NAMESPACE_DECL. 1098 10992022-04-26 Jason Merrill <jason@redhat.com> 1100 1101 PR c++/102629 1102 * pt.cc (gen_elem_of_pack_expansion_instantiation): Clear 1103 TEMPLATE_TYPE_PARAMETER_PACK on auto. 1104 11052022-04-26 Patrick Palka <ppalka@redhat.com> 1106 1107 PR c++/105386 1108 * semantics.cc (finish_decltype_type): Pass tf_decltype to 1109 instantiate_non_dependent_expr_sfinae. 1110 11112022-04-26 Jason Merrill <jason@redhat.com> 1112 1113 PR c++/104624 1114 * pt.cc (check_for_bare_parameter_packs): Check for lambda 1115 function parameter pack. 1116 11172022-04-26 Patrick Palka <ppalka@redhat.com> 1118 1119 PR c++/105289 1120 PR c++/86193 1121 * pt.cc (process_partial_specialization): Downgrade "partial 1122 specialization isn't more specialized" diagnostic from permerror 1123 to an on-by-default pedwarn. 1124 (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the 1125 NTTP type a second time, use the original type not the 1126 substituted type. 1127 11282022-04-25 Marek Polacek <polacek@redhat.com> 1129 1130 PR c++/105353 1131 * typeck.cc (build_x_shufflevector): Use 1132 instantiation_dependent_expression_p except for the first two 1133 arguments. 1134 11352022-04-21 Marek Polacek <polacek@redhat.com> 1136 1137 * constexpr.cc (cxx_eval_logical_expression): Remove unused 1138 parameter. 1139 (cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>, 1140 <case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression. 1141 11422022-04-21 Marek Polacek <polacek@redhat.com> 1143 1144 PR c++/105321 1145 * constexpr.cc (cxx_eval_logical_expression): Always pass false for lval 1146 to cxx_eval_constant_expression. 1147 11482022-04-20 Ed Catmur <ed@catmur.uk> 1149 1150 PR c++/104996 1151 * call.cc (compare_ics): When comparing list-initialization 1152 sequences, do not return early. 1153 11542022-04-19 Jakub Jelinek <jakub@redhat.com> 1155 1156 PR c++/105256 1157 * typeck2.cc (process_init_constructor_array, 1158 process_init_constructor_record, process_init_constructor_union): Move 1159 CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag from CONSTRUCTOR elements to the 1160 containing CONSTRUCTOR. 1161 11622022-04-15 Marek Polacek <polacek@redhat.com> 1163 1164 PR c++/105268 1165 * parser.cc (cp_parser_placeholder_type_specifier): Return 1166 error_mark_node when trying to build up a constrained parameter in 1167 a default argument. 1168 11692022-04-15 Jason Merrill <jason@redhat.com> 1170 1171 PR c++/102804 1172 * decl.cc (grokdeclarator): Drop typedef used with 'unsigned'. 1173 11742022-04-15 Jason Merrill <jason@redhat.com> 1175 1176 PR c++/102987 1177 * error.cc (dump_expr): Handle USING_DECL. 1178 [VIEW_CONVERT_EXPR]: Just look through location wrapper. 1179 11802022-04-14 Jason Merrill <jason@redhat.com> 1181 1182 PR c++/104646 1183 * constexpr.cc (maybe_save_constexpr_fundef): Don't do extra 1184 checks for defaulted ctors. 1185 11862022-04-14 Jason Merrill <jason@redhat.com> 1187 1188 PR c++/82980 1189 * lambda.cc (type_deducible_expression_p): New. 1190 (lambda_capture_field_type): Check it. 1191 11922022-04-14 Jason Merrill <jason@redhat.com> 1193 1194 PR c++/65211 1195 * pt.cc (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN. 1196 11972022-04-14 Jason Merrill <jason@redhat.com> 1198 1199 PR c++/97219 1200 * name-lookup.cc (dependent_local_decl_p): New. 1201 * cp-tree.h (dependent_local_decl_p): Declare. 1202 * semantics.cc (finish_call_expr): Use it. 1203 * pt.cc (tsubst_arg_types): Also substitute default args 1204 for local externs. 1205 12062022-04-14 Jason Merrill <jason@redhat.com> 1207 1208 PR c++/101698 1209 * pt.cc (tsubst_baselink): Also check dependent optype. 1210 12112022-04-14 Jason Merrill <jason@redhat.com> 1212 1213 PR c++/101442 1214 * decl.cc (cp_finish_decl): Don't pass decl to push_cleanup. 1215 * init.cc (perform_member_init): Likewise. 1216 * semantics.cc (push_cleanup): Adjust comment. 1217 12182022-04-13 Jason Merrill <jason@redhat.com> 1219 1220 PR c++/105245 1221 PR c++/100111 1222 * constexpr.cc (cxx_eval_store_expression): Build a CONSTRUCTOR 1223 as needed in empty base handling. 1224 12252022-04-13 Jakub Jelinek <jakub@redhat.com> 1226 1227 PR c++/105233 1228 * decl2.cc (cp_check_const_attributes): For aligned attribute 1229 pass manifestly_const_eval=true to fold_non_dependent_expr. 1230 12312022-04-13 Marek Polacek <polacek@redhat.com> 1232 1233 PR c++/97296 1234 * call.cc (direct_reference_binding): strip_top_quals when creating 1235 a ck_qual. 1236 12372022-04-12 Jason Merrill <jason@redhat.com> 1238 1239 PR c++/104669 1240 * decl.cc (decls_match): Compare versions even if not recording. 1241 (duplicate_decls): Propagate attributes to alias. 1242 * decl2.cc (find_last_decl): Give up if versioned. 1243 12442022-04-12 Jason Merrill <jason@redhat.com> 1245 1246 PR c++/102071 1247 * init.cc (build_new_1): Check array_p for alignment. 1248 12492022-04-12 Patrick Palka <ppalka@redhat.com> 1250 1251 PR c++/103105 1252 * pt.cc (build_extra_args): Call preserve_args. 1253 12542022-04-12 Jason Merrill <jason@redhat.com> 1255 1256 PR c++/104142 1257 * decl.cc (check_initializer): Check TREE_SIDE_EFFECTS. 1258 12592022-04-12 Jason Merrill <jason@redhat.com> 1260 1261 PR c++/105223 1262 PR c++/92918 1263 * class.cc (finish_struct): Always using op=. 1264 12652022-04-11 Jason Merrill <jason@redhat.com> 1266 1267 PR c++/98249 1268 * call.cc (build_operator_new_call): Just look in ::. 1269 12702022-04-11 Alexandre Oliva <oliva@adacore.com> 1271 1272 * constexpr.cc (cxx_eval_call_expression): Disregard dtor 1273 result. 1274 12752022-04-11 Alexandre Oliva <oliva@adacore.com> 1276 1277 * semantics.cc (set_cleanup_locs): Propagate locus to call 1278 wrapped in cast-to-void. 1279 12802022-04-11 Jason Merrill <jason@redhat.com> 1281 1282 PR c++/100370 1283 * init.cc (warn_placement_new_too_small): Check deref. 1284 12852022-04-09 Jason Merrill <jason@redhat.com> 1286 1287 PR c++/105191 1288 PR c++/92385 1289 * tree.cc (build_vec_init_elt): Do {}-init for aggregates. 1290 * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init 1291 for non-aggregate types. 1292 (build_vec_init_expr): Also check constancy of explicit 1293 initializer elements. 1294 12952022-04-09 Jason Merrill <jason@redhat.com> 1296 1297 PR c++/91618 1298 PR c++/96604 1299 * name-lookup.cc (set_decl_namespace): Set 1300 DECL_IMPLICIT_INSTANTIATION if no non-template match. 1301 * pt.cc (check_explicit_specialization): Check it. 1302 * decl2.cc (check_classfn): Call it. 1303 13042022-04-07 Patrick Palka <ppalka@redhat.com> 1305 1306 PR c++/99479 1307 * name-lookup.cc (name_lookup::using_queue): Change to an 1308 auto_vec (with 16 elements of internal storage). 1309 (name_lookup::queue_namespace): Change return type to void, 1310 take queue parameter by reference and adjust function body 1311 accordingly. 1312 (name_lookup::do_queue_usings): Inline into ... 1313 (name_lookup::queue_usings): ... here. As in queue_namespace. 1314 (name_lookup::search_unqualified): Don't make queue static, 1315 remove length variable, and adjust function body accordingly. 1316 13172022-04-07 Jakub Jelinek <jakub@redhat.com> 1318 1319 PR tree-optimization/102586 1320 * cp-objcp-common.h (cp_classtype_as_base): Declare. 1321 (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine. 1322 * cp-objcp-common.cc (cp_classtype_as_base): New function. 1323 13242022-04-07 Jason Merrill <jason@redhat.com> 1325 1326 PR c++/101051 1327 * decl.cc (grokdeclarator): Reject conversion with trailing return 1328 sooner. 1329 13302022-04-07 Jason Merrill <jason@redhat.com> 1331 1332 PR c++/101717 1333 * lambda.cc (lambda_expr_this_capture): Check all enclosing 1334 lambdas for completeness. 1335 13362022-04-07 Jason Merrill <jason@redhat.com> 1337 1338 PR c++/105187 1339 * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for 1340 vectors. 1341 13422022-04-06 Jakub Jelinek <jakub@redhat.com> 1343 1344 PR c++/104668 1345 * decl2.cc (splice_template_attributes): Return NULL if *p is 1346 error_mark_node. 1347 (cplus_decl_attributes): Return early if attributes is 1348 error_mark_node. Don't check that later. 1349 13502022-04-06 Patrick Palka <ppalka@redhat.com> 1351 1352 PR c++/105143 1353 * pt.cc (do_class_deduction): Check complain before attempting 1354 to issue a -Wctad-maybe-unsupported warning. 1355 13562022-04-06 Jason Merrill <jason@redhat.com> 1357 1358 PR c++/104702 1359 * init.cc (build_vec_init): Use a reference for the result. 1360 13612022-04-06 Jason Merrill <jason@redhat.com> 1362 1363 PR c++/100608 1364 * name-lookup.cc (check_local_shadow): Use -Wshadow=local 1365 if exactly one of 'old' and 'decl' is a type. 1366 13672022-04-05 Jason Merrill <jason@redhat.com> 1368 1369 PR c++/103852 1370 DR 1286 1371 * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17. 1372 13732022-04-05 Jason Merrill <jason@redhat.com> 1374 1375 PR c++/101677 1376 * name-lookup.h (struct cp_binding_level): Add requires_expression 1377 bit-field. 1378 * parser.cc (cp_parser_requires_expression): Set it. 1379 (synthesize_implicit_template_parm): Check it. 1380 13812022-04-04 Jason Merrill <jason@redhat.com> 1382 1383 PR c++/101894 1384 * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT. 1385 13862022-04-04 Jason Merrill <jason@redhat.com> 1387 1388 PR c++/103852 1389 DR 1286 1390 * pt.cc (get_underlying_template): Compare default template args. 1391 13922022-04-03 Benno Evers <benno.evers@tenzir.com> 1393 Iain Sandoe <iain@sandoe.co.uk> 1394 1395 PR c++/103328 1396 * coroutines.cc (morph_fn_to_coro): Reset 1397 current_binding_level->blocks. 1398 13992022-04-01 Jason Merrill <jason@redhat.com> 1400 1401 Revert: 1402 2022-03-31 Jason Merrill <jason@redhat.com> 1403 1404 PR c++/96645 1405 * parser.cc (cp_parser_early_parsing_nsdmi): New. 1406 (cp_parser_member_declaration): Call it. 1407 14082022-04-01 Jason Merrill <jason@redhat.com> 1409 1410 Revert: 1411 2022-03-24 Jason Merrill <jason@redhat.com> 1412 1413 PR c++/96645 1414 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. 1415 * class.cc (type_has_default_ctor_to_be_synthesized): New. 1416 (type_has_non_user_provided_default_constructor_1): Support it. 1417 (type_has_non_user_provided_default_constructor): Now a wrapper. 1418 * method.cc (complain_about_unparsed_dmi): New. 1419 (constructible_expr): Call it. 1420 14212022-04-01 Patrick Palka <ppalka@redhat.com> 1422 1423 PR c++/105110 1424 * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from 1425 the argument type of an NTTP before deducing from it. 1426 14272022-03-31 Jason Merrill <jason@redhat.com> 1428 1429 PR c++/96645 1430 * parser.cc (cp_parser_early_parsing_nsdmi): New. 1431 (cp_parser_member_declaration): Call it. 1432 14332022-03-30 Patrick Palka <ppalka@redhat.com> 1434 1435 PR c++/100474 1436 * constraint.cc (diagnose_trait_expr): Handle all remaining 1437 traits appropriately. Remove default case. 1438 14392022-03-30 Marek Polacek <polacek@redhat.com> 1440 1441 PR c++/93280 1442 PR c++/104583 1443 * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor. 1444 14452022-03-30 Jakub Jelinek <jakub@redhat.com> 1446 1447 PR c++/105092 1448 * pt.cc (tsubst_omp_clause_decl): When handling iterators, set 1449 DECL_CONTEXT of the iterator var to current_function_decl and 1450 call pushdecl. 1451 14522022-03-30 Jakub Jelinek <jakub@redhat.com> 1453 1454 PR c++/105061 1455 * parser.cc (cp_parser_template_introduction): If member_p, temporarily 1456 clear parser->colon_corrects_to_scope_p around tentative parsing of 1457 nested name specifier. 1458 14592022-03-28 Jason Merrill <jason@redhat.com> 1460 1461 * pt.cc (determine_specialization): Add comment. 1462 14632022-03-28 Patrick Palka <ppalka@redhat.com> 1464 1465 PR c++/105067 1466 * pt.cc (finish_concept_definition): Check that a concept is 1467 declared with exactly one template parameter list. 1468 14692022-03-28 Patrick Palka <ppalka@redhat.com> 1470 1471 PR c++/105064 1472 * constraint.cc (maybe_substitute_reqs_for): Don't assume 1473 DECL_TEMPLATE_INFO is available. 1474 14752022-03-28 Jason Merrill <jason@redhat.com> 1476 1477 PR c++/105003 1478 PR c++/104008 1479 PR c++/102869 1480 * pt.cc (complex_alias_template_r): walk_tree callback, replacing 1481 uses_all_template_parms_r, complex_pack_expansion_r. 1482 (complex_alias_template_p): Adjust. 1483 * tree.cc (strip_typedefs): Revert r12-7710 change. 1484 14852022-03-28 Jason Merrill <jason@redhat.com> 1486 1487 PR c++/102071 1488 * init.cc (build_new_1): Include cookie in alignment. Omit 1489 constexpr wrapper from alloc_call. 1490 14912022-03-28 Jason Merrill <jason@redhat.com> 1492 1493 PR c++/103291 1494 * name-lookup.cc (push_local_extern_decl_alias): Call 1495 determine_visibility. 1496 14972022-03-28 Jason Merrill <jason@redhat.com> 1498 1499 PR c++/102123 1500 * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting 1501 a type template reference. 1502 15032022-03-28 Jason Merrill <jason@redhat.com> 1504 1505 PR c++/103968 1506 * pt.cc (value_dependent_expression_p): Check 1507 has_value_dependent_address for conversion to reference. 1508 15092022-03-28 Jason Merrill <jason@redhat.com> 1510 1511 PR c++/103943 1512 * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from 1513 tsubst_baselink. 1514 (instantiation_dependent_scope_ref_p): Check dependent_scope_p. 1515 15162022-03-28 Jason Merrill <jason@redhat.com> 1517 1518 PR c++/102045 1519 * call.cc (make_base_init_ok): Call make_used. 1520 15212022-03-28 Jason Merrill <jason@redhat.com> 1522 1523 PR c++/104847 1524 * mangle.cc (write_expression): Don't write a union designator when 1525 undigested. 1526 15272022-03-28 Jason Merrill <jason@redhat.com> 1528 1529 PR c++/99445 1530 PR c++/103769 1531 * tree.cc (strip_typedefs): Use build_distinct_type_copy. 1532 15332022-03-26 Patrick Palka <ppalka@redhat.com> 1534 1535 PR c++/105050 1536 * constexpr.cc (potential_constant_expression_1) <case IF_STMT>: 1537 Clarify error message when a if-stmt is non-constant because its 1538 branches are non-constant. 1539 15402022-03-26 Patrick Palka <ppalka@redhat.com> 1541 1542 PR c++/103455 1543 * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test 1544 CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P. 1545 15462022-03-26 Jakub Jelinek <jakub@redhat.com> 1547 1548 * parser.cc (cp_parser_postfix_expression) 1549 <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't 1550 return cp_build_{vec,convert,bit_cast} result right away, instead 1551 set postfix_expression to it and break. 1552 15532022-03-25 Marek Polacek <polacek@redhat.com> 1554 1555 PR c++/104944 1556 * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void). 1557 (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with 1558 complain == true. 1559 15602022-03-24 Marek Polacek <polacek@redhat.com> 1561 1562 PR c++/104284 1563 * decl.cc (check_initializer): Don't call build_aggr_init in 1564 a template. 1565 15662022-03-24 Jason Merrill <jason@redhat.com> 1567 1568 PR c++/96645 1569 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. 1570 * class.cc (type_has_default_ctor_to_be_synthesized): New. 1571 (type_has_non_user_provided_default_constructor_1): Support it. 1572 (type_has_non_user_provided_default_constructor): Now a wrapper. 1573 * method.cc (complain_about_unparsed_dmi): New. 1574 (constructible_expr): Call it. 1575 15762022-03-24 Marek Polacek <polacek@redhat.com> 1577 1578 PR c++/102990 1579 * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs. 1580 15812022-03-24 Patrick Palka <ppalka@redhat.com> 1582 1583 PR c++/104620 1584 * call.cc (build_over_call): Use cxx_constant_value_sfinae 1585 instead of cxx_constant_value to evaluate a consteval call. 1586 * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter 1587 and pass it to cxx_eval_outermost_constant_expr. 1588 * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter. 1589 * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to 1590 cxx_constant_value_sfinae. 1591 15922022-03-24 Jakub Jelinek <jakub@redhat.com> 1593 1594 PR c++/104994 1595 * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing 1596 through extern thread_local declarations. Change wording from 1597 declaration to definition. 1598 (potential_constant_expression_1): Don't diagnose extern thread_local 1599 declarations. Change wording from declared to defined. 1600 * decl.cc (start_decl): Likewise. 1601 16022022-03-23 Jason Merrill <jason@redhat.com> 1603 1604 PR c++/103337 1605 * decl.cc (reshape_single_init): New. 1606 (reshape_init_class): Use it. 1607 16082022-03-23 Jason Merrill <jason@redhat.com> 1609 1610 PR c++/105006 1611 * name-lookup.cc (lookup_using_decl): Check that scope is 1612 a dependent type before looking for dependent using. 1613 16142022-03-23 Jason Merrill <jason@redhat.com> 1615 1616 PR c++/105006 1617 * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup 1618 finds a dependent using. 1619 16202022-03-21 Jason Merrill <jason@redhat.com> 1621 1622 PR c++/58646 1623 * init.cc (build_vec_init): Check for vla element type. 1624 16252022-03-21 Jason Merrill <jason@redhat.com> 1626 1627 PR c++/103337 1628 PR c++/102740 1629 PR c++/103299 1630 PR c++/102538 1631 * decl.cc (reshape_init_class): Avoid looking for designator 1632 after we found it. 1633 (reshape_init_r): Keep looking for designator. 1634 16352022-03-21 Jason Merrill <jason@redhat.com> 1636 1637 PR c++/101767 1638 * decl.cc (reshape_init_class): Back out of anon struct 1639 if a designator doesn't match. 1640 16412022-03-18 Jason Merrill <jason@redhat.com> 1642 1643 PR c++/92918 1644 PR c++/104476 1645 * class.cc (add_method): Avoid adding the same used function twice. 1646 (handle_using_decl): Don't add_method. 1647 (finish_struct): Don't using op= if we have one already. 1648 (maybe_push_used_methods): New. 1649 * semantics.cc (finish_member_declaration): Call it. 1650 * name-lookup.cc (diagnose_name_conflict): No longer static. 1651 (push_class_level_binding): Revert 92918 patch, limit 1652 to dependent using. 1653 * cp-tree.h: Adjust. 1654 16552022-03-18 Jakub Jelinek <jakub@redhat.com> 1656 1657 PR c++/104568 1658 * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE 1659 argument and its handling, instead add ITYPE2 argument. Only 1660 support COOKIE_SIZE != NULL. 1661 (build_new_1): If size is 0, change it to 0 * outer_nelts if 1662 outer_nelts is non-NULL. Pass type rather than elt_type to 1663 maybe_wrap_new_for_constexpr. 1664 * constexpr.cc (build_new_constexpr_heap_type): New function. 1665 (cxx_eval_constant_expression) <case CONVERT_EXPR>: 1666 If elt_size is zero sized type, try to recover outer_nelts from 1667 the size argument to operator new/new[] and pass that as 1668 arg_size to build_new_constexpr_heap_type. Pass ctx, 1669 non_constant_p and overflow_p to that call too. 1670 16712022-03-18 Marek Polacek <polacek@redhat.com> 1672 1673 PR c++/104008 1674 * tree.cc (strip_typedefs): Don't strip an alias template when 1675 doing so would result in losing a parameter pack. 1676 16772022-03-16 Patrick Palka <ppalka@redhat.com> 1678 1679 * search.cc (lookup_member): Simplify by handling all values 1680 of protect together in the ambiguous case. Don't modify protect. 1681 16822022-03-16 Patrick Palka <ppalka@redhat.com> 1683 1684 PR c++/96780 1685 * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to 1686 std::move/forward and other cast-like functions into simple 1687 casts. 1688 16892022-03-15 Patrick Palka <ppalka@redhat.com> 1690 1691 PR c++/103177 1692 * search.cc (lookup_field_info::errstr): Remove this data 1693 member. 1694 (lookup_field_r): Don't set errstr. 1695 (lookup_member): Check ambiguity before checking access. 1696 Simplify accordingly after errstr removal. Exit early upon 1697 error or empty result. 1698 16992022-03-15 Jakub Jelinek <jakub@redhat.com> 1700 1701 PR c++/104623 1702 * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens. 1703 17042022-03-14 Jakub Jelinek <jakub@redhat.com> 1705 1706 PR tree-optimization/102586 1707 * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where 1708 first argument's type is pointer to non-trivially-copyable type unless 1709 it is address of a variable or parameter. 1710 17112022-03-12 Patrick Palka <ppalka@redhat.com> 1712 1713 PR c++/104641 1714 * cp-tree.h (tsubst_flags::tf_tst_ok): New flag. 1715 * decl.cc (make_typename_type): Allow a typename-specifier to 1716 resolve to a template when tf_tst_ok, in which case return 1717 a CTAD placeholder for the template. 1718 * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when 1719 substituting the type. 1720 (tsubst): Clear tf_tst_ok and remember if it was set. 1721 <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type 1722 appropriately. 1723 (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting 1724 the type. 1725 (tsubst_copy_and_build) <case CAST_EXPR>: Likewise. 1726 <case CONSTRUCTOR>: Likewise. 1727 17282022-03-12 Patrick Palka <ppalka@redhat.com> 1729 1730 PR c++/104622 1731 * call.cc (missing_conversion_p): Define. 1732 (add_candidates): Use it. 1733 * pt.cc (check_non_deducible_conversion): Change type of strict 1734 parameter to unification_kind_t and directly test for DEDUCE_CALL. 1735 17362022-03-12 Patrick Palka <ppalka@redhat.com> 1737 1738 PR c++/104527 1739 * constraint.cc (normalize_atom): Set 1740 ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately. 1741 (get_mapped_args): Make static, adjust parameters. Always 1742 return a vector whose depth corresponds to the template depth of 1743 the context of the atomic constraint expression. Micro-optimize 1744 by passing false as exact to safe_grow_cleared and by collapsing 1745 a multi-level depth-one argument vector. 1746 (satisfy_atom): Adjust call to get_mapped_args and 1747 diagnose_atomic_constraint. 1748 (diagnose_atomic_constraint): Replace map parameter with an args 1749 parameter. 1750 * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define. 1751 (get_mapped_args): Remove declaration. 1752 17532022-03-12 Patrick Palka <ppalka@redhat.com> 1754 Jason Merrill <jason@redhat.com> 1755 1756 PR c++/98644 1757 * constexpr.cc (mark_non_constant): Define, split out from ... 1758 (cxx_eval_outermost_constant_expr): ... here. 1759 (maybe_constant_value): Use it. 1760 17612022-03-12 Patrick Palka <ppalka@redhat.com> 1762 1763 * semantics.cc (finish_unary_fold_expr): Use input_location 1764 instead of UNKNOWN_LOCATION. 1765 (finish_binary_fold_expr): Likewise. 1766 17672022-03-12 Thomas Schwinge <thomas@codesourcery.com> 1768 1769 PR other/65095 1770 * semantics.cc (handle_omp_array_sections_1) 1771 (cp_oacc_check_attachments): Call 'user_omp_clause_code_name' 1772 instead of 'c_omp_map_clause_name'. 1773 17742022-03-10 Marek Polacek <polacek@redhat.com> 1775 1776 PR c++/104608 1777 * parser.cc (cp_parser_template_name): Repeat lookup of 1778 TYPE_DECLs. 1779 17802022-03-10 Marek Polacek <polacek@redhat.com> 1781 1782 PR c++/104752 1783 * semantics.cc (finish_compound_literal): Disallow auto{x} for 1784 is_constrained_auto. 1785 * typeck2.cc (build_functional_cast_1): Likewise. 1786 17872022-03-10 Marek Polacek <polacek@redhat.com> 1788 1789 PR c++/104846 1790 * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving 1791 data member errors. 1792 17932022-03-10 Jakub Jelinek <jakub@redhat.com> 1794 1795 PR c++/103460 1796 * decl.cc (grok_op_properties): Allow variadic operator[] for 1797 C++23. 1798 17992022-03-10 Roger Sayle <roger@nextmovesoftware.com> 1800 1801 PR c++/95999 1802 * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST 1803 consider it to be zero (i.e. treat it like error_mark_node). 1804 (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST, 1805 set VALUE to error_mark_node. 1806 18072022-03-10 Roger Sayle <roger@nextmovesoftware.com> 1808 1809 PR c++/39751 1810 * parser.cc (cp_parser_late_parsing_for_member): Confirm the token 1811 stream hasn't been purged before processing DECL_PENDING_INLINE. 1812 18132022-03-09 Patrick Palka <ppalka@redhat.com> 1814 1815 PR c++/104823 1816 * except.cc (build_noexcept_spec): Strengthen dependence check 1817 to instantiation_dependent_expression_p. 1818 * parser.cc (cp_parser_parenthesized_expression_list_elt): 1819 Remove fold_expr_p parameter, and don't call 1820 instantiate_non_dependent_expr. 1821 (cp_parser_parenthesized_expression_list): Adjust accordingly. 1822 * pt.cc (expand_integer_pack): Strengthen dependence check 1823 to instantiation_dependent_expression_p. 1824 (instantiate_non_dependent_expr_internal): Adjust comment. 1825 (instantiate_non_dependent_expr_sfinae): Likewise. Drop 1826 the potentially-constant check, and relax and turn the 1827 dependence check into a checking assert. 1828 (instantiate_non_dependent_or_null): Adjust comment. 1829 * semantics.cc (finish_decltype_type): Keep 1830 processing_template_decl cleared after calling 1831 instantiate_non_dependent_expr_sfinae. 1832 18332022-03-09 Patrick Palka <ppalka@redhat.com> 1834 1835 PR c++/102137 1836 PR c++/87820 1837 * cp-tree.h (is_copy_initialization): Declare. 1838 * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING 1839 when is_copy_initialization is true. 1840 * init.cc (build_aggr_init): Split out copy-initialization 1841 check into ... 1842 (is_copy_initialization): ... here. 1843 * pt.cc (instantiate_decl): Pass 0 instead of 1844 LOOKUP_ONLYCONVERTING as flags to cp_finish_decl. 1845 18462022-03-09 Patrick Palka <ppalka@redhat.com> 1847 1848 PR c++/65396 1849 * cp-tree.h (merge_default_template_args): Declare. 1850 * decl.cc (merge_default_template_args): Define, factored out 1851 from redeclare_class_template. 1852 (duplicate_decls): Use it when merging member function template 1853 and free function declarations. 1854 * pt.cc (redeclare_class_template): Factor out default argument 1855 merging logic into merge_default_template_args. Improve location 1856 of a note when there's a template parameter kind mismatch. 1857 18582022-03-09 Jakub Jelinek <jakub@redhat.com> 1859 1860 PR c/104711 1861 * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS 1862 instead of TYPE_UNSIGNED. 1863 * typeck.cc (cp_build_binary_op): Don't emit 1864 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS. 1865 18662022-03-08 Roger Sayle <roger@nextmovesoftware.com> 1867 1868 PR c++/96440 1869 * decl.cc (start_decl): Defend against prefix_attributes being 1870 error_mark_node. 1871 18722022-03-08 Roger Sayle <roger@nextmovesoftware.com> 1873 1874 PR c++/96437 1875 * parser.cc (synthesize_implicit_template_parm): Check that 1876 TREE_VALUE (new_parm) isn't error_mark_node before setting its 1877 DECL_VIRTUAL_P. 1878 18792022-03-08 Roger Sayle <roger@nextmovesoftware.com> 1880 1881 PR c++/96329 1882 * parser.cc (cp_parser_linkage_specification): Treat the case where 1883 linkage is error_mark_node as "invalid linkage-specification". 1884 18852022-03-08 Marek Polacek <polacek@redhat.com> 1886 1887 PR c++/104108 1888 * pt.cc (convert_nontype_argument): Recompute 1889 value_dependent_expression_p after build_converted_constant_expr. 1890 18912022-03-08 Marek Polacek <polacek@redhat.com> 1892 1893 * decl2.cc (is_late_template_attribute): Do not defer attribute 1894 unavailable. 1895 * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE. 1896 18972022-03-08 Jakub Jelinek <jakub@redhat.com> 1898 1899 PR c++/104806 1900 * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore 1901 identifiers with space at the end. 1902 19032022-03-07 Jason Merrill <jason@redhat.com> 1904 1905 PR c++/104618 1906 * decl2.cc (mark_single_function): Look through parens and location 1907 wrapper. 1908 * typeck.cc (cp_build_addr_expr_1): Not here. 1909 19102022-03-07 Jakub Jelinek <jakub@redhat.com> 1911 1912 * parser.cc (cp_parser_omp_clause_map): Add missing space in string 1913 literal. 1914 19152022-03-07 Jakub Jelinek <jakub@redhat.com> 1916 1917 * cvt.cc: Fix up duplicated word issue in a comment. 1918 * pt.cc: Likewise. 1919 * module.cc: Likewise. 1920 * coroutines.cc: Likewise. 1921 19222022-03-04 Nathan Sidwell <nathan@acm.org> 1923 1924 * mangle.cc (is_std_substitution): Check global module. 1925 (is_std_substitution_char): Return bool. 1926 19272022-03-04 Nathan Sidwell <nathan@acm.org> 1928 1929 * cp-tree.h (mangle_identifier): Replace with ... 1930 (mangle_module_component): ... this. 1931 * mangle.cc (dump_substitution_candidates): Adjust. 1932 (add_substitution): Likewise. 1933 (find_substitution): Likewise. 1934 (unmangled_name_p): Likewise. 1935 (mangle_module_substitution): Reimplement. 1936 (mangle_module_component): New. 1937 (write_module, maybe_write_module): Adjust. 1938 (write_name): Drop modules here. 1939 (write_unqualified): Do them here instead. 1940 (mangle_global_init): Adjust. 1941 * module.cc (module_state::mangle): Adjust. 1942 (mangle_module): Likewise. 1943 (get_originating_module): Adjust. 1944 19452022-02-28 Marek Polacek <polacek@redhat.com> 1946 1947 PR c++/104682 1948 * cp-tree.h (build_enumerator): Adjust. 1949 * decl.cc (finish_enum): Make it return the new decl. 1950 * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE. 1951 19522022-02-28 Marek Polacek <polacek@redhat.com> 1953 1954 PR c++/104667 1955 * decl2.cc (is_late_template_attribute): Cope with a decl without 1956 a type. 1957 19582022-02-27 Jason Merrill <jason@redhat.com> 1959 1960 PR c++/104618 1961 * typeck.cc (cp_build_addr_expr_1): Also 1962 maybe_undo_parenthesized_ref. 1963 19642022-02-24 Martin Liska <mliska@suse.cz> 1965 1966 * pt.cc (defarg_insts_for): Use braces for subobject. 1967 19682022-02-18 Patrick Palka <ppalka@redhat.com> 1969 1970 PR c++/94944 1971 * pt.cc (maybe_instantiate_noexcept): For non-static member 1972 functions, set current_class_ptr/ref to the specialized 'this' 1973 instead. 1974 19752022-02-17 Jason Merrill <jason@redhat.com> 1976 1977 PR c++/104539 1978 * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT. 1979 19802022-02-17 Jason Merrill <jason@redhat.com> 1981 1982 PR c++/90451 1983 * decl2.cc (mark_single_function): New. 1984 * cp-tree.h: Declare it. 1985 * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF. 1986 * semantics.cc (finish_qualified_id_expr): Not here. 1987 (finish_id_expression_1): Or here. 1988 (finish_decltype_type): Call mark_single_function. 1989 * cvt.cc (convert_to_void): And here. 1990 * pt.cc (convert_nontype_argument): And here. 1991 * init.cc (build_offset_ref): Adjust assert. 1992 19932022-02-17 Patrick Palka <ppalka@redhat.com> 1994 1995 PR c++/104565 1996 * semantics.cc (finish_compound_literal): Don't perform 1997 non-dependent expr folding before calling check_narrowing. 1998 19992022-02-16 Patrick Palka <ppalka@redhat.com> 2000 2001 PR c++/104507 2002 * constexpr.cc (potential_constant_expression_1) 2003 <case NON_DEPENDENT_EXPR>: Return false instead of recursing. 2004 Assert tf_error isn't set. 2005 20062022-02-15 Jason Merrill <jason@redhat.com> 2007 2008 PR c++/104107 2009 PR c++/95036 2010 * pt.cc (coerce_template_template_parms): Take full parms. 2011 Avoid adding too much of outer_args. 2012 (coerce_template_template_parm): Adjust. 2013 (template_template_parm_bindings_ok_p): Adjust. 2014 (convert_template_argument): Adjust. 2015 20162022-02-14 Jakub Jelinek <jakub@redhat.com> 2017 2018 PR c++/104513 2019 * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>: 2020 Don't punt if returns (target). 2021 20222022-02-11 Jakub Jelinek <jakub@redhat.com> 2023 2024 PR c++/104472 2025 * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>: 2026 Only return fold_const_call result if it is non-NULL. Otherwise 2027 fall through into the default: case to return t, set *non_constant_p 2028 and emit diagnostics if needed. 2029 20302022-02-10 Jason Merrill <jason@redhat.com> 2031 2032 * module.cc (depset::hash::add_specializations): Use 2033 STRIP_TEMPLATE. 2034 20352022-02-10 Tobias Burnus <tobias@codesourcery.com> 2036 2037 PR c++/102204 2038 * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual 2039 members as those are permitted since OpenMP 5.0. 2040 20412022-02-10 Patrick Palka <ppalka@redhat.com> 2042 2043 * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL 2044 better. 2045 20462022-02-10 Marcel Vollweiler <marcel@codesourcery.com> 2047 2048 * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause. 2049 (cp_parser_omp_var_list_no_open): Handle array sections. 2050 (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR 2051 case. 2052 (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK. 2053 * semantics.cc (handle_omp_array_sections): Handle clause restrictions. 2054 (finish_omp_clauses): Handle array sections. 2055 20562022-02-09 Patrick Palka <ppalka@redhat.com> 2057 2058 PR c++/104432 2059 * call.cc (build_new_method_call): When a non-dependent call 2060 resolves to a specialization of a member template, always build 2061 the pruned overload set using the member template, not the 2062 specialization. 2063 * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify 2064 and correct how members from the new lookup set are matched to 2065 those from the old one. 2066 (tsubst_baselink): Pass binfo_type as newtype to 2067 filter_memfn_lookup. 2068 20692022-02-09 Jason Merrill <jason@redhat.com> 2070 2071 PR c++/103752 2072 * module.cc (trees_out::core_vals): Stream explicit specifier. 2073 (trees_in::core_vals): Likewise. 2074 * pt.cc (store_explicit_specifier): No longer static. 2075 (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P. 2076 * cp-tree.h (lookup_explicit_specifier): Declare. 2077 20782022-02-09 Jason Merrill <jason@redhat.com> 2079 2080 PR c++/96876 2081 * typeck2.cc (split_nonconstant_init_1): Push cleanups for 2082 preceding members with constant initialization. 2083 (maybe_push_temp_cleanup): Do nothing if -fno-exceptions. 2084 20852022-02-08 Jakub Jelinek <jakub@redhat.com> 2086 2087 PR c++/104379 2088 * name-lookup.cc (check_local_shadow): When diagnosing shadowing 2089 of a member or global declaration, add warning suppression for 2090 the decl and don't warn again on it. 2091 20922022-02-08 Jakub Jelinek <jakub@redhat.com> 2093 2094 PR c++/104403 2095 * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs 2096 of TREE_STATIC vars may only appear in -std=c++23. 2097 20982022-02-08 Patrick Palka <ppalka@redhat.com> 2099 2100 PR c++/80951 2101 * pt.cc (uses_deducible_template_parms): Consider the 2102 noexcept-spec of a function type. 2103 21042022-02-08 Patrick Palka <ppalka@redhat.com> 2105 2106 PR c++/104410 2107 * constraint.cc (satisfaction_value): Relax assert to accept 2108 cv-qualified bool. 2109 21102022-02-08 Patrick Palka <ppalka@redhat.com> 2111 2112 PR c++/103706 2113 * pt.cc (preserve_args): New function. 2114 (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO. 2115 21162022-02-08 Patrick Palka <ppalka@redhat.com> 2117 2118 PR c++/103706 2119 * constraint.cc (satisfy_declaration_constraints): Use 2120 lambda_regenerating_args instead. 2121 * cp-tree.h (lambda_regenerating_args): Declare. 2122 * pt.cc (lambda_regenerating_args): Define, split out from 2123 satisfy_declaration_constraints. 2124 (do_auto_deduction): Use lambda_regenerating_args to obtain the 2125 full set of outer template arguments for satisfaction when 2126 inside a lambda. 2127 21282022-02-06 Patrick Palka <ppalka@redhat.com> 2129 2130 PR c++/96242 2131 * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED 2132 fn by calling maybe_synthesize_method instead of relying on 2133 maybe_instantiate_noexcept. Move call to m_i_n after the 2134 DECL_DELETED_FN handling. 2135 * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED 2136 fn synthesis to only those with an implicit noexcept-spec, and 2137 return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards. 2138 21392022-02-06 Jakub Jelinek <jakub@redhat.com> 2140 2141 PR c++/89074 2142 PR c++/104033 2143 * constexpr.cc (cxx_eval_binary_expression): Temporarily set 2144 folding_cxx_constexpr. 2145 21462022-02-05 Jason Merrill <jason@redhat.com> 2147 2148 PR c++/104300 2149 PR c++/92385 2150 * cp-tree.h (get_vec_init_expr): New. 2151 (target_expr_needs_replace): New. 2152 * cp-gimplify.cc (cp_gimplify_init_expr): Use it. 2153 (struct cp_fold_data): New. 2154 (cp_fold_r): Only genericize inits at end of fn. 2155 (cp_fold_function): Here. 2156 (cp_fully_fold_init): Not here. 2157 * init.cc (build_vec_init): Use get_vec_init_expr. 2158 * tree.cc (build_vec_init_expr): Likewise. 2159 * typeck2.cc (split_nonconstant_init_1): Likewise. 2160 (process_init_constructor): Wrap VEC_INIT_EXPR in 2161 TARGET_EXPR. 2162 21632022-02-05 Jason Merrill <jason@redhat.com> 2164 2165 * pt.cc (iterative_hash_template_arg): Add comment. 2166 21672022-02-03 Patrick Palka <ppalka@redhat.com> 2168 2169 PR c++/104079 2170 * pt.cc (value_dependent_noexcept_spec_p): New predicate split 2171 out from ... 2172 (dependent_type_p_r): ... here. 2173 (instantiation_dependent_r): Use value_dependent_noexcept_spec_p 2174 to consider dependence of a noexcept-spec before C++17. 2175 * tree.cc (fixup_deferred_exception_variants): Clear 2176 TYPE_DEPENDENT_P_VALID. 2177 21782022-02-03 Jason Merrill <jason@redhat.com> 2179 2180 PR c++/104302 2181 * decl.cc (maybe_deduce_size_from_array_init): Give up 2182 on type-dependent init. 2183 (cp_complete_array_type): Only call reshape_init for character 2184 array. 2185 21862022-02-01 Jason Merrill <jason@redhat.com> 2187 2188 PR c++/103186 2189 * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher. 2190 (defarg_insts_for): New. 2191 (tsubst_default_argument): Adjust. 2192 21932022-01-31 Marek Polacek <polacek@redhat.com> 2194 2195 PR c++/102414 2196 PR c++/101874 2197 * decl.cc (create_array_type_for_decl): Use template_placeholder_p. 2198 Sorry on a variable-length array of auto. 2199 22002022-01-31 Marek Polacek <polacek@redhat.com> 2201 2202 PR c++/102434 2203 * class.cc (finish_struct): Don't allow union initializer_list. 2204 22052022-01-31 Patrick Palka <ppalka@redhat.com> 2206 2207 PR c++/104294 2208 * pt.cc (ctor_deduction_guides_for): Correct computation of 2209 outer_args. 2210 22112022-01-31 Patrick Palka <ppalka@redhat.com> 2212 2213 PR c++/104291 2214 * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear 2215 walk_subtrees if !include_nondeduced_p. Simplify given that 2216 cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW. 2217 22182022-01-28 Patrick Palka <ppalka@redhat.com> 2219 Jason Merrill <jason@redhat.com> 2220 2221 PR c++/92752 2222 * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the 2223 unqualified pointer type not the qualified one. 2224 22252022-01-28 Patrick Palka <ppalka@redhat.com> 2226 2227 PR c++/103341 2228 * decl.cc (cp_finish_decl): Pass the template arguments of a 2229 variable template specialization or a templated static data 2230 member to do_auto_deduction when the auto is constrained. 2231 22322022-01-28 Jason Merrill <jason@redhat.com> 2233 2234 PR c++/100198 2235 PR c++/100030 2236 PR c++/100282 2237 * parser.cc (cp_parser_enumerator_definition): Sorry on parameter 2238 pack in lambda. 2239 (cp_parser_class_head): And in class attributes. 2240 * pt.cc (check_for_bare_parameter_packs): Sorry instead of error 2241 in lambda. 2242 22432022-01-27 Jason Merrill <jason@redhat.com> 2244 2245 PR c++/104245 2246 PR c++/51344 2247 * decl2.cc (save_template_attributes): Take late attrs as parm. 2248 (cplus_decl_attributes): Call it after decl_attributes, 2249 splice_template_attributes before. 2250 22512022-01-27 Patrick Palka <ppalka@redhat.com> 2252 2253 PR c++/99895 2254 * call.cc (build_over_call): For a non-dependent member call, 2255 build up a CALL_EXPR using a COMPONENT_REF callee, as in 2256 build_new_method_call. 2257 * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either. 2258 * tree.cc (build_min_non_dep_op_overload): Adjust accordingly 2259 after the build_over_call change. 2260 22612022-01-27 Patrick Palka <ppalka@redhat.com> 2262 2263 PR c++/92944 2264 PR c++/103678 2265 * parser.cc (cp_parser_class_head): Update 'type' with the result 2266 of maybe_process_partial_specialization in the 2267 nested_name_specifier branch. Refactor nearby code to accomodate 2268 that maybe_process_partial_specialization returns a _TYPE, not a 2269 TYPE_DECL, and eliminate local variable 'class_type' in passing. 2270 22712022-01-27 Marek Polacek <polacek@redhat.com> 2272 2273 PR c++/101988 2274 * decl.cc (create_array_type_for_decl): Reject forming an array of 2275 placeholder for a deduced class type. 2276 22772022-01-26 Jason Merrill <jason@redhat.com> 2278 2279 PR c++/104206 2280 PR c++/101072 2281 * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check. 2282 22832022-01-26 Jakub Jelinek <jakub@redhat.com> 2284 2285 PR c++/104226 2286 * constexpr.cc (init_subob_ctx): For vector ctors containing 2287 vector elements, ensure appending to the same ctor instead of 2288 creating another one. 2289 22902022-01-26 Marek Polacek <polacek@redhat.com> 2291 2292 PR target/104213 2293 * decl.cc (finish_constructor_body): Suppress -Wuse-after-free. 2294 (finish_destructor_body): Likewise. 2295 * optimize.cc (build_delete_destructor_body): Likewise. 2296 22972022-01-26 Jason Merrill <jason@redhat.com> 2298 2299 PR c++/104235 2300 * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL. 2301 23022022-01-26 Jason Merrill <jason@redhat.com> 2303 2304 PR c++/103057 2305 * pt.cc (tsubst_aggr_type): Call tsubst for alias template 2306 specialization. 2307 23082022-01-25 Patrick Palka <ppalka@redhat.com> 2309 2310 PR c++/101532 2311 PR c++/104225 2312 * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept 2313 on a deleted function. 2314 23152022-01-25 Jason Merrill <jason@redhat.com> 2316 2317 PR c++/59950 2318 * call.cc (build_over_call): Use cp_build_indirect_ref. 2319 23202022-01-24 Patrick Palka <ppalka@redhat.com> 2321 2322 PR c++/104197 2323 * pt.cc (make_auto_1): Use -1 as a placeholder default argument 2324 for level. 2325 23262022-01-24 Patrick Palka <ppalka@redhat.com> 2327 2328 PR c++/104173 2329 * typeck.cc (build_class_member_access_expr): Extend 2330 unary_complex_lvalue result adjustment to preserve all 2331 rvalues, not just xvalues. 2332 23332022-01-23 Will Wray <wjwray@gmail.com> 2334 2335 PR c++/55227 2336 * decl.cc (reshape_init_r): Only call has_designator_check when 2337 first_initializer_p or for the inner constructor element. 2338 (cp_complete_array_type): Call reshape_init on braced-init-list. 2339 23402022-01-23 Jason Merrill <jason@redhat.com> 2341 2342 PR c++/104182 2343 * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing 2344 has set DECL_INITIAL on a TARGET_EXPR slot. 2345 * tree.cc (is_local_temp): Don't check DECL_CONTEXT. 2346 23472022-01-23 Jason Merrill <jason@redhat.com> 2348 2349 PR c++/101072 2350 * cp-tree.h (build_implicit_conv_flags): Declare. 2351 * call.cc (build_implicit_conv_flags): Split out from... 2352 (perform_implicit_conversion_flags): ...here. 2353 * decl.cc (check_initializer): Use it. 2354 * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling. 2355 * semantics.cc (finish_compound_literal): Don't treat 2356 scalar values like CONSTRUCTORs. 2357 23582022-01-21 Jason Merrill <jason@redhat.com> 2359 2360 * semantics.cc (find_failing_clause): Return expr if not 2361 decomposable. 2362 (finish_static_assert): Show constant values in failing 2363 comparison. 2364 23652022-01-21 Jason Merrill <jason@redhat.com> 2366 2367 PR c++/104084 2368 PR c++/20040 2369 * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if 2370 alloc_expr is a TARGET_EXPR. 2371 23722022-01-21 Marek Polacek <polacek@redhat.com> 2373 2374 PR c++/101715 2375 * tree.cc (fixup_deferred_exception_variants): Remove duplicate 2376 variants after parsing the exception specifications. 2377 23782022-01-21 Jason Merrill <jason@redhat.com> 2379 2380 PR c++/104139 2381 PR c++/103681 2382 * class.cc (end_of_class): Use base_binfo. 2383 23842022-01-20 Jason Merrill <jason@redhat.com> 2385 2386 PR c++/101405 2387 * decl.cc (reshape_init_class): Reject designator for a member of 2388 another class. 2389 23902022-01-20 Patrick Palka <ppalka@redhat.com> 2391 2392 PR c++/91911 2393 PR c++/103672 2394 * pt.cc (keep_template_parm): Punt on a level 0 template parm. 2395 (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard. 2396 (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders 2397 specially. 2398 (make_auto_1): Add defaulted 'level' parameter. 2399 (make_template_placeholder): Pass 0 as 'level' to make_auto_1. 2400 24012022-01-20 Patrick Palka <ppalka@redhat.com> 2402 2403 * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as 2404 function return type even when !funcdecl_p. 2405 24062022-01-20 Martin Liska <mliska@suse.cz> 2407 2408 PR c++/104134 2409 * error.cc (dump_aggr_type): Partially disable the warning. 2410 24112022-01-20 Jason Merrill <jason@redhat.com> 2412 2413 PR c++/102300 2414 * parser.cc (cp_parser_template_name): Use dependent_scope_p. 2415 24162022-01-19 David Malcolm <dmalcolm@redhat.com> 2417 2418 * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc 2419 renaming. 2420 * cp-tree.h (cp_pt_c_tests): Rename to... 2421 (cp_pt_cc_tests): ...this. 2422 (cp_tree_c_tests): Rename to... 2423 (cp_tree_cc_tests): ...this. 2424 * pt.cc (cp_pt_c_tests): Rename to... 2425 (cp_pt_cc_tests): ...this. 2426 * tree.cc (cp_tree_c_tests): Rename to... 2427 (cp_tree_cc_tests): ...this. 2428 24292022-01-19 Jason Merrill <jason@redhat.com> 2430 2431 * parser.cc (saved_token_sentinel::rollback): Use 2432 cp_lexer_previous_token. 2433 24342022-01-18 Jakub Jelinek <jakub@redhat.com> 2435 2436 PR c++/104055 2437 * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a 2438 TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather 2439 than get_target_expr_sfinae with tf_no_cleanup, and don't set 2440 TREE_CONSTANT. 2441 24422022-01-18 Jason Merrill <jason@redhat.com> 2443 Jakub Jelinek <jakub@redhat.com> 2444 2445 PR c++/104025 2446 * parser.cc (saved_token_sentinel::rollback): Call 2447 cp_lexer_set_source_position. 2448 (~saved_token_sentinel): Call rollback. 2449 24502022-01-18 Patrick Palka <ppalka@redhat.com> 2451 2452 PR c++/104074 2453 * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so 2454 that we return false for DEPENDENT_OPERATOR_TYPE too. 2455 24562022-01-17 Martin Liska <mliska@suse.cz> 2457 2458 * Make-lang.in: Rename .c names to .cc. 2459 * config-lang.in: Likewise. 2460 * constexpr.cc (cxx_eval_constant_expression): Likewise. 2461 * coroutines.cc (morph_fn_to_coro): Likewise. 2462 * cp-gimplify.cc (cp_gimplify_expr): Likewise. 2463 * cp-lang.cc (struct lang_hooks): Likewise. 2464 (get_template_argument_pack_elems_folded): Likewise. 2465 * cp-objcp-common.cc (cp_tree_size): Likewise. 2466 (cp_unit_size_without_reusable_padding): Likewise. 2467 (pop_file_scope): Likewise. 2468 (cp_pushdecl): Likewise. 2469 * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise. 2470 (cxx_simulate_record_decl): Likewise. 2471 * cp-tree.h (struct named_label_entry): Likewise. 2472 (current_function_return_value): Likewise. 2473 (more_aggr_init_expr_args_p): Likewise. 2474 (get_function_version_dispatcher): Likewise. 2475 (common_enclosing_class): Likewise. 2476 (strip_fnptr_conv): Likewise. 2477 (current_decl_namespace): Likewise. 2478 (do_aggregate_paren_init): Likewise. 2479 (cp_check_const_attributes): Likewise. 2480 (qualified_name_lookup_error): Likewise. 2481 (generic_targs_for): Likewise. 2482 (mark_exp_read): Likewise. 2483 (is_global_friend): Likewise. 2484 (maybe_reject_flexarray_init): Likewise. 2485 (module_token_lang): Likewise. 2486 (handle_module_option): Likewise. 2487 (literal_integer_zerop): Likewise. 2488 (build_extra_args): Likewise. 2489 (build_if_nonnull): Likewise. 2490 (maybe_check_overriding_exception_spec): Likewise. 2491 (finish_omp_target_clauses): Likewise. 2492 (maybe_warn_zero_as_null_pointer_constant): Likewise. 2493 (cxx_print_error_function): Likewise. 2494 (decl_in_std_namespace_p): Likewise. 2495 (merge_exception_specifiers): Likewise. 2496 (mangle_module_global_init): Likewise. 2497 (cxx_block_may_fallthru): Likewise. 2498 (fold_builtin_source_location): Likewise. 2499 (enum cp_oracle_request): Likewise. 2500 (subsumes): Likewise. 2501 (cp_finish_injected_record_type): Likewise. 2502 (vtv_build_vtable_verify_fndecl): Likewise. 2503 (cp_tree_c_finish_parsing): Likewise. 2504 * cvt.cc (diagnose_ref_binding): Likewise. 2505 (convert_to_void): Likewise. 2506 (convert_force): Likewise. 2507 (type_promotes_to): Likewise. 2508 * decl.cc (make_unbound_class_template_raw): Likewise. 2509 (cxx_init_decl_processing): Likewise. 2510 (check_class_member_definition_namespace): Likewise. 2511 (cxx_maybe_build_cleanup): Likewise. 2512 * decl2.cc (maybe_emit_vtables): Likewise. 2513 * error.cc (dump_function_name): Likewise. 2514 * init.cc (is_class_type): Likewise. 2515 (build_new_1): Likewise. 2516 * lang-specs.h: Likewise. 2517 * method.cc (make_alias_for_thunk): Likewise. 2518 * module.cc (specialization_add): Likewise. 2519 (module_state::read_cluster): Likewise. 2520 * name-lookup.cc (check_extern_c_conflict): Likewise. 2521 * name-lookup.h (struct cxx_binding): Likewise. 2522 * parser.cc (cp_parser_identifier): Likewise. 2523 * parser.h (struct cp_parser): Likewise. 2524 * pt.cc (has_value_dependent_address): Likewise. 2525 (push_tinst_level_loc): Likewise. 2526 * semantics.cc (finish_omp_clauses): Likewise. 2527 (finish_omp_atomic): Likewise. 2528 * tree.cc (cp_save_expr): Likewise. 2529 (cp_free_lang_data): Likewise. 2530 * typeck.cc (cp_common_type): Likewise. 2531 (strip_array_domain): Likewise. 2532 (rationalize_conditional_expr): Likewise. 2533 (check_return_expr): Likewise. 2534 * vtable-class-hierarchy.cc: Likewise. 2535 25362022-01-17 Martin Liska <mliska@suse.cz> 2537 2538 * call.c: Moved to... 2539 * call.cc: ...here. 2540 * class.c: Moved to... 2541 * class.cc: ...here. 2542 * constexpr.c: Moved to... 2543 * constexpr.cc: ...here. 2544 * cp-gimplify.c: Moved to... 2545 * cp-gimplify.cc: ...here. 2546 * cp-lang.c: Moved to... 2547 * cp-lang.cc: ...here. 2548 * cp-objcp-common.c: Moved to... 2549 * cp-objcp-common.cc: ...here. 2550 * cp-ubsan.c: Moved to... 2551 * cp-ubsan.cc: ...here. 2552 * cvt.c: Moved to... 2553 * cvt.cc: ...here. 2554 * cxx-pretty-print.c: Moved to... 2555 * cxx-pretty-print.cc: ...here. 2556 * decl.c: Moved to... 2557 * decl.cc: ...here. 2558 * decl2.c: Moved to... 2559 * decl2.cc: ...here. 2560 * dump.c: Moved to... 2561 * dump.cc: ...here. 2562 * error.c: Moved to... 2563 * error.cc: ...here. 2564 * except.c: Moved to... 2565 * except.cc: ...here. 2566 * expr.c: Moved to... 2567 * expr.cc: ...here. 2568 * friend.c: Moved to... 2569 * friend.cc: ...here. 2570 * g++spec.c: Moved to... 2571 * g++spec.cc: ...here. 2572 * init.c: Moved to... 2573 * init.cc: ...here. 2574 * lambda.c: Moved to... 2575 * lambda.cc: ...here. 2576 * lex.c: Moved to... 2577 * lex.cc: ...here. 2578 * mangle.c: Moved to... 2579 * mangle.cc: ...here. 2580 * method.c: Moved to... 2581 * method.cc: ...here. 2582 * name-lookup.c: Moved to... 2583 * name-lookup.cc: ...here. 2584 * optimize.c: Moved to... 2585 * optimize.cc: ...here. 2586 * parser.c: Moved to... 2587 * parser.cc: ...here. 2588 * pt.c: Moved to... 2589 * pt.cc: ...here. 2590 * ptree.c: Moved to... 2591 * ptree.cc: ...here. 2592 * rtti.c: Moved to... 2593 * rtti.cc: ...here. 2594 * search.c: Moved to... 2595 * search.cc: ...here. 2596 * semantics.c: Moved to... 2597 * semantics.cc: ...here. 2598 * tree.c: Moved to... 2599 * tree.cc: ...here. 2600 * typeck.c: Moved to... 2601 * typeck.cc: ...here. 2602 * typeck2.c: Moved to... 2603 * typeck2.cc: ...here. 2604 * vtable-class-hierarchy.c: Moved to... 2605 * vtable-class-hierarchy.cc: ...here. 2606 26072022-01-17 Jakub Jelinek <jakub@redhat.com> 2608 2609 PR c++/104031 2610 * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of 2611 TARGET_EXPR_SLOT to current_function_decl if it was NULL. 2612 26132022-01-17 Andrew Stubbs <ams@codesourcery.com> 2614 2615 * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators. 2616 26172022-01-14 Chung-Lin Tang <cltang@codesourcery.com> 2618 2619 PR c++/103705 2620 * semantics.c (finish_omp_clauses): Also continue peeling off of 2621 outer node for ARRAY_REFs. 2622 26232022-01-14 Jakub Jelinek <jakub@redhat.com> 2624 2625 PR c++/103991 2626 * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For 2627 IF_STMT_CONSTEXPR_P with constant false or true condition only 2628 check if the taken clause may fall through. 2629 * cp-gimplify.c (genericize_if_stmt): For consteval if, revert 2630 to r12-5638^ behavior if then_ block can't fall through. For 2631 constexpr if, revert to r12-5638^ behavior. 2632 26332022-01-13 Anthony Sharp <anthonysharp15@gmail.com> 2634 Jason Merrill <jason@redhat.com> 2635 2636 PR c++/70417 2637 * parser.c (cp_parser_id_expression): Handle 2638 -Wmissing-template-keyword. 2639 (struct saved_token_sentinel): Add modes to control what happens 2640 on destruction. 2641 (cp_parser_statement): Adjust. 2642 (cp_parser_skip_entire_template_parameter_list): New function that 2643 skips an entire template parameter list. 2644 (cp_parser_require_end_of_template_parameter_list): Rename old 2645 cp_parser_skip_to_end_of_template_parameter_list. 2646 (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be 2647 called from one of the above two functions. 2648 (cp_parser_lambda_declarator_opt) 2649 (cp_parser_explicit_template_declaration) 2650 (cp_parser_enclosed_template_argument_list): Adjust. 2651 26522022-01-12 Jakub Jelinek <jakub@redhat.com> 2653 Jason Merrill <jason@redhat.com> 2654 2655 PR c++/103480 2656 * tree.c (move): If expr is xvalue_p, just return expr without 2657 build_static_cast. 2658 26592022-01-11 Jakub Jelinek <jakub@redhat.com> 2660 2661 PR c++/101597 2662 * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST 2663 OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type. 2664 * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of 2665 OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as 2666 obj_type. 2667 26682022-01-11 Patrick Palka <ppalka@redhat.com> 2669 2670 PR c++/103831 2671 * call.c (build_new_method_call): Consider dependent bases only 2672 if 'this' is available. 2673 26742022-01-11 Olivier Hainque <hainque@adacore.com> 2675 2676 * decl.c (cxx_init_decl_processing): Move code possibly 2677 altering flag_weak before code testing it. 2678 26792022-01-10 Patrick Palka <ppalka@redhat.com> 2680 2681 PR c++/103879 2682 * constexpr.c (cxx_fold_indirect_ref): Split out object/offset 2683 canonicalization step into a local lambda. Strengthen it to 2684 absorb more components at position 0. Use it before both calls 2685 to cxx_fold_indirect_ref_1. 2686 26872022-01-10 Patrick Palka <ppalka@redhat.com> 2688 2689 PR c++/103783 2690 * call.c (cand_parms_match): Skip over 'this' when given one 2691 static and one non-static member function. 2692 26932022-01-10 Jakub Jelinek <jakub@redhat.com> 2694 2695 PR c++/103912 2696 * semantics.c (expand_or_defer_fn): For immediate functions, set 2697 node->body_removed to true and clear analyzed, definition and 2698 force_output. 2699 * decl2.c (c_parse_final_cleanups): Ignore immediate functions for 2700 expand_or_defer_fn. 2701 27022022-01-08 Jakub Jelinek <jakub@redhat.com> 2703 2704 PR c++/89074 2705 * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function. 2706 (cxx_eval_binary_expression): Use it. 2707 27082022-01-08 Jason Merrill <jason@redhat.com> 2709 2710 PR c++/103946 2711 * init.c (build_vec_init): Remove assert. 2712 * tree.c (build_vec_init_expr): Likewise. 2713 27142022-01-08 Jason Merrill <jason@redhat.com> 2715 2716 PR c++/100588 2717 * call.c (build_op_delete_call): Ignore destroying delete 2718 if alloc_fn. 2719 27202022-01-07 Jason Merrill <jason@redhat.com> 2721 2722 PR c++/20040 2723 * init.c (build_new_1): Also build pointer cleanup if 2724 TYPE_GETS_DELETE. 2725 * cp-tree.h (TYPE_GETS_VEC_DELETE): New. 2726 27272022-01-07 Jason Merrill <jason@redhat.com> 2728 2729 PR c++/103936 2730 PR c++/65591 2731 * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling. 2732 27332022-01-07 Jason Merrill <jason@redhat.com> 2734 2735 PR c++/103711 2736 * init.c (perform_target_ctor): Select destructor by in_chrg. 2737 27382022-01-07 Jason Merrill <jason@redhat.com> 2739 2740 PR c++/61611 2741 * except.c (in_nested_catch): New. 2742 (expand_end_catch_block): Check it. 2743 27442022-01-07 Jason Merrill <jason@redhat.com> 2745 2746 PR c++/33799 2747 PR c++/102191 2748 * except.c (maybe_splice_retval_cleanup): Check 2749 current_binding_level. 2750 * semantics.c (do_poplevel): Call it here. 2751 * parser.c (cp_parser_compound_statement): Not here. 2752 27532022-01-07 Jason Merrill <jason@redhat.com> 2754 2755 PR c++/53868 2756 * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for 2757 cleanups from set_up_extended_ref_temp. 2758 (wrap_temporary_cleanups): Ignore array cleanups. 2759 (initialize_local_var): Don't check for array here. 2760 * cp-tree.h (BIND_EXPR_VEC_DTOR): New. 2761 * init.c (build_vec_delete_1): Set it. 2762 27632022-01-07 Jason Merrill <jason@redhat.com> 2764 2765 PR c++/66451 2766 * init.c (build_vec_delete_1): Handle throwing dtor. 2767 (build_vec_init): Tell it we're in a cleanup already. 2768 27692022-01-07 Jason Merrill <jason@redhat.com> 2770 2771 * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt. 2772 (split_nonconstant_init): Adjust. 2773 27742022-01-07 Jason Merrill <jason@redhat.com> 2775 2776 PR c++/66139 2777 PR c++/52320 2778 * constexpr.c (replace_decl): Rename from replace_result_decl. 2779 * cp-tree.h (replace_decl): Declare it. 2780 * cp-gimplify.c (cp_gimplify_init_expr): Call it. 2781 (cp_gimplify_expr): Don't handle VEC_INIT_EXPR. 2782 (cp_genericize_init, cp_genericize_init_expr) 2783 (cp_genericize_target_expr): New. 2784 (cp_fold_r): Call them. 2785 * tree.c (build_array_copy): Add a TARGET_EXPR. 2786 * typeck2.c (digest_init_r): Look through a TARGET_EXPR. 2787 27882022-01-07 Jason Merrill <jason@redhat.com> 2789 2790 PR c++/94041 2791 * decl.c (initialize_local_var): Fix comment. 2792 * init.c (build_new_1): Do stabilize array init. 2793 (build_vec_init): Use TARGET_EXPR for cleanup. Initialization 2794 of an element from an explicit initializer is not a 2795 full-expression. 2796 * tree.c (expand_vec_init_expr): Pass flags through. 2797 * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR. 2798 (split_nonconstant_init): Handle array cleanups. 2799 * cp-tree.h: Adjust. 2800 28012022-01-07 Jason Merrill <jason@redhat.com> 2802 2803 PR c++/94041 2804 * decl.c (check_initializer): Remove obsolete comment. 2805 (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY. 2806 (initialize_local_var): Change assert to test. 2807 * typeck2.c (maybe_push_temp_cleanup): New. 2808 (split_nonconstant_init_1): Use it. 2809 (split_nonconstant_init): Clear cleanup flags. 2810 28112022-01-07 Jason Merrill <jason@redhat.com> 2812 2813 PR c++/92385 2814 * typeck2.c (PICFLAG_VEC_INIT): New. 2815 (process_init_constructor_array): Set it. 2816 (process_init_constructor): Handle it. 2817 (split_nonconstant_init_1): Handle VEC_INIT_EXPR. 2818 * init.c (build_vec_init): Likewise. 2819 * cp-gimplify.c (cp_gimplify_expr): Factor out... 2820 * tree.c (expand_vec_init_expr): ...this function. 2821 (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P. 2822 (build_vec_init_expr): Likewise. 2823 * constexpr.c (cxx_eval_vec_init): Likewise. 2824 (reduced_constant_expression_p): Check arrays before C++20. 2825 * cp-tree.h (expand_vec_init_expr): Declare. 2826 28272022-01-07 Jason Merrill <jason@redhat.com> 2828 2829 * init.c (build_new_1): Remove preevaluation code. 2830 28312022-01-05 Nathan Sidwell <nathan@acm.org> 2832 2833 * pt.c (instantiate_class_template_1): Process attribute((used)) set 2834 in class's context. 2835 28362022-01-05 Nathan Sidwell <nathan@acm.org> 2837 2838 * init.c (build_new_1): Check complain before alignment warning. 2839 28402022-01-04 Jason Merrill <jason@redhat.com> 2841 2842 * cp-tree.h (class releasing_vec): Add begin/end fns. 2843 28442022-01-04 Jason Merrill <jason@redhat.com> 2845 2846 * init.c: Include -*- C++ -*- on first line. 2847 28482022-01-03 Marek Polacek <polacek@redhat.com> 2849 2850 PR c++/103758 2851 * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%> 2852 with %qD. 2853 28542022-01-03 Marek Polacek <polacek@redhat.com> 2855 2856 * parser.c (make_char_string_pack): Add a cast to const unsigned 2857 char *. 2858 28592022-01-03 Jakub Jelinek <jakub@redhat.com> 2860 2861 PR c++/103600 2862 * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute 2863 to DECL_TINFO_P VAR_DECLs. 2864 28652022-01-02 Jason Merrill <jason@redhat.com> 2866 2867 * init.c (build_vec_init): Append the decrement to elt_init. 2868 28692022-01-02 Jason Merrill <jason@redhat.com> 2870 2871 * decl.c (wrap_cleanups_r): Don't wrap if noexcept. 2872 2873 2874Copyright (C) 2022 Free Software Foundation, Inc. 2875 2876Copying and distribution of this file, with or without modification, 2877are permitted in any medium without royalty provided the copyright 2878notice and this notice are preserved. 2879