| 1 |
2023-12-22 Jason Merrill <[email protected]> |
| 2 |
|
| 3 |
PR c++/81438 |
| 4 |
* decl.cc (poplevel_named_label_1): Handle leaving catch. |
| 5 |
(check_previous_goto_1): Likewise. |
| 6 |
(check_goto_1): Likewise. |
| 7 |
|
| 8 |
2023-12-22 Jason Merrill <[email protected]> |
| 9 |
|
| 10 |
PR c++/95298 |
| 11 |
* mangle.cc (write_expression): Handle v18 sizeof... bug. |
| 12 |
* pt.cc (tsubst_pack_expansion): Keep TREE_VEC for sizeof... |
| 13 |
(tsubst_expr): Don't strip TREE_VEC here. |
| 14 |
|
| 15 |
2023-12-21 Patrick Palka <[email protected]> |
| 16 |
|
| 17 |
* cp-tree.h (maybe_warn_unparenthesized_assignment): Add |
| 18 |
'nested_p' bool parameter. |
| 19 |
* semantics.cc (boolish_class_type_p_cache): Define. |
| 20 |
(boolish_class_type_p): Define. |
| 21 |
(maybe_warn_unparenthesized_assignment): Add 'nested_p' |
| 22 |
bool parameter. Suppress the warning for nested assignments |
| 23 |
to bool and bool-like class types. |
| 24 |
(maybe_convert_cond): Pass nested_p=false to |
| 25 |
maybe_warn_unparenthesized_assignment. |
| 26 |
* typeck.cc (convert_for_assignment): Pass nested_p=true to |
| 27 |
maybe_warn_unparenthesized_assignment. Remove now redundant |
| 28 |
check for 'rhs' having bool type. |
| 29 |
|
| 30 |
2023-12-21 Patrick Palka <[email protected]> |
| 31 |
|
| 32 |
PR c++/84542 |
| 33 |
* decl.cc (merge_attribute_bits): Merge TREE_DEPRECATED |
| 34 |
and TREE_UNAVAILABLE. |
| 35 |
|
| 36 |
2023-12-21 Patrick Palka <[email protected]> |
| 37 |
|
| 38 |
PR c++/70413 |
| 39 |
PR c++/107906 |
| 40 |
* decl2.cc (min_vis_expr_r): Handle PTRMEM_CST and TEMPLATE_DECL |
| 41 |
other than those for alias templates. |
| 42 |
|
| 43 |
2023-12-21 Jakub Jelinek <[email protected]> |
| 44 |
|
| 45 |
* cp-gimplify.cc (cp_genericize_r): If warn_alloc_size, call |
| 46 |
warn_for_alloc_size for -Walloc-size diagnostics. |
| 47 |
* semantics.cc (finish_call_expr): If warn_calloc_transposed_args, |
| 48 |
call warn_for_calloc for -Wcalloc-transposed-args diagnostics. |
| 49 |
|
| 50 |
2023-12-21 Jason Merrill <[email protected]> |
| 51 |
|
| 52 |
PR c++/37722 |
| 53 |
* decl.cc (identify_goto): Adjust for computed goto. |
| 54 |
(struct named_label_use_entry): Add computed_goto field. |
| 55 |
(poplevel_named_label_1): Add to computed_goto vec. |
| 56 |
(check_previous_goto_1): Dump computed_goto vec. |
| 57 |
(check_goto_1): Split out from check_goto. |
| 58 |
(check_goto): Check all addressable labels for computed goto. |
| 59 |
(struct named_label_entry): Add addressed field. |
| 60 |
(mark_label_addressed): New. |
| 61 |
* parser.cc (cp_parser_unary_expression): Call it. |
| 62 |
* cp-tree.h (mark_label_addressed): Declare it. |
| 63 |
|
| 64 |
2023-12-20 Jason Merrill <[email protected]> |
| 65 |
|
| 66 |
PR c++/113088 |
| 67 |
PR c++/33799 |
| 68 |
* except.cc (maybe_splice_retval_cleanup): Handle an empty block. |
| 69 |
|
| 70 |
2023-12-20 Jason Merrill <[email protected]> |
| 71 |
|
| 72 |
PR c++/103185 |
| 73 |
* typeck.cc (cp_build_array_ref): Handle swapped operands. |
| 74 |
|
| 75 |
2023-12-19 Patrick Palka <[email protected]> |
| 76 |
|
| 77 |
PR c++/113063 |
| 78 |
* method.cc (synthesize_method): Use maybe_push_to_top_level |
| 79 |
and maybe_pop_from_top_level. |
| 80 |
|
| 81 |
2023-12-19 Patrick Palka <[email protected]> |
| 82 |
|
| 83 |
* name-lookup.cc (struct local_state_t): Define. |
| 84 |
(local_state_stack): Define. |
| 85 |
(maybe_push_to_top_level): Use them. |
| 86 |
(maybe_pop_from_top_level): Likewise. |
| 87 |
* pt.cc (instantiate_decl): Remove dead code for saving/restoring |
| 88 |
cp_unevaluated_operand and c_inhibit_evaluation_warnings. |
| 89 |
|
| 90 |
2023-12-19 Nathaniel Shead <[email protected]> |
| 91 |
|
| 92 |
PR c++/102420 |
| 93 |
* constexpr.cc (cxx_bind_parameters_in_call): Check for calling |
| 94 |
non-static member functions with a null pointer. |
| 95 |
|
| 96 |
2023-12-19 Sandra Loosemore <[email protected]> |
| 97 |
|
| 98 |
* decl.cc (omp_declare_variant_finalize_one): Adjust for new |
| 99 |
representations. |
| 100 |
* parser.cc (omp_construct_selectors): Delete. |
| 101 |
(omp_device_selectors): Delete. |
| 102 |
(omp_implementation_selectors): Delete. |
| 103 |
(omp_user_selectors): Delete. |
| 104 |
(cp_parser_omp_context_selector): Adjust for new representations |
| 105 |
and simplify dispatch logic. Uniformly warn instead of sometimes |
| 106 |
error when an unknown selector is found. Adjust error messages |
| 107 |
for extraneous/incorrect score. |
| 108 |
(cp_parser_omp_context_selector_specification): Likewise. |
| 109 |
* pt.cc (tsubst_attribute): Adjust for new representations. |
| 110 |
|
| 111 |
2023-12-19 Sandra Loosemore <[email protected]> |
| 112 |
|
| 113 |
* parser.cc (cp_parser_omp_context_selector): Adjust for new |
| 114 |
namelist property representation. |
| 115 |
* pt.cc (tsubst_attribute): Likewise. |
| 116 |
|
| 117 |
2023-12-19 Sandra Loosemore <[email protected]> |
| 118 |
|
| 119 |
* parser.cc (cp_parser_omp_context_selector): Use new constructors. |
| 120 |
* pt.cc: Include omp-general.h. |
| 121 |
(tsubst_attribute): Use new context selector accessors and |
| 122 |
constructors. |
| 123 |
|
| 124 |
2023-12-19 Patrick Palka <[email protected]> |
| 125 |
|
| 126 |
PR c++/90679 |
| 127 |
* cp-tree.h (comp_template_args): Remove partial_order parameter. |
| 128 |
(template_args_equal): Likewise. |
| 129 |
* pt.cc (comparing_for_partial_ordering): New global flag. |
| 130 |
(iterative_hash_template_arg) <case tcc_type>: Hash the template |
| 131 |
and arguments for specializations that use structural equality. |
| 132 |
(template_args_equal): Remove partial order parameter and |
| 133 |
use comparing_for_partial_ordering instead. |
| 134 |
(comp_template_args): Likewise. |
| 135 |
(comp_template_args_porder): Set comparing_for_partial_ordering |
| 136 |
instead. Make static. |
| 137 |
(any_template_arguments_need_structural_equality_p): Return true |
| 138 |
for an argument that's a dependent alias template specialization |
| 139 |
or a class template specialization that itself needs structural |
| 140 |
equality. |
| 141 |
* tree.cc (cp_tree_equal) <case TREE_VEC>: Adjust call to |
| 142 |
comp_template_args. |
| 143 |
|
| 144 |
2023-12-19 Patrick Palka <[email protected]> |
| 145 |
|
| 146 |
PR c++/90679 |
| 147 |
* cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): Remove. |
| 148 |
(most_general_template): Constify parameter. |
| 149 |
* pt.cc (push_template_decl): Adjust after removing |
| 150 |
TEMPLATE_DECL_COMPLEX_ALIAS_P. |
| 151 |
(complex_alias_tmpl_info): New hash_map. |
| 152 |
(uses_all_template_parms_data::seen): Change type to |
| 153 |
tree* from bool*. |
| 154 |
(complex_alias_template_r): Adjust accordingly. |
| 155 |
(complex_alias_template_p): Add 'seen_out' out parameter. |
| 156 |
Call most_general_template and check PRIMARY_TEMPLATE_P. |
| 157 |
Use complex_alias_tmpl_info to cache the result and set |
| 158 |
'*seen_out' accordigly. |
| 159 |
(dependent_alias_template_spec_p): Add !processing_template_decl |
| 160 |
early exit test. Consider dependence of only template arguments |
| 161 |
corresponding to seen template parameters as per |
| 162 |
|
| 163 |
2023-12-19 Thomas Schwinge <[email protected]> |
| 164 |
|
| 165 |
PR c++/90868 |
| 166 |
* parser.cc (cp_parser_oacc_declare): For "more than once", check |
| 167 |
the DECL that we're actually setting the attribute on. |
| 168 |
|
| 169 |
2023-12-16 Nathaniel Shead <[email protected]> |
| 170 |
|
| 171 |
PR c++/106363 |
| 172 |
* module.cc (module_state::write_cluster): Don't skip first |
| 173 |
depset for bindings. |
| 174 |
|
| 175 |
2023-12-16 Nathaniel Shead <[email protected]> |
| 176 |
|
| 177 |
PR c++/113031 |
| 178 |
* constexpr.cc (cxx_fold_indirect_ref_1): Check for CLASS_TYPE |
| 179 |
before using CLASSTYPE_AS_BASE. |
| 180 |
|
| 181 |
2023-12-16 Andrew Carlotti <[email protected]> |
| 182 |
|
| 183 |
* decl2.cc (check_classfn): Update comment to include |
| 184 |
target_version attributes. |
| 185 |
|
| 186 |
2023-12-15 Patrick Palka <[email protected]> |
| 187 |
|
| 188 |
PR c++/70435 |
| 189 |
PR c++/88061 |
| 190 |
* pt.cc (tsubst_function_decl): Propagate DECL_SECTION_NAME |
| 191 |
via set_decl_section_name. |
| 192 |
(tsubst_decl) <case VAR_DECL>: Likewise. |
| 193 |
|
| 194 |
2023-12-15 Patrick Palka <[email protected]> |
| 195 |
|
| 196 |
PR c++/109715 |
| 197 |
* mangle.cc (get_abi_tags): Strip TEMPLATE_DECL before looking |
| 198 |
up the abi_tag attribute. |
| 199 |
|
| 200 |
2023-12-14 Marek Polacek <[email protected]> |
| 201 |
|
| 202 |
PR c++/112482 |
| 203 |
* decl.cc (grokdeclarator): Do not issue the auto parameter error while |
| 204 |
tentatively parsing a function parameter. |
| 205 |
* parser.cc (cp_parser_parameter_declaration_clause): Check it here. |
| 206 |
|
| 207 |
2023-12-14 Marek Polacek <[email protected]> |
| 208 |
|
| 209 |
PR c++/112869 |
| 210 |
* cp-gimplify.cc (cp_fold_immediate_r): Check cp_unevaluated_operand |
| 211 |
and DECL_IMMEDIATE_FUNCTION_P rather than in_immediate_context. |
| 212 |
|
| 213 |
2023-12-14 Patrick Palka <[email protected]> |
| 214 |
|
| 215 |
* cp-tree.h (type_targs_deducible_from): Adjust return type. |
| 216 |
* pt.cc (alias_ctad_tweaks): Also handle C++23 inherited CTAD. |
| 217 |
(inherited_ctad_tweaks): Define. |
| 218 |
(type_targs_deducible_from): Return the deduced arguments or |
| 219 |
NULL_TREE instead of a bool. Handle 'tmpl' being a TREE_LIST |
| 220 |
representing a synthetic alias template. |
| 221 |
(ctor_deduction_guides_for): Do inherited_ctad_tweaks for each |
| 222 |
USING_DECL in C++23 mode. |
| 223 |
(deduction_guides_for): Add FIXME for stale cache entries in |
| 224 |
light of inherited CTAD. |
| 225 |
|
| 226 |
2023-12-14 Jakub Jelinek <[email protected]> |
| 227 |
|
| 228 |
PR c++/112968 |
| 229 |
* pt.cc (freelist<tree_node>::reinit): Make whole obj->common |
| 230 |
defined for valgrind annotations rather than just obj->base, |
| 231 |
and do it even for ENABLE_GC_CHECKING. If not ENABLE_GC_CHECKING, |
| 232 |
clear TREE_CHAIN (obj) and TREE_TYPE (obj). |
| 233 |
|
| 234 |
2023-12-13 Patrick Palka <[email protected]> |
| 235 |
|
| 236 |
* call.cc (print_z_candidates): Only print ignored candidates |
| 237 |
when -fdiagnostics-all-candidates is set, otherwise suggest |
| 238 |
the flag. |
| 239 |
(build_over_call): When diagnosing deletedness, note |
| 240 |
other candidates only if -fdiagnostics-all-candidates is |
| 241 |
set, otherwise suggest the flag. |
| 242 |
|
| 243 |
2023-12-13 Patrick Palka <[email protected]> |
| 244 |
|
| 245 |
* call.cc (enum rejection_reason_code): Add rr_ignored. |
| 246 |
(add_ignored_candidate): Define. |
| 247 |
(ignored_candidate_p): Define. |
| 248 |
(add_template_candidate_real): Do add_ignored_candidate |
| 249 |
instead of returning NULL. |
| 250 |
(splice_viable): Put ignored (non-viable) candidates last. |
| 251 |
(print_z_candidate): Handle ignored candidates. |
| 252 |
(build_new_function_call): Refine shortcut that calls |
| 253 |
cp_build_function_call_vec now that non-templates can |
| 254 |
appear in the candidate list for a template-id call. |
| 255 |
(add_candidates): Replace 'bad_fns' overload with 'bad_cands' |
| 256 |
candidate list. When not considering a candidate, add it |
| 257 |
to the list as an ignored candidate. Add all 'bad_cands' |
| 258 |
to the overload set as well. |
| 259 |
|
| 260 |
2023-12-13 Patrick Palka <[email protected]> |
| 261 |
|
| 262 |
* call.cc: Include "tristate.h". |
| 263 |
(splice_viable): Sort the candidate list according to viability. |
| 264 |
Don't remove non-viable candidates from the list. |
| 265 |
(print_z_candidates): Add defaulted only_viable_p parameter. |
| 266 |
By default only print non-viable candidates if there is no |
| 267 |
viable candidate. |
| 268 |
(tourney): Ignore non-viable candidates. Move the true champ to |
| 269 |
the front of the candidates list, and update 'candidates' to |
| 270 |
point to the front. Rename champ_compared_to_predecessor to |
| 271 |
previous_worse_champ. |
| 272 |
|
| 273 |
2023-12-13 Patrick Palka <[email protected]> |
| 274 |
|
| 275 |
PR c++/99186 |
| 276 |
PR c++/104867 |
| 277 |
* pt.cc (unify) <case INTEGER_CST>: Compare types as well. |
| 278 |
|
| 279 |
2023-12-13 Patrick Palka <[email protected]> |
| 280 |
|
| 281 |
PR c++/93740 |
| 282 |
* pt.cc (unify) <case FUNCTION_DECL>: Handle it like FIELD_DECL |
| 283 |
and TEMPLATE_DECL. |
| 284 |
|
| 285 |
2023-12-13 Jason Merrill <[email protected]> |
| 286 |
|
| 287 |
* call.cc (convert_for_arg_passing) |
| 288 |
* typeck.cc (convert_for_assignment): Adjust call to |
| 289 |
warn_for_address_of_packed_member. |
| 290 |
|
| 291 |
2023-12-13 Julian Brown <[email protected]> |
| 292 |
|
| 293 |
* parser.cc (cp_parser_oacc_all_clauses): Add TARGET_P parameter. Use |
| 294 |
to select region type for finish_omp_clauses call. |
| 295 |
(cp_parser_omp_target_data, cp_parser_omp_target_enter_data): Support |
| 296 |
GOMP_MAP_ATTACH kind. |
| 297 |
(cp_parser_omp_target_exit_data): Support GOMP_MAP_DETACH kind. |
| 298 |
(cp_parser_oacc_declare): Update call to cp_parser_oacc_all_clauses. |
| 299 |
(cp_parser_oacc_loop): Update calls to cp_parser_oacc_all_clauses. |
| 300 |
(cp_parser_oacc_compute): Likewise. |
| 301 |
* pt.cc (tsubst_expr): Use C_ORT_ACC_TARGET for call to |
| 302 |
tsubst_omp_clauses for OpenACC compute regions. |
| 303 |
* semantics.cc (cp_omp_address_inspector): New class, derived from |
| 304 |
c_omp_address_inspector. |
| 305 |
(handle_omp_array_sections_1, handle_omp_array_sections, |
| 306 |
finish_omp_clauses): Use cp_omp_address_inspector class and OMP address |
| 307 |
tokenizer to analyze and expand OpenMP map clause expressions. Fix |
| 308 |
some diagnostics. Support C_ORT_ACC_TARGET. |
| 309 |
(finish_omp_target): Handle GOMP_MAP_POINTER. |
| 310 |
|
| 311 |
2023-12-13 Julian Brown <[email protected]> |
| 312 |
|
| 313 |
* semantics.cc (finish_omp_clause): Add braces and reindent |
| 314 |
OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza. |
| 315 |
|
| 316 |
2023-12-13 Jason Merrill <[email protected]> |
| 317 |
|
| 318 |
PR c++/96997 |
| 319 |
* tree.cc (bot_manip): Check data.clear_location for TARGET_EXPR. |
| 320 |
|
| 321 |
2023-12-13 Nathaniel Shead <[email protected]> |
| 322 |
|
| 323 |
PR c++/71093 |
| 324 |
* constexpr.cc (constexpr_global_ctx::get_value_ptr): Don't |
| 325 |
return NULL_TREE for objects we're initializing. |
| 326 |
(constexpr_global_ctx::destroy_value): Rename from remove_value. |
| 327 |
Only mark real variables as outside lifetime. |
| 328 |
(constexpr_global_ctx::clear_value): New function. |
| 329 |
(destroy_value_checked): New function. |
| 330 |
(cxx_eval_call_expression): Defer complaining about non-constant |
| 331 |
arg0 for operator delete. Use remove_value_safe. |
| 332 |
(cxx_fold_indirect_ref_1): Handle conversion to 'as base' type. |
| 333 |
(outside_lifetime_error): Include name of object we're |
| 334 |
accessing. |
| 335 |
(cxx_eval_store_expression): Handle clobbers. Improve error |
| 336 |
messages. |
| 337 |
(cxx_eval_constant_expression): Use remove_value_safe. Clear |
| 338 |
bind variables before entering body. |
| 339 |
|
| 340 |
2023-12-13 Jason Merrill <[email protected]> |
| 341 |
|
| 342 |
* constexpr.cc (cxx_eval_call_expression): Handle missing in-charge |
| 343 |
argument. |
| 344 |
|
| 345 |
2023-12-13 Jason Merrill <[email protected]> |
| 346 |
|
| 347 |
PR c++/108243 |
| 348 |
* constexpr.cc (cxx_eval_outermost_constant_expr): Turn |
| 349 |
a constructor CALL_EXPR into a TARGET_EXPR. |
| 350 |
|
| 351 |
2023-12-13 Jason Merrill <[email protected]> |
| 352 |
|
| 353 |
* tree.cc (build_aggr_init_expr): Copy EXPR_LOCATION. |
| 354 |
|
| 355 |
2023-12-12 Jason Merrill <[email protected]> |
| 356 |
Jason Xu <[email protected]> |
| 357 |
|
| 358 |
* class.cc (propagate_class_warmth_attribute): Handle |
| 359 |
member templates. |
| 360 |
|
| 361 |
2023-12-12 Jason Merrill <[email protected]> |
| 362 |
Nathaniel Shead <[email protected]> |
| 363 |
|
| 364 |
* call.cc (build_trivial_dtor_call): Use CLOBBER_OBJECT_END. |
| 365 |
* decl.cc (build_clobber_this): Take clobber_kind argument. |
| 366 |
(start_preparsed_function): Pass CLOBBER_OBJECT_BEGIN. |
| 367 |
(begin_destructor_body): Pass CLOBBER_OBJECT_END. |
| 368 |
|
| 369 |
2023-12-11 Patrick Palka <[email protected]> |
| 370 |
|
| 371 |
* pt.cc (alias_ctad_tweaks): Pass use_spec_table=false to |
| 372 |
tsubst_decl. |
| 373 |
|
| 374 |
2023-12-11 Tobias Burnus <[email protected]> |
| 375 |
|
| 376 |
* parser.cc (cp_parser_omp_requires): Handle acquires/release |
| 377 |
in atomic_default_mem_order clause. |
| 378 |
(cp_parser_omp_atomic): Update. |
| 379 |
|
| 380 |
2023-12-11 Nathaniel Shead <[email protected]> |
| 381 |
|
| 382 |
PR c++/96090 |
| 383 |
PR c++/100470 |
| 384 |
* call.cc (build_over_call): Prevent folding of trivial special |
| 385 |
members when checking for noexcept. |
| 386 |
* method.cc (constructible_expr): Perform value-initialisation |
| 387 |
for empty parameter lists. |
| 388 |
(is_nothrow_xible): Treat as noexcept operator. |
| 389 |
|
| 390 |
2023-12-11 Nathaniel Shead <[email protected]> |
| 391 |
|
| 392 |
PR c++/104234 |
| 393 |
PR c++/112580 |
| 394 |
* pt.cc (tsubst_template_decl): Clear |
| 395 |
DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P. |
| 396 |
|
| 397 |
2023-12-10 Ken Matsui <[email protected]> |
| 398 |
|
| 399 |
* cp-trait.def: Define __remove_pointer. |
| 400 |
* semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. |
| 401 |
|
| 402 |
2023-12-10 Ken Matsui <[email protected]> |
| 403 |
|
| 404 |
* cp-trait.def: Define __is_object. |
| 405 |
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_OBJECT. |
| 406 |
* semantics.cc (trait_expr_value): Likewise. |
| 407 |
(finish_trait_expr): Likewise. |
| 408 |
|
| 409 |
2023-12-10 Ken Matsui <[email protected]> |
| 410 |
|
| 411 |
* cp-trait.def: Define __is_function. |
| 412 |
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. |
| 413 |
* semantics.cc (trait_expr_value): Likewise. |
| 414 |
(finish_trait_expr): Likewise. |
| 415 |
|
| 416 |
2023-12-10 Ken Matsui <[email protected]> |
| 417 |
|
| 418 |
* cp-trait.def: Define __is_reference. |
| 419 |
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. |
| 420 |
* semantics.cc (trait_expr_value): Likewise. |
| 421 |
(finish_trait_expr): Likewise. |
| 422 |
|
| 423 |
2023-12-10 Ken Matsui <[email protected]> |
| 424 |
|
| 425 |
* cp-trait.def: Define __is_member_object_pointer. |
| 426 |
* constraint.cc (diagnose_trait_expr): Handle |
| 427 |
CPTK_IS_MEMBER_OBJECT_POINTER. |
| 428 |
* semantics.cc (trait_expr_value): Likewise. |
| 429 |
(finish_trait_expr): Likewise. |
| 430 |
|
| 431 |
2023-12-10 Ken Matsui <[email protected]> |
| 432 |
|
| 433 |
* cp-trait.def: Define __is_member_function_pointer. |
| 434 |
* constraint.cc (diagnose_trait_expr): Handle |
| 435 |
CPTK_IS_MEMBER_FUNCTION_POINTER. |
| 436 |
* semantics.cc (trait_expr_value): Likewise. |
| 437 |
(finish_trait_expr): Likewise. |
| 438 |
|
| 439 |
2023-12-10 Ken Matsui <[email protected]> |
| 440 |
|
| 441 |
* cp-trait.def: Define __is_member_pointer. |
| 442 |
* constraint.cc (diagnose_trait_expr): Handle |
| 443 |
CPTK_IS_MEMBER_POINTER. |
| 444 |
* semantics.cc (trait_expr_value): Likewise. |
| 445 |
(finish_trait_expr): Likewise. |
| 446 |
|
| 447 |
2023-12-10 Ken Matsui <[email protected]> |
| 448 |
|
| 449 |
* cp-trait.def: Define __is_scoped_enum. |
| 450 |
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM. |
| 451 |
* semantics.cc (trait_expr_value): Likewise. |
| 452 |
(finish_trait_expr): Likewise. |
| 453 |
|
| 454 |
2023-12-10 Ken Matsui <[email protected]> |
| 455 |
|
| 456 |
* cp-trait.def: Define __is_bounded_array. |
| 457 |
* constraint.cc (diagnose_trait_expr): Handle |
| 458 |
CPTK_IS_BOUNDED_ARRAY. |
| 459 |
* semantics.cc (trait_expr_value): Likewise. |
| 460 |
(finish_trait_expr): Likewise. |
| 461 |
|
| 462 |
2023-12-10 Ken Matsui <[email protected]> |
| 463 |
|
| 464 |
* cp-trait.def: Define __is_array. |
| 465 |
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. |
| 466 |
* semantics.cc (trait_expr_value): Likewise. |
| 467 |
(finish_trait_expr): Likewise. |
| 468 |
|
| 469 |
2023-12-10 Jason Merrill <[email protected]> |
| 470 |
|
| 471 |
* parser.cc (cp_parser_simple_type_specifier): Move trait |
| 472 |
handling to default label. |
| 473 |
|
| 474 |
2023-12-10 Ken Matsui <[email protected]> |
| 475 |
|
| 476 |
* parser.cc (cp_lexer_lookup_trait): Rename to ... |
| 477 |
(cp_lexer_peek_trait): ... this. Handle a subsequent token for |
| 478 |
the corresponding built-in trait. |
| 479 |
(cp_lexer_lookup_trait_expr): Rename to ... |
| 480 |
(cp_lexer_peek_trait_expr): ... this. |
| 481 |
(cp_lexer_lookup_trait_type): Rename to ... |
| 482 |
(cp_lexer_peek_trait_type): ... this. |
| 483 |
(cp_lexer_next_token_is_decl_specifier_keyword): Call |
| 484 |
cp_lexer_peek_trait_type. |
| 485 |
(cp_parser_simple_type_specifier): Likewise. |
| 486 |
(cp_parser_primary_expression): Call cp_lexer_peek_trait_expr. |
| 487 |
|
| 488 |
2023-12-10 Ken Matsui <[email protected]> |
| 489 |
Patrick Palka <[email protected]> |
| 490 |
|
| 491 |
* cp-objcp-common.cc (names_builtin_p): Remove all RID value |
| 492 |
cases for built-in traits. Check for built-in traits via |
| 493 |
the new cik_trait kind. |
| 494 |
* cp-tree.h (enum cp_trait_kind): Set its underlying type to |
| 495 |
addr_space_t. |
| 496 |
(struct cp_trait): New struct to hold trait information. |
| 497 |
(cp_traits): New array to hold a mapping to all traits. |
| 498 |
(cik_reserved_for_udlit): Rename to ... |
| 499 |
(cik_trait): ... this. |
| 500 |
(IDENTIFIER_ANY_OP_P): Exclude cik_trait. |
| 501 |
(IDENTIFIER_TRAIT_P): New macro to detect cik_trait. |
| 502 |
* lex.cc (cp_traits): Define its values, declared in cp-tree.h. |
| 503 |
(init_cp_traits): New function to set cik_trait and |
| 504 |
IDENTIFIER_CP_INDEX for all built-in trait identifiers. |
| 505 |
(cxx_init): Call init_cp_traits function. |
| 506 |
* parser.cc (cp_lexer_lookup_trait): New function to look up a |
| 507 |
built-in trait by IDENTIFIER_CP_INDEX. |
| 508 |
(cp_lexer_lookup_trait_expr): Likewise, look up an |
| 509 |
expression-yielding built-in trait. |
| 510 |
(cp_lexer_lookup_trait_type): Likewise, look up a type-yielding |
| 511 |
built-in trait. |
| 512 |
(cp_keyword_starts_decl_specifier_p): Remove all RID value cases |
| 513 |
for built-in traits. |
| 514 |
(cp_lexer_next_token_is_decl_specifier_keyword): Handle |
| 515 |
type-yielding built-in traits. |
| 516 |
(cp_parser_primary_expression): Remove all RID value cases for |
| 517 |
built-in traits. Handle expression-yielding built-in traits. |
| 518 |
(cp_parser_trait): Handle cp_trait instead of enum rid. |
| 519 |
(cp_parser_simple_type_specifier): Remove all RID value cases |
| 520 |
for built-in traits. Handle type-yielding built-in traits. |
| 521 |
|
| 522 |
2023-12-10 Ken Matsui <[email protected]> |
| 523 |
|
| 524 |
* constraint.cc (diagnose_trait_expr): Sort built-in traits |
| 525 |
alphabetically. |
| 526 |
* cp-trait.def: Likewise. |
| 527 |
* semantics.cc (trait_expr_value): Likewise. |
| 528 |
(finish_trait_expr): Likewise. |
| 529 |
(finish_trait_type): Likewise. |
| 530 |
|
| 531 |
2023-12-09 Jakub Jelinek <[email protected]> |
| 532 |
|
| 533 |
* parser.cc (cp_parser_statement, cp_parser_expression_statement, |
| 534 |
cp_parser_declaration, cp_parser_asm_definition): Don't diagnose |
| 535 |
ignored attributes if !any_nonignored_attribute_p. |
| 536 |
* decl.cc (grokdeclarator): Likewise. |
| 537 |
* name-lookup.cc (handle_namespace_attrs, finish_using_directive): |
| 538 |
Don't diagnose ignoring of attr_ignored_p attributes. |
| 539 |
|
| 540 |
2023-12-08 Patrick Palka <[email protected]> |
| 541 |
|
| 542 |
PR c++/83167 |
| 543 |
* semantics.cc (capture_decltype): Inline into its only caller ... |
| 544 |
(finish_decltype_type): ... here. Update nearby comment to refer |
| 545 |
to recent standard. Add FIXME. Restrict uncaptured variable type |
| 546 |
transformation to happen only for lambdas with a by-copy |
| 547 |
capture-default. |
| 548 |
|
| 549 |
2023-12-08 Jakub Jelinek <[email protected]> |
| 550 |
|
| 551 |
* parser.cc (cp_parser_std_attribute_spec): Return void_list_node |
| 552 |
rather than NULL_TREE if token is neither CPP_OPEN_SQUARE nor |
| 553 |
RID_ALIGNAS CPP_KEYWORD. |
| 554 |
(cp_parser_std_attribute_spec_seq): For attr_spec == void_list_node |
| 555 |
break, for attr_spec == NULL_TREE continue. |
| 556 |
|
| 557 |
2023-12-08 Jakub Jelinek <[email protected]> |
| 558 |
|
| 559 |
PR sanitizer/112727 |
| 560 |
* cp-gimplify.cc (cp_fold): If SAVE_EXPR has been previously |
| 561 |
folded, unshare_expr what is returned. |
| 562 |
|
| 563 |
2023-12-08 Patrick Palka <[email protected]> |
| 564 |
|
| 565 |
PR c++/112658 |
| 566 |
* parser.cc (cp_parser_expression_statement): If the statement |
| 567 |
is error_mark_node, make sure we've seen_error(). |
| 568 |
|
| 569 |
2023-12-08 Patrick Palka <[email protected]> |
| 570 |
|
| 571 |
PR c++/112658 |
| 572 |
PR c++/94264 |
| 573 |
* typeck.cc (cp_build_c_cast): If we're committed to a const_cast |
| 574 |
and the result is erroneous, call build_const_cast_1 a second |
| 575 |
time to issue errors. Use complain=tf_none instead of =false. |
| 576 |
|
| 577 |
2023-12-06 David Malcolm <[email protected]> |
| 578 |
|
| 579 |
* cp-tree.h (cxx_print_error_function): Make diagnostic_info param |
| 580 |
const. |
| 581 |
* error.cc (cxx_print_error_function): Likewise. |
| 582 |
(cp_diagnostic_starter): Likewise. |
| 583 |
(cp_print_error_function): Likewise. |
| 584 |
|
| 585 |
2023-12-06 Jason Merrill <[email protected]> |
| 586 |
|
| 587 |
DR 532 |
| 588 |
PR c++/53499 |
| 589 |
* pt.cc (more_specialized_fn): Fix object parameter handling. |
| 590 |
|
| 591 |
2023-12-05 Jakub Jelinek <[email protected]> |
| 592 |
|
| 593 |
PR c++/112795 |
| 594 |
* cp-tree.h (cp_check_pragma_unroll): Declare. |
| 595 |
* semantics.cc (cp_check_pragma_unroll): New function. |
| 596 |
* parser.cc (cp_parser_pragma_unroll): Use cp_check_pragma_unroll. |
| 597 |
* pt.cc (tsubst_expr) <case ANNOTATE_EXPR>: Likewise. |
| 598 |
(tsubst_stmt) <case RANGE_FOR_STMT>: Likwsie. |
| 599 |
|
| 600 |
2023-12-05 Richard Sandiford <[email protected]> |
| 601 |
|
| 602 |
* tree.cc (cxx_gnu_attribute_table): Add extra braces to work |
| 603 |
around PR 16333 in older compilers. |
| 604 |
|
| 605 |
2023-12-05 Jakub Jelinek <[email protected]> |
| 606 |
|
| 607 |
PR c++/110734 |
| 608 |
* parser.cc (cp_parser_block_declaration): Implement C++ DR 2262 |
| 609 |
- Attributes for asm-definition. Call cp_parser_asm_definition |
| 610 |
even if RID_ASM token is only seen after sequence of standard |
| 611 |
attributes. |
| 612 |
(cp_parser_asm_definition): Parse standard attributes before |
| 613 |
RID_ASM token and warn for them with -Wattributes. |
| 614 |
|
| 615 |
2023-12-05 Marek Polacek <[email protected]> |
| 616 |
|
| 617 |
PR c++/107687 |
| 618 |
PR c++/110997 |
| 619 |
* call.cc (in_immediate_context): No longer static. |
| 620 |
* constexpr.cc (cxx_eval_call_expression): Adjust assert. |
| 621 |
* cp-gimplify.cc (deferred_escalating_exprs): New vec. |
| 622 |
(remember_escalating_expr): New. |
| 623 |
(enum fold_flags): Remove ff_fold_immediate. |
| 624 |
(immediate_escalating_function_p): New. |
| 625 |
(unchecked_immediate_escalating_function_p): New. |
| 626 |
(promote_function_to_consteval): New. |
| 627 |
(cp_fold_immediate): Move above. Return non-null if any errors were |
| 628 |
emitted. |
| 629 |
(maybe_explain_promoted_consteval): New. |
| 630 |
(cp_gimplify_expr) <case CALL_EXPR>: Assert we've handled all |
| 631 |
immediate invocations. |
| 632 |
(taking_address_of_imm_fn_error): New. |
| 633 |
(cp_fold_immediate_r): Merge ADDR_EXPR and PTRMEM_CST cases. Implement |
| 634 |
P2564 - promoting functions to consteval. |
| 635 |
<case CALL_EXPR>: Implement P2564 - promoting functions to consteval. |
| 636 |
(cp_fold_r): If an expression turns into a CALL_EXPR after cp_fold, |
| 637 |
call cp_fold_immediate_r on the CALL_EXPR. |
| 638 |
(cp_fold_function): Set DECL_ESCALATION_CHECKED_P if |
| 639 |
deferred_escalating_exprs does not contain current_function_decl. |
| 640 |
(process_and_check_pending_immediate_escalating_fns): New. |
| 641 |
* cp-tree.h (struct lang_decl_fn): Add escalated_p bit-field. |
| 642 |
(DECL_ESCALATION_CHECKED_P): New. |
| 643 |
(immediate_invocation_p): Declare. |
| 644 |
(process_pending_immediate_escalating_fns): Likewise. |
| 645 |
* decl2.cc (c_parse_final_cleanups): Set at_eof to 2 after all |
| 646 |
templates have been instantiated; and to 3 at the end of the function. |
| 647 |
Call process_pending_immediate_escalating_fns. |
| 648 |
* error.cc (dump_template_bindings): Check at_eof against an updated |
| 649 |
value. |
| 650 |
* module.cc (trees_out::lang_decl_bools): Stream escalated_p. |
| 651 |
(trees_in::lang_decl_bools): Likewise. |
| 652 |
* pt.cc (push_tinst_level_loc): Set at_eof to 3, not 2. |
| 653 |
* typeck.cc (cp_build_addr_expr_1): Don't check |
| 654 |
DECL_IMMEDIATE_FUNCTION_P. |
| 655 |
|
| 656 |
2023-12-04 Jason Merrill <[email protected]> |
| 657 |
|
| 658 |
* constexpr.cc (potential_constant_expression_1): Fix |
| 659 |
check for loading volatile lvalue. |
| 660 |
|
| 661 |
2023-12-04 Jakub Jelinek <[email protected]> |
| 662 |
|
| 663 |
PR c++/112795 |
| 664 |
* cp-tree.h (cp_convert_range_for): Change UNROLL type from |
| 665 |
unsigned short to tree. |
| 666 |
(finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. |
| 667 |
* parser.cc (cp_parser_statement): Pass NULL_TREE rather than 0 to |
| 668 |
cp_parser_iteration_statement UNROLL argument. |
| 669 |
(cp_parser_for, cp_parser_c_for): Change UNROLL type from |
| 670 |
unsigned short to tree. |
| 671 |
(cp_parser_range_for): Likewise. Set RANGE_FOR_UNROLL to just UNROLL |
| 672 |
rather than build_int_cst from it. |
| 673 |
(cp_convert_range_for, cp_parser_iteration_statement): Change UNROLL |
| 674 |
type from unsigned short to tree. |
| 675 |
(cp_parser_omp_loop_nest): Pass NULL_TREE rather than 0 to |
| 676 |
cp_parser_range_for UNROLL argument. |
| 677 |
(cp_parser_pragma_unroll): Return tree rather than unsigned short. |
| 678 |
If parsed expression is type dependent, just return it, don't diagnose |
| 679 |
issues with value if it is value dependent. |
| 680 |
(cp_parser_pragma): Change UNROLL type from unsigned short to tree. |
| 681 |
* semantics.cc (finish_while_stmt_cond): Change UNROLL type from |
| 682 |
unsigned short to tree. Build ANNOTATE_EXPR with UNROLL as its last |
| 683 |
operand rather than build_int_cst from it. |
| 684 |
(finish_do_stmt, finish_for_cond): Likewise. |
| 685 |
* pt.cc (tsubst_stmt) <case RANGE_FOR_STMT>: Change UNROLL type from |
| 686 |
unsigned short to tree and set it to RECUR on RANGE_FOR_UNROLL (t). |
| 687 |
(tsubst_expr) <case ANNOTATE_EXPR>: For annot_expr_unroll_kind repeat |
| 688 |
checks on UNROLL value from cp_parser_pragma_unroll. |
| 689 |
|
| 690 |
2023-12-02 Richard Sandiford <[email protected]> |
| 691 |
|
| 692 |
* cp-tree.h (cxx_attribute_table): Delete. |
| 693 |
(cxx_gnu_attribute_table, std_attribute_table): Declare. |
| 694 |
* cp-objcp-common.h (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. |
| 695 |
(LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete. |
| 696 |
(cp_objcp_attribute_table): New table. |
| 697 |
(LANG_HOOKS_ATTRIBUTE_TABLE): Redefine. |
| 698 |
* tree.cc (cxx_attribute_table): Replace with... |
| 699 |
(cxx_gnu_attributes, cxx_gnu_attribute_table): ...these globals. |
| 700 |
(std_attribute_table): Change type to scoped_attribute_specs, using... |
| 701 |
(std_attributes): ...this as the underlying array. |
| 702 |
(init_tree): Remove call to register_scoped_attributes. |
| 703 |
|
| 704 |
2023-12-01 Jason Merrill <[email protected]> |
| 705 |
|
| 706 |
* mangle.cc (write_type): Mangle placeholder as its template. |
| 707 |
|
| 708 |
2023-12-01 Jason Merrill <[email protected]> |
| 709 |
|
| 710 |
* cp-tree.h (TEMPLATE_ARGS_TYPE_CONSTRAINT_P): New. |
| 711 |
(get_concept_check_template): Declare. |
| 712 |
* constraint.cc (combine_constraint_expressions) |
| 713 |
(finish_shorthand_constraint): Use UNKNOWN_LOCATION. |
| 714 |
* pt.cc (convert_generic_types_to_packs): Likewise. |
| 715 |
* mangle.cc (write_constraint_expression) |
| 716 |
(write_tparms_constraints, write_type_constraint) |
| 717 |
(template_parm_natural_p, write_requirement) |
| 718 |
(write_requires_expr): New. |
| 719 |
(write_encoding): Mangle trailing requires-clause. |
| 720 |
(write_name): Pass parms to write_template_args. |
| 721 |
(write_template_param_decl): Factor out from... |
| 722 |
(write_closure_template_head): ...here. |
| 723 |
(write_template_args): Mangle non-natural parms |
| 724 |
and requires-clause. |
| 725 |
(write_expression): Handle REQUIRES_EXPR. |
| 726 |
|
| 727 |
2023-12-01 Jason Merrill <[email protected]> |
| 728 |
|
| 729 |
* semantics.cc (finish_non_static_data_member) |
| 730 |
(finish_decltype_type, capture_decltype): |
| 731 |
Handle deduced closure parameter. |
| 732 |
|
| 733 |
2023-11-30 Marek Polacek <[email protected]> |
| 734 |
|
| 735 |
PR c++/112744 |
| 736 |
* typeck.cc (finish_class_member_access_expr): When accessing |
| 737 |
a static data member, use ba_any for lookup_base. |
| 738 |
|
| 739 |
2023-11-30 Jakub Jelinek <[email protected]> |
| 740 |
|
| 741 |
PR c++/110349 |
| 742 |
* cp-tree.h: Implement C++26 P2169R4 - Placeholder variables with no |
| 743 |
name. |
| 744 |
(OVL_NAME_INDEPENDENT_DECL_P): Define. |
| 745 |
(add_capture): Add unsigned * argument. |
| 746 |
(name_independent_decl_p): New inline function. |
| 747 |
* name-lookup.cc (class name_lookup): Make ambiguous and |
| 748 |
add_value members public. |
| 749 |
(name_independent_linear_search): New function. |
| 750 |
(get_class_binding_direct): Handle member_vec_binary_search |
| 751 |
returning OVL_NAME_INDEPENDENT_DECL_P OVERLOAD. Use |
| 752 |
name_independent_linear_search rather than fields_linear_search |
| 753 |
for linear lookup of _ name if !want_type. |
| 754 |
(member_name_cmp): Sort name-independent declarations first. |
| 755 |
(member_vec_dedup): Handle name-independent declarations. |
| 756 |
(pop_local_binding): Handle binding->value being a TREE_LIST for |
| 757 |
ambiguous name-independent declarations. |
| 758 |
(supplement_binding): Handle name-independent declarations. |
| 759 |
(update_binding): Likewise. |
| 760 |
(check_local_shadow): Return tree rather than void, normally |
| 761 |
NULL_TREE but old for name-independent declarations which used |
| 762 |
to conflict with outer scope declaration. Don't emit -Wshadow* |
| 763 |
warnings for name-independent declarations. |
| 764 |
(pushdecl): Handle name-independent declarations. |
| 765 |
* search.cc (lookup_field_r): Handle nval being a TREE_LIST. |
| 766 |
* lambda.cc (build_capture_proxy): Adjust for ___.<number> |
| 767 |
names of members. |
| 768 |
(add_capture): Add NAME_INDEPENDENT_CNT argument. Use ___.<number> |
| 769 |
name rather than ___ for second and following capture with |
| 770 |
_ name. |
| 771 |
(add_default_capture): Adjust add_capture caller. |
| 772 |
* decl.cc (poplevel): Don't warn about name-independent declarations. |
| 773 |
(duplicate_decls): If in C++26 a _ named declaration conflicts with |
| 774 |
earlier declarations, emit explaining note why the new declaration |
| 775 |
is not name-independent. |
| 776 |
(reshape_init_class): If field is a TREE_LIST, emit an ambiguity |
| 777 |
error with list of candidates rather than error about non-existing |
| 778 |
non-static data member. |
| 779 |
* parser.cc (cp_parser_lambda_introducer): Adjust add_capture callers. |
| 780 |
Allow name-independent capture redeclarations. |
| 781 |
(cp_parser_decomposition_declaration): Set decl_specs.storage_class |
| 782 |
to sc_static for static structured bindings. |
| 783 |
* pt.cc (tsubst_lambda_expr): Adjust add_capture caller. |
| 784 |
|
| 785 |
2023-11-30 Alexandre Oliva <[email protected]> |
| 786 |
|
| 787 |
* decl.cc (finish_enum_value_list): Set TYPE_PACKED if |
| 788 |
use_short_enum, and propagate it to variants. |
| 789 |
|
| 790 |
2023-11-30 Jason Merrill <[email protected]> |
| 791 |
|
| 792 |
* cp-tree.h (LAMBDA_EXPR_MUTABLE_P): Remove. |
| 793 |
* cp-tree.def: Remove documentation. |
| 794 |
* lambda.cc (build_lambda_expr): Remove reference. |
| 795 |
* parser.cc (cp_parser_lambda_declarator_opt): Likewise. |
| 796 |
* pt.cc (tsubst_lambda_expr): Likewise. |
| 797 |
* ptree.cc (cxx_print_lambda_node): Likewise. |
| 798 |
* semantics.cc (capture_decltype): Get the object quals |
| 799 |
from the object instead. |
| 800 |
|
| 801 |
2023-11-29 Marek Polacek <[email protected]> |
| 802 |
|
| 803 |
PR c++/106650 |
| 804 |
* constexpr.cc (cxx_eval_constant_expression) <case PARM_DECL>: Allow |
| 805 |
reference to unknown/this as per P2280. |
| 806 |
<case VAR_DECL>: Allow reference to unknown as per P2280. |
| 807 |
|
| 808 |
2023-11-29 Patrick Palka <[email protected]> |
| 809 |
|
| 810 |
PR c++/112765 |
| 811 |
* pt.cc (tsubst_expr) <case MODOP_EXPR>: Look through implicit |
| 812 |
INDIRECT_REF when propagating -Wparentheses warning suppression. |
| 813 |
* semantics.cc (maybe_warn_unparenthesized_assignment): Replace |
| 814 |
REFERENCE_REF_P handling with STRIP_REFERENCE_REF. |
| 815 |
(finish_parenthesized_expr): Likewise. |
| 816 |
|
| 817 |
2023-11-29 Jakub Jelinek <[email protected]> |
| 818 |
|
| 819 |
* semantics.cc (finish_static_assert): Free buf on error return. |
| 820 |
|
| 821 |
2023-11-29 Alexandre Oliva <[email protected]> |
| 822 |
|
| 823 |
* decl.cc (maybe_prepare_return_this): Split out of... |
| 824 |
(maybe_return_this): ... this. |
| 825 |
* cp-tree.h (maybe_prepare_return_this): Declare. |
| 826 |
* class.cc (build_clone): Call it. |
| 827 |
|
| 828 |
2023-11-29 Alexandre Oliva <[email protected]> |
| 829 |
|
| 830 |
* contracts.cc (check_postcondition_result): Cope with |
| 831 |
cdtor_return_this. |
| 832 |
|
| 833 |
2023-11-28 Jason Merrill <[email protected]> |
| 834 |
|
| 835 |
PR c++/94264 |
| 836 |
PR c++/53220 |
| 837 |
* call.cc (convert_like_internal): Remove obsolete comment. |
| 838 |
* typeck.cc (decay_conversion): Allow array prvalue. |
| 839 |
(maybe_warn_about_returning_address_of_local): Check |
| 840 |
for returning pointer to temporary. |
| 841 |
|
| 842 |
2023-11-28 Jakub Jelinek <[email protected]> |
| 843 |
|
| 844 |
* cp-objcp-common.cc (cp_feature_table): Evaluate |
| 845 |
__has_extension (cxx_init_captures) to 1 even for -std=c++11. |
| 846 |
|
| 847 |
2023-11-27 Alex Coplan <[email protected]> |
| 848 |
Iain Sandoe <[email protected]> |
| 849 |
|
| 850 |
PR c++/60512 |
| 851 |
* cp-lang.cc (c_family_register_lang_features): New. |
| 852 |
* cp-objcp-common.cc (struct cp_feature_selector): New. |
| 853 |
(cp_feature_selector::has_feature): New. |
| 854 |
(struct cp_feature_info): New. |
| 855 |
(cp_register_features): New. |
| 856 |
* cp-objcp-common.h (cp_register_features): New. |
| 857 |
|
| 858 |
2023-11-25 Nathaniel Shead <[email protected]> |
| 859 |
|
| 860 |
* name-lookup.cc (check_can_export_using_decl): New. |
| 861 |
(do_nonmember_using_decl): Use above to check if names can be |
| 862 |
exported. |
| 863 |
|
| 864 |
2023-11-25 Nathaniel Shead <[email protected]> |
| 865 |
|
| 866 |
PR c++/102341 |
| 867 |
* decl.cc (duplicate_decls): Allow exporting a redeclaration of |
| 868 |
a typedef. |
| 869 |
|
| 870 |
2023-11-24 Tobias Burnus <[email protected]> |
| 871 |
|
| 872 |
* parser.cc (cp_parser_omp_clause_dist_schedule, |
| 873 |
cp_parser_omp_scan_loop_body, cp_parser_omp_assumption_clauses, |
| 874 |
cp_parser_omp_depobj): Add OPT_Wopenmp to warning_at. |
| 875 |
* semantics.cc (finish_omp_clauses): Likewise. |
| 876 |
|
| 877 |
2023-11-24 Tobias Burnus <[email protected]> |
| 878 |
|
| 879 |
* parser.cc (cp_parser_omp_depobj): Accept optionally an argument |
| 880 |
to the destroy clause. |
| 881 |
|
| 882 |
2023-11-24 Nathaniel Shead <[email protected]> |
| 883 |
|
| 884 |
PR c++/99232 |
| 885 |
* decl.cc (grokvardecl): Don't mark variables attached to |
| 886 |
modules as internal. |
| 887 |
|
| 888 |
2023-11-24 Nathaniel Shead <[email protected]> |
| 889 |
|
| 890 |
PR c++/107398 |
| 891 |
* module.cc (trees_out::get_merge_kind): Handle lambdas in class |
| 892 |
scope. |
| 893 |
(maybe_key_decl): Remove assertion and fix whitespace. |
| 894 |
|
| 895 |
2023-11-24 Nathaniel Shead <[email protected]> |
| 896 |
|
| 897 |
PR c++/98885 |
| 898 |
* decl.cc (duplicate_decls): Adjust error message. |
| 899 |
(xref_tag): Adjust error message. Check exporting decl that is |
| 900 |
already declared as non-exporting. |
| 901 |
|
| 902 |
2023-11-23 Jakub Jelinek <[email protected]> |
| 903 |
|
| 904 |
PR c++/110348 |
| 905 |
* parser.cc: Implement C++26 P2741R3 - user-generated static_assert |
| 906 |
messages. |
| 907 |
(cp_parser_static_assert): Parse message argument as |
| 908 |
conditional-expression if it is not a pure string literal or |
| 909 |
several of them concatenated followed by closing paren. |
| 910 |
* semantics.cc (finish_static_assert): Handle message which is not |
| 911 |
STRING_CST. For condition with bare parameter packs return early. |
| 912 |
* pt.cc (tsubst_expr) <case STATIC_ASSERT>: Also tsubst_expr |
| 913 |
message and make sure that if it wasn't originally STRING_CST, it |
| 914 |
isn't after tsubst_expr either. |
| 915 |
|
| 916 |
2023-11-22 Patrick Palka <[email protected]> |
| 917 |
|
| 918 |
PR c++/112633 |
| 919 |
* pt.cc (tsubst_aggr_type): Handle empty TYPE_TEMPLATE_INFO |
| 920 |
in the entering_scope adjustment. |
| 921 |
|
| 922 |
2023-11-22 Jason Merrill <[email protected]> |
| 923 |
|
| 924 |
* decl.cc (start_preparsed_function): Clarify ctype logic. |
| 925 |
|
| 926 |
2023-11-20 Marc Poulhiès <[email protected]> |
| 927 |
|
| 928 |
* lambda.cc (compare_lambda_sig): Fix typo in variadic. |
| 929 |
|
| 930 |
2023-11-20 Jason Merrill <[email protected]> |
| 931 |
|
| 932 |
* pt.cc (comp_template_parms): Just one level. |
| 933 |
(template_parameter_lists_equivalent_p): Likewise. |
| 934 |
|
| 935 |
2023-11-20 Jason Merrill <[email protected]> |
| 936 |
|
| 937 |
* cp-tree.h (DECL_TEMPLATE_PARM_CHECK): New. |
| 938 |
(DECL_IMPLICIT_TEMPLATE_PARM_P): New. |
| 939 |
(decl_template_parm_check): New. |
| 940 |
* mangle.cc (write_closure_template_head): Use it. |
| 941 |
* parser.cc (synthesize_implicit_template_parm): Likewise. |
| 942 |
* pt.cc (template_parameters_equivalent_p): Likewise. |
| 943 |
|
| 944 |
2023-11-19 Nathaniel Shead <[email protected]> |
| 945 |
|
| 946 |
PR c++/99187 |
| 947 |
* cp-tree.h (enum cp_tree_index): Add CPTI_THREAD_ATEXIT. |
| 948 |
(thread_atexit_node): New. |
| 949 |
* decl.cc (get_thread_atexit_node): Cache in thread_atexit_node. |
| 950 |
|
| 951 |
2023-11-19 David Malcolm <[email protected]> |
| 952 |
|
| 953 |
* mapper-client.cc: Include "rich-location.h". |
| 954 |
|
| 955 |
2023-11-16 Jakub Jelinek <[email protected]> |
| 956 |
|
| 957 |
PR c++/112365 |
| 958 |
* class.cc (layout_class_type): Don't |
| 959 |
SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on FIELD_DECLs with |
| 960 |
error_mark_node type. |
| 961 |
|
| 962 |
2023-11-16 Patrick Palka <[email protected]> |
| 963 |
|
| 964 |
PR c++/111703 |
| 965 |
PR c++/107939 |
| 966 |
* constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: |
| 967 |
Fix FUNCTION_POINTER_TYPE_P test. |
| 968 |
|
| 969 |
2023-11-16 Marek Polacek <[email protected]> |
| 970 |
|
| 971 |
PR c++/112410 |
| 972 |
* parser.cc (cp_parser_direct_declarator): Maybe call |
| 973 |
abort_fully_implicit_template if it turned out the parameter list was |
| 974 |
ill-formed. |
| 975 |
|
| 976 |
2023-11-15 Bernhard Reutner-Fischer <[email protected]> |
| 977 |
|
| 978 |
* tree.cc (build_cplus_array_type): Revert using the macro |
| 979 |
CAN_HAVE_LOCATION_P. |
| 980 |
|
| 981 |
2023-11-15 Patrick Palka <[email protected]> |
| 982 |
|
| 983 |
PR c++/112515 |
| 984 |
* decl.cc (is_direct_enum_init): Check type-dependence of the |
| 985 |
single element. |
| 986 |
|
| 987 |
2023-11-15 Patrick Palka <[email protected]> |
| 988 |
|
| 989 |
PR c++/101043 |
| 990 |
* tree.cc (strip_typedefs_expr) <case TREE_LIST>: Handle |
| 991 |
non-empty TREE_PURPOSE. |
| 992 |
|
| 993 |
2023-11-15 Patrick Palka <[email protected]> |
| 994 |
|
| 995 |
PR c++/112427 |
| 996 |
* tree.cc (build_min_non_dep): Propagate TREE_SIDE_EFFECTS from |
| 997 |
the original arguments. |
| 998 |
(build_min_non_dep_call_vec): Likewise. |
| 999 |
* typeck2.cc (build_m_component_ref): Use cp_convert, build2 and |
| 1000 |
cp_fully_fold instead of fold_build_pointer_plus and fold_convert. |
| 1001 |
Don't build the POINTER_PLUS_EXPR in a template context. |
| 1002 |
|
| 1003 |
2023-11-15 Patrick Palka <[email protected]> |
| 1004 |
|
| 1005 |
PR c++/111703 |
| 1006 |
PR c++/112269 |
| 1007 |
* constexpr.cc (potential_constant_expression_1) <case VAR_DECL>: |
| 1008 |
Only consider var_in_maybe_constexpr_fn if 'now' is false. |
| 1009 |
<case INDIRECT_REF>: Likewise. |
| 1010 |
|
| 1011 |
2023-11-15 Jakub Jelinek <[email protected]> |
| 1012 |
|
| 1013 |
* typeck.cc: Implement C++26 P2864R2 - Remove Deprecated Arithmetic |
| 1014 |
Conversion on Enumerations From C++26. |
| 1015 |
(do_warn_enum_conversions): Return bool rather than void, add COMPLAIN |
| 1016 |
argument. Use pedwarn rather than warning_at for C++26 and remove |
| 1017 |
" is deprecated" part of the diagnostics in that case. For SFINAE |
| 1018 |
in C++26 return true on newly erroneous cases. |
| 1019 |
(cp_build_binary_op): For C++26 call do_warn_enum_conversions |
| 1020 |
unconditionally, pass complain argument to it and if it returns true, |
| 1021 |
return error_mark_node. |
| 1022 |
* call.cc (build_conditional_expr): Use pedwarn rather than warning_at |
| 1023 |
for C++26 and remove " is deprecated" part of the diagnostics in that |
| 1024 |
case and check for complain & tf_warning_or_error. Use emit_diagnostic |
| 1025 |
with cxx_dialect >= cxx26 ? DK_PEDWARN : DK_WARNING. For SFINAE in |
| 1026 |
C++26 return error_mark_node on newly erroneous cases. |
| 1027 |
(build_new_op): Use emit_diagnostic with cxx_dialect >= cxx26 |
| 1028 |
? DK_PEDWARN : DK_WARNING and complain & tf_warning_or_error check |
| 1029 |
for C++26. For SFINAE in C++26 return error_mark_node on newly |
| 1030 |
erroneous cases. |
| 1031 |
|
| 1032 |
2023-11-14 Nathaniel Shead <[email protected]> |
| 1033 |
|
| 1034 |
PR c++/103499 |
| 1035 |
* module.cc (trees_out::decl_node): Write DECL_VINDEX for |
| 1036 |
virtual clones. |
| 1037 |
(trees_in::tree_node): Read DECL_VINDEX for virtual clones. |
| 1038 |
|
| 1039 |
2023-11-14 Nathaniel Shead <[email protected]> |
| 1040 |
|
| 1041 |
PR c++/106849 |
| 1042 |
* name-lookup.cc (do_nonmember_using_decl): Handle |
| 1043 |
TEMPLATE_DECLs when checking module attachment. |
| 1044 |
|
| 1045 |
2023-11-14 David Malcolm <[email protected]> |
| 1046 |
|
| 1047 |
* decl.cc (finish_function): Update call to |
| 1048 |
global_dc->m_option_enabled to use option_enabled_p. |
| 1049 |
|
| 1050 |
2023-11-14 David Malcolm <[email protected]> |
| 1051 |
|
| 1052 |
* contracts.cc (build_comment): Use global_dc's file_cache. |
| 1053 |
|
| 1054 |
2023-11-14 Jonathan Wakely <[email protected]> |
| 1055 |
|
| 1056 |
PR c++/111842 |
| 1057 |
PR c++/112498 |
| 1058 |
* call.cc (convert_like_internal): Use OPT_Wnarrowing for |
| 1059 |
pedwarns about illformed conversions involving extended |
| 1060 |
floating-point types. Clarify that ISO C++ requires these |
| 1061 |
diagnostics. |
| 1062 |
|
| 1063 |
2023-11-14 Jakub Jelinek <[email protected]> |
| 1064 |
|
| 1065 |
PR c/111309 |
| 1066 |
* call.cc (magic_varargs_p): Return 4 for |
| 1067 |
BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G. |
| 1068 |
(build_over_call): Don't promote first argument of |
| 1069 |
BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G. |
| 1070 |
* cp-gimplify.cc (cp_gimplify_expr): For BUILT_IN_C{L,T}ZG use |
| 1071 |
c_gimplify_expr. |
| 1072 |
|
| 1073 |
2023-11-10 Patrick Palka <[email protected]> |
| 1074 |
|
| 1075 |
PR c++/79620 |
| 1076 |
* cp-tree.h (STRIP_REFERENCE_REF): Define. |
| 1077 |
* semantics.cc (outer_var_p): Assert REFERENCE_REF_P is false. |
| 1078 |
(finish_decltype_type): Look through implicit INDIRECT_REF when |
| 1079 |
deciding whether to call capture_decltype. |
| 1080 |
|
| 1081 |
2023-11-10 Patrick Palka <[email protected]> |
| 1082 |
|
| 1083 |
PR c++/79378 |
| 1084 |
PR c++/96917 |
| 1085 |
* semantics.cc (finish_decltype_type): Handle an id-expression |
| 1086 |
naming a capture proxy specially. |
| 1087 |
|
| 1088 |
2023-11-07 Kwok Cheung Yeung <[email protected]> |
| 1089 |
|
| 1090 |
* cp-tree.h (cp_omp_declare_target_attr): Add indirect field. |
| 1091 |
* decl2.cc (cplus_decl_attributes): Add attribute for indirect |
| 1092 |
functions. |
| 1093 |
* parser.cc (cp_parser_omp_clause_name): Handle indirect clause. |
| 1094 |
(cp_parser_omp_clause_indirect): New. |
| 1095 |
(cp_parser_omp_all_clauses): Handle indirect clause. |
| 1096 |
(handle_omp_declare_target_clause): Add extra parameter. Add |
| 1097 |
indirect attribute for indirect functions. |
| 1098 |
(OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask. |
| 1099 |
(cp_parser_omp_declare_target): Handle indirect clause. Emit error |
| 1100 |
message if device_type or indirect clauses used alone. Emit error |
| 1101 |
if indirect clause used with device_type that is not 'any'. |
| 1102 |
(OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask. |
| 1103 |
(cp_parser_omp_begin): Handle indirect clause. |
| 1104 |
* semantics.cc (finish_omp_clauses): Handle indirect clause. |
| 1105 |
|
| 1106 |
2023-11-04 Jakub Jelinek <[email protected]> |
| 1107 |
|
| 1108 |
* parser.h (struct cp_parser): Adjust comment on omp_attrs_forbidden_p |
| 1109 |
member. |
| 1110 |
* parser.cc (cp_parser_omp_section_scan): Allow __directive__ spelling. |
| 1111 |
|
| 1112 |
2023-11-04 David Malcolm <[email protected]> |
| 1113 |
|
| 1114 |
* call.cc: Update for changes to diagnostic_context. |
| 1115 |
* class.cc: Likewise. |
| 1116 |
* decl.cc: Likewise. |
| 1117 |
* error.cc: Likewise. |
| 1118 |
* except.cc: Likewise. |
| 1119 |
* pt.cc: Likewise. |
| 1120 |
|
| 1121 |
2023-11-02 Jason Merrill <[email protected]> |
| 1122 |
|
| 1123 |
* semantics.cc (nrv_data): Change visited to hash_set. |
| 1124 |
(finalize_nrv_r): Reorganize. |
| 1125 |
|
| 1126 |
2023-11-02 Jason Merrill <[email protected]> |
| 1127 |
|
| 1128 |
PR c++/112301 |
| 1129 |
PR c++/102191 |
| 1130 |
PR c++/33799 |
| 1131 |
* except.cc (maybe_splice_retval_cleanup): Clear |
| 1132 |
current_retval_sentinel when destroying retval. |
| 1133 |
* semantics.cc (nrv_data): Add in_nrv_cleanup. |
| 1134 |
(finalize_nrv): Set it. |
| 1135 |
(finalize_nrv_r): Fix handling of throwing cleanups. |
| 1136 |
|
| 1137 |
2023-11-02 Jakub Jelinek <[email protected]> |
| 1138 |
|
| 1139 |
PR c++/110342 |
| 1140 |
* parser.cc: Implement C++26 P2361R6 - Unevaluated strings. |
| 1141 |
(uneval_string_attr): New enumerator. |
| 1142 |
(cp_parser_string_literal_common): Add UNEVAL argument. If true, |
| 1143 |
pass CPP_UNEVAL_STRING rather than CPP_STRING to |
| 1144 |
cpp_interpret_string_notranslate. |
| 1145 |
(cp_parser_string_literal, cp_parser_userdef_string_literal): Adjust |
| 1146 |
callers of cp_parser_string_literal_common. |
| 1147 |
(cp_parser_unevaluated_string_literal): New function. |
| 1148 |
(cp_parser_parenthesized_expression_list): Handle uneval_string_attr. |
| 1149 |
(cp_parser_linkage_specification): Use |
| 1150 |
cp_parser_unevaluated_string_literal for C++26. |
| 1151 |
(cp_parser_static_assert): Likewise. |
| 1152 |
(cp_parser_std_attribute): Use uneval_string_attr for standard |
| 1153 |
deprecated and nodiscard attributes. |
| 1154 |
|
| 1155 |
2023-10-31 David Malcolm <[email protected]> |
| 1156 |
|
| 1157 |
* module.cc (ordinary_loc_of): Update for removal of |
| 1158 |
MACRO_MAP_EXPANSION_POINT_LOCATION. |
| 1159 |
(module_state::note_location): Update for renaming of field. |
| 1160 |
(module_state::write_macro_maps): Likewise. |
| 1161 |
|
| 1162 |
2023-10-27 Patrick Palka <[email protected]> |
| 1163 |
|
| 1164 |
PR c++/111929 |
| 1165 |
* init.cc (build_new_1): Remove unnecessary call to convert |
| 1166 |
on 'nelts'. Use build2 instead of fold_build2 for |
| 1167 |
'outer_nelts_checks'. |
| 1168 |
|
| 1169 |
2023-10-27 Patrick Palka <[email protected]> |
| 1170 |
|
| 1171 |
* cp-tree.h (maybe_warn_unparenthesized_assignment): Declare. |
| 1172 |
* semantics.cc (is_assignment_op_expr_p): Generalize to return |
| 1173 |
true for any assignment operator expression, not just one that |
| 1174 |
has been resolved to an operator overload. |
| 1175 |
(maybe_warn_unparenthesized_assignment): Factored out from ... |
| 1176 |
(maybe_convert_cond): ... here. |
| 1177 |
(finish_parenthesized_expr): Mention |
| 1178 |
maybe_warn_unparenthesized_assignment. |
| 1179 |
* typeck.cc (convert_for_assignment): Replace -Wparentheses |
| 1180 |
warning logic with maybe_warn_unparenthesized_assignment. |
| 1181 |
|
| 1182 |
2023-10-27 Lewis Hyatt <[email protected]> |
| 1183 |
|
| 1184 |
PR preprocessor/87299 |
| 1185 |
* parser.cc (cp_lexer_new_main): Call c_reset_target_pragmas () |
| 1186 |
after preprocessing is complete, before starting compilation. |
| 1187 |
|
| 1188 |
2023-10-26 liuhongt <[email protected]> |
| 1189 |
|
| 1190 |
* typeck.cc (build_vec_cmp): Pass type of arg0 to |
| 1191 |
truth_type_for. |
| 1192 |
|
| 1193 |
2023-10-25 Jason Merrill <[email protected]> |
| 1194 |
|
| 1195 |
* cp-tree.def: Improve OFFSET_REF comment. |
| 1196 |
* cp-gimplify.cc (cp_fold_immediate): Add to comment. |
| 1197 |
|
| 1198 |
2023-10-25 Thomas Schwinge <[email protected]> |
| 1199 |
|
| 1200 |
* parser.cc (cp_parser_omp_clause_name): Return |
| 1201 |
'PRAGMA_OACC_CLAUSE_SELF' for "self". |
| 1202 |
(cp_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust. |
| 1203 |
(cp_parser_oacc_all_clauses): Remove 'bool compute_p' formal |
| 1204 |
parameter, and instead locally determine whether we're called for |
| 1205 |
an OpenACC compute construct or OpenACC 'update' directive. |
| 1206 |
(cp_parser_oacc_compute): Adjust. |
| 1207 |
|
| 1208 |
2023-10-25 Chung-Lin Tang <[email protected]> |
| 1209 |
|
| 1210 |
* parser.cc (cp_parser_oacc_compute_clause_self): New function. |
| 1211 |
(cp_parser_oacc_all_clauses): Add new 'bool compute_p = false' |
| 1212 |
parameter, add parsing of self clause when compute_p is true. |
| 1213 |
(OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF. |
| 1214 |
(OACC_PARALLEL_CLAUSE_MASK): Likewise, |
| 1215 |
(OACC_SERIAL_CLAUSE_MASK): Likewise. |
| 1216 |
(cp_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to |
| 1217 |
set compute_p argument to true. |
| 1218 |
* pt.cc (tsubst_omp_clauses): Add OMP_CLAUSE_SELF case. |
| 1219 |
* semantics.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case, merged |
| 1220 |
with OMP_CLAUSE_IF case. |
| 1221 |
|
| 1222 |
2023-10-25 Marek Polacek <[email protected]> |
| 1223 |
|
| 1224 |
PR c++/111895 |
| 1225 |
* typeck.cc (build_static_cast_1): Call decay_conversion. |
| 1226 |
|
| 1227 |
2023-10-24 Patrick Palka <[email protected]> |
| 1228 |
|
| 1229 |
PR c++/111929 |
| 1230 |
* init.cc (build_new_1): Use convert, build2, build3 and |
| 1231 |
cp_fully_fold instead of fold_convert, size_binop and |
| 1232 |
fold_build3 when building up 'size'. |
| 1233 |
|
| 1234 |
2023-10-24 Patrick Palka <[email protected]> |
| 1235 |
|
| 1236 |
PR c++/111919 |
| 1237 |
* tree.cc (cp_stabilize_reference): Do nothing when |
| 1238 |
processing_template_decl. |
| 1239 |
|
| 1240 |
2023-10-22 Patrick Palka <[email protected]> |
| 1241 |
|
| 1242 |
PR objc++/111920 |
| 1243 |
* pt.cc (tsubst_expr) <case AT_ENCODE_EXPR>: Use tsubst instead |
| 1244 |
of tsubst_expr. |
| 1245 |
|
| 1246 |
2023-10-20 Jason Merrill <[email protected]> |
| 1247 |
|
| 1248 |
* call.cc (implicit_conversion_1): Rename... |
| 1249 |
(implicit_conversion): ...to this. Remove the old wrapper. |
| 1250 |
|
| 1251 |
2023-10-20 Jason Merrill <[email protected]> |
| 1252 |
|
| 1253 |
* call.cc (tourney): Only skip champ_compared_to_predecessor. |
| 1254 |
|
| 1255 |
2023-10-20 Nathan Sidwell <[email protected]> |
| 1256 |
|
| 1257 |
PR c++/105322 |
| 1258 |
* module.cc (trees_out::core_vals): Stream CONSTRUCTOR operands |
| 1259 |
after the type. |
| 1260 |
(trees_in::core_vals): Likewise. |
| 1261 |
|
| 1262 |
2023-10-20 Patrick Palka <[email protected]> |
| 1263 |
|
| 1264 |
* cp-lang.cc (objcp_tsubst_copy_and_build): Rename to ... |
| 1265 |
(objcp_tsubst_expr): ... this. |
| 1266 |
* cp-objcp-common.h (objcp_tsubst_copy_and_build): Rename to ... |
| 1267 |
(objcp_tsubst_expr): ... this. |
| 1268 |
* cp-tree.h (tsubst_copy_and_build): Remove declaration. |
| 1269 |
* init.cc (maybe_instantiate_nsdmi_init): Use tsubst_expr |
| 1270 |
instead of tsubst_copy_and_build. |
| 1271 |
* pt.cc (expand_integer_pack): Likewise. |
| 1272 |
(instantiate_non_dependent_expr_internal): Likewise. |
| 1273 |
(instantiate_class_template): Use tsubst_stmt instead of |
| 1274 |
tsubst_expr for STATIC_ASSERT. |
| 1275 |
(tsubst_function_decl): Adjust tsubst_copy_and_build uses. |
| 1276 |
(tsubst_arg_types): Likewise. |
| 1277 |
(tsubst_exception_specification): Likewise. |
| 1278 |
(tsubst_tree_list): Likewise. |
| 1279 |
(tsubst): Likewise. |
| 1280 |
(tsubst_name): Likewise. |
| 1281 |
(tsubst_omp_clause_decl): Use tsubst_stmt instead of tsubst_expr. |
| 1282 |
(tsubst_omp_clauses): Likewise. |
| 1283 |
(tsubst_copy_asm_operands): Adjust tsubst_copy_and_build use. |
| 1284 |
(tsubst_omp_for_iterator): Use tsubst_stmt instead of tsubst_expr. |
| 1285 |
(tsubst_expr): Rename to ... |
| 1286 |
(tsubst_stmt): ... this. |
| 1287 |
<case CO_YIELD_EXPR, CO_AWAIT_EXPR>: Move to tsubst_expr. |
| 1288 |
(tsubst_omp_udr): Use tsubst_stmt instead of tsubst_expr. |
| 1289 |
(tsubst_non_call_postfix_expression): Adjust tsubst_copy_and_build |
| 1290 |
use. |
| 1291 |
(tsubst_lambda_expr): Likewise. Use tsubst_stmt instead of |
| 1292 |
tsubst_expr for the body of a lambda. |
| 1293 |
(tsubst_copy_and_build_call_args): Rename to ... |
| 1294 |
(tsubst_call_args): ... this. Adjust tsubst_copy_and_build use. |
| 1295 |
(tsubst_copy_and_build): Rename to tsubst_expr. Adjust |
| 1296 |
tsubst_copy_and_build and tsubst_copy_and_build_call_args use. |
| 1297 |
<case TRANSACTION_EXPR>: Use tsubst_stmt instead of tsubst_expr. |
| 1298 |
(maybe_instantiate_noexcept): Adjust tsubst_copy_and_build use. |
| 1299 |
(instantiate_body): Use tsubst_stmt instead of tsubst_expr for |
| 1300 |
substituting the function body. |
| 1301 |
(tsubst_initializer_list): Adjust tsubst_copy_and_build use. |
| 1302 |
|
| 1303 |
2023-10-20 Patrick Palka <[email protected]> |
| 1304 |
|
| 1305 |
* cp-tree.h (enum tsubst_flags): Add tf_no_name_lookup. |
| 1306 |
* pt.cc (tsubst_pack_expansion): Use tsubst for substituting |
| 1307 |
BASES_TYPE. |
| 1308 |
(tsubst_decl) <case USING_DECL>: Use tsubst_name instead of |
| 1309 |
tsubst_copy. |
| 1310 |
(tsubst) <case TEMPLATE_TYPE_PARM>: Use tsubst_copy_and_build |
| 1311 |
instead of tsubst_copy for substituting |
| 1312 |
CLASS_PLACEHOLDER_TEMPLATE. |
| 1313 |
<case TYPENAME_TYPE>: Use tsubst_name instead of tsubst_copy for |
| 1314 |
substituting TYPENAME_TYPE_FULLNAME. |
| 1315 |
(tsubst_name): Define. |
| 1316 |
(tsubst_qualified_id): Use tsubst_name instead of tsubst_copy |
| 1317 |
for substituting the component name of a SCOPE_REF. |
| 1318 |
(tsubst_copy): Remove. |
| 1319 |
(tsubst_copy_and_build): Clear tf_no_name_lookup at the start, |
| 1320 |
and remember if it was set. Call maybe_dependent_member_ref if |
| 1321 |
tf_no_name_lookup was not set. |
| 1322 |
<case IDENTIFIER_NODE>: Don't do name lookup if tf_no_name_lookup |
| 1323 |
was set. |
| 1324 |
<case TEMPLATE_ID_EXPR>: If tf_no_name_lookup was set, use |
| 1325 |
tsubst_name instead of tsubst_copy_and_build to substitute the |
| 1326 |
template and don't finish the template-id. |
| 1327 |
<case BIT_NOT_EXPR>: Handle identifier and type operand (if |
| 1328 |
tf_no_name_lookup was set). |
| 1329 |
<case SCOPE_REF>: Avoid trying to resolve a SCOPE_REF if |
| 1330 |
tf_no_name_lookup was set by calling build_qualified_name directly |
| 1331 |
instead of tsubst_qualified_id. |
| 1332 |
<case SIZEOF_EXPR>: Handling of sizeof... copied from tsubst_copy. |
| 1333 |
<case CALL_EXPR>: Use tsubst_name instead of tsubst_copy to |
| 1334 |
substitute a TEMPLATE_ID_EXPR callee naming an unresolved template. |
| 1335 |
<case COMPONENT_REF>: Likewise to substitute the member. |
| 1336 |
<case FUNCTION_DECL>: Copied from tsubst_copy and merged with ... |
| 1337 |
<case VAR_DECL, PARM_DECL>: ... these. Initial handling copied |
| 1338 |
from tsubst_copy. Optimize local variable substitution by |
| 1339 |
trying retrieve_local_specialization before checking |
| 1340 |
uses_template_parms. |
| 1341 |
<case CONST_DECL>: Copied from tsubst_copy. |
| 1342 |
<case FIELD_DECL>: Likewise. |
| 1343 |
<case NAMESPACE_DECL>: Likewise. |
| 1344 |
<case OVERLOAD>: Likewise. |
| 1345 |
<case TEMPLATE_DECL>: Likewise. |
| 1346 |
<case TEMPLATE_PARM_INDEX>: Likewise. |
| 1347 |
<case TYPE_DECL>: Likewise. |
| 1348 |
<case CLEANUP_POINT_EXPR>: Likewise. |
| 1349 |
<case OFFSET_REF>: Likewise. |
| 1350 |
<case EXPR_PACK_EXPANSION>: Likewise. |
| 1351 |
<case NONTYPE_ARGUMENT_PACK>: Likewise. |
| 1352 |
<case *_CST>: Likewise. |
| 1353 |
<case *_*_FOLD_EXPR>: Likewise. |
| 1354 |
<case DEBUG_BEGIN_STMT>: Likewise. |
| 1355 |
<case CO_AWAIT_EXPR>: Likewise. |
| 1356 |
<case TRAIT_EXPR>: Use tsubst and tsubst_copy_and_build instead |
| 1357 |
of tsubst_copy. |
| 1358 |
<default>: Copied from tsubst_copy. |
| 1359 |
(tsubst_initializer_list): Use tsubst and tsubst_copy_and_build |
| 1360 |
instead of tsubst_copy. |
| 1361 |
|
| 1362 |
2023-10-20 Patrick Palka <[email protected]> |
| 1363 |
|
| 1364 |
PR c++/106086 |
| 1365 |
* parser.cc (cp_parser_postfix_expression): Consolidate three |
| 1366 |
calls to finish_call_expr, one to build_new_method_call and |
| 1367 |
one to build_min_nt_call_vec into one call to finish_call_expr. |
| 1368 |
Don't call maybe_generic_this_capture here. |
| 1369 |
* pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Remove |
| 1370 |
COMPONENT_REF callee handling. |
| 1371 |
(type_dependent_expression_p): Use t_d_object_e_p instead of |
| 1372 |
t_d_e_p for COMPONENT_REF and OFFSET_REF. |
| 1373 |
* semantics.cc (finish_call_expr): In the type-dependent case, |
| 1374 |
call maybe_generic_this_capture here instead. |
| 1375 |
|
| 1376 |
2023-10-20 Patrick Palka <[email protected]> |
| 1377 |
|
| 1378 |
* call.cc (build_new_method_call): Remove calls to |
| 1379 |
build_non_dependent_expr and/or make_args_non_dependent. |
| 1380 |
* coroutines.cc (finish_co_return_stmt): Likewise. |
| 1381 |
* cp-tree.h (build_non_dependent_expr): Remove. |
| 1382 |
(make_args_non_dependent): Remove. |
| 1383 |
* decl2.cc (grok_array_decl): Remove calls to |
| 1384 |
build_non_dependent_expr and/or make_args_non_dependent. |
| 1385 |
(build_offset_ref_call_from_tree): Likewise. |
| 1386 |
* init.cc (build_new): Likewise. |
| 1387 |
* pt.cc (make_args_non_dependent): Remove. |
| 1388 |
(test_build_non_dependent_expr): Remove. |
| 1389 |
(cp_pt_cc_tests): Adjust. |
| 1390 |
* semantics.cc (finish_expr_stmt): Remove calls to |
| 1391 |
build_non_dependent_expr and/or make_args_non_dependent. |
| 1392 |
(finish_for_expr): Likewise. |
| 1393 |
(finish_call_expr): Likewise. |
| 1394 |
(finish_omp_atomic): Likewise. |
| 1395 |
* typeck.cc (finish_class_member_access_expr): Likewise. |
| 1396 |
(build_x_indirect_ref): Likewise. |
| 1397 |
(build_x_binary_op): Likewise. |
| 1398 |
(build_x_array_ref): Likewise. |
| 1399 |
(build_x_vec_perm_expr): Likewise. |
| 1400 |
(build_x_shufflevector): Likewise. |
| 1401 |
(build_x_unary_op): Likewise. |
| 1402 |
(cp_build_addressof): Likewise. |
| 1403 |
(build_x_conditional_expr): Likewise. |
| 1404 |
(build_x_compound_expr): Likewise. |
| 1405 |
(build_static_cast): Likewise. |
| 1406 |
(build_x_modify_expr): Likewise. |
| 1407 |
(check_return_expr): Likewise. |
| 1408 |
* typeck2.cc (build_x_arrow): Likewise. |
| 1409 |
|
| 1410 |
2023-10-20 Patrick Palka <[email protected]> |
| 1411 |
|
| 1412 |
* class.cc (instantiate_type): Remove NON_DEPENDENT_EXPR |
| 1413 |
handling. |
| 1414 |
* constexpr.cc (cxx_eval_constant_expression): Likewise. |
| 1415 |
(potential_constant_expression_1): Likewise. |
| 1416 |
* coroutines.cc (coro_validate_builtin_call): Don't |
| 1417 |
expect ALIGNOF_EXPR to be wrapped in NON_DEPENDENT_EXPR. |
| 1418 |
* cp-objcp-common.cc (cp_common_init_ts): Remove |
| 1419 |
NON_DEPENDENT_EXPR handling. |
| 1420 |
* cp-tree.def (NON_DEPENDENT_EXPR): Remove. |
| 1421 |
* cp-tree.h (build_non_dependent_expr): Temporarily redefine as |
| 1422 |
the identity function. |
| 1423 |
* cvt.cc (maybe_warn_nodiscard): Handle type-dependent and |
| 1424 |
variable callee of CALL_EXPR. |
| 1425 |
* cxx-pretty-print.cc (cxx_pretty_printer::expression): Remove |
| 1426 |
NON_DEPENDENT_EXPR handling. |
| 1427 |
* error.cc (dump_decl): Likewise. |
| 1428 |
(dump_expr): Likewise. |
| 1429 |
* expr.cc (mark_use): Likewise. |
| 1430 |
(mark_exp_read): Likewise. |
| 1431 |
* pt.cc (build_non_dependent_expr): Remove. |
| 1432 |
* tree.cc (lvalue_kind): Remove NON_DEPENDENT_EXPR handling. |
| 1433 |
(cp_stabilize_reference): Likewise. |
| 1434 |
* typeck.cc (warn_for_null_address): Likewise. |
| 1435 |
(cp_build_binary_op): Handle type-dependent SIZEOF_EXPR operands. |
| 1436 |
(cp_build_unary_op) <case TRUTH_NOT_EXPR>: Don't fold inside a |
| 1437 |
template. |
| 1438 |
|
| 1439 |
2023-10-20 Alexandre Oliva <[email protected]> |
| 1440 |
|
| 1441 |
* decl.cc (push_throw_library_fn): Mark with ECF_XTHROW. |
| 1442 |
* except.cc (build_throw): Likewise __cxa_throw, |
| 1443 |
_ITM_cxa_throw, __cxa_rethrow. |
| 1444 |
|
| 1445 |
2023-10-20 Nathaniel Shead <[email protected]> |
| 1446 |
|
| 1447 |
PR c++/101631 |
| 1448 |
PR c++/102286 |
| 1449 |
* call.cc (build_over_call): Fold more indirect refs for trivial |
| 1450 |
assignment op. |
| 1451 |
* class.cc (type_has_non_deleted_trivial_default_ctor): Create. |
| 1452 |
* constexpr.cc (cxx_eval_call_expression): Start lifetime of |
| 1453 |
union member before entering constructor. |
| 1454 |
(cxx_eval_component_reference): Check against first member of |
| 1455 |
value-initialised union. |
| 1456 |
(cxx_eval_store_expression): Activate member for |
| 1457 |
value-initialised union. Check for accessing inactive union |
| 1458 |
member indirectly. |
| 1459 |
* cp-tree.h (type_has_non_deleted_trivial_default_ctor): |
| 1460 |
Forward declare. |
| 1461 |
|
| 1462 |
2023-10-20 Nathaniel Shead <[email protected]> |
| 1463 |
|
| 1464 |
* constexpr.cc (is_std_source_location_current): New. |
| 1465 |
(cxx_eval_constant_expression): Only ignore cast from void* for |
| 1466 |
specific cases and improve other diagnostics. |
| 1467 |
|
| 1468 |
2023-10-19 Marek Polacek <[email protected]> |
| 1469 |
|
| 1470 |
* cp-gimplify.cc (cp_fold_r): Don't call maybe_constant_value. |
| 1471 |
|
| 1472 |
2023-10-19 Jason Merrill <[email protected]> |
| 1473 |
|
| 1474 |
* typeck2.cc (check_narrowing): Adjust. |
| 1475 |
|
| 1476 |
2023-10-19 Jason Merrill <[email protected]> |
| 1477 |
|
| 1478 |
* parser.cc (cp_parser_primary_expression): Use G_. |
| 1479 |
(cp_parser_using_enum): Likewise. |
| 1480 |
* decl.cc (identify_goto): Likewise. |
| 1481 |
|
| 1482 |
2023-10-18 Jason Merrill <[email protected]> |
| 1483 |
|
| 1484 |
* typeck2.cc (check_narrowing): Use permerror. |
| 1485 |
|
| 1486 |
2023-10-17 Marek Polacek <[email protected]> |
| 1487 |
|
| 1488 |
PR c++/111840 |
| 1489 |
* parser.cc (cp_parser_simple_declaration): Do cp_parser_error |
| 1490 |
for FUNCTION_DECLs. |
| 1491 |
|
| 1492 |
2023-10-17 Marek Polacek <[email protected]> |
| 1493 |
|
| 1494 |
PR c++/111660 |
| 1495 |
* cp-gimplify.cc (cp_fold_immediate_r) <case COND_EXPR>: Don't |
| 1496 |
handle it here. |
| 1497 |
(cp_fold_r): Handle COND_EXPR here. |
| 1498 |
|
| 1499 |
2023-10-17 Jason Merrill <[email protected]> |
| 1500 |
|
| 1501 |
* mangle.cc (abi_check): New. |
| 1502 |
(write_prefix, write_unqualified_name, write_discriminator) |
| 1503 |
(write_type, write_member_name, write_expression) |
| 1504 |
(write_template_arg, write_template_param): Use it. |
| 1505 |
(start_mangling): Assign from {}. |
| 1506 |
* cp-tree.h: Update comment. |
| 1507 |
|
| 1508 |
2023-10-17 Nathaniel Shead <[email protected]> |
| 1509 |
|
| 1510 |
* constexpr.cc (cxx_eval_dynamic_cast_fn): Add missing |
| 1511 |
auto_diagnostic_group. |
| 1512 |
(cxx_eval_call_expression): Likewise. |
| 1513 |
(diag_array_subscript): Likewise. |
| 1514 |
(outside_lifetime_error): Likewise. |
| 1515 |
(potential_constant_expression_1): Likewise. |
| 1516 |
|
| 1517 |
2023-10-16 Jason Merrill <[email protected]> |
| 1518 |
|
| 1519 |
* parser.cc (cp_parser_fold_expression): Track location range. |
| 1520 |
* semantics.cc (finish_unary_fold_expr) |
| 1521 |
(finish_left_unary_fold_expr, finish_right_unary_fold_expr) |
| 1522 |
(finish_binary_fold_expr): Add location parm. |
| 1523 |
* constraint.cc (finish_shorthand_constraint): Pass it. |
| 1524 |
* pt.cc (convert_generic_types_to_packs): Likewise. |
| 1525 |
* cp-tree.h: Adjust. |
| 1526 |
|
| 1527 |
2023-10-16 Marek Polacek <[email protected]> |
| 1528 |
|
| 1529 |
PR c++/111272 |
| 1530 |
* constexpr.cc (explain_invalid_constexpr_fn): Also check the body of |
| 1531 |
a constructor in C++14 and up. |
| 1532 |
|
| 1533 |
2023-10-14 Jakub Jelinek <[email protected]> |
| 1534 |
|
| 1535 |
PR c/102989 |
| 1536 |
* module.cc (trees_out::start, trees_in::start): Remove |
| 1537 |
TREE_INT_CST_OFFSET_NUNITS handling. |
| 1538 |
|
| 1539 |
2023-10-10 Jason Merrill <[email protected]> |
| 1540 |
|
| 1541 |
PR c++/109422 |
| 1542 |
* mangle.cc (write_template_param): Also mangle level. |
| 1543 |
|
| 1544 |
2023-10-08 David Malcolm <[email protected]> |
| 1545 |
|
| 1546 |
* module.cc (module_state::read_location): Update for renaming of |
| 1547 |
get_combined_adhoc_loc. |
| 1548 |
|
| 1549 |
2023-10-03 David Malcolm <[email protected]> |
| 1550 |
|
| 1551 |
* error.cc (print_instantiation_partial_context_line): Call |
| 1552 |
diagnostic_show_locus. |
| 1553 |
|
| 1554 |
2023-10-03 David Malcolm <[email protected]> |
| 1555 |
|
| 1556 |
* error.cc: Update for "m_" prefixes to text_info fields. |
| 1557 |
|
| 1558 |
2023-09-30 Eugene Rozenfeld <[email protected]> |
| 1559 |
|
| 1560 |
* Make-lang.in: Make create_fdas_for_cc1plus target not .PHONY |
| 1561 |
|
| 1562 |
2023-09-28 Richard Sandiford <[email protected]> |
| 1563 |
|
| 1564 |
* constexpr.cc (cxx_fold_indirect_ref): Remove unused variables. |
| 1565 |
|
| 1566 |
2023-09-22 Jason Merrill <[email protected]> |
| 1567 |
|
| 1568 |
PR c++/111357 |
| 1569 |
* pt.cc (expand_integer_pack): Use IMPLICIT_CONV_EXPR. |
| 1570 |
|
| 1571 |
2023-09-22 Jason Merrill <[email protected]> |
| 1572 |
|
| 1573 |
* constexpr.cc (free_constructor): Handle null ce->value. |
| 1574 |
|
| 1575 |
2023-09-22 Jason Merrill <[email protected]> |
| 1576 |
|
| 1577 |
PR c++/111529 |
| 1578 |
* parser.cc (cp_parser_lambda_declarator_opt): Don't suggest |
| 1579 |
-std=c++14 for lambda templates. |
| 1580 |
* pt.cc (tsubst_expr): Move ANNOTATE_EXPR handling... |
| 1581 |
(tsubst_copy_and_build): ...here. |
| 1582 |
|
| 1583 |
2023-09-22 Patrick Palka <[email protected]> |
| 1584 |
|
| 1585 |
PR c++/111493 |
| 1586 |
* decl2.cc (grok_array_decl): Guard diagnostic and backward |
| 1587 |
compatibility fallback code paths with tf_error. |
| 1588 |
|
| 1589 |
2023-09-22 Patrick Palka <[email protected]> |
| 1590 |
|
| 1591 |
PR c++/111485 |
| 1592 |
* pt.cc (is_compatible_template_arg): New parameter 'args'. |
| 1593 |
Add the outer template arguments 'args' to 'new_args'. |
| 1594 |
(convert_template_argument): Pass 'args' to |
| 1595 |
is_compatible_template_arg. |
| 1596 |
|
| 1597 |
2023-09-20 Jakub Jelinek <[email protected]> |
| 1598 |
|
| 1599 |
* parser.cc (cp_parser_postfix_expression): Parse |
| 1600 |
__builtin_classify_type call with typename as argument. |
| 1601 |
* pt.cc (tsubst_copy_and_build): Handle __builtin_classify_type |
| 1602 |
with dependent typename as argument. |
| 1603 |
|
| 1604 |
2023-09-20 Patrick Palka <[email protected]> |
| 1605 |
|
| 1606 |
PR c++/111471 |
| 1607 |
* cxx-pretty-print.cc (cxx_pretty_printer::expression) |
| 1608 |
<case VAR_DECL>: Handle class NTTP objects by printing |
| 1609 |
their type and value. |
| 1610 |
<case VIEW_CONVERT_EXPR>: Strip const VIEW_CONVERT_EXPR |
| 1611 |
wrappers for class NTTPs. |
| 1612 |
(pp_cxx_template_argument_list): Don't handle class NTTP |
| 1613 |
objects here. |
| 1614 |
|
| 1615 |
2023-09-20 Patrick Palka <[email protected]> |
| 1616 |
|
| 1617 |
* pt.cc (tsubst_function_decl): Don't bother computing 'argvec' |
| 1618 |
when 'lambda_fntype' is set. |
| 1619 |
(tsubst_template_decl): Make sure we return a TEMPLATE_DECL |
| 1620 |
during specialization lookup. In the non-class non-function |
| 1621 |
template case, use tsubst_decl directly with use_spec_table=false, |
| 1622 |
update DECL_TI_ARGS and call register_specialization like |
| 1623 |
tsubst_decl would have done if use_spec_table=true. |
| 1624 |
|
| 1625 |
2023-09-20 Jakub Jelinek <[email protected]> |
| 1626 |
|
| 1627 |
PR c++/111392 |
| 1628 |
* parser.h (struct cp_lexer): Add in_omp_decl_attribute member. |
| 1629 |
* cp-tree.h (cp_maybe_parse_omp_decl): Declare. |
| 1630 |
* parser.cc (cp_parser_handle_statement_omp_attributes): Diagnose |
| 1631 |
omp::decl attribute on statements. Adjust diagnostic wording for |
| 1632 |
omp::decl. |
| 1633 |
(cp_parser_omp_directive_args): Add DECL_P argument, set TREE_PUBLIC |
| 1634 |
to it on the DEFERRED_PARSE tree. |
| 1635 |
(cp_parser_omp_sequence_args): Adjust caller. |
| 1636 |
(cp_parser_std_attribute): Handle omp::decl attribute. |
| 1637 |
(cp_parser_omp_var_list): If parser->lexer->in_omp_decl_attribute |
| 1638 |
don't expect any arguments, instead create clause or TREE_LIST for |
| 1639 |
that decl. |
| 1640 |
(cp_parser_late_parsing_omp_declare_simd): Adjust diagnostic wording |
| 1641 |
for omp::decl. |
| 1642 |
(cp_maybe_parse_omp_decl): New function. |
| 1643 |
(cp_parser_omp_declare_target): If |
| 1644 |
parser->lexer->in_omp_decl_attribute and first token isn't name or |
| 1645 |
comma invoke cp_parser_omp_var_list. |
| 1646 |
* decl2.cc (cplus_decl_attributes): Adjust diagnostic wording for |
| 1647 |
omp::decl. Handle omp::decl on declarations. |
| 1648 |
* name-lookup.cc (finish_using_directive): Adjust diagnostic wording |
| 1649 |
for omp::decl. |
| 1650 |
|
| 1651 |
2023-09-19 Ben Boeckel <[email protected]> |
| 1652 |
|
| 1653 |
* mapper-client.cc, mapper-client.h (open_module_client): Accept |
| 1654 |
dependency tracking and track module mapper files as |
| 1655 |
dependencies. |
| 1656 |
* module.cc (make_mapper, get_mapper): Pass the dependency |
| 1657 |
tracking class down. |
| 1658 |
|
| 1659 |
2023-09-19 Ben Boeckel <[email protected]> |
| 1660 |
|
| 1661 |
* module.cc (do_import): Report imported CMI files as |
| 1662 |
dependencies. |
| 1663 |
|
| 1664 |
2023-09-19 Ben Boeckel <[email protected]> |
| 1665 |
|
| 1666 |
* module.cc (preprocessed_module): Pass whether the module is |
| 1667 |
exported to dependency tracking. |
| 1668 |
|
| 1669 |
2023-09-19 Javier Martinez <[email protected]> |
| 1670 |
|
| 1671 |
* class.cc (propagate_class_warmth_attribute): New function. |
| 1672 |
(check_bases_and_members): propagate hot and cold attributes |
| 1673 |
to all FUNCTION_DECL when the record is marked hot or cold. |
| 1674 |
* cp-tree.h (maybe_propagate_warmth_attributes): New function. |
| 1675 |
* decl2.cc (maybe_propagate_warmth_attributes): New function. |
| 1676 |
* method.cc (lazily_declare_fn): propagate hot and cold |
| 1677 |
attributes to lazily declared functions when the record is |
| 1678 |
marked hot or cold. |
| 1679 |
|
| 1680 |
2023-09-19 Patrick Palka <[email protected]> |
| 1681 |
|
| 1682 |
* ptree.cc (cxx_print_type): Remove TYPE_LANG_SPECIFIC |
| 1683 |
test guarding TYPE_TEMPLATE_INFO. |
| 1684 |
|
| 1685 |
2023-09-19 Jason Merrill <[email protected]> |
| 1686 |
|
| 1687 |
DR 2799 |
| 1688 |
* class.cc (add_implicit_default_ctor): Split out... |
| 1689 |
(add_implicitly_declared_members): ...from here. |
| 1690 |
Also call it when inheriting a default ctor. |
| 1691 |
|
| 1692 |
2023-09-19 Marek Polacek <[email protected]> |
| 1693 |
|
| 1694 |
* call.cc (build_over_call): Set ADDR_EXPR_DENOTES_CALL_P. Don't handle |
| 1695 |
immediate_invocation_p here. |
| 1696 |
* constexpr.cc (cxx_eval_call_expression): Use mce_true for |
| 1697 |
DECL_IMMEDIATE_FUNCTION_P. |
| 1698 |
(cxx_eval_conditional_expression): Call cp_fold_immediate. |
| 1699 |
* cp-gimplify.cc (enum fold_flags): Add ff_fold_immediate. |
| 1700 |
(maybe_replace_decl): Make static. |
| 1701 |
(cp_fold_r): Expand immediate invocations. |
| 1702 |
(cp_fold_immediate_r): New. |
| 1703 |
(cp_fold_immediate): New. |
| 1704 |
* cp-tree.h (ADDR_EXPR_DENOTES_CALL_P): Define. |
| 1705 |
(cp_fold_immediate): Declare. |
| 1706 |
* tree.cc (bot_replace): Don't handle immediate invocations here. |
| 1707 |
|
| 1708 |
2023-09-19 Patrick Palka <[email protected]> |
| 1709 |
|
| 1710 |
PR c++/111419 |
| 1711 |
* cvt.cc (convert_to_void) <case INDIRECT_REF>: Only call |
| 1712 |
complete_type if the type is volatile. |
| 1713 |
<case VAR_DECL>: Likewise. |
| 1714 |
|
| 1715 |
2023-09-19 Patrick Palka <[email protected]> |
| 1716 |
|
| 1717 |
PR c++/99631 |
| 1718 |
* semantics.cc (finish_decltype_type): For an NTTP object, |
| 1719 |
return its type modulo cv-quals. |
| 1720 |
|
| 1721 |
2023-09-18 Patrick Palka <[email protected]> |
| 1722 |
|
| 1723 |
PR c++/89231 |
| 1724 |
* pt.cc (try_class_unification): Strengthen TI_TEMPLATE equality |
| 1725 |
test by not calling most_general_template. Only unify the |
| 1726 |
innermost levels of template arguments. |
| 1727 |
(unify) <case CLASS_TYPE>: Only unify the innermost levels of |
| 1728 |
template arguments, and only if the template is primary. |
| 1729 |
|
| 1730 |
2023-09-18 Patrick Palka <[email protected]> |
| 1731 |
|
| 1732 |
PR c++/63198 |
| 1733 |
PR c++/18474 |
| 1734 |
* semantics.cc (maybe_convert_cond): Look through implicit |
| 1735 |
INDIRECT_REF when deciding whether to issue a -Wparentheses |
| 1736 |
warning, and consider templated assignment expressions as well. |
| 1737 |
(finish_parenthesized_expr): Look through implicit INDIRECT_REF |
| 1738 |
when suppressing -Wparentheses warning. |
| 1739 |
* typeck.cc (build_x_modify_expr): Check simple assignments |
| 1740 |
ahead time too, not just compound assignments. Give the second |
| 1741 |
operand of MODOP_EXPR a non-null type so that it's not considered |
| 1742 |
always instantiation-dependent. Don't call suppress_warning. |
| 1743 |
|
| 1744 |
2023-09-18 Patrick Palka <[email protected]> |
| 1745 |
|
| 1746 |
PR c++/108347 |
| 1747 |
* pt.cc (unify): Return unify_success for identical dependent |
| 1748 |
DECL_P 'arg' and 'parm'. |
| 1749 |
<case CONST_DECL>: Remove handling. |
| 1750 |
|
| 1751 |
2023-09-18 Patrick Palka <[email protected]> |
| 1752 |
|
| 1753 |
* call.cc (add_template_candidate_real): Check arity even |
| 1754 |
when there are no explicit template arguments. Combine the |
| 1755 |
two adjacent '!obj' tests into one. |
| 1756 |
|
| 1757 |
2023-09-18 Patrick Palka <[email protected]> |
| 1758 |
|
| 1759 |
* pt.cc (register_specialization): Remove now-unnecessary |
| 1760 |
early exit for FUNCTION_DECL partial instantiation. |
| 1761 |
(tsubst_template_decl): Pass use_spec_table=false to |
| 1762 |
tsubst_function_decl. Set DECL_TI_ARGS of a non-lambda |
| 1763 |
FUNCTION_DECL specialization to the full set of arguments. |
| 1764 |
Simplify register_specialization call accordingly. |
| 1765 |
|
| 1766 |
2023-09-18 Jason Merrill <[email protected]> |
| 1767 |
|
| 1768 |
* class.cc (check_subobject_offset): Use similar_type_p. |
| 1769 |
|
| 1770 |
2023-09-12 Jason Merrill <[email protected]> |
| 1771 |
|
| 1772 |
PR c++/111357 |
| 1773 |
* pt.cc (expand_integer_pack): Convert argument to int. |
| 1774 |
|
| 1775 |
2023-09-12 Jason Merrill <[email protected]> |
| 1776 |
|
| 1777 |
PR c++/107198 |
| 1778 |
* typeck2.cc (process_init_constructor_array): Use VEC_INIT_EXPR |
| 1779 |
regardless of seen_error. |
| 1780 |
|
| 1781 |
2023-09-08 Patrick Palka <[email protected]> |
| 1782 |
|
| 1783 |
PR c++/99599 |
| 1784 |
* pt.cc (check_non_deducible_conversions): Add bool parameter |
| 1785 |
passed down to check_non_deducible_conversion. |
| 1786 |
(fn_type_unification): Call check_non_deducible_conversions |
| 1787 |
an extra time before satisfaction with noninst_only_p=true. |
| 1788 |
(conversion_may_instantiate_p): Define. |
| 1789 |
(check_non_deducible_conversion): Add bool parameter controlling |
| 1790 |
whether to compute only conversions that are guaranteed to |
| 1791 |
not induce template instantiation. |
| 1792 |
|
| 1793 |
2023-09-07 Sandra Loosemore <[email protected]> |
| 1794 |
|
| 1795 |
PR c++/111274 |
| 1796 |
* parser.cc (fixup_blocks_walker): Check for null BIND_EXPR_BLOCK. |
| 1797 |
|
| 1798 |
2023-09-06 Jason Merrill <[email protected]> |
| 1799 |
|
| 1800 |
* class.cc (check_subobject_offset): Check |
| 1801 |
same_type_ignoring_top_level_qualifiers_p. |
| 1802 |
|
| 1803 |
2023-09-05 Marek Polacek <[email protected]> |
| 1804 |
|
| 1805 |
PR c++/91483 |
| 1806 |
* constexpr.cc (verify_constant_explain_r): New. |
| 1807 |
(verify_constant): Call it. |
| 1808 |
|
| 1809 |
2023-09-05 Jakub Jelinek <[email protected]> |
| 1810 |
|
| 1811 |
PR c++/52953 |
| 1812 |
* name-lookup.cc (check_local_shadow): Don't punt early for |
| 1813 |
DECL_EXTERNAL decls, instead just disable the shadowing of namespace |
| 1814 |
decls check for those and emit a pedwarn rather than error_at or |
| 1815 |
permerror for those. Formatting fix. |
| 1816 |
|
| 1817 |
2023-09-05 Jakub Jelinek <[email protected]> |
| 1818 |
|
| 1819 |
PR c++/52953 |
| 1820 |
* name-lookup.h (struct cp_binding_level): Add artificial bit-field. |
| 1821 |
Formatting fixes. |
| 1822 |
* name-lookup.cc (check_local_shadow): Skip artificial bindings when |
| 1823 |
checking if parameter scope is parent scope. Don't special case |
| 1824 |
FUNCTION_NEEDS_BODY_BLOCK. Diagnose the in_function_try_handler |
| 1825 |
cases in the b->kind == sk_function_parms test and verify no |
| 1826 |
non-artificial intervening scopes. Add missing auto_diagnostic_group. |
| 1827 |
* decl.cc (begin_function_body): Set |
| 1828 |
current_binding_level->artificial. |
| 1829 |
* semantics.cc (begin_function_try_block): Likewise. |
| 1830 |
|
| 1831 |
2023-09-05 Patrick Palka <[email protected]> |
| 1832 |
|
| 1833 |
* parser.cc (cp_parser_parenthesized_expression_list_elt): Pass |
| 1834 |
nullptr as non_constant_p to cp_parser_braced_list if our |
| 1835 |
non_constant_p is null. |
| 1836 |
(cp_parser_initializer_list): Likewise to |
| 1837 |
cp_parser_initializer_clause. Avoid inspecting |
| 1838 |
clause_non_constant_p if it's uninitialized. |
| 1839 |
|
| 1840 |
2023-09-05 Patrick Palka <[email protected]> |
| 1841 |
|
| 1842 |
* call.cc (build_user_type_conversion): Free allocated |
| 1843 |
conversions. |
| 1844 |
(build_converted_constant_expr_internal): Use |
| 1845 |
conversion_obstack_sentinel instead. |
| 1846 |
(perform_dguide_overload_resolution): Likewise. |
| 1847 |
(build_new_function_call): Likewise. |
| 1848 |
(build_operator_new_call): Free allocated conversions. |
| 1849 |
(build_op_call): Use conversion_obstack_sentinel instead. |
| 1850 |
(build_conditional_expr): Use conversion_obstack_sentinel |
| 1851 |
instead, and hoist it out to the outermost scope. |
| 1852 |
(build_new_op): Use conversion_obstack_sentinel instead |
| 1853 |
and set it up before the first goto. Remove second unneeded goto. |
| 1854 |
(build_op_subscript): Use conversion_obstack_sentinel instead. |
| 1855 |
(ref_conv_binds_to_temporary): Likewise. |
| 1856 |
(build_new_method_call): Likewise. |
| 1857 |
(can_convert_arg): Likewise. |
| 1858 |
(can_convert_arg_bad): Likewise. |
| 1859 |
(perform_implicit_conversion_flags): Likewise. |
| 1860 |
(perform_direct_initialization_if_possible): Likewise. |
| 1861 |
(initialize_reference): Likewise. |
| 1862 |
|
| 1863 |
2023-09-01 Jakub Jelinek <[email protected]> |
| 1864 |
|
| 1865 |
PR c++/111069 |
| 1866 |
* cp-tree.h (determine_local_discriminator): Add NAME argument with |
| 1867 |
NULL_TREE default. |
| 1868 |
(struct cp_decomp): New type. |
| 1869 |
(cp_finish_decl): Add DECOMP argument defaulted to nullptr. |
| 1870 |
(cp_maybe_mangle_decomp): Remove declaration. |
| 1871 |
(cp_finish_decomp): Add cp_decomp * argument, remove tree and unsigned |
| 1872 |
args. |
| 1873 |
(cp_convert_range_for): Likewise. |
| 1874 |
* decl.cc (determine_local_discriminator): Add NAME argument, use it |
| 1875 |
if non-NULL, otherwise compute it the old way. |
| 1876 |
(maybe_commonize_var): Don't return early for structured bindings. |
| 1877 |
(cp_finish_decl): Add DECOMP argument, if non-NULL, call |
| 1878 |
cp_maybe_mangle_decomp. |
| 1879 |
(cp_maybe_mangle_decomp): Make it static with a forward declaration. |
| 1880 |
Call determine_local_discriminator. Replace FIRST and COUNT arguments |
| 1881 |
with DECOMP argument. |
| 1882 |
(cp_finish_decomp): Replace FIRST and COUNT arguments with DECOMP |
| 1883 |
argument. |
| 1884 |
* mangle.cc (find_decomp_unqualified_name): Remove. |
| 1885 |
(write_unqualified_name): Don't call find_decomp_unqualified_name. |
| 1886 |
(mangle_decomp): Handle mangling of static function/block scope |
| 1887 |
structured bindings. Don't call decl_mangling_context twice. Call |
| 1888 |
check_abi_tags, call write_abi_tags for abi version >= 19 and emit |
| 1889 |
-Wabi warnings if needed. |
| 1890 |
(write_guarded_var_name): Handle structured bindings. |
| 1891 |
(mangle_ref_init_variable): Use write_guarded_var_name. |
| 1892 |
* parser.cc (cp_parser_range_for): Adjust do_range_for_auto_deduction |
| 1893 |
and cp_convert_range_for callers. |
| 1894 |
(do_range_for_auto_deduction): Replace DECOMP_FIRST_NAME and |
| 1895 |
DECOMP_CNT arguments with DECOMP. Adjust cp_finish_decomp caller. |
| 1896 |
(cp_convert_range_for): Replace DECOMP_FIRST_NAME and |
| 1897 |
DECOMP_CNT arguments with DECOMP. Don't call cp_maybe_mangle_decomp, |
| 1898 |
adjust cp_finish_decl and cp_finish_decomp callers. |
| 1899 |
(cp_parser_decomposition_declaration): Don't call |
| 1900 |
cp_maybe_mangle_decomp, adjust cp_finish_decl and cp_finish_decomp |
| 1901 |
callers. |
| 1902 |
(cp_convert_omp_range_for): Adjust do_range_for_auto_deduction |
| 1903 |
and cp_finish_decomp callers. |
| 1904 |
(cp_finish_omp_range_for): Don't call cp_maybe_mangle_decomp, |
| 1905 |
adjust cp_finish_decl and cp_finish_decomp callers. |
| 1906 |
* pt.cc (tsubst_omp_for_iterator): Adjust tsubst_decomp_names |
| 1907 |
caller. |
| 1908 |
(tsubst_decomp_names): Replace FIRST and CNT arguments with DECOMP. |
| 1909 |
(tsubst_expr): Don't call cp_maybe_mangle_decomp, adjust |
| 1910 |
tsubst_decomp_names, cp_finish_decl, cp_finish_decomp and |
| 1911 |
cp_convert_range_for callers. |
| 1912 |
|
| 1913 |
2023-08-30 Marek Polacek <[email protected]> |
| 1914 |
|
| 1915 |
PR c++/91319 |
| 1916 |
* parser.cc (cp_parser_initializer_list): Set CONSTRUCTOR_IS_DIRECT_INIT |
| 1917 |
when the designated initializer is of the .x{} form. |
| 1918 |
|
| 1919 |
2023-08-30 Marek Polacek <[email protected]> |
| 1920 |
|
| 1921 |
PR c++/111173 |
| 1922 |
* decl.cc (grokdeclarator): Disallow constinit on functions. |
| 1923 |
|
| 1924 |
2023-08-29 Marek Polacek <[email protected]> |
| 1925 |
|
| 1926 |
* call.cc (convert_like_internal): Show where the conversion function |
| 1927 |
was declared. |
| 1928 |
(maybe_show_nonconverting_candidate): New. |
| 1929 |
* cp-tree.h (maybe_show_nonconverting_candidate): Declare. |
| 1930 |
* typeck.cc (convert_for_assignment): Call it. |
| 1931 |
|
| 1932 |
2023-08-25 Sandra Loosemore <[email protected]> |
| 1933 |
|
| 1934 |
* cp-tree.h (cp_convert_omp_range_for): Adjust declaration. |
| 1935 |
* parser.cc (struct omp_for_parse_data): New. |
| 1936 |
(cp_parser_postfix_expression): Diagnose calls to OpenMP runtime |
| 1937 |
in intervening code. |
| 1938 |
(check_omp_intervening_code): New. |
| 1939 |
(cp_parser_statement_seq_opt): Special-case nested loops, blocks, |
| 1940 |
and other constructs for OpenMP loops. |
| 1941 |
(cp_parser_iteration_statement): Reject loops in intervening code. |
| 1942 |
(cp_parser_omp_for_loop_init): Expand comments and tweak the |
| 1943 |
interface slightly to better distinguish input/output parameters. |
| 1944 |
(cp_convert_omp_range_for): Likewise. |
| 1945 |
(cp_parser_omp_loop_nest): New, split from cp_parser_omp_for_loop |
| 1946 |
and largely rewritten. Add more comments. |
| 1947 |
(insert_structured_blocks): New. |
| 1948 |
(find_structured_blocks): New. |
| 1949 |
(struct sit_data, substitute_in_tree_walker, substitute_in_tree): |
| 1950 |
New. |
| 1951 |
(fixup_blocks_walker): New. |
| 1952 |
(cp_parser_omp_for_loop): Rewrite to use recursive descent instead |
| 1953 |
of a loop. Add logic to reshuffle the bits of code collected |
| 1954 |
during parsing so intervening code gets moved to the loop body. |
| 1955 |
(cp_parser_omp_loop): Remove call to finish_omp_for_block, which |
| 1956 |
is now redundant. |
| 1957 |
(cp_parser_omp_simd): Likewise. |
| 1958 |
(cp_parser_omp_for): Likewise. |
| 1959 |
(cp_parser_omp_distribute): Likewise. |
| 1960 |
(cp_parser_oacc_loop): Likewise. |
| 1961 |
(cp_parser_omp_taskloop): Likewise. |
| 1962 |
(cp_parser_pragma): Reject OpenMP pragmas in intervening code. |
| 1963 |
* parser.h (struct cp_parser): Add omp_for_parse_state field. |
| 1964 |
* pt.cc (tsubst_omp_for_iterator): Adjust call to |
| 1965 |
cp_convert_omp_range_for. |
| 1966 |
* semantics.cc (finish_omp_for): Try harder to preserve location |
| 1967 |
of loop variable init expression for use in diagnostics. |
| 1968 |
(struct fofb_data, finish_omp_for_block_walker): New. |
| 1969 |
(finish_omp_for_block): Allow variables to be bound in a BIND_EXPR |
| 1970 |
nested inside BIND instead of directly in BIND itself. |
| 1971 |
|
| 1972 |
2023-08-25 Sandra Loosemore <[email protected]> |
| 1973 |
|
| 1974 |
* constexpr.cc (cxx_eval_constant_expression): Handle |
| 1975 |
OMP_STRUCTURED_BLOCK. |
| 1976 |
* pt.cc (tsubst_expr): Likewise. |
| 1977 |
|
| 1978 |
2023-08-25 Uros Bizjak <[email protected]> |
| 1979 |
|
| 1980 |
* call.cc (build_conditional_expr): |
| 1981 |
Rename TRUE/FALSE to true/false. |
| 1982 |
(build_new_op): Ditto. |
| 1983 |
|
| 1984 |
2023-08-22 Jason Merrill <[email protected]> |
| 1985 |
|
| 1986 |
* pt.cc (outer_template_args): Handle non-template argument. |
| 1987 |
* constraint.cc (maybe_substitute_reqs_for): Pass decl to it. |
| 1988 |
* cp-tree.h (outer_template_args): Adjust. |
| 1989 |
|
| 1990 |
2023-08-22 Jason Merrill <[email protected]> |
| 1991 |
|
| 1992 |
PR c++/109751 |
| 1993 |
* cp-tree.h (member_like_constrained_friend_p): Declare. |
| 1994 |
* decl.cc (member_like_constrained_friend_p): New. |
| 1995 |
(function_requirements_equivalent_p): Check it. |
| 1996 |
(duplicate_decls): Check it. |
| 1997 |
(grokfndecl): Check friend template constraints. |
| 1998 |
* mangle.cc (decl_mangling_context): Check it. |
| 1999 |
(write_unqualified_name): Check it. |
| 2000 |
* pt.cc (uses_outer_template_parms_in_constraints): Fix for friends. |
| 2001 |
(tsubst_friend_function): Don't check satisfaction. |
| 2002 |
|
| 2003 |
2023-08-22 Tobias Burnus <[email protected]> |
| 2004 |
|
| 2005 |
* parser.cc (cp_parser_omp_clause_defaultmap): Parse |
| 2006 |
'all' as category. |
| 2007 |
|
| 2008 |
2023-08-15 Chung-Lin Tang <[email protected]> |
| 2009 |
Thomas Schwinge <[email protected]> |
| 2010 |
|
| 2011 |
* parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT. |
| 2012 |
|
| 2013 |
2023-08-14 gnaggnoyil <[email protected]> |
| 2014 |
|
| 2015 |
DR 2386 |
| 2016 |
PR c++/110216 |
| 2017 |
* decl.cc (get_tuple_size): Update implementation for DR 2386. |
| 2018 |
|
| 2019 |
2023-08-14 Jason Merrill <[email protected]> |
| 2020 |
|
| 2021 |
* parser.cc (cp_parser_simple_type_specifier): Handle -std=c++14 |
| 2022 |
-fconcepts. |
| 2023 |
|
| 2024 |
2023-08-12 Patrick Palka <[email protected]> |
| 2025 |
Jason Merrill <[email protected]> |
| 2026 |
|
| 2027 |
PR c++/106604 |
| 2028 |
* decl.cc (redeclaration_error_message): Remove special handling |
| 2029 |
for deduction guides. |
| 2030 |
(grokfndecl): Give deduction guides a dummy DECL_INITIAL. |
| 2031 |
|
| 2032 |
2023-08-11 Patrick Palka <[email protected]> |
| 2033 |
|
| 2034 |
PR c++/110927 |
| 2035 |
* parser.cc (cp_parser_type_requirement): Pass |
| 2036 |
check_dependency_p=true instead of =false. |
| 2037 |
|
| 2038 |
2023-08-11 Patrick Palka <[email protected]> |
| 2039 |
|
| 2040 |
PR c++/71954 |
| 2041 |
* decl.cc (grokdeclarator): Pass 'dname' instead of |
| 2042 |
'unqualified_id' as the name when building the VAR_DECL for a |
| 2043 |
static data member. Call check_explicit_specialization for a |
| 2044 |
TEMPLATE_ID_EXPR such member. |
| 2045 |
* pt.cc (finish_member_template_decl): Return NULL_TREE |
| 2046 |
instead of 'decl' when DECL_TEMPLATE_SPECIALIZATION is not |
| 2047 |
set. |
| 2048 |
|
| 2049 |
2023-08-11 Patrick Palka <[email protected]> |
| 2050 |
|
| 2051 |
* ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and |
| 2052 |
TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO |
| 2053 |
for all decls that have it, not just VAR_DECL or FUNCTION_DECL. |
| 2054 |
Also print DECL_USE_TEMPLATE. |
| 2055 |
(cxx_print_type): Print TYPE_TEMPLATE_INFO. |
| 2056 |
<case BOUND_TEMPLATE_TEMPLATE_PARM>: Don't print TYPE_TI_ARGS |
| 2057 |
anymore. |
| 2058 |
<case TEMPLATE_TYPE/TEMPLATE_PARM>: Print TEMPLATE_TYPE_PARM_INDEX |
| 2059 |
instead of printing the index, level and original level |
| 2060 |
individually. |
| 2061 |
|
| 2062 |
2023-08-08 Marek Polacek <[email protected]> |
| 2063 |
|
| 2064 |
* parser.cc (cp_parser_postfix_expression): Adjust the call to |
| 2065 |
cp_parser_braced_list. |
| 2066 |
(cp_parser_postfix_open_square_expression): Likewise. |
| 2067 |
(cp_parser_new_initializer): Likewise. |
| 2068 |
(cp_parser_assignment_expression): Adjust the call to |
| 2069 |
cp_parser_initializer_clause. |
| 2070 |
(cp_parser_lambda_introducer): Adjust the call to cp_parser_initializer. |
| 2071 |
(cp_parser_range_for): Adjust the call to cp_parser_braced_list. |
| 2072 |
(cp_parser_jump_statement): Likewise. |
| 2073 |
(cp_parser_mem_initializer): Likewise. |
| 2074 |
(cp_parser_template_argument): Likewise. |
| 2075 |
(cp_parser_default_argument): Adjust the call to cp_parser_initializer. |
| 2076 |
(cp_parser_initializer): Handle null is_direct_init and non_constant_p |
| 2077 |
arguments. |
| 2078 |
(cp_parser_initializer_clause): Handle null non_constant_p argument. |
| 2079 |
(cp_parser_braced_list): Likewise. |
| 2080 |
(cp_parser_initializer_list): Likewise. |
| 2081 |
(cp_parser_member_declaration): Adjust the call to |
| 2082 |
cp_parser_initializer_clause and cp_parser_initializer. |
| 2083 |
(cp_parser_yield_expression): Adjust the call to cp_parser_braced_list. |
| 2084 |
(cp_parser_functional_cast): Likewise. |
| 2085 |
(cp_parser_late_parse_one_default_arg): Adjust the call to |
| 2086 |
cp_parser_initializer. |
| 2087 |
(cp_parser_omp_for_loop_init): Likewise. |
| 2088 |
(cp_parser_omp_declare_reduction_exprs): Likewise. |
| 2089 |
|
| 2090 |
2023-08-08 Nathaniel Shead <[email protected]> |
| 2091 |
|
| 2092 |
PR c++/100482 |
| 2093 |
* parser.cc (cp_parser_decltype_expr): Report errors raised by |
| 2094 |
finish_id_expression. |
| 2095 |
|
| 2096 |
2023-08-04 Tamar Christina <[email protected]> |
| 2097 |
|
| 2098 |
* cp-tree.h (RANGE_FOR_NOVECTOR): New. |
| 2099 |
(cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt, |
| 2100 |
finish_for_cond): Add novector param. |
| 2101 |
* init.cc (build_vec_init): Default novector to false. |
| 2102 |
* method.cc (build_comparison_op): Likewise. |
| 2103 |
* parser.cc (cp_parser_statement): Likewise. |
| 2104 |
(cp_parser_for, cp_parser_c_for, cp_parser_range_for, |
| 2105 |
cp_convert_range_for, cp_parser_iteration_statement, |
| 2106 |
cp_parser_omp_for_loop, cp_parser_pragma): Support novector. |
| 2107 |
(cp_parser_pragma_novector): New. |
| 2108 |
* pt.cc (tsubst_expr): Likewise. |
| 2109 |
* semantics.cc (finish_while_stmt_cond, finish_do_stmt, |
| 2110 |
finish_for_cond): Likewise. |
| 2111 |
|
| 2112 |
2023-08-01 Lewis Hyatt <[email protected]> |
| 2113 |
|
| 2114 |
* parser.cc (c_init_preprocess): New function. |
| 2115 |
(maybe_read_tokens_for_pragma_lex): New function. |
| 2116 |
(pragma_lex): Support preprocess-only mode. |
| 2117 |
(pragma_lex_discard_to_eol): New function. |
| 2118 |
|
| 2119 |
2023-07-31 Chung-Lin Tang <[email protected]> |
| 2120 |
|
| 2121 |
* parser.cc (cp_parser_oacc_host_data): Add checking requiring OpenACC |
| 2122 |
host_data construct to have an use_device clause. |
| 2123 |
|
| 2124 |
2023-07-28 Ng YongXiang <[email protected]> |
| 2125 |
|
| 2126 |
PR c++/110057 |
| 2127 |
PR ipa/83054 |
| 2128 |
* init.cc (build_vec_delete_1): Devirtualize array destruction. |
| 2129 |
|
| 2130 |
2023-07-27 Patrick Palka <[email protected]> |
| 2131 |
|
| 2132 |
PR c++/110197 |
| 2133 |
* constexpr.cc (cxx_eval_array_reference): Allow synthesizing an |
| 2134 |
empty subobject even if CONSTRUCTOR_NO_CLEARING is set. |
| 2135 |
(cxx_eval_bare_aggregate): Set 'no_slot' to true more generally |
| 2136 |
whenever new_ctx.ctor is set to NULL_TREE by init_subob_ctx, |
| 2137 |
i.e. whenever initializing an subobject of empty type. |
| 2138 |
(cxx_eval_vec_init_1): Define 'no_slot' as above and use it |
| 2139 |
accordingly. |
| 2140 |
|
| 2141 |
2023-07-27 Nathaniel Shead <[email protected]> |
| 2142 |
|
| 2143 |
PR c++/103497 |
| 2144 |
* pt.cc (type_uses_auto): Check inside parameter packs. |
| 2145 |
|
| 2146 |
2023-07-26 Patrick Palka <[email protected]> |
| 2147 |
|
| 2148 |
PR c++/110566 |
| 2149 |
PR c++/108179 |
| 2150 |
* pt.cc (reduce_template_parm_level): Set DECL_TEMPLATE_INFO |
| 2151 |
on the DECL_TEMPLATE_RESULT of the new ttp. |
| 2152 |
(add_defaults_to_ttp): Make a copy of the original ttp's |
| 2153 |
DECL_TEMPLATE_RESULT, and update this copy's DECL_TEMPLATE_INFO |
| 2154 |
as well. |
| 2155 |
(coerce_template_template_parms): Make sure 'scope_args' has |
| 2156 |
the right amount of levels for the ttp argument. |
| 2157 |
(most_general_template): Handle template template parameters. |
| 2158 |
(rewrite_template_parm): Set DECL_TEMPLATE_RESULT on the |
| 2159 |
DECL_TEMPLATE_RESULT of the new ttp. |
| 2160 |
|
| 2161 |
2023-07-26 Patrick Palka <[email protected]> |
| 2162 |
|
| 2163 |
PR c++/110566 |
| 2164 |
PR c++/108179 |
| 2165 |
* pt.cc (coerce_template_template_parms): Simplify by using |
| 2166 |
DECL_INNERMOST_TEMPLATE_PARMS and removing redundant asserts. |
| 2167 |
Always pass the parameters of the most general template to |
| 2168 |
coerce_template_parms. |
| 2169 |
|
| 2170 |
2023-07-26 Patrick Palka <[email protected]> |
| 2171 |
|
| 2172 |
PR c++/110809 |
| 2173 |
* pt.cc (unify) <case INTEGER_CST>: Generalize to handle |
| 2174 |
REAL_CST as well. |
| 2175 |
|
| 2176 |
2023-07-26 Marek Polacek <[email protected]> |
| 2177 |
|
| 2178 |
* parser.cc (cp_parser_constant_expression): Allow non_constant_p to be |
| 2179 |
nullptr even when allow_non_constant_p is true. Don't call |
| 2180 |
_rvalue_constant_expression when not necessary. Move local variable |
| 2181 |
declarations closer to their first use. |
| 2182 |
(cp_parser_static_assert): Don't pass a dummy down to |
| 2183 |
cp_parser_constant_expression. |
| 2184 |
|
| 2185 |
2023-07-26 Jason Merrill <[email protected]> |
| 2186 |
|
| 2187 |
PR c++/106310 |
| 2188 |
* parser.cc (cp_parser_template_name): Skip non-member |
| 2189 |
lookup after the template keyword. |
| 2190 |
(cp_parser_lookup_name): Pass down template_keyword_p. |
| 2191 |
|
| 2192 |
2023-07-26 Nathaniel Shead <[email protected]> |
| 2193 |
|
| 2194 |
PR c++/96630 |
| 2195 |
PR c++/98675 |
| 2196 |
PR c++/70331 |
| 2197 |
* constexpr.cc (constexpr_global_ctx::is_outside_lifetime): New |
| 2198 |
function. |
| 2199 |
(constexpr_global_ctx::get_value): Don't return expired values. |
| 2200 |
(constexpr_global_ctx::get_value_ptr): Likewise. |
| 2201 |
(constexpr_global_ctx::remove_value): Mark value outside |
| 2202 |
lifetime. |
| 2203 |
(outside_lifetime_error): New function. |
| 2204 |
(cxx_eval_call_expression): No longer track save_exprs. |
| 2205 |
(cxx_eval_loop_expr): Likewise. |
| 2206 |
(cxx_eval_constant_expression): Add checks for outside lifetime |
| 2207 |
values. Remove local variables at end of bind exprs, and |
| 2208 |
temporaries after cleanup points. |
| 2209 |
|
| 2210 |
2023-07-26 Nathaniel Shead <[email protected]> |
| 2211 |
|
| 2212 |
PR c++/110619 |
| 2213 |
* cp-gimplify.cc (cp_genericize_r): Transform RETURN_EXPRs to |
| 2214 |
not return dangling pointers. |
| 2215 |
* cp-tree.h (RETURN_EXPR_LOCAL_ADDR_P): New flag. |
| 2216 |
(check_return_expr): Add a new parameter. |
| 2217 |
* semantics.cc (finish_return_stmt): Set flag on RETURN_EXPR |
| 2218 |
when referring to dangling pointer. |
| 2219 |
* typeck.cc (check_return_expr): Disable transformation of |
| 2220 |
dangling pointers, instead pass this information to caller. |
| 2221 |
|
| 2222 |
2023-07-26 Nathaniel Shead <[email protected]> |
| 2223 |
|
| 2224 |
* constexpr.cc (modifying_const_object_error): Find the source |
| 2225 |
location of the const object's declaration. |
| 2226 |
(cxx_eval_constant_expression): Update input_location to the |
| 2227 |
location of the currently evaluated expression, if possible. |
| 2228 |
|
| 2229 |
2023-07-25 Marek Polacek <[email protected]> |
| 2230 |
|
| 2231 |
PR c++/108960 |
| 2232 |
* pt.cc (lookup_and_finish_template_variable): Don't clear tf_partial |
| 2233 |
here. |
| 2234 |
(instantiate_template): Reset all complain flags except |
| 2235 |
tf_warning_or_error. |
| 2236 |
|
| 2237 |
2023-07-25 Marek Polacek <[email protected]> |
| 2238 |
|
| 2239 |
PR c++/110382 |
| 2240 |
* constexpr.cc (cxx_eval_array_reference): Create a new constructor |
| 2241 |
only when we don't already have a matching one. Clear the object |
| 2242 |
when the type is non-scalar. |
| 2243 |
|
| 2244 |
2023-07-21 Marek Polacek <[email protected]> |
| 2245 |
|
| 2246 |
PR c++/110106 |
| 2247 |
* constexpr.cc (potential_constant_expression_1): Try to complete the |
| 2248 |
type when !processing_template_decl. |
| 2249 |
|
| 2250 |
2023-07-20 Marek Polacek <[email protected]> |
| 2251 |
|
| 2252 |
PR c++/110114 |
| 2253 |
* call.cc (implicit_conversion_1): Return early if the type isn't |
| 2254 |
complete. |
| 2255 |
|
| 2256 |
2023-07-19 Marek Polacek <[email protected]> |
| 2257 |
|
| 2258 |
PR c++/110745 |
| 2259 |
* error.cc (dump_simple_decl): Print base class name. |
| 2260 |
|
| 2261 |
2023-07-19 Marek Polacek <[email protected]> |
| 2262 |
|
| 2263 |
PR c++/110064 |
| 2264 |
* typeck2.cc (process_init_constructor_record): Don't emit |
| 2265 |
-Wmissing-field-initializers for empty classes. |
| 2266 |
|
| 2267 |
2023-07-19 Patrick Palka <[email protected]> |
| 2268 |
|
| 2269 |
* pt.cc (type_unification_real): Test for PARM_DECL instead |
| 2270 |
of TEMPLATE_PARM_INDEX to distinguish a type vs non-type |
| 2271 |
template parameter pack. |
| 2272 |
(type_targs_deducible_from): Likewise. |
| 2273 |
|
| 2274 |
2023-07-19 Patrick Palka <[email protected]> |
| 2275 |
|
| 2276 |
* pt.cc (tsubst_function_decl): Add defaulted 'use_spec_table' |
| 2277 |
flag parameter. Don't look up or insert into the specializations |
| 2278 |
table if 'use_spec_table' is false. |
| 2279 |
(tsubst_decl): Add defaulted 'use_spec_table' flag parameter. |
| 2280 |
Check for error_mark_node. |
| 2281 |
<case FUNCTION_DECL>: Pass 'use_spec_table' to |
| 2282 |
tsubst_function_decl. |
| 2283 |
<case TYPE/VAR_DECL>: Don't call coerce_template_parms. |
| 2284 |
Don't look up or insert into the specializations table if |
| 2285 |
'use_spec_table' is false. Exit earlier if the substituted |
| 2286 |
type is erroneous and we're not complaining, and do so for |
| 2287 |
alias specializations as well. |
| 2288 |
(instantiate_template): Pass false as 'use_spec_table' |
| 2289 |
to tsubst_decl. Call register_specialization afterwards. |
| 2290 |
|
| 2291 |
2023-07-18 Jason Merrill <[email protected]> |
| 2292 |
|
| 2293 |
* constexpr.cc (cxx_eval_bit_cast): Check that the result of |
| 2294 |
native_interpret_aggregate doesn't need more evaluation. |
| 2295 |
|
| 2296 |
2023-07-18 Patrick Palka <[email protected]> |
| 2297 |
|
| 2298 |
* call.cc (add_template_conv_candidate): Don't check for |
| 2299 |
non-empty 'candidates' here. |
| 2300 |
(build_op_call): Check it here, before we've considered any |
| 2301 |
conversion functions. |
| 2302 |
|
| 2303 |
2023-07-18 Patrick Palka <[email protected]> |
| 2304 |
|
| 2305 |
PR c++/110535 |
| 2306 |
* call.cc (add_conv_candidate): Check constraints. |
| 2307 |
|
| 2308 |
2023-07-17 Jason Merrill <[email protected]> |
| 2309 |
|
| 2310 |
* constexpr.cc (cxx_eval_call_expression): Only cache |
| 2311 |
reduced_constant_expression_p results. |
| 2312 |
(reduced_constant_expression_p): Handle CONSTRUCTOR of scalar type. |
| 2313 |
(cxx_eval_constant_expression): Fold vectors here. |
| 2314 |
(cxx_eval_bare_aggregate): Not here. |
| 2315 |
|
| 2316 |
2023-07-15 Patrick Palka <[email protected]> |
| 2317 |
|
| 2318 |
PR c++/110441 |
| 2319 |
* call.cc (keep_unused_object_arg): Use cp_build_compound_expr |
| 2320 |
instead of building a COMPOUND_EXPR directly. |
| 2321 |
|
| 2322 |
2023-07-15 Patrick Palka <[email protected]> |
| 2323 |
|
| 2324 |
PR c++/110524 |
| 2325 |
* mangle.cc (write_expression): Handle TEMPLATE_ID_EXPR |
| 2326 |
whose template is already an IDENTIFIER_NODE. |
| 2327 |
|
| 2328 |
2023-07-14 Nathaniel Shead <[email protected]> |
| 2329 |
|
| 2330 |
* constexpr.cc (cxx_eval_constant_expression): Pass t to get_value. |
| 2331 |
|
| 2332 |
2023-07-14 Jason Merrill <[email protected]> |
| 2333 |
|
| 2334 |
PR c++/110344 |
| 2335 |
* constexpr.cc (cxx_eval_constant_expression): Move P2738 handling |
| 2336 |
after heap handling. |
| 2337 |
* name-lookup.cc (get_cxx_dialect_name): Add C++26. |
| 2338 |
|
| 2339 |
2023-07-14 Marek Polacek <[email protected]> |
| 2340 |
Jason Merrill <[email protected]> |
| 2341 |
|
| 2342 |
PR c++/109876 |
| 2343 |
* decl.cc (cp_finish_decl): Set TREE_CONSTANT when initializing |
| 2344 |
an object of empty class type. |
| 2345 |
* pt.cc (value_dependent_expression_p) <case VAR_DECL>: Treat a |
| 2346 |
constexpr-declared non-constant variable as value-dependent. |
| 2347 |
|
| 2348 |
2023-07-11 Patrick Palka <[email protected]> |
| 2349 |
|
| 2350 |
PR c++/110580 |
| 2351 |
* pt.cc (lookup_template_variable): Pass all levels of arguments |
| 2352 |
to coerce_template_parms, and use the parameters from the most |
| 2353 |
general template. |
| 2354 |
|
| 2355 |
2023-07-10 Patrick Palka <[email protected]> |
| 2356 |
|
| 2357 |
PR c++/110523 |
| 2358 |
* pt.cc (redeclare_class_template): Relax the ttp DECL_CONTEXT |
| 2359 |
assert, and downgrade it to a checking assert. |
| 2360 |
|
| 2361 |
2023-06-30 Patrick Palka <[email protected]> |
| 2362 |
|
| 2363 |
* cp-tree.h (TEMPLATE_PARM_DESCENDANTS): Harden. |
| 2364 |
(TEMPLATE_TYPE_DESCENDANTS): Define. |
| 2365 |
(TEMPLATE_TEMPLATE_PARM_SIMPLE_P): Define. |
| 2366 |
* pt.cc (reduce_template_parm_level): Revert |
| 2367 |
r14-418-g0bc2a1dc327af9 change. |
| 2368 |
(process_template_parm): Set TEMPLATE_TEMPLATE_PARM_SIMPLE_P |
| 2369 |
appropriately. |
| 2370 |
(uses_outer_template_parms): Determine the outer depth of |
| 2371 |
a template template parm without relying on DECL_CONTEXT. |
| 2372 |
(tsubst) <case TEMPLATE_TEMPLATE_PARM>: Cache lowering a |
| 2373 |
simple template template parm. Consistently use 'code'. |
| 2374 |
|
| 2375 |
2023-06-29 Patrick Palka <[email protected]> |
| 2376 |
|
| 2377 |
PR c++/110468 |
| 2378 |
* init.cc (maybe_instantiate_nsdmi_init): Mask out all |
| 2379 |
tsubst flags except for tf_warning_or_error. |
| 2380 |
|
| 2381 |
2023-06-29 Patrick Palka <[email protected]> |
| 2382 |
|
| 2383 |
PR c++/110463 |
| 2384 |
* cp-gimplify.cc (cp_fold) <case CONSTRUCTOR>: Propagate |
| 2385 |
CONSTRUCTOR_MUTABLE_POISON. |
| 2386 |
|
| 2387 |
2023-06-29 Patrick Palka <[email protected]> |
| 2388 |
|
| 2389 |
* cp-tree.h (tree_template_info::partial): New data member. |
| 2390 |
(TI_PARTIAL_INFO): New tree accessor. |
| 2391 |
(most_specialized_partial_spec): Add defaulted bool parameter. |
| 2392 |
* module.cc (trees_out::core_vals) <case TEMPLATE_INFO>: Stream |
| 2393 |
TI_PARTIAL_INFO. |
| 2394 |
(trees_in::core_vals) <case TEMPLATE_INFO>: Likewise. |
| 2395 |
* parser.cc (specialization_of): Adjust after making |
| 2396 |
most_specialized_partial_spec return TEMPLATE_INFO instead |
| 2397 |
of TREE_LIST. |
| 2398 |
* pt.cc (process_partial_specialization): Set TI_PARTIAL_INFO |
| 2399 |
of 'decl' to point back to the partial TEMPLATE_DECL. Likewise |
| 2400 |
(and pass rechecking=true to most_specialization_partial_spec). |
| 2401 |
(instantiate_class_template): Likewise. |
| 2402 |
(instantiate_template): Set TI_PARTIAL_INFO to the result of |
| 2403 |
most_specialization_partial_spec after forming a variable |
| 2404 |
template specialization. |
| 2405 |
(most_specialized_partial_spec): Add 'rechecking' parameter. |
| 2406 |
Exit early if the template is not primary. Use the TI_PARTIAL_INFO |
| 2407 |
of the corresponding TEMPLATE_INFO as a cache unless 'rechecking' |
| 2408 |
is true. Don't bother setting TREE_TYPE of each TREE_LIST. |
| 2409 |
(instantiate_decl): Adjust after making |
| 2410 |
most_specialized_partial_spec return TEMPLATE_INFO instead of |
| 2411 |
TREE_LIST. |
| 2412 |
* ptree.cc (cxx_print_xnode) <case TEMPLATE_INFO>: Dump |
| 2413 |
TI_PARTIAL_INFO. |
| 2414 |
|
| 2415 |
2023-06-29 Eugene Rozenfeld <[email protected]> |
| 2416 |
|
| 2417 |
* Make-lang.in: Pass correct stage cc1plus when processing |
| 2418 |
profile data collected while building target libraries |
| 2419 |
|
| 2420 |
2023-06-28 Patrick Palka <[email protected]> |
| 2421 |
|
| 2422 |
PR c++/89442 |
| 2423 |
PR c++/107437 |
| 2424 |
* cp-tree.h (lookup_template_variable): Add complain parameter. |
| 2425 |
* parser.cc (cp_parser_template_id): Pass tf_warning_or_error |
| 2426 |
to lookup_template_variable. |
| 2427 |
* pt.cc (lookup_template_variable): Add complain parameter. |
| 2428 |
Coerce template arguments here ... |
| 2429 |
(finish_template_variable): ... instead of here. |
| 2430 |
(lookup_and_finish_template_variable): Check for error_mark_node |
| 2431 |
result from lookup_template_variable. |
| 2432 |
(tsubst_copy) <case TEMPLATE_ID_EXPR>: Pass complain to |
| 2433 |
lookup_template_variable. |
| 2434 |
(instantiate_template): Use build2 instead of |
| 2435 |
lookup_template_variable to build a TEMPLATE_ID_EXPR |
| 2436 |
for most_specialized_partial_spec. |
| 2437 |
|
| 2438 |
2023-06-28 Marek Polacek <[email protected]> |
| 2439 |
|
| 2440 |
PR c++/110175 |
| 2441 |
* typeck.cc (cp_build_unary_op): Check tf_warning before warning. |
| 2442 |
|
| 2443 |
2023-06-28 Jason Merrill <[email protected]> |
| 2444 |
|
| 2445 |
PR c++/110334 |
| 2446 |
* cp-tree.h (clone_attrs): Declare. |
| 2447 |
* method.cc (implicitly_declare_fn): Use it for inherited |
| 2448 |
constructor. |
| 2449 |
* optimize.cc (clone_attrs): New. |
| 2450 |
(maybe_clone_body): Use it. |
| 2451 |
|
| 2452 |
2023-06-28 Jason Merrill <[email protected]> |
| 2453 |
|
| 2454 |
PR c++/110344 |
| 2455 |
* constexpr.cc (cxx_eval_constant_expression): In C++26, allow cast |
| 2456 |
from void* to the type of a pointed-to object. |
| 2457 |
|
| 2458 |
2023-06-23 David Malcolm <[email protected]> |
| 2459 |
|
| 2460 |
PR c++/110164 |
| 2461 |
* cp-name-hint.h (maybe_suggest_missing_header): New decl. |
| 2462 |
* decl.cc: Define INCLUDE_MEMORY. Add include of |
| 2463 |
"cp/cp-name-hint.h". |
| 2464 |
(start_decl_1): Call maybe_suggest_missing_header. |
| 2465 |
* name-lookup.cc (maybe_suggest_missing_header): Remove "static". |
| 2466 |
|
| 2467 |
2023-06-16 Alex Coplan <[email protected]> |
| 2468 |
|
| 2469 |
* parser.cc (cp_parser_enum_specifier): Don't reject |
| 2470 |
elaborated-type-specifier with enum-base, instead emit new |
| 2471 |
Welaborated-enum-base warning. |
| 2472 |
|
| 2473 |
2023-06-14 Jason Merrill <[email protected]> |
| 2474 |
|
| 2475 |
DR 2327 |
| 2476 |
PR c++/86521 |
| 2477 |
* call.cc (joust_maybe_elide_copy): Don't change cand. |
| 2478 |
(joust): Move the elided tiebreaker later. |
| 2479 |
|
| 2480 |
2023-06-13 David Malcolm <[email protected]> |
| 2481 |
|
| 2482 |
PR c/84890 |
| 2483 |
* name-lookup.cc (missing_std_header::~missing_std_header): Reword |
| 2484 |
note to avoid negative tone of "forgetting". |
| 2485 |
|
| 2486 |
2023-06-13 Jason Merrill <[email protected]> |
| 2487 |
|
| 2488 |
* tree.cc (build_target_expr): Check TYPE_HAS_MUTABLE_P. |
| 2489 |
|
| 2490 |
2023-06-12 Tobias Burnus <[email protected]> |
| 2491 |
|
| 2492 |
* parser.cc (cp_parser_omp_clause_map): Reword error message for |
| 2493 |
clearness especially with 'omp target (enter/exit) data.' |
| 2494 |
* semantics.cc (handle_omp_array_sections): Handle |
| 2495 |
GOMP_MAP_{ALWAYS_,}PRESENT_{TO,TOFROM,FROM,ALLOC} enum values. |
| 2496 |
|
| 2497 |
2023-06-12 Jason Merrill <[email protected]> |
| 2498 |
|
| 2499 |
PR c++/105838 |
| 2500 |
* call.cc (convert_like_internal) [ck_list]: Use |
| 2501 |
maybe_init_list_as_array. |
| 2502 |
* constexpr.cc (cxx_eval_vec_init_1): Init might have |
| 2503 |
a different type. |
| 2504 |
* tree.cc (build_vec_init_elt): Likewise. |
| 2505 |
* init.cc (build_vec_init): Handle from_array from a |
| 2506 |
TARGET_EXPR. Retain TARGET_EXPR of a different type. |
| 2507 |
|
| 2508 |
2023-06-11 Patrick Palka <[email protected]> |
| 2509 |
|
| 2510 |
PR c++/110122 |
| 2511 |
* constexpr.cc (cxx_eval_call_expression): Synthesize defaulted |
| 2512 |
functions needed for constant evaluation. |
| 2513 |
(instantiate_cx_fn_r): Likewise. |
| 2514 |
|
| 2515 |
2023-06-11 Patrick Palka <[email protected]> |
| 2516 |
|
| 2517 |
PR c++/110122 |
| 2518 |
* pt.cc (lookup_template_class): Extend shortcut for looking up the |
| 2519 |
current class scope to consider outer class scopes too, and use |
| 2520 |
current_nonlambda_class_type instead of current_class_type. Only |
| 2521 |
call coerce_template_parms when specializing a primary template. |
| 2522 |
|
| 2523 |
2023-06-10 Nathan Sidwell <[email protected]> |
| 2524 |
|
| 2525 |
PR c++/61663 |
| 2526 |
* pt.cc (maybe_adjust_types_for_deduction): Implement DR976. |
| 2527 |
|
| 2528 |
2023-06-09 Jason Merrill <[email protected]> |
| 2529 |
|
| 2530 |
PR c++/110185 |
| 2531 |
PR c++/58487 |
| 2532 |
* method.cc (build_comparison_op): Give retval a name. |
| 2533 |
* typeck.cc (check_return_expr): Fix for nameless variables. |
| 2534 |
|
| 2535 |
2023-06-09 Jason Merrill <[email protected]> |
| 2536 |
|
| 2537 |
* parser.cc (cp_parser_simple_type_specifier): Check for auto |
| 2538 |
in template argument. |
| 2539 |
(cp_parser_template_type_arg): Remove auto checking. |
| 2540 |
|
| 2541 |
2023-06-09 Jason Merrill <[email protected]> |
| 2542 |
|
| 2543 |
PR c++/110102 |
| 2544 |
* call.cc (maybe_init_list_as_array): Check that the element type is |
| 2545 |
copyable. |
| 2546 |
|
| 2547 |
2023-06-07 Jason Merrill <[email protected]> |
| 2548 |
|
| 2549 |
PR c++/58487 |
| 2550 |
PR c++/53637 |
| 2551 |
* cp-tree.h (INIT_EXPR_NRV_P): New. |
| 2552 |
* semantics.cc (finalize_nrv_r): Check it. |
| 2553 |
* name-lookup.h (decl_in_scope_p): Declare. |
| 2554 |
* name-lookup.cc (decl_in_scope_p): New. |
| 2555 |
* typeck.cc (check_return_expr): Allow non-NRV |
| 2556 |
returns if the NRV is no longer in scope. |
| 2557 |
|
| 2558 |
2023-06-07 Jason Merrill <[email protected]> |
| 2559 |
|
| 2560 |
PR c++/58487 |
| 2561 |
* typeck.cc (want_nrvo_p): New. |
| 2562 |
(check_return_expr): Handle -Wnrvo. |
| 2563 |
|
| 2564 |
2023-06-07 Jason Merrill <[email protected]> |
| 2565 |
|
| 2566 |
PR c++/51571 |
| 2567 |
PR c++/92407 |
| 2568 |
* decl.cc (finish_function): Simplify NRV handling. |
| 2569 |
* except.cc (maybe_set_retval_sentinel): Also set if NRV. |
| 2570 |
(maybe_splice_retval_cleanup): Don't add the cleanup region |
| 2571 |
if we don't need it. |
| 2572 |
* semantics.cc (nrv_data): Add simple field. |
| 2573 |
(finalize_nrv): Set it. |
| 2574 |
(finalize_nrv_r): Check it and retval sentinel. |
| 2575 |
* cp-tree.h (finalize_nrv): Adjust declaration. |
| 2576 |
* typeck.cc (check_return_expr): Remove named_labels check. |
| 2577 |
|
| 2578 |
2023-06-07 Jason Merrill <[email protected]> |
| 2579 |
|
| 2580 |
PR c++/92407 |
| 2581 |
* typeck.cc (check_return_expr): Prevent NRV in the presence of |
| 2582 |
named labels. |
| 2583 |
|
| 2584 |
2023-06-07 Jason Merrill <[email protected]> |
| 2585 |
|
| 2586 |
PR c++/33799 |
| 2587 |
* except.cc (maybe_splice_retval_cleanup): Change |
| 2588 |
recognition of function body and try scopes. |
| 2589 |
* semantics.cc (do_poplevel): Call it after poplevel. |
| 2590 |
(at_try_scope): New. |
| 2591 |
* cp-tree.h (maybe_splice_retval_cleanup): Adjust. |
| 2592 |
|
| 2593 |
2023-06-07 Jason Merrill <[email protected]> |
| 2594 |
|
| 2595 |
* semantics.cc (finalize_nrv_r): [RETURN_EXPR]: Only replace the |
| 2596 |
INIT_EXPR. |
| 2597 |
|
| 2598 |
2023-06-06 Kwok Cheung Yeung <[email protected]> |
| 2599 |
Tobias Burnus <[email protected]> |
| 2600 |
|
| 2601 |
* parser.cc (cp_parser_omp_clause_defaultmap, |
| 2602 |
cp_parser_omp_clause_map): Parse 'present'. |
| 2603 |
(cp_parser_omp_clause_from_to): New; parse to/from |
| 2604 |
clauses with optional 'present' modifier. |
| 2605 |
(cp_parser_omp_all_clauses): Update call. |
| 2606 |
(cp_parser_omp_target_data, cp_parser_omp_target_enter_data, |
| 2607 |
cp_parser_omp_target_exit_data): Handle new enum value for |
| 2608 |
'present' mapping. |
| 2609 |
* semantics.cc (finish_omp_target): Likewise. |
| 2610 |
|
| 2611 |
2023-06-04 Jason Merrill <[email protected]> |
| 2612 |
|
| 2613 |
PR c++/97720 |
| 2614 |
* cp-tree.h (enum cp_tree_index): Add CPTI_CALL_TERMINATE_FN. |
| 2615 |
(call_terminate_fn): New macro. |
| 2616 |
* cp-gimplify.cc (gimplify_must_not_throw_expr): Use it. |
| 2617 |
* except.cc (init_exception_processing): Set it. |
| 2618 |
(cp_protect_cleanup_actions): Return it. |
| 2619 |
|
| 2620 |
2023-06-03 Patrick Palka <[email protected]> |
| 2621 |
|
| 2622 |
PR c++/109923 |
| 2623 |
* pt.cc (is_specialization_of_friend): Fix overbroad check for |
| 2624 |
a non-template member function of a class template. |
| 2625 |
|
| 2626 |
2023-06-03 Patrick Palka <[email protected]> |
| 2627 |
|
| 2628 |
* pt.cc (iterative_hash_template_arg): Don't hash |
| 2629 |
TEMPLATE_TEMPLATE_PARM specially. |
| 2630 |
|
| 2631 |
2023-06-03 Patrick Palka <[email protected]> |
| 2632 |
|
| 2633 |
* class.cc (build_base_path): Check in_template_context instead |
| 2634 |
of in_template_function. |
| 2635 |
(resolves_to_fixed_type_p): Likewise. |
| 2636 |
* cp-tree.h (in_template_context): Define. |
| 2637 |
(in_template_function): Remove. |
| 2638 |
* decl.cc (cp_make_fname_decl): Check current_function_decl |
| 2639 |
and in_template_context instead of in_template_function. |
| 2640 |
* decl2.cc (mark_used): Check in_template_context instead of |
| 2641 |
in_template_function. |
| 2642 |
* pt.cc (in_template_function): Remove. |
| 2643 |
* semantics.cc (enforce_access): Check in_template_context |
| 2644 |
instead of current_template_parms directly. |
| 2645 |
|
| 2646 |
2023-06-03 Patrick Palka <[email protected]> |
| 2647 |
|
| 2648 |
PR c++/70790 |
| 2649 |
* mangle.cc (write_expression): Handle NOEXCEPT_EXPR. |
| 2650 |
|
| 2651 |
2023-06-02 Jason Merrill <[email protected]> |
| 2652 |
|
| 2653 |
DR 2735 |
| 2654 |
PR c++/109247 |
| 2655 |
* call.cc (sfk_copy_or_move): New. |
| 2656 |
(joust): Add tiebreaker for explicit conv and copy ctor. |
| 2657 |
|
| 2658 |
2023-06-02 Jason Merrill <[email protected]> |
| 2659 |
|
| 2660 |
PR c++/110070 |
| 2661 |
PR c++/105838 |
| 2662 |
* call.cc (maybe_init_list_as_array): Set DECL_MERGEABLE. |
| 2663 |
(convert_like_internal) [ck_list]: Set it. |
| 2664 |
(set_up_extended_ref_temp): Copy it. |
| 2665 |
* tree.cc (handle_no_unique_addr_attribute): Set it. |
| 2666 |
|
| 2667 |
2023-06-01 Jason Merrill <[email protected]> |
| 2668 |
|
| 2669 |
* typeck2.cc (check_narrowing): Check flag_permissive. |
| 2670 |
|
| 2671 |
2023-05-30 Tobias Burnus <[email protected]> |
| 2672 |
|
| 2673 |
PR c/109999 |
| 2674 |
* parser.cc (cp_parser_oacc_all_clauses, |
| 2675 |
cp_parser_omp_all_clauses): Improve error wording. |
| 2676 |
|
| 2677 |
2023-05-19 Andrew Pinski <[email protected]> |
| 2678 |
|
| 2679 |
PR driver/33980 |
| 2680 |
* lang-specs.h ("@c++-header"): Add %w after |
| 2681 |
the --output-pch. |
| 2682 |
("@c++-system-header"): Likewise. |
| 2683 |
("@c++-user-header"): Likewise. |
| 2684 |
|
| 2685 |
2023-05-19 Patrick Palka <[email protected]> |
| 2686 |
|
| 2687 |
* constraint.cc (normalize_concept_check): Avoid having to do |
| 2688 |
two norm_cache lookups. Remove unnecessary early exit for an |
| 2689 |
ill-formed concept definition. |
| 2690 |
|
| 2691 |
2023-05-19 Patrick Palka <[email protected]> |
| 2692 |
|
| 2693 |
PR c++/97340 |
| 2694 |
* pt.cc (lookup_and_finish_template_variable): Don't call |
| 2695 |
convert_from_reference. |
| 2696 |
(tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Call |
| 2697 |
convert_from_reference on the result of |
| 2698 |
lookup_and_finish_template_variable. |
| 2699 |
|
| 2700 |
2023-05-18 Bernhard Reutner-Fischer <[email protected]> |
| 2701 |
|
| 2702 |
* call.cc (promoted_arithmetic_type_p): Use _P defines from tree.h. |
| 2703 |
(build_conditional_expr): Ditto. |
| 2704 |
(convert_like_internal): Ditto. |
| 2705 |
(convert_arg_to_ellipsis): Ditto. |
| 2706 |
(build_over_call): Ditto. |
| 2707 |
(compare_ics): Ditto. |
| 2708 |
* class.cc (is_empty_base_ref): Ditto. |
| 2709 |
* coroutines.cc (rewrite_param_uses): Ditto. |
| 2710 |
* cp-tree.h (DECL_DISCRIMINATOR_P): Ditto. |
| 2711 |
(ARITHMETIC_TYPE_P): Ditto. |
| 2712 |
* cvt.cc (ocp_convert): Ditto. |
| 2713 |
* cxx-pretty-print.cc (pp_cxx_template_argument_list): Ditto. |
| 2714 |
* decl.cc (layout_var_decl): Ditto. |
| 2715 |
(get_tuple_size): Ditto. |
| 2716 |
* error.cc (dump_simple_decl): Ditto. |
| 2717 |
* lambda.cc (start_lambda_scope): Ditto. |
| 2718 |
* mangle.cc (write_template_arg): Ditto. |
| 2719 |
* method.cc (spaceship_comp_cat): Ditto. |
| 2720 |
* module.cc (node_template_info): Ditto. |
| 2721 |
(trees_out::start): Ditto. |
| 2722 |
(trees_out::decl_node): Ditto. |
| 2723 |
(trees_in::read_var_def): Ditto. |
| 2724 |
(set_instantiating_module): Ditto. |
| 2725 |
* name-lookup.cc (maybe_record_mergeable_decl): Ditto. |
| 2726 |
(consider_decl): Ditto. |
| 2727 |
(maybe_add_fuzzy_decl): Ditto. |
| 2728 |
* pt.cc (convert_nontype_argument): Ditto. |
| 2729 |
* semantics.cc (handle_omp_array_sections_1): Ditto. |
| 2730 |
(finish_omp_clauses): Ditto. |
| 2731 |
(finish_omp_target_clauses_r): Ditto. |
| 2732 |
(is_this_parameter): Ditto. |
| 2733 |
* tree.cc (build_cplus_array_type): Ditto. |
| 2734 |
(is_this_expression): Ditto. |
| 2735 |
* typeck.cc (do_warn_enum_conversions): Ditto. |
| 2736 |
* typeck2.cc (store_init_value): Ditto. |
| 2737 |
(check_narrowing): Ditto. |
| 2738 |
|
| 2739 |
2023-05-17 Jakub Jelinek <[email protected]> |
| 2740 |
|
| 2741 |
PR c++/109868 |
| 2742 |
* init.cc (build_zero_init_1): Don't initialize zero-width bitfields. |
| 2743 |
For unions only initialize the first FIELD_DECL. |
| 2744 |
|
| 2745 |
2023-05-16 Marek Polacek <[email protected]> |
| 2746 |
|
| 2747 |
PR c++/109774 |
| 2748 |
* typeck.cc (check_return_expr): In a template, return only after |
| 2749 |
suppressing -Wdangling-reference. |
| 2750 |
|
| 2751 |
2023-05-16 Patrick Palka <[email protected]> |
| 2752 |
|
| 2753 |
PR c++/109871 |
| 2754 |
* call.cc (add_list_candidates): Check for invalid designated |
| 2755 |
initialization sooner and even for types that have a list |
| 2756 |
constructor. |
| 2757 |
|
| 2758 |
2023-05-11 Patrick Palka <[email protected]> |
| 2759 |
|
| 2760 |
PR c++/109745 |
| 2761 |
* typeck2.cc (poison_mutable_constructors): Define. |
| 2762 |
(store_init_value): Use it instead of setting |
| 2763 |
CONSTRUCTOR_MUTABLE_POISON directly. |
| 2764 |
|
| 2765 |
2023-05-11 Patrick Palka <[email protected]> |
| 2766 |
Jonathan Wakely <[email protected]> |
| 2767 |
|
| 2768 |
PR c++/83258 |
| 2769 |
PR c++/80488 |
| 2770 |
PR c++/97700 |
| 2771 |
* pt.cc (convert_nontype_argument_function): Remove linkage |
| 2772 |
requirement for C++17 and later. |
| 2773 |
(invalid_tparm_referent_p) <case ADDR_EXPR>: Restrict |
| 2774 |
DECL_ARTIFICIAL rejection test to VAR_DECL. |
| 2775 |
|
| 2776 |
2023-05-10 Marek Polacek <[email protected]> |
| 2777 |
|
| 2778 |
PR c++/109680 |
| 2779 |
* method.cc (build_trait_object): New. |
| 2780 |
(assignable_expr): Use it. |
| 2781 |
(ref_xes_from_temporary): Likewise. |
| 2782 |
(is_convertible_helper): Likewise. Check FUNC_OR_METHOD_TYPE_P. |
| 2783 |
|
| 2784 |
2023-05-10 Jason Merrill <[email protected]> |
| 2785 |
|
| 2786 |
* call.cc (convert_like_internal): Share ck_ref_bind handling |
| 2787 |
between all bad conversions. |
| 2788 |
|
| 2789 |
2023-05-10 Jason Merrill <[email protected]> |
| 2790 |
|
| 2791 |
DR 2543 |
| 2792 |
* constexpr.cc (cxx_eval_outermost_constant_expr): Preserve |
| 2793 |
TARGET_EXPR flags. |
| 2794 |
(potential_constant_expression_1): Check TARGET_EXPR_ELIDING_P. |
| 2795 |
* typeck2.cc (store_init_value): Diagnose constinit sooner. |
| 2796 |
|
| 2797 |
2023-05-10 Jason Merrill <[email protected]> |
| 2798 |
|
| 2799 |
* constexpr.cc (cxx_eval_outermost_constant_expr): Always check |
| 2800 |
for address of immediate fn. |
| 2801 |
(maybe_constant_init_1): Evaluate PTRMEM_CST. |
| 2802 |
|
| 2803 |
2023-05-10 Jakub Jelinek <[email protected]> |
| 2804 |
|
| 2805 |
PR c++/109756 |
| 2806 |
* parser.cc (cp_parser_std_attribute): For unknown attributes with |
| 2807 |
arguments set TREE_VALUE (attribute) to error_mark_node after skipping |
| 2808 |
the balanced tokens. |
| 2809 |
(cp_parser_std_attribute_list): If ... is used after attribute without |
| 2810 |
arguments, diagnose it and return error_mark_node. If |
| 2811 |
TREE_VALUE (attribute) is error_mark_node, don't call |
| 2812 |
make_pack_expansion nor return early error_mark_node. |
| 2813 |
|
| 2814 |
2023-05-09 Patrick Palka <[email protected]> |
| 2815 |
|
| 2816 |
PR c++/109752 |
| 2817 |
* constraint.cc (satisfaction_cache::satisfaction_cache): In the |
| 2818 |
unexpected case of evaluating an atom for the first time noisily, |
| 2819 |
remove the cache slot that we inserted. |
| 2820 |
|
| 2821 |
2023-05-09 Patrick Palka <[email protected]> |
| 2822 |
|
| 2823 |
PR c++/109761 |
| 2824 |
* parser.cc (cp_parser_class_specifier): Don't pass a class |
| 2825 |
context to noexcept_override_late_checks. |
| 2826 |
(noexcept_override_late_checks): Remove 'type' parameter |
| 2827 |
and use DECL_CONTEXT of 'fndecl' instead. |
| 2828 |
|
| 2829 |
2023-05-09 Jakub Jelinek <[email protected]> |
| 2830 |
|
| 2831 |
PR c++/109756 |
| 2832 |
* cp-gimplify.cc (process_stmt_assume_attribute): Diagnose pack |
| 2833 |
expansion of assume attribute. |
| 2834 |
|
| 2835 |
2023-05-08 Patrick Palka <[email protected]> |
| 2836 |
|
| 2837 |
PR c++/106214 |
| 2838 |
PR c++/93107 |
| 2839 |
* pt.cc (do_auto_deduction): Move up resolve_nondeduced_context |
| 2840 |
calls to happen before do_class_deduction. Add some |
| 2841 |
error_mark_node tests. |
| 2842 |
|
| 2843 |
2023-05-07 Patrick Palka <[email protected]> |
| 2844 |
|
| 2845 |
PR c++/85979 |
| 2846 |
* cxx-pretty-print.cc (cxx_pretty_printer::unary_expression) |
| 2847 |
<case ALIGNOF_EXPR>: Consider ALIGNOF_EXPR_STD_P. |
| 2848 |
* error.cc (dump_expr) <case ALIGNOF_EXPR>: Likewise. |
| 2849 |
|
| 2850 |
2023-05-07 Patrick Palka <[email protected]> |
| 2851 |
|
| 2852 |
DR 2256 |
| 2853 |
PR c++/103091 |
| 2854 |
* decl.cc (decl_jump_unsafe): Return bool instead of int. |
| 2855 |
Don't consider TYPE_HAS_NONTRIVIAL_DESTRUCTOR. |
| 2856 |
(check_previous_goto_1): Simplify now that decl_jump_unsafe |
| 2857 |
returns bool instead of int. |
| 2858 |
(check_goto): Likewise. |
| 2859 |
|
| 2860 |
2023-05-07 Patrick Palka <[email protected]> |
| 2861 |
|
| 2862 |
* pt.cc (instantiate_alias_template): Exit early upon |
| 2863 |
error from coerce_template_parms. Remove dependence test |
| 2864 |
guarding constraints_satisfied_p. |
| 2865 |
|
| 2866 |
2023-05-07 Patrick Palka <[email protected]> |
| 2867 |
|
| 2868 |
* cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Harden via |
| 2869 |
TEMPLATE_TYPE_PARM_CHECK. |
| 2870 |
(TPARMS_PRIMARY_TEMPLATE): Harden via TREE_VEC_CHECK. |
| 2871 |
(TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Harden via |
| 2872 |
TEMPLATE_TEMPLATE_PARM_CHECK. |
| 2873 |
* cxx-pretty-print.cc (cxx_pretty_printer::simple_type_specifier): |
| 2874 |
Guard PLACEHOLDER_TYPE_CONSTRAINTS access. |
| 2875 |
* error.cc (dump_type) <case TEMPLATE_TYPE_PARM>: Use separate |
| 2876 |
variable to store CLASS_PLACEHOLDER_TEMPLATE result. |
| 2877 |
* pt.cc (outer_template_args): Use strip_innermost_template_args. |
| 2878 |
(any_type_dependent_arguments_p): Exit early if |
| 2879 |
!processing_template_decl. Use range-based for. |
| 2880 |
(any_dependent_template_arguments_p): Likewise. |
| 2881 |
|
| 2882 |
2023-05-07 Patrick Palka <[email protected]> |
| 2883 |
|
| 2884 |
PR c++/98283 |
| 2885 |
* pt.cc (tsubst_copy_and_build) <case COMPONENT_REF>: Propagate |
| 2886 |
REF_PARENTHESIZED_P more generally via force_paren_expr. |
| 2887 |
* semantics.cc (force_paren_expr): Document default argument. |
| 2888 |
|
| 2889 |
2023-05-07 Patrick Palka <[email protected]> |
| 2890 |
|
| 2891 |
PR c++/109651 |
| 2892 |
* pt.cc (coerce_template_args_for_ttp): Mention we can hit the |
| 2893 |
current_template_parms fallback when level-lowering a bound ttp. |
| 2894 |
(tsubst_template_decl): Add lambda_tparms parameter. Prefer to |
| 2895 |
use lambda_tparms instead of substituting DECL_TEMPLATE_PARMS. |
| 2896 |
(tsubst_decl) <case TEMPLATE_DECL>: Pass NULL_TREE as lambda_tparms |
| 2897 |
to tsubst_template_decl. |
| 2898 |
(tsubst_lambda_expr): For a generic lambda, substitute |
| 2899 |
DECL_TEMPLATE_PARMS and set current_template_parms to it |
| 2900 |
before substituting the function type. Pass the substituted |
| 2901 |
DECL_TEMPLATE_PARMS as lambda_tparms to tsubst_template_decl. |
| 2902 |
|
| 2903 |
2023-05-07 Patrick Palka <[email protected]> |
| 2904 |
|
| 2905 |
PR c++/109480 |
| 2906 |
* semantics.cc (enforce_access): Check current_template_parms |
| 2907 |
instead of processing_template_decl when deciding whether to |
| 2908 |
defer the access check. |
| 2909 |
|
| 2910 |
2023-05-07 Patrick Palka <[email protected]> |
| 2911 |
|
| 2912 |
PR c++/109480 |
| 2913 |
* constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: |
| 2914 |
Reorganize to call get_fns sooner. Remove special handling of |
| 2915 |
the object argument of a non-static member function call. Remove |
| 2916 |
dead store to 'fun'. |
| 2917 |
|
| 2918 |
2023-05-05 Jason Merrill <[email protected]> |
| 2919 |
|
| 2920 |
Revert: |
| 2921 |
2023-04-27 Jason Merrill <[email protected]> |
| 2922 |
|
| 2923 |
PR c++/61445 |
| 2924 |
* pt.cc (instantiate_decl): Assert !defer_ok for local |
| 2925 |
class members. |
| 2926 |
|
| 2927 |
2023-05-03 Jason Merrill <[email protected]> |
| 2928 |
|
| 2929 |
PR c++/91618 |
| 2930 |
PR c++/109649 |
| 2931 |
* friend.cc (do_friend): Don't call check_explicit_specialization if |
| 2932 |
DECL_TEMPLATE_INFO is already set. |
| 2933 |
* decl2.cc (check_classfn): Set DECL_TEMPLATE_INFO. |
| 2934 |
* name-lookup.cc (set_decl_namespace): Likewise. |
| 2935 |
|
| 2936 |
2023-05-03 Jakub Jelinek <[email protected]> |
| 2937 |
|
| 2938 |
* cp-gimplify.cc (cp_fold_data): Move definition earlier. |
| 2939 |
(cp_gimplify_expr): Pass address of ff_genericize | ff_mce_false |
| 2940 |
constructed data rather than &pset to cp_walk_tree with cp_fold_r. |
| 2941 |
|
| 2942 |
2023-05-03 Jason Merrill <[email protected]> |
| 2943 |
|
| 2944 |
* pt.cc (reduce_template_parm_level): Fix comparison of |
| 2945 |
template template parm to cached version. |
| 2946 |
|
| 2947 |
2023-05-02 Jason Merrill <[email protected]> |
| 2948 |
|
| 2949 |
* pt.cc (instantiate_class_template): Skip the RECORD_TYPE |
| 2950 |
of a class template. |
| 2951 |
(tsubst_template_decl): Clear CLASSTYPE_USE_TEMPLATE. |
| 2952 |
|
| 2953 |
2023-05-02 Jason Merrill <[email protected]> |
| 2954 |
|
| 2955 |
* name-lookup.cc (pop_from_top_level): Don't |
| 2956 |
invalidate_class_lookup_cache. |
| 2957 |
|
| 2958 |
2023-05-02 Jason Merrill <[email protected]> |
| 2959 |
|
| 2960 |
PR c++/109678 |
| 2961 |
* cp-tree.h (lookup_base): Add offset parm. |
| 2962 |
* constexpr.cc (cxx_fold_indirect_ref_1): Pass it. |
| 2963 |
* search.cc (struct lookup_base_data_s): Add offset. |
| 2964 |
(dfs_lookup_base): Handle it. |
| 2965 |
(lookup_base): Pass it. |
| 2966 |
|
| 2967 |
2023-05-02 Jason Merrill <[email protected]> |
| 2968 |
|
| 2969 |
PR c++/109678 |
| 2970 |
* constexpr.cc (cxx_fold_indirect_ref_1): Handle empty base first. |
| 2971 |
|
| 2972 |
2023-05-01 Jason Merrill <[email protected]> |
| 2973 |
|
| 2974 |
PR c++/109666 |
| 2975 |
* name-lookup.cc (maybe_push_to_top_level) |
| 2976 |
(maybe_pop_from_top_level): Split out... |
| 2977 |
* pt.cc (instantiate_body): ...from here. |
| 2978 |
* init.cc (maybe_instantiate_nsdmi_init): Use them. |
| 2979 |
* name-lookup.h: Declare them.. |
| 2980 |
|
| 2981 |
2023-04-28 Eugene Rozenfeld <[email protected]> |
| 2982 |
|
| 2983 |
* Make-lang.in: Merge perf data collected when compiling cc1plus and runtime libraries |
| 2984 |
|
| 2985 |
2023-04-27 Jason Merrill <[email protected]> |
| 2986 |
|
| 2987 |
* call.cc (print_conversion_rejection): Use iloc_sentinel. |
| 2988 |
|
| 2989 |
2023-04-27 Jason Merrill <[email protected]> |
| 2990 |
|
| 2991 |
PR c++/61445 |
| 2992 |
* pt.cc (instantiate_decl): Assert !defer_ok for local |
| 2993 |
class members. |
| 2994 |
|
| 2995 |
2023-04-26 Jason Merrill <[email protected]> |
| 2996 |
|
| 2997 |
* init.cc (nsdmi_inst): Remove. |
| 2998 |
(maybe_instantiate_nsdmi_init): Use DECL_INITIAL instead. |
| 2999 |
|
| 3000 |
2023-04-26 Jason Merrill <[email protected]> |
| 3001 |
|
| 3002 |
PR c++/109241 |
| 3003 |
* pt.cc (instantiate_class_template): Do partially instantiate. |
| 3004 |
(tsubst_expr): Do call complete_type for partial instantiations. |
| 3005 |
|
| 3006 |
2023-04-26 Jason Merrill <[email protected]> |
| 3007 |
|
| 3008 |
PR c++/69836 |
| 3009 |
* pt.cc (regenerate_decl_from_template): Skip unique friends. |
| 3010 |
|
| 3011 |
2023-04-26 Patrick Palka <[email protected]> |
| 3012 |
|
| 3013 |
* pt.cc (most_specialized_partial_spec): Exit early when |
| 3014 |
DECL_TEMPLATE_SPECIALIZATIONS is empty. Move local variable |
| 3015 |
declarations closer to their first use. Remove redundant |
| 3016 |
flag_concepts test. Remove redundant forward declaration. |
| 3017 |
|
| 3018 |
2023-04-25 Patrick Palka <[email protected]> |
| 3019 |
|
| 3020 |
PR c++/108975 |
| 3021 |
* pt.cc (value_dependent_expression_p) <case VAR_DECL>: |
| 3022 |
Suppress conservative early exit for reference variables |
| 3023 |
when DECL_HAS_VALUE_EXPR_P. |
| 3024 |
|
| 3025 |
2023-04-25 Tobias Burnus <[email protected]> |
| 3026 |
|
| 3027 |
* parser.cc (cp_parser_omp_scan_loop_body): Handle |
| 3028 |
zero exec statements before/after 'omp scan'. |
| 3029 |
|
| 3030 |
2023-04-24 Patrick Palka <[email protected]> |
| 3031 |
|
| 3032 |
* cp-tree.h (cp_expr_location): Define here. |
| 3033 |
* tree.cc (cp_expr_location): Don't define here. |
| 3034 |
|
| 3035 |
2023-04-21 Jason Merrill <[email protected]> |
| 3036 |
|
| 3037 |
PR c++/108099 |
| 3038 |
* decl.cc (grokdeclarator): Don't clear typedef_decl after 'unsigned |
| 3039 |
typedef' pedwarn. Use c_common_signed_or_unsigned_type. Also |
| 3040 |
handle 'signed typedef'. |
| 3041 |
|
| 3042 |
2023-04-21 Patrick Palka <[email protected]> |
| 3043 |
|
| 3044 |
* tree.cc (cp_walk_subtrees): Avoid repeatedly dereferencing tp. |
| 3045 |
<case DECLTYPE_TYPE>: Use cp_unevaluated and WALK_SUBTREE. |
| 3046 |
<case ALIGNOF_EXPR etc>: Likewise. |
| 3047 |
|
| 3048 |
2023-04-20 Patrick Palka <[email protected]> |
| 3049 |
|
| 3050 |
* pt.cc (tsubst) <case TEMPLATE_TYPE_PARM>: Don't recurse when |
| 3051 |
level lowering a cv-qualified type template parameter. Remove |
| 3052 |
recursive loop breaker in the level lowering case for constrained |
| 3053 |
autos. Use the TEMPLATE_PARM_DESCENDANTS cache in this case as |
| 3054 |
well. |
| 3055 |
|
| 3056 |
2023-04-20 Patrick Palka <[email protected]> |
| 3057 |
|
| 3058 |
* constraint.cc (diagnose_trait_expr): Convert a TREE_VEC |
| 3059 |
of arguments into a TREE_LIST for sake of pretty printing. |
| 3060 |
* cxx-pretty-print.cc (pp_cxx_trait): Handle TREE_VEC |
| 3061 |
instead of TREE_LIST of trailing variadic trait arguments. |
| 3062 |
* method.cc (constructible_expr): Likewise. |
| 3063 |
(is_xible_helper): Likewise. |
| 3064 |
* parser.cc (cp_parser_trait): Represent trailing variadic trait |
| 3065 |
arguments as a TREE_VEC instead of TREE_LIST. |
| 3066 |
* pt.cc (value_dependent_expression_p): Handle TREE_VEC |
| 3067 |
instead of TREE_LIST of trailing variadic trait arguments. |
| 3068 |
* semantics.cc (finish_type_pack_element): Likewise. |
| 3069 |
(check_trait_type): Likewise. |
| 3070 |
|
| 3071 |
2023-04-20 Patrick Palka <[email protected]> |
| 3072 |
|
| 3073 |
* tree.cc (strip_typedefs): Move TREE_LIST handling to |
| 3074 |
strip_typedefs_expr. Dispatch to strip_typedefs_expr for |
| 3075 |
non-type 't'. |
| 3076 |
<case TYPENAME_TYPE>: Remove manual dispatching to |
| 3077 |
strip_typedefs_expr. |
| 3078 |
<case TRAIT_TYPE>: Likewise. |
| 3079 |
(strip_typedefs_expr): Replaces calls to strip_typedefs_expr |
| 3080 |
with strip_typedefs throughout. Don't dispatch to strip_typedefs |
| 3081 |
for type 't'. |
| 3082 |
<case TREE_LIST>: Replace this with the better version from |
| 3083 |
strip_typedefs. |
| 3084 |
|
| 3085 |
2023-04-19 Patrick Palka <[email protected]> |
| 3086 |
Jonathan Wakely <[email protected]> |
| 3087 |
|
| 3088 |
PR c++/100157 |
| 3089 |
* cp-trait.def (TYPE_PACK_ELEMENT): Define. |
| 3090 |
* cp-tree.h (finish_trait_type): Add complain parameter. |
| 3091 |
* cxx-pretty-print.cc (pp_cxx_trait): Handle |
| 3092 |
CPTK_TYPE_PACK_ELEMENT. |
| 3093 |
* parser.cc (cp_parser_constant_expression): Document default |
| 3094 |
arguments. |
| 3095 |
(cp_parser_trait): Handle CPTK_TYPE_PACK_ELEMENT. Pass |
| 3096 |
tf_warning_or_error to finish_trait_type. |
| 3097 |
* pt.cc (tsubst) <case TRAIT_TYPE>: Handle non-type first |
| 3098 |
argument. Pass complain to finish_trait_type. |
| 3099 |
* semantics.cc (finish_type_pack_element): Define. |
| 3100 |
(finish_trait_type): Add complain parameter. Handle |
| 3101 |
CPTK_TYPE_PACK_ELEMENT. |
| 3102 |
* tree.cc (strip_typedefs): Handle non-type first argument. |
| 3103 |
Pass tf_warning_or_error to finish_trait_type. |
| 3104 |
* typeck.cc (structural_comptypes) <case TRAIT_TYPE>: Use |
| 3105 |
cp_tree_equal instead of same_type_p for the first argument. |
| 3106 |
|
| 3107 |
2023-04-19 Patrick Palka <[email protected]> |
| 3108 |
|
| 3109 |
PR c++/109556 |
| 3110 |
* pt.cc (try_class_unification): Don't ggc_free the copy of |
| 3111 |
'targs'. |
| 3112 |
|
| 3113 |
2023-04-19 Jason Merrill <[email protected]> |
| 3114 |
|
| 3115 |
PR c++/108099 |
| 3116 |
* decl.cc (grokdeclarator): Keep typedef_decl for __int128_t. |
| 3117 |
|
| 3118 |
2023-04-17 Patrick Palka <[email protected]> |
| 3119 |
|
| 3120 |
PR c++/109531 |
| 3121 |
* pt.cc (tsubst) <case BOUND_TEMPLATE_TEMPLATE_PARM>: |
| 3122 |
In the level-lowering case just use lookup_template_class |
| 3123 |
to rebuild the bound ttp. |
| 3124 |
|
| 3125 |
2023-04-15 Jason Merrill <[email protected]> |
| 3126 |
|
| 3127 |
PR c++/109357 |
| 3128 |
* constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: |
| 3129 |
Check for complex initializer. |
| 3130 |
|
| 3131 |
2023-04-13 Patrick Palka <[email protected]> |
| 3132 |
|
| 3133 |
PR c++/109420 |
| 3134 |
* decl.cc (make_typename_type): Also ignore non-types during the |
| 3135 |
lookup if tag_type corresponds to an elaborated-type-specifier. |
| 3136 |
* pt.cc (tsubst) <case TYPENAME_TYPE>: Pass class_type or |
| 3137 |
enum_type as tag_type to make_typename_type accordingly instead |
| 3138 |
of always passing typename_type. |
| 3139 |
|
| 3140 |
2023-04-13 Jason Merrill <[email protected]> |
| 3141 |
|
| 3142 |
PR c++/109277 |
| 3143 |
* semantics.cc (check_trait_type): Handle incomplete type directly. |
| 3144 |
* typeck2.cc (cxx_incomplete_type_diagnostic): Remove assert. |
| 3145 |
|
| 3146 |
2023-04-13 Jason Merrill <[email protected]> |
| 3147 |
|
| 3148 |
* typeck2.cc (cxx_incomplete_type_diagnostic): Return bool. |
| 3149 |
* cp-tree.h (cxx_incomplete_type_diagnostic): Adjust. |
| 3150 |
|
| 3151 |
2023-04-12 Jakub Jelinek <[email protected]> |
| 3152 |
|
| 3153 |
* Make-lang.in (s-cp-module-version): New target. |
| 3154 |
(cp/module.o): Depend on it. |
| 3155 |
(MODULE_VERSION): Remove variable. |
| 3156 |
(CFLAGS-cp/module.o): For -DMODULE_VERSION= argument just |
| 3157 |
cat s-cp-module-version. |
| 3158 |
|
| 3159 |
2023-04-09 Iain Sandoe <[email protected]> |
| 3160 |
|
| 3161 |
* coroutines.cc (coro_rewrite_function_body): Ensure that added |
| 3162 |
bind expressions have scope blocks. |
| 3163 |
|
| 3164 |
2023-04-04 Jason Merrill <[email protected]> |
| 3165 |
|
| 3166 |
PR c++/107484 |
| 3167 |
* decl2.cc (find_last_decl): Return early if DECL_USE_TEMPLATE. |
| 3168 |
|
| 3169 |
2023-04-03 Patrick Palka <[email protected]> |
| 3170 |
|
| 3171 |
PR c++/109300 |
| 3172 |
* decl.cc (cp_finish_decl): Diagnose ordinary auto deduction |
| 3173 |
with no initializer, instead of asserting. |
| 3174 |
|
| 3175 |
2023-04-01 Patrick Palka <[email protected]> |
| 3176 |
|
| 3177 |
PR c++/109160 |
| 3178 |
* cp-tree.h (do_auto_deduction): Add defaulted tmpl parameter. |
| 3179 |
* pt.cc (convert_template_argument): Pass 'in_decl' as 'tmpl' to |
| 3180 |
do_auto_deduction. |
| 3181 |
(tsubst_decl) <case VAR_/TYPE_DECL>: Pass 'tmpl' instead of 't' as |
| 3182 |
'in_decl' to coerce_template_parms. |
| 3183 |
(unify) <case TEMPLATE_PARM_INDEX>: Pass TPARMS_PRIMARY_TEMPLATE |
| 3184 |
as 'tmpl' to do_auto_deduction. |
| 3185 |
(do_auto_deduction): Document default arguments. Rename local |
| 3186 |
variable 'tmpl' to 'ctmpl'. Use 'tmpl' to obtain a full set of |
| 3187 |
template arguments for satisfaction in the adc_unify case. |
| 3188 |
|
| 3189 |
2023-04-01 Patrick Palka <[email protected]> |
| 3190 |
|
| 3191 |
PR c++/53164 |
| 3192 |
PR c++/105848 |
| 3193 |
* pt.cc (invalid_tparm_referent_p): Accept ADDR_EXPR of |
| 3194 |
FUNCTION_DECL. |
| 3195 |
(instantiate_class_template): Call mark_template_arguments_used. |
| 3196 |
(tsubst_copy_and_build) <case CALL_EXPR>: Revert r13-995 change. |
| 3197 |
(mark_template_arguments_used): Define. |
| 3198 |
(instantiate_body): Call mark_template_arguments_used. |
| 3199 |
|
| 3200 |
2023-04-01 Iain Sandoe <[email protected]> |
| 3201 |
|
| 3202 |
PR c++/101118 |
| 3203 |
* coroutines.cc (flatten_await_stmt): Use the current count of |
| 3204 |
promoted temporaries to build a unique name for the frame entries. |
| 3205 |
|
| 3206 |
2023-03-30 Jason Merrill <[email protected]> |
| 3207 |
|
| 3208 |
PR c++/105452 |
| 3209 |
* search.cc (type_context_for_name_lookup): New. |
| 3210 |
(accessible_p): Handle anonymous union. |
| 3211 |
* init.cc (maybe_instantiate_nsdmi_init): Use |
| 3212 |
type_context_for_name_lookup. |
| 3213 |
* parser.cc (cp_parser_class_specifier): Likewise. |
| 3214 |
* cp-tree.h (type_context_for_name_lookup): Declare. |
| 3215 |
|
| 3216 |
2023-03-30 Jason Merrill <[email protected]> |
| 3217 |
|
| 3218 |
PR c++/105221 |
| 3219 |
* pt.cc (unify) [FUNCTION_TYPE]: Handle function pointer |
| 3220 |
conversions. |
| 3221 |
|
| 3222 |
2023-03-30 Jakub Jelinek <[email protected]> |
| 3223 |
|
| 3224 |
PR c++/109319 |
| 3225 |
* decl2.cc (grok_array_decl): After emitting a pedwarn for |
| 3226 |
-Wcomma-subscript, if processing_template_decl set orig_index_exp |
| 3227 |
to compound expr from orig_index_exp_list. |
| 3228 |
|
| 3229 |
2023-03-30 Jason Merrill <[email protected]> |
| 3230 |
|
| 3231 |
PR c++/107897 |
| 3232 |
PR c++/108887 |
| 3233 |
* decl2.cc (record_mangling): Use symtab_node::reset. |
| 3234 |
|
| 3235 |
2023-03-30 Jakub Jelinek <[email protected]> |
| 3236 |
|
| 3237 |
PR c++/109278 |
| 3238 |
* call.cc (convert_like_internal): If pedwarn for extended float |
| 3239 |
type conversions doesn't report anything, avoid calling |
| 3240 |
maybe_inform_about_fndecl_for_bogus_argument_init. |
| 3241 |
|
| 3242 |
2023-03-29 Jason Merrill <[email protected]> |
| 3243 |
|
| 3244 |
PR c++/109321 |
| 3245 |
PR c++/109320 |
| 3246 |
* pt.cc (alias_ctad_tweaks): Rewrite deduced args. |
| 3247 |
(type_targs_deducible_from): Handle null pack deduction. |
| 3248 |
|
| 3249 |
2023-03-28 David Malcolm <[email protected]> |
| 3250 |
|
| 3251 |
PR c/107002 |
| 3252 |
* parser.cc (cp_parser_binary_expression): Update for new param of |
| 3253 |
check_for_xor_used_as_pow. |
| 3254 |
|
| 3255 |
2023-03-28 Jakub Jelinek <[email protected]> |
| 3256 |
|
| 3257 |
PR c++/109309 |
| 3258 |
* contracts.cc: Include intl.h. |
| 3259 |
(check_postcondition_result): Don't form diagnostics from two halves |
| 3260 |
of an English message to allow translations. |
| 3261 |
|
| 3262 |
2023-03-24 Patrick Palka <[email protected]> |
| 3263 |
|
| 3264 |
PR c++/106969 |
| 3265 |
* parser.cc (cp_parser_class_specifier): Clear current_class_ptr |
| 3266 |
and current_class_ref sooner, before parsing a class definition. |
| 3267 |
|
| 3268 |
2023-03-24 Jason Merrill <[email protected]> |
| 3269 |
|
| 3270 |
PR c++/105481 |
| 3271 |
* pt.cc (type_unification_real): Adjust for partial ordering. |
| 3272 |
|
| 3273 |
2023-03-23 Jason Merrill <[email protected]> |
| 3274 |
|
| 3275 |
PR c++/105996 |
| 3276 |
* typeck.cc (build_ptrmemfunc): Drop 0-offset optimization |
| 3277 |
and location wrappers. |
| 3278 |
|
| 3279 |
2023-03-23 Marek Polacek <[email protected]> |
| 3280 |
|
| 3281 |
PR c++/107532 |
| 3282 |
* call.cc (class_has_reference_member_p): New. |
| 3283 |
(class_has_reference_member_p_r): New. |
| 3284 |
(reference_like_class_p): Don't look for a specific constructor. |
| 3285 |
Use a DFS walk with class_has_reference_member_p_r. |
| 3286 |
|
| 3287 |
2023-03-23 Jason Merrill <[email protected]> |
| 3288 |
|
| 3289 |
PR c++/109241 |
| 3290 |
* pt.cc (find_parameter_packs_r): Handle null TREE_BINFO. |
| 3291 |
|
| 3292 |
2023-03-22 Jason Merrill <[email protected]> |
| 3293 |
|
| 3294 |
PR c++/108390 |
| 3295 |
* pt.cc (unify): Use fold of build_nop instead of fold_convert. |
| 3296 |
|
| 3297 |
2023-03-22 Jason Merrill <[email protected]> |
| 3298 |
|
| 3299 |
PR c++/108795 |
| 3300 |
* semantics.cc (finish_id_expression_1): Check scope before |
| 3301 |
returning id_expression. |
| 3302 |
|
| 3303 |
2023-03-22 Alex Coplan <[email protected]> |
| 3304 |
|
| 3305 |
PR c++/109177 |
| 3306 |
* call.cc (build_over_call): Use make_temp_override to suppress |
| 3307 |
both unavailable and deprecated warnings when calling |
| 3308 |
build_addr_func. |
| 3309 |
|
| 3310 |
2023-03-21 Jason Merrill <[email protected]> |
| 3311 |
|
| 3312 |
PR c++/106890 |
| 3313 |
* init.cc (maybe_instantiate_nsdmi_init): Don't leave |
| 3314 |
current_function_decl set to a constructor. |
| 3315 |
|
| 3316 |
2023-03-20 Marek Polacek <[email protected]> |
| 3317 |
|
| 3318 |
PR c++/109159 |
| 3319 |
* call.cc (add_template_candidate_real): Add explicit decls to the |
| 3320 |
set of candidates when the initializer is a braced-init-list. |
| 3321 |
|
| 3322 |
2023-03-20 Jakub Jelinek <[email protected]> |
| 3323 |
|
| 3324 |
PR c++/109164 |
| 3325 |
* cp-tree.h (var_needs_tls_wrapper): Declare. |
| 3326 |
* decl2.cc (var_needs_tls_wrapper): No longer static. |
| 3327 |
* decl.cc (cp_finish_decl): Clear TREE_READONLY on TLS variables |
| 3328 |
for which a TLS wrapper will be needed. |
| 3329 |
|
| 3330 |
2023-03-17 Jason Merrill <[email protected]> |
| 3331 |
|
| 3332 |
PR c++/108975 |
| 3333 |
* lambda.cc (prune_lambda_captures): Don't bother in a template. |
| 3334 |
|
| 3335 |
2023-03-17 Jason Merrill <[email protected]> |
| 3336 |
|
| 3337 |
PR c++/109172 |
| 3338 |
* except.cc (build_throw): Check dtor access. |
| 3339 |
|
| 3340 |
2023-03-17 Jason Merrill <[email protected]> |
| 3341 |
|
| 3342 |
PR c++/69410 |
| 3343 |
* friend.cc (do_friend): Handle namespace as scope argument. |
| 3344 |
* decl.cc (grokdeclarator): Pass down in_namespace. |
| 3345 |
|
| 3346 |
2023-03-16 Jason Merrill <[email protected]> |
| 3347 |
|
| 3348 |
PR c++/105809 |
| 3349 |
* init.cc (get_nsdmi): Split out... |
| 3350 |
(maybe_instantiate_nsdmi_init): ...this function. |
| 3351 |
* cp-tree.h: Declare it. |
| 3352 |
* pt.cc (tsubst_expr): Use it. |
| 3353 |
|
| 3354 |
2023-03-16 Jason Merrill <[email protected]> |
| 3355 |
|
| 3356 |
PR c++/108242 |
| 3357 |
* pt.cc (tsubst_expr) [TAG_DEFN]: Handle partial instantiation. |
| 3358 |
|
| 3359 |
2023-03-16 Jason Merrill <[email protected]> |
| 3360 |
|
| 3361 |
PR c++/101869 |
| 3362 |
* semantics.cc (finish_qualified_id_expr): Don't try to build a |
| 3363 |
pointer-to-member if the scope is an enumeration. |
| 3364 |
|
| 3365 |
2023-03-16 Patrick Palka <[email protected]> |
| 3366 |
|
| 3367 |
PR c++/109030 |
| 3368 |
* constexpr.cc (maybe_constant_init_1): For an unevaluated |
| 3369 |
non-manifestly-constant operand, don't constant evaluate |
| 3370 |
and instead call fold_to_constant as in maybe_constant_value. |
| 3371 |
|
| 3372 |
2023-03-16 Patrick Palka <[email protected]> |
| 3373 |
|
| 3374 |
PR c++/100288 |
| 3375 |
* constraint.cc (satisfaction_cache::get): Relax overly strict |
| 3376 |
checking assert in the constraint recursion case. |
| 3377 |
|
| 3378 |
2023-03-16 Jason Merrill <[email protected]> |
| 3379 |
|
| 3380 |
PR c++/105406 |
| 3381 |
* coroutines.cc (build_co_await): Handle lvalue 'o'. |
| 3382 |
|
| 3383 |
2023-03-15 Jason Merrill <[email protected]> |
| 3384 |
|
| 3385 |
PR c++/103871 |
| 3386 |
PR c++/98056 |
| 3387 |
* typeck.cc (cp_build_modify_expr): Allow array initialization of |
| 3388 |
DECL_ARTIFICIAL variable. |
| 3389 |
|
| 3390 |
2023-03-15 Marek Polacek <[email protected]> |
| 3391 |
|
| 3392 |
PR c++/107280 |
| 3393 |
* constexpr.cc (cxx_eval_store_expression): Strip location wrappers. |
| 3394 |
|
| 3395 |
2023-03-15 Jason Merrill <[email protected]> |
| 3396 |
|
| 3397 |
PR c++/58538 |
| 3398 |
* semantics.cc (check_template_template_default_arg): Check |
| 3399 |
maybe_get_template_decl_from_type_decl. |
| 3400 |
|
| 3401 |
2023-03-15 Jason Merrill <[email protected]> |
| 3402 |
|
| 3403 |
PR c++/108179 |
| 3404 |
PR c++/104107 |
| 3405 |
PR c++/95036 |
| 3406 |
* pt.cc (coerce_template_template_parms): Use args from |
| 3407 |
DECL_CONTEXT (arg_tmpl) instead of outer_args. |
| 3408 |
|
| 3409 |
2023-03-15 Jason Merrill <[email protected]> |
| 3410 |
|
| 3411 |
PR c++/108179 |
| 3412 |
* pt.cc (coerce_template_template_parms): Take the arg and parm |
| 3413 |
templates directly. |
| 3414 |
(coerce_template_template_parm): Adjust. |
| 3415 |
(template_template_parm_bindings_ok_p): Adjust. |
| 3416 |
(convert_template_argument): Adjust. |
| 3417 |
|
| 3418 |
2023-03-14 Patrick Palka <[email protected]> |
| 3419 |
|
| 3420 |
PR c++/96830 |
| 3421 |
* pt.cc (push_inline_template_parms_recursive): Set |
| 3422 |
TEMPLATE_PARMS_CONSTRAINTS. |
| 3423 |
(push_template_decl): For an out-of-line declaration, verify |
| 3424 |
constraints for each enclosing template scope match those of the |
| 3425 |
original template declaratation. |
| 3426 |
|
| 3427 |
2023-03-14 Patrick Palka <[email protected]> |
| 3428 |
|
| 3429 |
PR c++/96830 |
| 3430 |
* pt.cc (redeclare_class_template): Add missing "of" in |
| 3431 |
constraint mismatch diagnostic. |
| 3432 |
(tsubst_friend_class): For an already declared class template, |
| 3433 |
substitute and pass the friend declaration's constraints to |
| 3434 |
redeclare_class_template instead of passing the existing |
| 3435 |
template's constraints. |
| 3436 |
|
| 3437 |
2023-03-14 Jason Merrill <[email protected]> |
| 3438 |
|
| 3439 |
PR c++/108468 |
| 3440 |
* pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE |
| 3441 |
is non-null. |
| 3442 |
|
| 3443 |
2023-03-14 Jason Merrill <[email protected]> |
| 3444 |
|
| 3445 |
PR c++/107310 |
| 3446 |
* cp-gimplify.cc (genericize_if_stmt): Restore folding |
| 3447 |
of constant conditions. |
| 3448 |
|
| 3449 |
2023-03-14 Jakub Jelinek <[email protected]> |
| 3450 |
|
| 3451 |
PR c++/109096 |
| 3452 |
* tree.cc (record_has_unique_obj_representations): Ignore unnamed |
| 3453 |
bitfields. |
| 3454 |
|
| 3455 |
2023-03-13 Jason Merrill <[email protected]> |
| 3456 |
|
| 3457 |
PR c++/107128 |
| 3458 |
* parser.cc (cp_parser_set_decl_spec_type): Use |
| 3459 |
redefined_builtin_type for extended_float_type_p. |
| 3460 |
|
| 3461 |
2023-03-13 Marek Polacek <[email protected]> |
| 3462 |
|
| 3463 |
PR c++/107532 |
| 3464 |
* call.cc (reference_like_class_p): Check for std::span. |
| 3465 |
|
| 3466 |
2023-03-10 Jakub Jelinek <[email protected]> |
| 3467 |
|
| 3468 |
PR c++/107558 |
| 3469 |
* decl.cc (cp_finish_decl): Don't clear TREE_READONLY on |
| 3470 |
automatic non-aggregate variables just because of |
| 3471 |
-fmerge-all-constants. |
| 3472 |
|
| 3473 |
2023-03-10 Jakub Jelinek <[email protected]> |
| 3474 |
|
| 3475 |
PR c++/109039 |
| 3476 |
* class.cc (end_of_class): For bit-fields, instead of computing |
| 3477 |
offset as sum of byte_position (field) and DECL_SIZE_UNIT (field), |
| 3478 |
compute it as sum of bit_position (field) and DECL_SIZE (field) |
| 3479 |
divided by BITS_PER_UNIT rounded up. |
| 3480 |
|
| 3481 |
2023-03-10 Jason Merrill <[email protected]> |
| 3482 |
|
| 3483 |
PR c++/108972 |
| 3484 |
* lambda.cc (compare_lambda_template_head): Check more |
| 3485 |
for error_mark_node. |
| 3486 |
|
| 3487 |
2023-03-10 Jason Merrill <[email protected]> |
| 3488 |
|
| 3489 |
PR c++/108566 |
| 3490 |
* mangle.cc (anon_aggr_naming_decl): New. |
| 3491 |
(write_unqualified_name): Use it. |
| 3492 |
|
| 3493 |
2023-03-10 Jakub Jelinek <[email protected]> |
| 3494 |
|
| 3495 |
PR c/108079 |
| 3496 |
* decl.cc (poplevel): Suppress OPT_Wunused_variable warning |
| 3497 |
after diagnosing it. |
| 3498 |
|
| 3499 |
2023-03-10 Jason Merrill <[email protected]> |
| 3500 |
|
| 3501 |
PR c++/108099 |
| 3502 |
* decl.cc (grokdeclarator): Handle non-typedef typedef_decl. |
| 3503 |
|
| 3504 |
2023-03-10 Jason Merrill <[email protected]> |
| 3505 |
|
| 3506 |
PR c++/108542 |
| 3507 |
* class.cc (instantiate_type): Strip location wrapper. |
| 3508 |
|
| 3509 |
2023-03-09 Jason Merrill <[email protected]> |
| 3510 |
|
| 3511 |
PR c++/108773 |
| 3512 |
* init.cc (find_allocator_temps_r): New. |
| 3513 |
(combine_allocator_temps): Replace find_allocator_temp. |
| 3514 |
(build_vec_init): Adjust. |
| 3515 |
|
| 3516 |
2023-03-09 Jason Merrill <[email protected]> |
| 3517 |
|
| 3518 |
DR 2664 |
| 3519 |
PR c++/102529 |
| 3520 |
* pt.cc (alias_ctad_tweaks): Continue after deduction failure. |
| 3521 |
|
| 3522 |
2023-03-09 Jason Merrill <[email protected]> |
| 3523 |
Michael Spertus <[email protected]> |
| 3524 |
|
| 3525 |
PR c++/105841 |
| 3526 |
* pt.cc (corresponding_template_parameter_list): Split out... |
| 3527 |
(corresponding_template_parameter): ...from here. |
| 3528 |
(find_template_parameters): Factor out... |
| 3529 |
(find_template_parameter_info::find_in): ...this function. |
| 3530 |
(find_template_parameter_info::find_in_recursive): New. |
| 3531 |
(find_template_parameter_info::found): New. |
| 3532 |
(alias_ctad_tweaks): Only add parms used in the deduced args. |
| 3533 |
|
| 3534 |
2023-03-09 Jason Merrill <[email protected]> |
| 3535 |
|
| 3536 |
* cp-trait.def (IS_DEDUCIBLE): Add space to name. |
| 3537 |
|
| 3538 |
2023-03-09 Jason Merrill <[email protected]> |
| 3539 |
|
| 3540 |
PR c++/105841 |
| 3541 |
* cp-trait.def (IS_DEDUCIBLE): New. |
| 3542 |
* cxx-pretty-print.cc (pp_cxx_trait): Handle non-type. |
| 3543 |
* parser.cc (cp_parser_trait): Likewise. |
| 3544 |
* tree.cc (cp_tree_equal): Likewise. |
| 3545 |
* pt.cc (tsubst_copy_and_build): Likewise. |
| 3546 |
(type_targs_deducible_from): New. |
| 3547 |
(alias_ctad_tweaks): Use it. |
| 3548 |
* semantics.cc (trait_expr_value): Handle CPTK_IS_DEDUCIBLE. |
| 3549 |
(finish_trait_expr): Likewise. |
| 3550 |
* constraint.cc (diagnose_trait_expr): Likewise. |
| 3551 |
* cp-tree.h (type_targs_deducible_from): Declare. |
| 3552 |
|
| 3553 |
2023-03-07 Jason Merrill <[email protected]> |
| 3554 |
|
| 3555 |
PR c++/108526 |
| 3556 |
PR c++/106651 |
| 3557 |
* pt.cc (tsubst_function_decl): Don't replace the closure |
| 3558 |
parameter if DECL_STATIC_FUNCTION_P. |
| 3559 |
|
| 3560 |
2023-03-07 Marek Polacek <[email protected]> |
| 3561 |
|
| 3562 |
PR c++/107532 |
| 3563 |
* call.cc (reference_like_class_p): New. |
| 3564 |
(do_warn_dangling_reference): Add new bool parameter. See through |
| 3565 |
reference_like_class_p. |
| 3566 |
|
| 3567 |
2023-03-07 Jakub Jelinek <[email protected]> |
| 3568 |
|
| 3569 |
PR c++/109042 |
| 3570 |
* rtti.cc (emit_support_tinfo_1): Don't assert that last |
| 3571 |
unemitted_tinfo_decls element is tinfo, instead pop from it only in |
| 3572 |
that case. |
| 3573 |
* decl2.cc (c_parse_final_cleanups): Don't call emit_tinfo_decl |
| 3574 |
for unemitted_tinfO_decls which have already non-NULL DECL_INITIAL. |
| 3575 |
|
| 3576 |
2023-03-07 Marek Polacek <[email protected]> |
| 3577 |
|
| 3578 |
PR c++/109030 |
| 3579 |
* constexpr.cc (cxx_eval_call_expression): Relax assert. |
| 3580 |
|
| 3581 |
2023-03-07 Marek Polacek <[email protected]> |
| 3582 |
|
| 3583 |
PR c++/107939 |
| 3584 |
* constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: Pass |
| 3585 |
'any' when recursing on a VAR_DECL and not a pointer to function. |
| 3586 |
|
| 3587 |
2023-03-04 Jakub Jelinek <[email protected]> |
| 3588 |
|
| 3589 |
PR c++/108702 |
| 3590 |
* constexpr.cc: Include toplev.h. |
| 3591 |
(cxx_eval_constant_expression) <case DECL_EXPR>: When seeing a local |
| 3592 |
static initialized by constant expression outside of a constexpr |
| 3593 |
function which has been deferred by make_rtl_for_nonlocal_decl, |
| 3594 |
call rest_of_decl_compilation on it. |
| 3595 |
|
| 3596 |
2023-03-03 Patrick Palka <[email protected]> |
| 3597 |
|
| 3598 |
PR c++/108998 |
| 3599 |
* pt.cc (el_data::skipped_trees): New data member. |
| 3600 |
(extract_locals_r): Push to skipped_trees any unevaluated |
| 3601 |
contexts that we skipped over. |
| 3602 |
(extract_local_specs): For the second walk, start from each |
| 3603 |
tree in skipped_trees. |
| 3604 |
|
| 3605 |
2023-03-03 Alexandre Oliva <[email protected]> |
| 3606 |
|
| 3607 |
* typeck.cc (cp_build_binary_op): Suppress redundant warning |
| 3608 |
for pfn null test in pmfn test with vbit-in-delta. |
| 3609 |
|
| 3610 |
2023-03-02 Jakub Jelinek <[email protected]> |
| 3611 |
|
| 3612 |
PR target/108883 |
| 3613 |
* cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE |
| 3614 |
enumerators. |
| 3615 |
(fallback_dfloat32_type, fallback_dfloat64_type, |
| 3616 |
fallback_dfloat128_type): Remove. |
| 3617 |
* rtti.cc (emit_support_tinfo_1): If not emitted already, call |
| 3618 |
emit_tinfo_decl and remove from unemitted_tinfo_decls right away. |
| 3619 |
(emit_support_tinfos): Move &dfloat*_type_node from fundamentals array |
| 3620 |
into new fundamentals_with_fallback array. Call emit_support_tinfo_1 |
| 3621 |
on elements of that array too, with the difference that if |
| 3622 |
the type is NULL, use a fallback REAL_TYPE for it temporarily. |
| 3623 |
Drop the !targetm.decimal_float_supported_p () handling. Call |
| 3624 |
targetm.emit_support_tinfos at the end. |
| 3625 |
* mangle.cc (write_builtin_type): Remove references to |
| 3626 |
fallback_dfloat*_type. Handle bfloat16_type_node mangling. |
| 3627 |
|
| 3628 |
2023-03-02 Patrick Palka <[email protected]> |
| 3629 |
|
| 3630 |
PR c++/108243 |
| 3631 |
PR c++/97553 |
| 3632 |
* cp-gimplify.cc (cp_fully_fold): Add an internal overload that |
| 3633 |
additionally takes and propagate an mce_value parameter, and |
| 3634 |
define the existing public overload in terms of it. |
| 3635 |
(cp_fully_fold_init): Pass mce_false to cp_fully_fold. |
| 3636 |
|
| 3637 |
2023-03-02 Patrick Palka <[email protected]> |
| 3638 |
|
| 3639 |
PR c++/108243 |
| 3640 |
* constexpr.cc (maybe_constant_init_1): Override |
| 3641 |
manifestly_const_eval to true if is_static. |
| 3642 |
|
| 3643 |
2023-03-02 Jakub Jelinek <[email protected]> |
| 3644 |
|
| 3645 |
PR debug/108716 |
| 3646 |
* cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set |
| 3647 |
DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location |
| 3648 |
of USING_STMT or input_location. |
| 3649 |
|
| 3650 |
2023-03-02 Marek Polacek <[email protected]> |
| 3651 |
|
| 3652 |
PR c++/106259 |
| 3653 |
* parser.cc (class_decl_loc_t::diag_mismatched_tags): If the first |
| 3654 |
lookup of SPEC didn't find anything, try to look for |
| 3655 |
most_general_template. |
| 3656 |
|
| 3657 |
2023-03-02 Jakub Jelinek <[email protected]> |
| 3658 |
|
| 3659 |
PR c++/105839 |
| 3660 |
* parser.cc (cp_convert_omp_range_for): Allow in assert |
| 3661 |
decomp_first_name without DECL_HAS_VALUE_EXPR_P if it has |
| 3662 |
error_mark_node type. |
| 3663 |
(cp_finish_omp_range_for): Don't set DECL_HAS_VALUE_EXPR_P back |
| 3664 |
on decls which have error_mark_node type. |
| 3665 |
|
| 3666 |
2023-03-01 Marek Polacek <[email protected]> |
| 3667 |
|
| 3668 |
PR c++/107574 |
| 3669 |
* constexpr.cc (cxx_eval_constant_expression): Emit an error when |
| 3670 |
a PTRMEM_CST cannot be evaluated. |
| 3671 |
|
| 3672 |
2023-03-01 Patrick Palka <[email protected]> |
| 3673 |
|
| 3674 |
* pt.cc (tsubst_scope): Define. |
| 3675 |
(tsubst_decl) <case USING_DECL>: Call tsubst_scope instead of |
| 3676 |
calling tsubst_scope with tf_qualifying_scope set. |
| 3677 |
(tsubst_qualified_id): Call tsubst_scope instead of |
| 3678 |
calling tsubst with tf_qualifying_scope set. |
| 3679 |
(tsubst_copy): Immediately delegate to tsubst for all TYPE_P |
| 3680 |
trees. Remove tf_qualifying_scope manipulation. |
| 3681 |
<case SCOPE_REF>: Call tsubst_scope instead of calling |
| 3682 |
tsubst with tf_qualifying_scope set. |
| 3683 |
|
| 3684 |
2023-03-01 Patrick Palka <[email protected]> |
| 3685 |
Jason Merrill <[email protected]> |
| 3686 |
|
| 3687 |
PR c++/108219 |
| 3688 |
PR c++/108218 |
| 3689 |
* constexpr.cc (fold_to_constant): Define. |
| 3690 |
(maybe_constant_value): Move up early exit test for unevaluated |
| 3691 |
operands. Try reducing an unevaluated operand to a constant via |
| 3692 |
fold_to_constant. |
| 3693 |
(fold_non_dependent_expr_template): Add early exit test for |
| 3694 |
CONSTANT_CLASS_P nodes. Try reducing an unevaluated operand |
| 3695 |
to a constant via fold_to_constant. |
| 3696 |
* cp-tree.h (fold_to_constant): Declare. |
| 3697 |
|
| 3698 |
2023-03-01 Jakub Jelinek <[email protected]> |
| 3699 |
|
| 3700 |
PR c++/108606 |
| 3701 |
* constexpr.cc (potential_constant_expression_1) <case DECL_EXPR>: |
| 3702 |
Only recurse on DECL_INITIAL (tmp) if tmp is a VAR_DECL, otherwise |
| 3703 |
just return true. |
| 3704 |
|
| 3705 |
2023-02-28 Patrick Palka <[email protected]> |
| 3706 |
|
| 3707 |
PR c++/108848 |
| 3708 |
* pt.cc (finish_template_variable): Move dependence check |
| 3709 |
to here from ... |
| 3710 |
(lookup_and_finish_template_variable): ... here. |
| 3711 |
* semantics.cc (finish_id_expression_1): Call |
| 3712 |
finish_template_variable sooner, before (and regardless of) the |
| 3713 |
type_dependent_expression_p test. |
| 3714 |
|
| 3715 |
2023-02-28 Marek Polacek <[email protected]> |
| 3716 |
|
| 3717 |
PR c++/108550 |
| 3718 |
* pt.cc (lookup_and_finish_template_variable): Clear tf_partial. |
| 3719 |
|
| 3720 |
2023-02-20 Marek Polacek <[email protected]> |
| 3721 |
|
| 3722 |
PR c++/101073 |
| 3723 |
* constexpr.cc (cxx_eval_call_expression): Replace shortcutting trivial |
| 3724 |
constructor/op= with a checking assert. |
| 3725 |
|
| 3726 |
2023-02-20 Marek Polacek <[email protected]> |
| 3727 |
|
| 3728 |
PR c++/108829 |
| 3729 |
* pt.cc (prepend_one_capture): Set LAMBDA_CAPTURE_EXPLICIT_P. |
| 3730 |
(tsubst_lambda_expr): Pass LAMBDA_CAPTURE_EXPLICIT_P to |
| 3731 |
prepend_one_capture. |
| 3732 |
|
| 3733 |
2023-02-18 Jason Merrill <[email protected]> |
| 3734 |
|
| 3735 |
DR 2518 |
| 3736 |
PR c++/52809 |
| 3737 |
PR c++/53638 |
| 3738 |
PR c++/87389 |
| 3739 |
PR c++/89741 |
| 3740 |
PR c++/92099 |
| 3741 |
PR c++/104041 |
| 3742 |
PR c++/104691 |
| 3743 |
* semantics.cc (finish_static_assert): Don't diagnose in |
| 3744 |
template context. |
| 3745 |
|
| 3746 |
2023-02-17 Patrick Palka <[email protected]> |
| 3747 |
|
| 3748 |
PR c++/108243 |
| 3749 |
PR c++/97553 |
| 3750 |
* cp-gimplify.cc (enum fold_flags): Define. |
| 3751 |
(fold_flags_t): Declare. |
| 3752 |
(cp_fold_data::genericize): Replace this data member with ... |
| 3753 |
(cp_fold_data::fold_flags): ... this. |
| 3754 |
(cp_fold_r): Adjust use of cp_fold_data and calls to cp_fold. |
| 3755 |
(cp_fold_function): Likewise. |
| 3756 |
(cp_fold_maybe_rvalue): Add an internal overload that |
| 3757 |
additionally takes and propagates a fold_flags_t parameter, and |
| 3758 |
define the existing public overload in terms of it. |
| 3759 |
(cp_fold_rvalue): Likewise. |
| 3760 |
(cp_fully_fold_init): Adjust use of cp_fold_data. |
| 3761 |
(fold_cache): Replace with ... |
| 3762 |
(fold_caches): ... this 2-element array of caches. |
| 3763 |
(get_fold_cache): Define. |
| 3764 |
(clear_fold_cache): Adjust. |
| 3765 |
(cp_fold): Add fold_flags_t parameter. Use get_fold_cache. |
| 3766 |
Pass flags to calls to cp_fold, cp_fold_rvalue and |
| 3767 |
cp_fold_maybe_rvalue. |
| 3768 |
<case CALL_EXPR>: If ff_mce_false is set, fold |
| 3769 |
__builtin_is_constant_evaluated to false and pass mce_false to |
| 3770 |
maybe_constant_value. |
| 3771 |
|
| 3772 |
2023-02-17 Patrick Palka <[email protected]> |
| 3773 |
|
| 3774 |
* constexpr.cc (constexpr_call::manifestly_const_eval): Give |
| 3775 |
it type int instead of bool. |
| 3776 |
(constexpr_ctx::manifestly_const_eval): Give it type mce_value |
| 3777 |
instead of bool. |
| 3778 |
(cxx_eval_builtin_function_call): Adjust after making |
| 3779 |
manifestly_const_eval tri-state. |
| 3780 |
(cxx_eval_call_expression): Likewise. |
| 3781 |
(cxx_eval_binary_expression): Likewise. |
| 3782 |
(cxx_eval_conditional_expression): Likewise. |
| 3783 |
(cxx_eval_constant_expression): Likewise. |
| 3784 |
(cxx_eval_outermost_constant_expr): Likewise. |
| 3785 |
(cxx_constant_value): Likewise. |
| 3786 |
(cxx_constant_dtor): Likewise. |
| 3787 |
(maybe_constant_value): Give manifestly_const_eval parameter |
| 3788 |
type mce_value instead of bool and adjust accordingly. |
| 3789 |
(fold_non_dependent_expr_template): Adjust call |
| 3790 |
to cxx_eval_outermost_constant_expr. |
| 3791 |
(fold_non_dependent_expr): Likewise. |
| 3792 |
(maybe_constant_init_1): Likewise. |
| 3793 |
* constraint.cc (satisfy_atom): Adjust call to |
| 3794 |
maybe_constant_value. |
| 3795 |
* cp-tree.h (enum class mce_value): Define. |
| 3796 |
(maybe_constant_value): Adjust manifestly_const_eval parameter |
| 3797 |
type and default argument. |
| 3798 |
* decl.cc (compute_array_index_type_loc): Adjust call to |
| 3799 |
maybe_constant_value. |
| 3800 |
* pt.cc (convert_nontype_argument): Likewise. |
| 3801 |
|
| 3802 |
2023-02-16 Patrick Palka <[email protected]> |
| 3803 |
|
| 3804 |
PR c++/107773 |
| 3805 |
* cp-tree.h (enum tsubst_flags): New flag tf_qualifying_scope. |
| 3806 |
* decl.cc (make_typename_type): Use lookup_member instead of |
| 3807 |
lookup_field. If tf_qualifying_scope is set, pass want_type=true |
| 3808 |
instead of =false to lookup_member. Generalize format specifier |
| 3809 |
in diagnostic to handle both type and non-type bindings. |
| 3810 |
* pt.cc (tsubst_aggr_type_1): Clear tf_qualifying_scope. Tidy |
| 3811 |
the function. |
| 3812 |
(tsubst_decl) <case USING_DECL>: Set tf_qualifying_scope when |
| 3813 |
substituting USING_DECL_SCOPE. |
| 3814 |
(tsubst): Clear tf_qualifying_scope right away and remember if |
| 3815 |
it was set. Do the same for tf_tst_ok sooner. |
| 3816 |
<case TYPENAME_TYPE>: Set tf_qualifying_scope when substituting |
| 3817 |
TYPE_CONTEXT. Pass tf_qualifying_scope to make_typename_type |
| 3818 |
if it was set. |
| 3819 |
(tsubst_qualified_id): Set tf_qualifying_scope when substituting |
| 3820 |
the scope. |
| 3821 |
(tsubst_copy): Clear tf_qualifying_scope and remember if it was |
| 3822 |
set. |
| 3823 |
<case SCOPE_REF>: Set tf_qualifying_scope when substituting the |
| 3824 |
scope. |
| 3825 |
<case *_TYPE>: Pass tf_qualifying_scope to tsubst if it was set. |
| 3826 |
* search.cc (lookup_member): Document default argument. |
| 3827 |
|
| 3828 |
2023-02-16 Patrick Palka <[email protected]> |
| 3829 |
|
| 3830 |
* cp-tree.h: Mechanically drop static from static inline |
| 3831 |
functions via s/^static inline/inline/g. |
| 3832 |
|
| 3833 |
2023-02-15 Marek Polacek <[email protected]> |
| 3834 |
|
| 3835 |
PR c++/106675 |
| 3836 |
* call.cc (joust_maybe_elide_copy): Return false for ck_ambig. |
| 3837 |
|
| 3838 |
2023-02-10 Marek Polacek <[email protected]> |
| 3839 |
|
| 3840 |
PR c++/107079 |
| 3841 |
* call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init. |
| 3842 |
|
| 3843 |
2023-02-09 Tobias Burnus <[email protected]> |
| 3844 |
|
| 3845 |
* parser.cc (cp_parser_omp_allocate): Parse align |
| 3846 |
clause and check for restrictions. |
| 3847 |
|
| 3848 |
2023-02-09 Jakub Jelinek <[email protected]> |
| 3849 |
|
| 3850 |
PR c++/108698 |
| 3851 |
* mangle.cc (write_expression, write_template_arg): Handle |
| 3852 |
EXCESS_PRECISION_EXPR with REAL_CST operand as |
| 3853 |
write_template_arg_literal on fold_convert of the REAL_CST |
| 3854 |
to EXCESS_PRECISION_EXPR type. |
| 3855 |
|
| 3856 |
2023-02-06 Patrick Palka <[email protected]> |
| 3857 |
|
| 3858 |
PR c++/107461 |
| 3859 |
* cp-tree.h (call_expr_dependent_name): Declare. |
| 3860 |
* pt.cc (iterative_hash_template_arg) <case CALL_EXPR>: Use |
| 3861 |
call_expr_dependent_name instead of dependent_name. |
| 3862 |
* tree.cc (call_expr_dependent_name): Define. |
| 3863 |
(called_fns_equal): Adjust to take two CALL_EXPRs instead of |
| 3864 |
CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead |
| 3865 |
of dependent_name. |
| 3866 |
(cp_tree_equal) <case CALL_EXPR>: Adjust call to called_fns_equal. |
| 3867 |
|
| 3868 |
2023-02-03 Marek Polacek <[email protected]> |
| 3869 |
|
| 3870 |
PR c++/108158 |
| 3871 |
* constexpr.cc (cxx_eval_array_reference): Don't replace |
| 3872 |
new_ctx.object. |
| 3873 |
|
| 3874 |
2023-02-03 Patrick Palka <[email protected]> |
| 3875 |
|
| 3876 |
PR c++/107461 |
| 3877 |
* semantics.cc (finish_call_expr): Strip ADDR_EXPR from |
| 3878 |
the selected callee during overload set pruning. |
| 3879 |
|
| 3880 |
2023-02-03 Patrick Palka <[email protected]> |
| 3881 |
|
| 3882 |
PR c++/96745 |
| 3883 |
* class.cc (check_methods): Diagnose an unviable OVERLOAD |
| 3884 |
set for CLASSTYPE_DESTRUCTOR differently from an ambiguous one. |
| 3885 |
Then prune the OVERLOAD to a single function. |
| 3886 |
(check_bases_and_members): Handle CLASSTYPE_DESTRUCTOR being |
| 3887 |
an OVERLOAD when calling deduce_noexcept_on_destructor. |
| 3888 |
Document why it has to be called before check_methods. |
| 3889 |
|
| 3890 |
2023-02-03 Patrick Palka <[email protected]> |
| 3891 |
|
| 3892 |
PR c++/108579 |
| 3893 |
* class.cc (check_methods): Swap order of constraints_satisfied_p |
| 3894 |
and copy/move_fn_p tests. |
| 3895 |
|
| 3896 |
2023-02-01 Marek Polacek <[email protected]> |
| 3897 |
|
| 3898 |
PR c++/107755 |
| 3899 |
* call.cc (build_new_op): Don't call warn_logical_operator when |
| 3900 |
processing a template. |
| 3901 |
|
| 3902 |
2023-02-01 Jakub Jelinek <[email protected]> |
| 3903 |
|
| 3904 |
PR c++/108607 |
| 3905 |
* constexpr.cc (cxx_eval_constant_expression): Handle OMP_* |
| 3906 |
and OACC_* constructs as non-constant. |
| 3907 |
(potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE. |
| 3908 |
|
| 3909 |
2023-02-01 Jason Merrill <[email protected]> |
| 3910 |
|
| 3911 |
* class.cc (note_name_declared_in_class): Change from permerror to |
| 3912 |
-Wchanges-meaning pedwarn, forcing -pedantic-errors for most cases. |
| 3913 |
|
| 3914 |
2023-01-31 Jason Merrill <[email protected]> |
| 3915 |
|
| 3916 |
PR c++/108559 |
| 3917 |
* cp-gimplify.cc (any_non_eliding_target_exprs): New. |
| 3918 |
(cp_genericize_init): Check it. |
| 3919 |
|
| 3920 |
2023-01-31 Marek Polacek <[email protected]> |
| 3921 |
|
| 3922 |
PR c++/107593 |
| 3923 |
PR c++/108597 |
| 3924 |
* cp-tree.h (instantiation_dependent_expression_p): Don't |
| 3925 |
declare here. |
| 3926 |
|
| 3927 |
2023-01-26 Marek Polacek <[email protected]> |
| 3928 |
|
| 3929 |
PR c++/105300 |
| 3930 |
* parser.cc: Remove unnecessary forward declarations. |
| 3931 |
(cp_parser_string_literal): New wrapper. |
| 3932 |
(cp_parser_string_literal_common): Renamed from |
| 3933 |
cp_parser_string_literal. Add a bool parameter. Give an error when |
| 3934 |
UDLs are not permitted. |
| 3935 |
(cp_parser_userdef_string_literal): New wrapper. |
| 3936 |
(finish_userdef_string_literal): Renamed from |
| 3937 |
cp_parser_userdef_string_literal. |
| 3938 |
(cp_parser_primary_expression): Call cp_parser_userdef_string_literal |
| 3939 |
instead of cp_parser_string_literal. |
| 3940 |
(cp_parser_linkage_specification): Move a variable declaration closer |
| 3941 |
to its first use. |
| 3942 |
(cp_parser_static_assert): Likewise. |
| 3943 |
(cp_parser_operator): Call cp_parser_userdef_string_literal instead of |
| 3944 |
cp_parser_string_literal. |
| 3945 |
(cp_parser_asm_definition): Move a variable declaration closer to its |
| 3946 |
first use. |
| 3947 |
(cp_parser_asm_specification_opt): Move variable declarations closer to |
| 3948 |
their first use. |
| 3949 |
(cp_parser_asm_operand_list): Likewise. |
| 3950 |
(cp_parser_asm_clobber_list): Likewise. |
| 3951 |
|
| 3952 |
2023-01-26 Jakub Jelinek <[email protected]> |
| 3953 |
|
| 3954 |
PR c++/108503 |
| 3955 |
* parser.cc (cp_convert_omp_range_for): If cp_finish_decomp has been |
| 3956 |
called in !processing_template_decl with processing_template_decl |
| 3957 |
temporarily set, clear DECL_HAS_VALUE_EXPR_P on the vars temporarily. |
| 3958 |
(cp_finish_omp_range_for): And set it back again here. |
| 3959 |
|
| 3960 |
2023-01-25 Jakub Jelinek <[email protected]> |
| 3961 |
|
| 3962 |
PR c++/108525 |
| 3963 |
* mangle.cc (write_closure_type_name): Don't assume all |
| 3964 |
lambda operator() fns are methods. |
| 3965 |
|
| 3966 |
2023-01-24 Jason Merrill <[email protected]> |
| 3967 |
|
| 3968 |
PR c++/108504 |
| 3969 |
* parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for first |
| 3970 |
token, too. |
| 3971 |
|
| 3972 |
2023-01-24 Jason Merrill <[email protected]> |
| 3973 |
|
| 3974 |
PR c++/108526 |
| 3975 |
* pt.cc (tsubst_function_decl): Handle static lambda. |
| 3976 |
|
| 3977 |
2023-01-24 Jakub Jelinek <[email protected]> |
| 3978 |
|
| 3979 |
PR c++/108474 |
| 3980 |
* cp-gimplify.cc (cp_fold_r): Revert 2023-01-19 changes. |
| 3981 |
|
| 3982 |
2023-01-24 Jason Merrill <[email protected]> |
| 3983 |
|
| 3984 |
PR c++/107303 |
| 3985 |
PR c++/107329 |
| 3986 |
* cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: In case of double |
| 3987 |
TARGET_EXPR, keep the outer one instead of the inner one. |
| 3988 |
(maybe_replace_decl): New. |
| 3989 |
|
| 3990 |
2023-01-23 Jason Merrill <[email protected]> |
| 3991 |
|
| 3992 |
PR c++/107267 |
| 3993 |
* cp-gimplify.cc (cp_gimplify_init_expr): Allow unexpected elision |
| 3994 |
of trivial types. |
| 3995 |
|
| 3996 |
2023-01-23 Marek Polacek <[email protected]> |
| 3997 |
|
| 3998 |
PR c++/107797 |
| 3999 |
* cvt.cc (ocp_convert): copy_warning when creating a new |
| 4000 |
COMPOUND_EXPR. |
| 4001 |
* init.cc (build_new_1): Suppress -Wunused-value on |
| 4002 |
compiler-generated COMPOUND_EXPRs. |
| 4003 |
|
| 4004 |
2023-01-23 Jason Merrill <[email protected]> |
| 4005 |
|
| 4006 |
PR c++/108195 |
| 4007 |
* call.cc (build_user_type_conversion_1): Check whether the |
| 4008 |
iterators also find a list ctor. |
| 4009 |
|
| 4010 |
2023-01-23 Jason Merrill <[email protected]> |
| 4011 |
|
| 4012 |
PR c++/108496 |
| 4013 |
* decl.cc (grokdeclarator): Check whether DECL_RESULT is already |
| 4014 |
set. |
| 4015 |
|
| 4016 |
2023-01-23 Jason Merrill <[email protected]> |
| 4017 |
|
| 4018 |
PR c++/53288 |
| 4019 |
DR 1299 |
| 4020 |
* call.cc (extend_ref_init_temps_1): Handle ptrmem expression. |
| 4021 |
|
| 4022 |
2023-01-19 Jakub Jelinek <[email protected]> |
| 4023 |
|
| 4024 |
PR c++/108437 |
| 4025 |
* cp-tree.h (keep_unused_object_arg): Declare. |
| 4026 |
* call.cc (keep_unused_object_arg): No longer static. |
| 4027 |
* tree.cc (build_min_non_dep_op_overload): Handle ARRAY_REF |
| 4028 |
with overload being static member function. |
| 4029 |
|
| 4030 |
2023-01-19 Jakub Jelinek <[email protected]> |
| 4031 |
|
| 4032 |
PR c++/53932 |
| 4033 |
* cp-gimplify.cc (cp_fold_r): During cp_fully_fold_init replace |
| 4034 |
DECL_ANON_UNION_VAR_P VAR_DECLs with their corresponding |
| 4035 |
DECL_VALUE_EXPR. |
| 4036 |
|
| 4037 |
2023-01-16 Jakub Jelinek <[email protected]> |
| 4038 |
|
| 4039 |
PR c++/105593 |
| 4040 |
* decl.cc (cp_finish_decl): Check warning_enabled_at |
| 4041 |
at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead |
| 4042 |
of warn_init_self. |
| 4043 |
|
| 4044 |
2023-01-14 Jakub Jelinek <[email protected]> |
| 4045 |
|
| 4046 |
PR c++/108365 |
| 4047 |
* typeck.cc (cp_build_binary_op): Use may_shorten_divmod for integral |
| 4048 |
division or modulo. |
| 4049 |
|
| 4050 |
2023-01-13 Jakub Jelinek <[email protected]> |
| 4051 |
|
| 4052 |
PR c++/108285 |
| 4053 |
* cvt.cc (cp_convert_and_check): For EXCESS_PRECISION_EXPR |
| 4054 |
use its operand except that for warning purposes use the original |
| 4055 |
EXCESS_PRECISION_EXPR. |
| 4056 |
* call.cc (convert_like_internal): Only look through |
| 4057 |
EXCESS_PRECISION_EXPR when calling cp_convert, not when calling |
| 4058 |
cp_convert_and_check. |
| 4059 |
|
| 4060 |
2023-01-09 Jakub Jelinek <[email protected]> |
| 4061 |
|
| 4062 |
PR c++/105838 |
| 4063 |
PR c++/108047 |
| 4064 |
PR c++/108266 |
| 4065 |
* call.cc (maybe_init_list_as_range): Always return NULL_TREE if |
| 4066 |
processing_template_decl. |
| 4067 |
|
| 4068 |
2023-01-05 Patrick Palka <[email protected]> |
| 4069 |
|
| 4070 |
PR c++/108275 |
| 4071 |
* parser.cc (cp_parser_class_head): Use dk_deferred instead of |
| 4072 |
dk_no_check when parsing the class name. |
| 4073 |
|
| 4074 |
2023-01-05 Jakub Jelinek <[email protected]> |
| 4075 |
|
| 4076 |
PR c++/108286 |
| 4077 |
* semantics.cc (finish_omp_target_clauses): Ignore clauses other than |
| 4078 |
OMP_CLAUSE_MAP. |
| 4079 |
|
| 4080 |
2023-01-04 Patrick Palka <[email protected]> |
| 4081 |
|
| 4082 |
PR c++/108282 |
| 4083 |
* decl2.cc (mark_single_function): Ignore mark_used failure |
| 4084 |
only in a non-SFINAE context rather than in a SFINAE one. |
| 4085 |
|
| 4086 |
2023-01-04 Jakub Jelinek <[email protected]> |
| 4087 |
|
| 4088 |
PR c++/108206 |
| 4089 |
* decl.cc (merge_default_template_args): Return false if either |
| 4090 |
new_parm or old_parm are erroneous. |
| 4091 |
|
| 4092 |
Copyright (C) 2023 Free Software Foundation, Inc. |
| 4093 |
|
| 4094 |
Copying and distribution of this file, with or without modification, |
| 4095 |
are permitted in any medium without royalty provided the copyright |
| 4096 |
notice and this notice are preserved. |