]>
Commit | Line | Data |
---|---|---|
1667962a GA |
1 | 2024-04-12 Marek Polacek <polacek@redhat.com> |
2 | ||
3 | PR c++/109966 | |
4 | * typeck2.cc (potential_prvalue_result_of): Remove. | |
5 | (replace_placeholders_for_class_temp_r): Check TARGET_EXPR_ELIDING_P. | |
6 | Use a pset. Don't replace_placeholders in TARGET_EXPRs that initialize | |
7 | a function argument. | |
8 | ||
9 | 2024-04-12 Patrick Palka <ppalka@redhat.com> | |
10 | ||
11 | PR c++/99426 | |
12 | * module.cc (merge_kind::MK_local_type): New enumerator. | |
13 | (merge_kind_name): Update. | |
14 | (trees_out::chained_decls): Move BLOCK-specific handling | |
15 | of DECL_LOCAL_DECL_P decls to ... | |
16 | (trees_out::core_vals) <case BLOCK>: ... here. Stream | |
17 | BLOCK_VARS manually. | |
18 | (trees_in::core_vals) <case BLOCK>: Stream BLOCK_VARS | |
19 | manually. Handle deduplicated local types.. | |
20 | (trees_out::key_local_type): Define. | |
21 | (trees_in::key_local_type): Define. | |
22 | (trees_out::get_merge_kind) <case FUNCTION_DECL>: Return | |
23 | MK_local_type for a local type. | |
24 | (trees_out::key_mergeable) <case FUNCTION_DECL>: Use | |
25 | key_local_type. | |
26 | (trees_in::key_mergeable) <case FUNCTION_DECL>: Likewise. | |
27 | (trees_in::is_matching_decl): Be flexible with type mismatches | |
28 | for local entities. | |
29 | (trees_in::register_duplicate): Also register the | |
30 | DECL_TEMPLATE_RESULT of a TEMPLATE_DECL as a duplicate. | |
31 | (depset_cmp): Return 0 for equal IDENTIFIER_HASH_VALUEs. | |
32 | ||
33 | 2024-04-12 Jason Merrill <jason@redhat.com> | |
34 | Patrick Palka <ppalka@redhat.com> | |
35 | ||
36 | PR c++/113141 | |
37 | * call.cc (reference_binding): For an invalid cast, warn and don't | |
38 | recalculate. | |
39 | ||
40 | 2024-04-12 Jason Merrill <jason@redhat.com> | |
41 | Patrick Palka <ppalka@redhat.com> | |
42 | ||
43 | DR 1996 | |
44 | PR c++/113141 | |
45 | * call.cc (reference_binding): Check direct binding from | |
46 | a single-element list. | |
47 | ||
48 | 2024-04-12 Jakub Jelinek <jakub@redhat.com> | |
49 | ||
50 | PR c++/114691 | |
51 | * semantics.cc (simplify_loop_decl_cond): Use cp_build_unary_op with | |
52 | TRUTH_NOT_EXPR on ANNOTATE_EXPR argument (if any) rather than | |
53 | ANNOTATE_EXPR itself. | |
54 | ||
55 | 2024-04-12 Patrick Palka <ppalka@redhat.com> | |
56 | ||
57 | PR c++/114393 | |
58 | * pt.cc (tsubst_lambda_expr): Also defer all dependent | |
59 | substitution. | |
60 | ||
61 | 2024-04-12 Jakub Jelinek <jakub@redhat.com> | |
62 | ||
63 | PR c++/114426 | |
64 | * constexpr.cc (is_valid_constexpr_fn): Return false/diagnose with | |
65 | complain destructors in classes with virtual bases. | |
66 | ||
67 | 2024-04-12 Patrick Palka <ppalka@redhat.com> | |
68 | ||
69 | PR c++/114393 | |
70 | PR c++/107457 | |
71 | PR c++/93595 | |
72 | * cp-tree.h (LAMBDA_EXPR_EXTRA_ARGS): Define. | |
73 | (tree_lambda_expr::extra_args): New field. | |
74 | * module.cc (trees_out::core_vals) <case LAMBDA_EXPR>: Stream | |
75 | LAMBDA_EXPR_EXTRA_ARGS. | |
76 | (trees_in::core_vals) <case LAMBDA_EXPR>: Likewise. | |
77 | * pt.cc (has_extra_args_mechanism_p): Return true for LAMBDA_EXPR. | |
78 | (tree_extra_args): Handle LAMBDA_EXPR. | |
79 | (tsubst_lambda_expr): Use LAMBDA_EXPR_EXTRA_ARGS to defer templated | |
80 | substitution into a lambda-expr if we lost the template context. | |
81 | Add sanity check for error_mark_node result from begin_lambda_type. | |
82 | ||
d1a21a6f GA |
83 | 2024-04-11 Patrick Palka <ppalka@redhat.com> |
84 | ||
85 | PR c++/114303 | |
86 | * constraint.cc (tsubst_requires_expr): Clear | |
87 | REQUIRES_EXPR_EXTRA_ARGS before calling build_extra_args. | |
88 | * pt.cc (tree_extra_args): Define. | |
89 | (extract_locals_r): Assert *_EXTRA_ARGS is empty. | |
90 | (tsubst_stmt) <case IF_STMT>: Clear IF_SCOPE on the new | |
91 | IF_STMT. Call build_extra_args on the new IF_STMT instead | |
92 | of t which might already have IF_STMT_EXTRA_ARGS. | |
93 | ||
94 | 2024-04-11 Jakub Jelinek <jakub@redhat.com> | |
95 | ||
96 | PR c++/114409 | |
97 | * pt.cc (tsubst_expr) <case ANNOTATE_EXPR>: Move to ... | |
98 | (tsubst_stmt) <case ANNOTATE_EXPR>: ... here. Use tsubst_expr | |
99 | instead of RECUR for the last 2 arguments. | |
100 | ||
0f3e76ee GA |
101 | 2024-04-10 Jakub Jelinek <jakub@redhat.com> |
102 | ||
103 | PR c++/114462 | |
104 | * semantics.cc: Implement C++26 P2809R3 - Trivial infinite | |
105 | loops are not Undefined Behavior. | |
106 | (maybe_warn_for_constant_evaluated): Add trivial_infinite argument | |
107 | and emit special diagnostics for that case. | |
108 | (finish_if_stmt_cond): Adjust caller. | |
109 | (finish_loop_cond): New function. | |
110 | (finish_while_stmt): Use it. | |
111 | (finish_do_stmt): Likewise. | |
112 | (finish_for_stmt): Likewise. | |
113 | ||
114 | 2024-04-10 Nathaniel Shead <nathanieloshead@gmail.com> | |
115 | ||
116 | PR c++/104040 | |
117 | * semantics.cc (expand_or_defer_fn_1): Keep DECL_SAVED_TREE for | |
118 | all vague linkage cdtors with modules. | |
119 | ||
120 | 2024-04-10 Nathaniel Shead <nathanieloshead@gmail.com> | |
121 | ||
122 | PR c++/99377 | |
123 | * module.cc (trees_in::install_entity): Overwrite entity map | |
124 | index if installing from a partition. | |
125 | ||
0753ae15 GA |
126 | 2024-04-09 Jakub Jelinek <jakub@redhat.com> |
127 | ||
128 | PR c++/114580 | |
129 | * semantics.cc (finish_if_stmt_cond): Call | |
130 | maybe_warn_for_constant_evaluated with IF_STMT_CONSTEXPR_P (if_stmt) | |
131 | as the second argument, rather than true/false depending on if | |
132 | it is if constexpr with non-dependent constant expression with | |
133 | bool type. | |
134 | ||
135 | 2024-04-09 Jakub Jelinek <jakub@redhat.com> | |
136 | ||
137 | * constexpr.cc (build_new_constexpr_heap_type): Fix duplicated words | |
138 | in comment; is is -> is. | |
139 | * cp-tree.def (CO_RETURN_EXPR): Fix duplicated words in comment; | |
140 | for for -> for. | |
141 | * parser.cc (fixup_blocks_walker): Fix duplicated words in comment; | |
142 | is is -> is. | |
143 | * semantics.cc (fixup_template_type): Fix duplicated words in comment; | |
144 | for for -> for. | |
145 | (finish_omp_for): Fix duplicated words in comment; the the -> the. | |
146 | * pt.cc (more_specialized_fn): Fix duplicated words in comment; | |
147 | think think -> think. | |
148 | (type_targs_deducible_from): Fix duplicated words in comment; the the | |
149 | -> the. | |
150 | ||
1a96eb0a GA |
151 | 2024-04-05 Marek Polacek <polacek@redhat.com> |
152 | ||
153 | PR c++/111132 | |
154 | * constexpr.cc (get_function_named_in_call): Use | |
155 | cp_get_fndecl_from_callee. | |
156 | * cvt.cc (cp_get_fndecl_from_callee): If there's a | |
157 | DECL_LOCAL_DECL_ALIAS, use it. | |
158 | ||
159 | 2024-04-05 Jakub Jelinek <jakub@redhat.com> | |
160 | ||
161 | PR c++/114572 | |
162 | * cp-gimplify.cc (cxx_omp_clause_apply_fn): Call build_cplus_new | |
163 | on build_call_a result if it has class type. | |
164 | ||
5192e72e GA |
165 | 2024-04-04 centurion <centurion009@proton.me> |
166 | ||
167 | PR c++/114377 | |
168 | * pt.cc (find_template_parameter_info::found): Use TREE_TYPE for | |
169 | TEMPLATE_DECL instead of DECL_INITIAL. | |
170 | ||
a1e6798a GA |
171 | 2024-04-02 Marek Polacek <polacek@redhat.com> |
172 | ||
173 | PR c++/114479 | |
174 | * semantics.cc (trait_expr_value) <case CPTK_IS_ARRAY>: Return false | |
175 | for zero-sized arrays. | |
176 | ||
177 | 2024-04-02 Marek Polacek <polacek@redhat.com> | |
178 | ||
179 | PR c++/103825 | |
180 | * typeck.cc (is_bitfield_expr_with_lowered_type): Handle | |
181 | CLEANUP_POINT_EXPR. | |
182 | ||
183 | 2024-04-02 Jason Merrill <jason@redhat.com> | |
184 | ||
185 | PR c++/114561 | |
186 | PR c++/114562 | |
187 | * call.cc (convert_like_internal): Avoid adding qualification | |
188 | conversion in direct reference binding. | |
189 | ||
0454eec3 GA |
190 | 2024-04-01 Jason Merrill <jason@redhat.com> |
191 | ||
192 | * typeck.cc (maybe_warn_about_returning_address_of_local): | |
193 | Permerror in C++26. | |
194 | ||
63e6ec53 GA |
195 | 2024-03-28 Jason Merrill <jason@redhat.com> |
196 | ||
197 | PR c++/100667 | |
198 | * semantics.cc (same_type_ref_bind_p): New. | |
199 | (finish_trait_expr): Use it. | |
200 | ||
4b8e7b57 GA |
201 | 2024-03-26 Jakub Jelinek <jakub@redhat.com> |
202 | ||
203 | PR c++/112724 | |
204 | * error.cc (dump_expr): Handle EXCESS_PRECISION_EXPR like NOP_EXPR. | |
205 | ||
7e6cdec4 GA |
206 | 2024-03-25 Marek Polacek <polacek@redhat.com> |
207 | ||
208 | PR c++/114349 | |
209 | * name-lookup.cc (maybe_push_to_top_level): For a non-lambda, | |
210 | don't push to top level if decl_function_context is non-null. | |
211 | * pt.cc (maybe_instantiate_noexcept): Use maybe_push_to_top_level. | |
212 | ||
213 | 2024-03-25 Marek Polacek <polacek@redhat.com> | |
214 | ||
215 | PR c++/114439 | |
216 | * init.cc (can_init_array_with_p): Return true for a VEC_INIT_EXPR | |
217 | wrapped in a TARGET_EXPR. | |
218 | ||
e8985864 GA |
219 | 2024-03-22 Marek Polacek <polacek@redhat.com> |
220 | ||
221 | PR c++/59465 | |
222 | * init.cc (can_init_array_with_p): New. | |
223 | (perform_member_init): Check it. | |
224 | ||
44b79ab6 GA |
225 | 2024-03-21 Marek Polacek <polacek@redhat.com> |
226 | ||
227 | PR c++/110323 | |
228 | * decl2.cc (min_vis_expr_r) <case VAR_DECL>: Do nothing for | |
229 | decl_constant_var_p VAR_DECLs. | |
230 | ||
af376184 GA |
231 | 2024-03-20 Jakub Jelinek <jakub@redhat.com> |
232 | ||
233 | * coroutines.cc (expand_one_await_expression): Use | |
234 | integer_zero_node instead of build_int_cst (integer_type_node, 0) | |
235 | and integer_one_node instead of build_int_cst (integer_type_node, 1). | |
236 | ||
cc606a91 GA |
237 | 2024-03-19 Nathaniel Shead <nathanieloshead@gmail.com> |
238 | ||
239 | * cp-tree.h (module_maybe_has_cmi_p): New function. | |
240 | * decl.cc (grokfndecl): Mark block-scope functions as public if | |
241 | they could be visible in other TUs. | |
242 | * decl2.cc (no_linkage_error): Don't error for declarations that | |
243 | could be defined in other TUs since C++20. Suppress duplicate | |
244 | errors from 'check_global_declaration'. | |
245 | * tree.cc (no_linkage_check): In relaxed mode, don't consider | |
246 | types in a module CMI to have no linkage. | |
247 | ||
b5490afe GA |
248 | 2024-03-16 Nathaniel Shead <nathanieloshead@gmail.com> |
249 | ||
250 | PR c++/112631 | |
251 | * cp-tree.h (named_module_attach_p): New function. | |
252 | * decl.cc (start_decl): Check for attachment not purview. | |
253 | (grokmethod): Likewise. | |
254 | ||
c1f6690b GA |
255 | 2024-03-14 Chung-Lin Tang <cltang@baylibre.com> |
256 | ||
257 | * parser.cc (cp_parser_oacc_data_clause): Add parsing support for | |
258 | 'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier | |
259 | found, update comments. | |
260 | (cp_parser_oacc_cache): Add parsing support for 'readonly' modifier, | |
261 | set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update | |
262 | comments. | |
263 | ||
f6d9426b GA |
264 | 2024-03-12 Nathaniel Shead <nathanieloshead@gmail.com> |
265 | ||
266 | PR c++/98645 | |
267 | PR c++/98688 | |
268 | PR c++/111224 | |
269 | * module.cc (enum tree_tag): Add new tag for builtin types. | |
270 | (trees_out::start): POLY_INT_CSTs can be emitted. | |
271 | (trees_in::start): Likewise. | |
272 | (trees_out::core_vals): Stream POLY_INT_CSTs. | |
273 | (trees_in::core_vals): Likewise. | |
274 | (trees_out::type_node): Handle vectors with multiple coeffs. | |
275 | (trees_in::tree_node): Likewise. | |
276 | (init_modules): Register target-specific builtin types. Bump | |
277 | initial capacity slightly. | |
278 | ||
c775a030 GA |
279 | 2024-03-08 Jakub Jelinek <jakub@redhat.com> |
280 | ||
281 | * pt.cc (tsubst_expr): Handle MEM_REF. | |
282 | ||
283 | 2024-03-08 Jakub Jelinek <jakub@redhat.com> | |
284 | ||
285 | PR debug/113918 | |
286 | * cp-objcp-common.cc (cp_type_dwarf_attribute): Return 1 | |
287 | for DW_AT_export_symbols on anonymous structs or unions. | |
288 | ||
289 | 2024-03-08 Jakub Jelinek <jakub@redhat.com> | |
290 | ||
291 | PR c++/113802 | |
292 | * parser.cc (cp_parser_parameter_declaration): Move the xobj_param_p | |
293 | pack diagnostics after ellipsis handling and if an error is reported, | |
294 | pretend this specifier didn't appear. Formatting fix. | |
295 | ||
1e74c758 GA |
296 | 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com> |
297 | ||
298 | PR c++/114229 | |
299 | * module.cc (trees_out::core_bools): Redetermine | |
300 | DECL_INTERFACE_KNOWN on stream-in for vtables and tinfo. | |
301 | * decl2.cc (import_export_decl): Add fixme for ABI changes with | |
302 | module vtables and tinfo. | |
303 | ||
304 | 2024-03-07 Patrick Palka <ppalka@redhat.com> | |
305 | ||
306 | PR c++/103994 | |
307 | * cp-tree.h (add_mergeable_specialization): Remove second | |
308 | parameter. | |
309 | * module.cc (depset::disc_bits::DB_ALIAS_TMPL_INST_BIT): Remove. | |
310 | (depset::disc_bits::DB_ALIAS_SPEC_BIT): Remove. | |
311 | (depset::is_alias_tmpl_inst): Remove. | |
312 | (depset::is_alias): Remove. | |
313 | (merge_kind::MK_tmpl_alias_mask): Remove. | |
314 | (merge_kind::MK_alias_spec): Remove. | |
315 | (merge_kind_name): Remove entries for alias specializations. | |
316 | (trees_out::core_vals) <case TEMPLATE_DECL>: Adjust after | |
317 | removing is_alias_tmpl_inst. | |
318 | (trees_in::decl_value): Adjust add_mergeable_specialization | |
319 | calls. | |
320 | (trees_out::get_merge_kind) <case depset::EK_SPECIALIZATION>: | |
321 | Use MK_decl_spec for alias template specializations. | |
322 | (trees_out::key_mergeable): Simplify after MK_tmpl_alias_mask | |
323 | removal. | |
324 | (depset::hash::make_dependency): Adjust after removing | |
325 | DB_ALIAS_TMPL_INST_BIT. | |
326 | (specialization_add): Don't allow alias templates when !decl_p. | |
327 | (depset::hash::add_specializations): Remove now-dead code | |
328 | accomodating alias template specializations in the type table. | |
329 | * pt.cc (lookup_template_class): Dispatch early to | |
330 | instantiate_alias_template for alias templates. Simplify | |
331 | accordingly. | |
332 | (add_mergeable_specialization): Remove alias_p parameter and | |
333 | simplify accordingly. | |
334 | ||
335 | 2024-03-07 Patrick Palka <ppalka@redhat.com> | |
336 | ||
337 | PR c++/110730 | |
338 | PR c++/105512 | |
339 | * module.cc (module_state::write_namespaces): Stream the | |
340 | abi_tag attribute of an inline namespace. | |
341 | (module_state::read_namespaces): Likewise. | |
342 | ||
343 | 2024-03-07 Marek Polacek <polacek@redhat.com> | |
344 | ||
345 | PR c++/110031 | |
346 | * pt.cc (lookup_and_finish_template_variable): Pass complain to | |
347 | mark_used. | |
348 | ||
349 | 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com> | |
350 | ||
351 | PR c++/98356 | |
352 | * typeck2.cc (cxx_incomplete_type_diagnostic): Don't assume | |
353 | 'member' will be a FUNCTION_DECL (or something like it). | |
354 | ||
355 | 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com> | |
356 | ||
357 | PR c++/98881 | |
358 | * module.cc (trees_out::tpl_parms_fini): Stream out DECL_CONTEXT | |
359 | for template template parameters. | |
360 | (trees_in::tpl_parms_fini): Read it. | |
361 | ||
8b483cd5 GA |
362 | 2024-03-06 Marek Polacek <polacek@redhat.com> |
363 | ||
364 | PR c++/114114 | |
365 | * pt.cc (maybe_instantiate_noexcept): Save/restore | |
366 | cp_unevaluated_operand, c_inhibit_evaluation_warnings, and | |
367 | cp_noexcept_operand around the tsubst_expr call. | |
368 | ||
369 | 2024-03-06 Nathaniel Shead <nathanieloshead@gmail.com> | |
370 | ||
371 | PR c++/113629 | |
372 | * pt.cc (type_unification_real): Only use DEDUCE_CONV for the | |
373 | return type of a conversion function. | |
374 | ||
375 | 2024-03-06 Patrick Palka <ppalka@redhat.com> | |
376 | ||
377 | * module.cc (trees_out::get_merge_kind) <case depset::EK_DECL>: | |
378 | Accomodate class-scope DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P | |
379 | TEMPLATE_DECL. Consolidate IDENTIFIER_ANON_P cases. | |
380 | ||
214dadf3 GA |
381 | 2024-03-05 Patrick Palka <ppalka@redhat.com> |
382 | ||
383 | * parser.cc (cp_parser_translation_unit): Relax GMF contents | |
384 | error into a pedwarn. | |
385 | ||
264e3ad4 GA |
386 | 2024-03-04 Nathaniel Shead <nathanieloshead@gmail.com> |
387 | ||
388 | * name-lookup.cc (walk_module_binding): Remove completed FIXME. | |
389 | (do_nonmember_using_decl): Mark redeclared entities as exported | |
390 | when needed. Check for re-exporting internal linkage types. | |
391 | ||
306a4c32 GA |
392 | 2024-03-01 Patrick Palka <ppalka@redhat.com> |
393 | ||
394 | PR c++/104919 | |
395 | PR c++/106009 | |
396 | * module.cc (depset::hash::sneakoscope): Remove. | |
397 | (trees_out::decl_node): Always add a dependency on a local type. | |
398 | (depset::hash::find_dependencies): Remove sneakoscope stuff. | |
399 | ||
400 | 2024-03-01 Nathaniel Shead <nathanieloshead@gmail.com> | |
401 | ||
402 | PR c++/114170 | |
403 | * module.cc (has_definition): Fall back to DECL_INITIALIZED_P | |
404 | when DECL_INITIAL is not set on a template. | |
405 | (module_state::write_inits): Only increment count when | |
406 | initializers are actually written. | |
407 | ||
408 | 2024-03-01 Nathaniel Shead <nathanieloshead@gmail.com> | |
409 | ||
410 | PR c++/114005 | |
411 | * init.cc (create_temporary_var): Use current_scope instead of | |
412 | current_function_decl. | |
413 | ||
414 | 2024-03-01 Patrick Palka <ppalka@redhat.com> | |
415 | ||
416 | * decl.cc (maybe_register_incomplete_var): Restrict second | |
417 | branch to static data members from a not-yet-complete class. | |
418 | ||
419 | 2024-03-01 Marek Polacek <polacek@redhat.com> | |
420 | ||
421 | PR c++/110358 | |
422 | PR c++/109642 | |
423 | * call.cc (no_dangling_p): New. | |
424 | (reference_like_class_p): Use it. | |
425 | (do_warn_dangling_reference): Use it. Don't warn when the function | |
426 | or its enclosing class has attribute gnu::no_dangling. | |
427 | * tree.cc (cxx_gnu_attributes): Add gnu::no_dangling. | |
428 | (handle_no_dangling_attribute): New. | |
429 | ||
430 | 2024-03-01 Patrick Palka <ppalka@redhat.com> | |
431 | ||
432 | PR c++/110025 | |
433 | PR c++/114138 | |
434 | * cp-tree.h (make_cast_auto): Declare. | |
435 | * parser.cc (cp_parser_functional_cast): If the type is an auto, | |
436 | replace it with a level-less one via make_cast_auto. | |
437 | * pt.cc (find_parameter_packs_r): Don't treat level-less auto | |
438 | as a type parameter pack. | |
439 | (tsubst) <case TEMPLATE_TYPE_PARM>: Generalize CTAD placeholder | |
440 | auto handling to all level-less autos. | |
441 | (make_cast_auto): Define. | |
442 | (do_auto_deduction): Handle replacement of a level-less auto. | |
443 | ||
444 | 2024-03-01 Jakub Jelinek <jakub@redhat.com> | |
445 | ||
446 | PR c++/92687 | |
447 | * decl.cc (lookup_decomp_type): Return NULL_TREE if decomp_type_table | |
448 | doesn't have entry for V. | |
449 | * semantics.cc (finish_decltype_type): If ptds.saved, assert | |
450 | DECL_HAS_VALUE_EXPR_P is true and decide on tuple vs. non-tuple based | |
451 | on if lookup_decomp_type is NULL or not. | |
452 | ||
b05f474c GA |
453 | 2024-02-29 Marek Polacek <polacek@redhat.com> |
454 | ||
455 | PR c++/113987 | |
456 | * call.cc (conv_binds_to_reference_parm_p): New. | |
457 | * cp-tree.h (conv_binds_to_reference_parm_p): Declare. | |
458 | * init.cc (find_uninit_fields_r): Call it. | |
459 | ||
460 | 2024-02-29 Nathaniel Shead <nathanieloshead@gmail.com> | |
461 | ||
462 | PR c++/111710 | |
463 | * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Remove tree checking. | |
464 | (struct lang_decl_base): Update comments and fix whitespace. | |
465 | * module.cc (trees_out::lang_decl_bools): Always write | |
466 | module_keyed_decls_p flag... | |
467 | (trees_in::lang_decl_bools): ...and always read it. | |
468 | (trees_out::decl_value): Handle all kinds of keyed decls. | |
469 | (trees_in::decl_value): Likewise. | |
470 | (trees_in::tree_value): Deduplicate LAMBDA_EXPRs. | |
471 | (maybe_key_decl): Also support lambdas attached to fields, | |
472 | parameters, and types. Key lambdas attached to fields to their | |
473 | class. | |
474 | (trees_out::get_merge_kind): Likewise. | |
475 | (trees_out::key_mergeable): Likewise. | |
476 | (trees_in::key_mergeable): Support keyed decls in a TYPE_DECL | |
477 | container. | |
478 | * parser.cc (cp_parser_class_head): Start a lambda scope when | |
479 | parsing base classes. | |
480 | ||
fd52355a GA |
481 | 2024-02-28 Jakub Jelinek <jakub@redhat.com> |
482 | Patrick Palka <ppalka@redhat.com> | |
483 | ||
484 | PR c++/113976 | |
485 | * decl.cc (grokdeclarator): Don't call cp_apply_type_quals_to_decl | |
486 | on DECL_TEMPLATE_INSTANTIATED VAR_DECLs. | |
487 | ||
488 | 2024-02-28 Nathaniel Shead <nathanieloshead@gmail.com> | |
489 | ||
490 | PR c++/113970 | |
491 | PR c++/114013 | |
492 | * decl.cc (make_rtl_for_nonlocal_decl): Don't defer inline | |
493 | variables. | |
494 | ||
4d9da419 GA |
495 | 2024-02-23 Jakub Jelinek <jakub@redhat.com> |
496 | ||
497 | PR c++/113083 | |
498 | * cp-gimplify.cc (cp_fold): For targetm.cxx.cdtor_returns_this () | |
499 | wrap r into a COMPOUND_EXPR and return folded CALL_EXPR_ARG (x, 0). | |
500 | ||
52490278 GA |
501 | 2024-02-19 Patrick Palka <ppalka@redhat.com> |
502 | ||
503 | PR c++/113966 | |
504 | * constraint.cc (tsubst_compound_requirement): Don't check | |
505 | the noexcept condition or the return-type-requirement when | |
506 | partially substituting. | |
507 | ||
c1d15713 GA |
508 | 2024-02-17 Marek Polacek <polacek@redhat.com> |
509 | ||
510 | PR c++/113158 | |
511 | * search.cc (maybe_check_overriding_exception_spec): Defer checking | |
512 | when a noexcept couldn't be instantiated & evaluated to false/true. | |
513 | ||
d70f155b GA |
514 | 2024-02-16 Marek Polacek <polacek@redhat.com> |
515 | ||
516 | DR 1351 | |
517 | * search.cc (maybe_check_overriding_exception_spec): Don't error about | |
518 | a looser exception specification if the overrider is deleted. | |
519 | ||
520 | 2024-02-16 Marek Polacek <polacek@redhat.com> | |
521 | ||
522 | PR c++/113789 | |
523 | PR c++/113853 | |
524 | * typeck.cc (treat_lvalue_as_rvalue_p): Update code to better | |
525 | reflect [expr.prim.id.unqual]#4.2. | |
526 | ||
527 | 2024-02-16 Jakub Jelinek <jakub@redhat.com> | |
528 | ||
529 | PR c++/113929 | |
530 | * parser.cc (cp_parser_parameter_declaration): Diagnose this specifier | |
531 | on template parameter declaration. | |
532 | ||
533 | 2024-02-16 Patrick Palka <ppalka@redhat.com> | |
534 | ||
535 | * module.cc (trees_out::core_bools): Stream TREE_UNAVAILABLE. | |
536 | (trees_in::core_bools): Likewise. | |
537 | (trees_out::core_vals): Stream LAMBDA_EXPR_REGEN_INFO. | |
538 | (trees_in::core_vals): Likewise. | |
539 | ||
5266f930 GA |
540 | 2024-02-14 Nathaniel Shead <nathanieloshead@gmail.com> |
541 | ||
542 | PR c++/113708 | |
543 | * decl.cc (make_rtl_for_nonlocal_decl): Defer inline variables. | |
544 | * decl2.cc (import_export_decl): Support inline variables. | |
545 | ||
546 | 2024-02-14 Patrick Palka <ppalka@redhat.com> | |
547 | ||
548 | PR c++/113908 | |
549 | PR c++/113332 | |
550 | * method.cc (synthesized_method_walk): Use maybe_push_to_top_level. | |
551 | ||
552 | 2024-02-14 Nathaniel Shead <nathanieloshead@gmail.com> | |
553 | ||
554 | PR c++/99573 | |
555 | * decl.cc (start_enum): Reorder check for redeclaring in module. | |
556 | Add missing auto_diagnostic_groups. | |
557 | ||
df6c57ce GA |
558 | 2024-02-13 Marek Polacek <polacek@redhat.com> |
559 | ||
560 | DR 1693 | |
561 | PR c++/113760 | |
562 | * parser.cc (cp_parser_member_declaration): Only pedwarn about an extra | |
563 | semicolon in C++98. | |
564 | ||
565 | 2024-02-13 Tobias Burnus <tburnus@baylibre.com> | |
566 | ||
567 | PR middle-end/113904 | |
568 | * parser.cc (cp_parser_omp_context_selector): Handle splitting of | |
569 | OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR. | |
570 | ||
571 | 2024-02-13 Patrick Palka <ppalka@redhat.com> | |
572 | ||
573 | * Make-lang.in (CFLAGS-cp/module.o): Add $(ZLIBINC). | |
574 | * module.cc: Include <zlib.h>. | |
575 | (bytes::calc_crc): Use crc32 from zlib. | |
576 | (bytes_out::set_crc): Use crc32_combine from zlib. | |
577 | ||
578 | 2024-02-13 Patrick Palka <ppalka@redhat.com> | |
579 | ||
580 | * module.cc (depset::hash::add_specializations): Use | |
581 | STRIP_TEMPLATE consistently. | |
582 | (get_originating_module_decl): Handle class-scope CONST_DECL. | |
583 | ||
584 | 2024-02-13 Patrick Palka <ppalka@redhat.com> | |
585 | ||
586 | * lambda.cc (lambda_function): Call get_class_binding_direct | |
587 | instead of lookup_member to sidestep lazy loading. | |
588 | * name-lookup.cc (check_local_shadow): Punt if we're in a | |
589 | function context that's not actual parsing. | |
590 | ||
591 | 2024-02-13 Jason Merrill <jason@redhat.com> | |
592 | ||
593 | PR c++/113612 | |
594 | * pt.cc (process_partial_specialization): Return early | |
595 | on redeclaration. | |
596 | ||
597 | 2024-02-13 Marek Polacek <polacek@redhat.com> | |
598 | ||
599 | PR c++/112436 | |
600 | * except.cc (expand_start_catch_block): Pass tf_warning_or_error to | |
601 | is_admissible_throw_operand_or_catch_parameter. | |
602 | (build_throw): Pass complain to | |
603 | is_admissible_throw_operand_or_catch_parameter. | |
604 | (complete_ptr_ref_or_void_ptr_p): Add a tsubst_flags_t parameter. Use | |
605 | it. Return bool. Call complete_type_or_maybe_complain instead of | |
606 | complete_type_or_else. | |
607 | (is_admissible_throw_operand_or_catch_parameter): Add a tsubst_flags_t | |
608 | parameter. Use it. Guard error calls. | |
609 | ||
610 | 2024-02-13 Alex Coplan <alex.coplan@arm.com> | |
611 | ||
612 | PR c++/113658 | |
613 | * cp-objcp-common.cc (cp_feature_table): Remove entry for | |
614 | cxx_constexpr_string_builtins. | |
615 | ||
bf074ee4 GA |
616 | 2024-02-12 Marek Polacek <polacek@redhat.com> |
617 | ||
618 | PR c++/113545 | |
619 | * constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce | |
620 | to an INTEGER_CST, consider it non-constant. | |
621 | ||
67d5b10e GA |
622 | 2024-02-10 Marek Polacek <polacek@redhat.com> |
623 | ||
624 | DR 2237 | |
625 | PR c++/107126 | |
626 | PR c++/97202 | |
627 | * parser.cc (cp_parser_unqualified_id): Downgrade the DR2237 error to | |
628 | a pedwarn. | |
629 | (cp_parser_constructor_declarator_p): Likewise. | |
630 | ||
631 | 2024-02-10 Jakub Jelinek <jakub@redhat.com> | |
632 | ||
633 | * tree.cc (debug_binfo): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld" | |
634 | and casts to long. | |
635 | * pt.cc (print_template_statistics): Use HOST_SIZE_T_PRINT_DEC | |
636 | and casts to fmt_size_t instead of "%ld" and casts to long. | |
637 | * class.cc (dump_class_hierarchy_1): Use HOST_WIDE_INT_PRINT_UNSIGNED | |
638 | instead of "%lu" and casts to unsigned long. For TYPE_ALIGN, use | |
639 | %u instead of %lu and drop casts to unsigned long. | |
640 | * parser.cc (cp_lexer_peek_nth_token): Use HOST_SIZE_T_PRINT_DEC | |
641 | and casts to fmt_size_t instead of "%ld" and casts to long. | |
642 | ||
2523654a GA |
643 | 2024-02-09 Marek Polacek <polacek@redhat.com> |
644 | ||
645 | PR c++/113834 | |
646 | * semantics.cc (finish_type_pack_element): Perform range checking | |
647 | before tree_to_shwi. | |
648 | ||
649 | 2024-02-09 Marek Polacek <polacek@redhat.com> | |
650 | ||
651 | PR c++/98388 | |
652 | * coroutines.cc (coro_rewrite_function_body): Pass tf_warning_or_error | |
653 | to build_throw. | |
654 | (morph_fn_to_coro): Likewise. | |
655 | * cp-tree.h (build_throw): Adjust. | |
656 | * except.cc (expand_end_catch_block): Pass tf_warning_or_error to | |
657 | build_throw. | |
658 | (build_throw): Add a tsubst_flags_t parameter. Use it. Remove | |
659 | redundant variable. Guard an inform call. | |
660 | * parser.cc (cp_parser_throw_expression): Pass tf_warning_or_error | |
661 | to build_throw. | |
662 | * pt.cc (tsubst_expr) <case THROW_EXPR>: Pass complain to build_throw. | |
663 | ||
664 | 2024-02-09 Patrick Palka <ppalka@redhat.com> | |
665 | ||
666 | PR c++/112580 | |
667 | * module.cc (trees_in::read_class_def): When streaming in | |
668 | an anonymous union field of an as-base class, don't overwrite | |
669 | ANON_AGGR_TYPE_FIELD. | |
670 | ||
90586e27 GA |
671 | 2024-02-08 Patrick Palka <ppalka@redhat.com> |
672 | ||
673 | PR c++/113649 | |
674 | * pt.cc (do_class_deduction): Add outer_targs parameter. | |
675 | Substitute outer arguments into the CTAD template. | |
676 | (do_auto_deduction): Pass outer_targs to do_class_deduction. | |
677 | ||
678 | 2024-02-08 Jason Merrill <jason@redhat.com> | |
679 | ||
680 | * pt.cc (create_template_parm_object): Pass TARGET_EXPR to | |
681 | cxx_constant_value. | |
682 | ||
3e4c4c5e GA |
683 | 2024-02-06 Jakub Jelinek <jakub@redhat.com> |
684 | ||
685 | PR c++/113788 | |
686 | * parser.cc (CP_PARSER_FLAGS_PARAMETER): New enumerator. | |
687 | (cp_parser_decl_specifier_seq): Parse RID_THIS only if | |
688 | CP_PARSER_FLAGS_PARAMETER is set in flags. | |
689 | (cp_parser_parameter_declaration): Or in CP_PARSER_FLAGS_PARAMETER | |
690 | when calling cp_parser_decl_specifier_seq. | |
691 | ||
692 | 2024-02-06 Marek Polacek <polacek@redhat.com> | |
693 | ||
694 | * method.cc (early_check_defaulted_comparison): Add | |
695 | auto_diagnostic_group. | |
696 | ||
697 | 2024-02-06 Jason Merrill <jason@redhat.com> | |
698 | ||
699 | PR c++/107291 | |
700 | * method.cc (early_check_defaulted_comparison): Fail if not friend. | |
701 | ||
1c9ddaae GA |
702 | 2024-02-05 Jason Merrill <jason@redhat.com> |
703 | ||
704 | PR c++/111286 | |
705 | * tree.cc (rvalue): Don't drop cv-quals from an array. | |
706 | ||
4b7d4d8a GA |
707 | 2024-02-03 Patrick Palka <ppalka@redhat.com> |
708 | ||
709 | PR c++/110006 | |
710 | PR c++/112769 | |
711 | * constraint.cc (subst_info::quiet): Accomodate non-diagnostic | |
712 | tsubst flags. | |
713 | (tsubst_valid_expression_requirement): Likewise. | |
714 | (tsubst_simple_requirement): Return a substituted _REQ node when | |
715 | processing_template_decl. | |
716 | (tsubst_type_requirement_1): Accomodate non-diagnostic tsubst | |
717 | flags. | |
718 | (tsubst_type_requirement): Return a substituted _REQ node when | |
719 | processing_template_decl. | |
720 | (tsubst_compound_requirement): Likewise. Accomodate non-diagnostic | |
721 | tsubst flags. | |
722 | (tsubst_nested_requirement): Likewise. | |
723 | (tsubst_requires_expr): Don't defer partial substitution when | |
724 | processing_constraint_expression_p is true, in which case return | |
725 | a substituted REQUIRES_EXPR. | |
726 | * pt.cc (tsubst_expr) <case REQUIRES_EXPR>: Accomodate | |
727 | non-diagnostic tsubst flags. | |
728 | ||
729 | 2024-02-02 Jason Merrill <jason@redhat.com> | |
730 | ||
731 | PR c++/110084 | |
732 | * pt.cc (tsubst_function_decl): Only check a function defaulted | |
733 | outside the class if the class is complete. | |
734 | ||
735 | 2024-02-02 Jason Merrill <jason@redhat.com> | |
736 | ||
737 | PR c++/112439 | |
738 | * constexpr.cc (cxx_eval_store_expression): Check empty_base | |
739 | before marking a CONSTRUCTOR readonly. | |
740 | ||
741 | 2024-02-02 Jason Merrill <jason@redhat.com> | |
742 | ||
743 | PR c++/113638 | |
744 | * cp-tree.h: Adjust comment. | |
745 | * pt.cc (instantiate_template): Set VAR_HAD_UNKNOWN_BOUND for | |
746 | variable template. | |
747 | ||
e2554540 GA |
748 | 2024-02-01 Marek Polacek <polacek@redhat.com> |
749 | ||
750 | * call.cc (reference_like_class_p): Consider even non-templates for | |
751 | std::span-like classes. | |
752 | ||
753 | 2024-02-01 Patrick Palka <ppalka@redhat.com> | |
754 | ||
755 | PR c++/112737 | |
756 | * pt.cc (iterative_hash_template_arg) <case TEMPLATE_DECL>: | |
757 | Adjust hashing to match cp_tree_equal. | |
758 | (ctp_hasher::hash): Also hash CLASS_PLACEHOLDER_TEMPLATE. | |
759 | * tree.cc (cp_tree_equal) <case TEMPLATE_DECL>: Return true | |
760 | for ttp TEMPLATE_DECLs if their TEMPLATE_TEMPLATE_PARMs are | |
761 | equivalent. | |
762 | * typeck.cc (structural_comptypes) <case TEMPLATE_TYPE_PARM>: | |
763 | Use cp_tree_equal to compare CLASS_PLACEHOLDER_TEMPLATE. | |
764 | ||
765 | 2024-02-01 Marek Polacek <polacek@redhat.com> | |
766 | ||
767 | PR c++/112437 | |
768 | * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespace in | |
769 | the move on throw of parms loop. | |
770 | ||
097ddd55 GA |
771 | 2024-01-30 Marek Polacek <polacek@redhat.com> |
772 | ||
773 | PR c++/110358 | |
774 | PR c++/109640 | |
775 | * call.cc (reference_like_class_p): Don't warn for std::span-like | |
776 | classes. | |
777 | ||
778 | 2024-01-30 Patrick Palka <ppalka@redhat.com> | |
779 | ||
780 | PR c++/113640 | |
781 | * call.cc (keep_unused_object_arg): Punt for an xobj member | |
782 | function. | |
783 | ||
784 | 2024-01-30 Patrick Palka <ppalka@redhat.com> | |
785 | ||
786 | PR c++/113644 | |
787 | * pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type. | |
788 | ||
789 | 2024-01-30 Nathaniel Shead <nathanieloshead@gmail.com> | |
790 | ||
791 | PR c++/107594 | |
792 | * module.cc (get_module): Bail on empty name. | |
793 | ||
f0706819 GA |
794 | 2024-01-29 Jason Merrill <jason@redhat.com> |
795 | ||
796 | PR c++/113544 | |
797 | * pt.cc (instantiate_class_template): Don't partially instantiate. | |
798 | (tsubst_stmt): Likewise. | |
799 | ||
ce9dae56 GA |
800 | 2024-01-26 Nathaniel Shead <nathanieloshead@gmail.com> |
801 | ||
802 | PR c++/113580 | |
803 | * module.cc (struct post_process_data): Create. | |
804 | (trees_in::post_decls): Use. | |
805 | (trees_in::post_process): Return entire vector at once. | |
806 | Change overload to take post_process_data instead of tree. | |
807 | (trees_out::write_function_def): Write needed flags from | |
808 | DECL_STRUCT_FUNCTION. | |
809 | (trees_in::read_function_def): Read them and pass to | |
810 | post_process. | |
811 | (module_state::read_cluster): Write flags into cfun. | |
812 | ||
813 | 2024-01-26 Nathaniel Shead <nathanieloshead@gmail.com> | |
814 | ||
815 | PR c++/112899 | |
816 | * cp-tree.h (note_variable_template_instantiation): Rename to... | |
817 | (note_vague_linkage_variable): ...this. | |
818 | * decl2.cc (note_variable_template_instantiation): Rename to... | |
819 | (note_vague_linkage_variable): ...this. | |
820 | * pt.cc (instantiate_decl): Rename usage of above function. | |
821 | * module.cc (trees_in::read_var_def): Remember pending statics | |
822 | that we stream in. | |
823 | ||
f22a7ae8 GA |
824 | 2024-01-25 Jakub Jelinek <jakub@redhat.com> |
825 | ||
826 | PR c++/113599 | |
827 | * typeck2.cc (build_m_component_ref): Use convert instead of | |
828 | cp_convert for pointer conversion. | |
829 | ||
830 | 2024-01-25 Jason Merrill <jason@redhat.com> | |
831 | ||
832 | PR c++/113598 | |
833 | * init.cc (build_vec_init): Don't use {} for PMF. | |
834 | ||
835 | 2024-01-25 Jason Merrill <jason@redhat.com> | |
836 | ||
837 | PR c++/109227 | |
838 | * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup. | |
839 | (build_actor_fn, process_conditional, maybe_promote_temps) | |
840 | (morph_fn_to_coro): Likewise. | |
841 | (expand_one_await_expression): Use build_cleanup. | |
842 | ||
843 | 2024-01-25 Nathaniel Shead <nathanieloshead@gmail.com> | |
844 | ||
845 | PR c++/113405 | |
846 | * module.cc (set_defining_module): Track partial specialisations | |
847 | for all declarations. | |
848 | ||
849 | 2024-01-25 Nathaniel Shead <nathanieloshead@gmail.com> | |
850 | ||
851 | PR c++/100707 | |
852 | * name-lookup.cc (add_imported_namespace): Don't mark namespaces | |
853 | as imported. | |
854 | ||
2a9637b2 GA |
855 | 2024-01-24 Patrick Palka <ppalka@redhat.com> |
856 | ||
857 | PR c++/113529 | |
858 | * call.cc (add_operator_candidates): Propagate error_mark_node | |
859 | result after recursing to find rewritten candidates. | |
860 | ||
3128786c GA |
861 | 2024-01-23 Marek Polacek <polacek@redhat.com> |
862 | ||
863 | PR c++/113256 | |
864 | PR c++/111607 | |
865 | PR c++/109640 | |
866 | * call.cc (do_warn_dangling_reference): Don't warn if the temporary | |
867 | is of lambda type. | |
868 | ||
869 | 2024-01-23 Nathaniel Shead <nathanieloshead@gmail.com> | |
870 | ||
871 | PR c++/112820 | |
872 | PR c++/102607 | |
873 | * module.cc (trees_out::lang_type_bools): Write interface_only | |
874 | and interface_unknown. | |
875 | (trees_in::lang_type_bools): Read the above flags. | |
876 | (trees_in::decl_value): Reset CLASSTYPE_INTERFACE_* except for | |
877 | extern templates. | |
878 | (trees_in::read_class_def): Remove buggy extern template | |
879 | handling. | |
880 | ||
c2544854 GA |
881 | 2024-01-19 Jason Merrill <jason@redhat.com> |
882 | ||
883 | PR c++/113498 | |
884 | * pt.cc (decl_template_info): New fn. | |
885 | (get_template_info): Use it. | |
886 | ||
887 | 2024-01-19 Jason Merrill <jason@redhat.com> | |
888 | ||
889 | PR c++/112632 | |
890 | PR c++/112594 | |
891 | PR c++/111357 | |
892 | PR c++/104594 | |
893 | PR c++/67898 | |
894 | * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New. | |
895 | * pt.cc (expand_integer_pack): Remove 111357 workaround. | |
896 | (maybe_convert_nontype_argument): Add force parm. | |
897 | (convert_template_argument): Handle alias template args | |
898 | specially. | |
899 | (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG. | |
900 | * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype. | |
901 | ||
bb0f96ab GA |
902 | 2024-01-18 Marek Polacek <polacek@redhat.com> |
903 | ||
904 | PR c++/113389 | |
905 | * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to | |
906 | NULL_TREE when emitting an error. | |
907 | ||
2c213ac9 GA |
908 | 2024-01-17 Nathaniel Shead <nathanieloshead@gmail.com> |
909 | ||
910 | PR c++/112588 | |
911 | * module.cc (trees_in::read_function_def): Don't overwrite | |
912 | arguments. | |
913 | ||
914 | 2024-01-17 Patrick Palka <ppalka@redhat.com> | |
915 | ||
916 | PR c++/113242 | |
917 | PR c++/99493 | |
918 | * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress | |
919 | DECL_ARTIFICIAL rejection test for class NTTP objects. | |
920 | ||
1a177974 GA |
921 | 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com> |
922 | ||
923 | PR c++/113292 | |
924 | * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT. | |
925 | (c_parse_final_cleanups): Suppress warning for no definition of | |
926 | TLS wrapper functions in header modules. | |
927 | * module.cc (trees_out::lang_decl_vals): Write wrapped variable | |
928 | for TLS wrapper functions. | |
929 | (trees_in::lang_decl_vals): Read it. | |
930 | (trees_out::decl_value): Write TLS model for thread-local vars. | |
931 | (trees_in::decl_value): Read it for new decls. Remember to emit | |
932 | definitions of TLS wrapper functions later. | |
933 | ||
934 | 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com> | |
935 | ||
936 | * name-lookup.h (enum scope_kind): Add 'sk_count'. | |
937 | * name-lookup.cc (cp_binding_level_descriptor): Add missing | |
938 | scope kinds. Add assertion that the list is up to date. Fix | |
939 | handling of explicit_spec_p. | |
940 | ||
941 | 2024-01-16 Marek Polacek <polacek@redhat.com> | |
942 | ||
943 | * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic | |
944 | messages. | |
945 | ||
946 | 2024-01-16 Marek Polacek <polacek@redhat.com> | |
947 | ||
948 | PR c++/113340 | |
949 | * decl.cc (grokdeclarator) <case cdk_function>: Clear | |
950 | is_xobj_member_function in case of an error. | |
951 | ||
952 | 2024-01-16 waffl3x <waffl3x@protonmail.com> | |
953 | ||
954 | PR c++/113307 | |
955 | * parser.cc (cp_parser_parameter_declaration): Reject packs | |
956 | on xobj params. | |
957 | ||
be035ec4 GA |
958 | 2024-01-15 Marek Polacek <polacek@redhat.com> |
959 | ||
960 | PR c++/110065 | |
961 | * parser.cc (cp_parser_template_type_arg): Add auto checking. | |
962 | ||
963 | 2024-01-15 Patrick Palka <ppalka@redhat.com> | |
964 | ||
965 | * parser.cc (cp_parser_check_access_in_redeclaration): Don't | |
966 | check access for a partial or explicit specialization. | |
967 | * pt.cc (maybe_new_partial_specialization): Don't set TREE_PRIVATE | |
968 | or TREE_PROTECTED on the newly created partial specialization. | |
969 | ||
970 | 2024-01-15 Patrick Palka <ppalka@redhat.com> | |
971 | ||
972 | PR c++/104634 | |
973 | * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC | |
974 | to the newly created partial specialization. | |
975 | ||
976 | 2024-01-15 Patrick Palka <ppalka@redhat.com> | |
977 | ||
978 | PR c++/109899 | |
979 | * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns | |
980 | false in a template context. | |
981 | ||
ed5bf208 GA |
982 | 2024-01-13 Jakub Jelinek <jakub@redhat.com> |
983 | ||
984 | * mangle.cc (write_nested_name): Mangle explicit object | |
985 | member functions with H as per | |
986 | https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal. | |
987 | ||
444a31f3 GA |
988 | 2024-01-12 Jason Merrill <jason@redhat.com> |
989 | ||
990 | PR c++/113038 | |
991 | * name-lookup.cc (lookup_elaborated_type): Look for bindings | |
992 | in the global namespace in the ABI namespace. | |
993 | ||
994 | 2024-01-12 Jason Merrill <jason@redhat.com> | |
995 | ||
996 | * call.cc (reversed_match): New. | |
997 | (enum class pmatch): New enum. | |
998 | (cand_parms_match): Add match_kind parm. | |
999 | (object_parms_correspond): Add fn parms. | |
1000 | (joust): Adjust. | |
1001 | * class.cc (xobj_iobj_parameters_correspond): Rename to... | |
1002 | (iobj_parm_corresponds_to): ...this. Take the other | |
1003 | type instead of a second function. | |
1004 | (object_parms_correspond): Adjust. | |
1005 | * cp-tree.h (iobj_parm_corresponds_to): Declare. | |
1006 | ||
1a80e955 GA |
1007 | 2024-01-11 Jason Merrill <jason@redhat.com> |
1008 | ||
1009 | PR c++/113191 | |
1010 | * class.cc (xobj_iobj_parameters_correspond): Add context parm. | |
1011 | (object_parms_correspond): Factor out of... | |
1012 | (add_method): ...here. | |
1013 | * method.cc (defaulted_late_check): Use it. | |
1014 | * call.cc (class_of_implicit_object): New. | |
1015 | (object_parms_correspond): Overload taking two candidates. | |
1016 | (cand_parms_match): Use it. | |
1017 | (joust): Check reversed before comparing constraints. | |
1018 | * cp-tree.h (object_parms_correspond): Declare. | |
1019 | ||
45af8962 GA |
1020 | 2024-01-10 Tamar Christina <tamar.christina@arm.com> |
1021 | ||
1022 | * parser.cc (cp_parser_pragma): Initialize to false. | |
1023 | ||
73ce73fc GA |
1024 | 2024-01-09 Jason Merrill <jason@redhat.com> |
1025 | ||
1026 | * semantics.cc (is_object_parameter): New. | |
1027 | * cp-tree.h (is_object_parameter): Declare. | |
1028 | * call.cc (maybe_warn_class_memaccess): Use it. | |
1029 | * search.cc (field_access_p): Use it. | |
1030 | (class_of_object_parm): New. | |
1031 | (field_accessor_p): Adjust for explicit object parms. | |
1032 | ||
1033 | 2024-01-09 Jason Merrill <jason@redhat.com> | |
1034 | ||
1035 | * call.cc (build_over_call): Refactor handle_arg lambda. | |
1036 | * class.cc (xobj_iobj_parameters_correspond): Fix FIXME. | |
1037 | * method.cc (defaulted_late_check): Adjust comments. | |
1038 | ||
1039 | 2024-01-09 waffl3x <waffl3x@protonmail.com> | |
1040 | ||
1041 | PR c++/102609 | |
1042 | PR c++/102609 | |
1043 | C++23 P0847R7 (deducing this) - CWG2586. | |
1044 | * decl.cc (copy_fn_p): Accept xobj copy assignment functions. | |
1045 | (move_signature_fn_p): Accept xobj move assignment functions. | |
1046 | * method.cc (do_build_copy_assign): Handle defaulted xobj member | |
1047 | functions. | |
1048 | (defaulted_late_check): Comment. | |
1049 | (defaultable_fn_check): Comment. | |
1050 | ||
1051 | 2024-01-09 waffl3x <waffl3x@protonmail.com> | |
1052 | ||
1053 | PR c++/102609 | |
1054 | PR c++/102609 | |
1055 | C++23 P0847R7 (deducing this) - xobj lambdas. | |
1056 | * lambda.cc (build_capture_proxy): Don't fold direct object types. | |
1057 | * parser.cc (cp_parser_lambda_declarator_opt): Handle xobj lambdas, | |
1058 | diagnostics. Comments also updated. | |
1059 | * pt.cc (tsubst_function_decl): Handle xobj lambdas. Check object | |
1060 | type of xobj lambda call operator, diagnose incorrect types. | |
1061 | (tsubst_lambda_expr): Update comment. | |
1062 | * semantics.cc (finish_decltype_type): Also consider by-value object | |
1063 | parameter qualifications. | |
1064 | ||
1065 | 2024-01-09 waffl3x <waffl3x@protonmail.com> | |
1066 | ||
1067 | PR c++/102609 | |
1068 | PR c++/102609 | |
1069 | C++23 P0847R7 (deducing this) - diagnostics. | |
1070 | * class.cc (resolve_address_of_overloaded_function): Diagnostics. | |
1071 | * cp-tree.h (TFF_XOBJ_FUNC): Define. | |
1072 | * decl.cc (grokfndecl): Diagnostics. | |
1073 | (grokdeclarator): Diagnostics. | |
1074 | * error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC. | |
1075 | (dump_lambda_function): Formatting for xobj lambda. | |
1076 | (dump_function_decl): Pass TFF_XOBJ_FUNC. | |
1077 | (dump_parameters): Formatting for xobj member functions. | |
1078 | (function_category): Formatting for xobj member functions. | |
1079 | * parser.cc (cp_parser_decl_specifier_seq): Diagnostics. | |
1080 | (cp_parser_parameter_declaration): Diagnostics. | |
1081 | * search.cc (look_for_overrides_here): Make xobj member functions | |
1082 | override. | |
1083 | (look_for_overrides_r): Reject an overriding xobj member function | |
1084 | and diagnose it. | |
1085 | * semantics.cc (finish_this_expr): Diagnostics. | |
1086 | * typeck.cc (cp_build_addr_expr_1): Diagnostics. | |
1087 | ||
1088 | 2024-01-09 waffl3x <waffl3x@protonmail.com> | |
1089 | ||
1090 | PR c++/102609 | |
1091 | PR c++/102609 | |
1092 | C++23 P0847R7 (deducing this) - initial functionality. | |
1093 | * class.cc (xobj_iobj_parameters_correspond): New function, checks | |
1094 | for corresponding object parameters between xobj and iobj member | |
1095 | functions. | |
1096 | (add_method): Handle object parameters of xobj member functions, use | |
1097 | xobj_iobj_parameters_correspond. | |
1098 | * call.cc (build_over_call): Refactor, handle xobj member functions. | |
1099 | (cand_parms_match): Handle object parameters of xobj and iobj member | |
1100 | functions, use xobj_iobj_parameters_correspond. | |
1101 | * cp-tree.h (enum cp_decl_spec): Add ds_this, add comments. | |
1102 | * decl.cc (grokfndecl): Add xobj_func_p parameter. For xobj member | |
1103 | functions, Set xobj_flag, don't set static_function flag. | |
1104 | (grokdeclarator): Handle xobj member functions, tell grokfndecl. | |
1105 | (grok_op_properties): Don't error for xobj operators. | |
1106 | * parser.cc (cp_parser_decl_specifier_seq): Handle this specifier. | |
1107 | (cp_parser_parameter_declaration): Set default argument to | |
1108 | "this_identifier" for xobj parameters. | |
1109 | (set_and_check_decl_spec_loc): Add "this", add comments. | |
1110 | * tree.cc (build_min_non_dep_op_overload): Handle xobj operators. | |
1111 | * typeck.cc (cp_build_addr_expr_1): Handle address-of xobj member | |
1112 | functions. | |
1113 | ||
1114 | 2024-01-09 waffl3x <waffl3x@protonmail.com> | |
1115 | Jason Merrill <jason@redhat.com> | |
1116 | ||
1117 | PR c++/102609 | |
1118 | * cp-tree.h (struct lang_decl_fn): New data member. | |
1119 | (DECL_NONSTATIC_MEMBER_FUNCTION_P): Poison. | |
1120 | (DECL_IOBJ_MEMBER_FUNCTION_P): Define. | |
1121 | (DECL_FUNCTION_XOBJ_FLAG): Define. | |
1122 | (DECL_XOBJ_MEMBER_FUNCTION_P): Define. | |
1123 | (DECL_OBJECT_MEMBER_FUNCTION_P): Define. | |
1124 | (DECL_FUNCTION_MEMBER_P): Don't use | |
1125 | DECL_NONSTATIC_MEMBER_FUNCTION_P. | |
1126 | (DECL_CONST_MEMFUNC_P): Likewise. | |
1127 | (DECL_VOLATILE_MEMFUNC_P): Likewise. | |
1128 | (DECL_NONSTATIC_MEMBER_P): Likewise. | |
1129 | * module.cc (trees_out::lang_decl_bools): Handle xobj_flag. | |
1130 | (trees_in::lang_decl_bools): Handle xobj_flag. | |
1131 | * call.cc (build_this_conversion) | |
1132 | (add_function_candidate) | |
1133 | (add_template_candidate_real) | |
1134 | (add_candidates) | |
1135 | (maybe_warn_class_memaccess) | |
1136 | (cand_parms_match) | |
1137 | (joust) | |
1138 | (do_warn_dangling_reference) | |
1139 | * class.cc (finalize_literal_type_property) | |
1140 | (finish_struct) | |
1141 | (resolve_address_of_overloaded_function) | |
1142 | * constexpr.cc (is_valid_constexpr_fn) | |
1143 | (cxx_bind_parameters_in_call) | |
1144 | * contracts.cc (build_contract_condition_function) | |
1145 | * cp-objcp-common.cc (cp_decl_dwarf_attribute) | |
1146 | * cxx-pretty-print.cc (cxx_pretty_printer::postfix_expression) | |
1147 | (cxx_pretty_printer::declaration_specifiers) | |
1148 | (cxx_pretty_printer::direct_declarator) | |
1149 | * decl.cc (cp_finish_decl) | |
1150 | (grok_special_member_properties) | |
1151 | (start_preparsed_function) | |
1152 | (record_key_method_defined) | |
1153 | * decl2.cc (cp_handle_deprecated_or_unavailable) | |
1154 | * init.cc (find_uninit_fields_r) | |
1155 | (build_offset_ref) | |
1156 | * lambda.cc (lambda_expr_this_capture) | |
1157 | (maybe_generic_this_capture) | |
1158 | (nonlambda_method_basetype) | |
1159 | * mangle.cc (write_nested_name) | |
1160 | * method.cc (early_check_defaulted_comparison) | |
1161 | (skip_artificial_parms_for) | |
1162 | (num_artificial_parms_for) | |
1163 | * pt.cc (is_specialization_of_friend) | |
1164 | (determine_specialization) | |
1165 | (copy_default_args_to_explicit_spec) | |
1166 | (check_explicit_specialization) | |
1167 | (tsubst_contract_attribute) | |
1168 | (check_non_deducible_conversions) | |
1169 | (more_specialized_fn) | |
1170 | (maybe_instantiate_noexcept) | |
1171 | (register_parameter_specializations) | |
1172 | (value_dependent_expression_p) | |
1173 | * search.cc (shared_member_p) | |
1174 | (lookup_member) | |
1175 | (field_access_p) | |
1176 | * semantics.cc (finish_omp_declare_simd_methods) | |
1177 | * tree.cc (lvalue_kind) | |
1178 | * typeck.cc (invalid_nonstatic_memfn_p): Don't use | |
1179 | DECL_NONSTATIC_MEMBER_FUNCTION_P. | |
1180 | ||
1181 | 2024-01-09 Julian Brown <julian@codesourcery.com> | |
1182 | ||
1183 | * constexpr.cc (potential_consant_expression_1): Handle | |
1184 | OMP_ARRAY_SECTION. | |
1185 | * cp-tree.h (grok_omp_array_section, build_omp_array_section): Add | |
1186 | prototypes. | |
1187 | * decl2.cc (grok_omp_array_section): New function. | |
1188 | * error.cc (dump_expr): Handle OMP_ARRAY_SECTION. | |
1189 | * parser.cc (cp_parser_new): Initialize parser->omp_array_section_p. | |
1190 | (cp_parser_statement_expr): Disallow array sections. | |
1191 | (cp_parser_postfix_open_square_expression): Support OMP_ARRAY_SECTION | |
1192 | parsing. | |
1193 | (cp_parser_parenthesized_expression_list, cp_parser_lambda_expression, | |
1194 | cp_parser_braced_list): Disallow array sections. | |
1195 | (cp_parser_omp_var_list_no_open): Remove ALLOW_DEREF parameter, add | |
1196 | MAP_LVALUE in its place. Support generalised lvalue parsing for | |
1197 | OpenMP map, to and from clauses. Use OMP_ARRAY_SECTION | |
1198 | code instead of TREE_LIST to represent OpenMP array sections. | |
1199 | (cp_parser_omp_var_list): Remove ALLOW_DEREF parameter, add MAP_LVALUE. | |
1200 | Pass to cp_parser_omp_var_list_no_open. | |
1201 | (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list. | |
1202 | (cp_parser_omp_clause_map): Add sk_omp scope around | |
1203 | cp_parser_omp_var_list_no_open call. | |
1204 | * parser.h (cp_parser): Add omp_array_section_p field. | |
1205 | * pt.cc (tsubst, tsubst_copy, tsubst_omp_clause_decl, | |
1206 | tsubst_copy_and_build): Add OMP_ARRAY_SECTION support. | |
1207 | * semantics.cc (handle_omp_array_sections_1, handle_omp_array_sections, | |
1208 | cp_oacc_check_attachments, finish_omp_clauses): Use OMP_ARRAY_SECTION | |
1209 | instead of TREE_LIST where appropriate. Handle more types of map | |
1210 | expression. | |
1211 | * typeck.cc (build_omp_array_section): New function. | |
1212 | ||
59e0c218 GA |
1213 | 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com> |
1214 | ||
1215 | * module.cc (trees_out::write_var_def): Only write initializers | |
1216 | in header modules. | |
1217 | ||
1218 | 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com> | |
1219 | ||
1220 | PR c++/109679 | |
1221 | * module.cc (depset::hash::add_binding_entity): Don't skip names | |
1222 | in the GMF if they've been exported with a using declaration. | |
1223 | ||
1224 | 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com> | |
1225 | ||
1226 | PR c++/110808 | |
1227 | * parser.cc (cp_parser_module_name): Rewrite to handle | |
1228 | module-names and module-partitions independently. | |
1229 | (cp_parser_module_partition): New function. | |
1230 | (cp_parser_module_declaration): Parse module partitions | |
1231 | explicitly. Don't change state if parsing module decl failed. | |
1232 | (cp_parser_import_declaration): Handle different kinds of | |
1233 | import-declarations locally. | |
1234 | ||
eb84e8d3 GA |
1235 | 2024-01-03 Patrick Palka <ppalka@redhat.com> |
1236 | ||
1237 | PR c++/113064 | |
1238 | * call.cc (reference_binding): Still try a conversion via a | |
1239 | temporary if a direct conversion was bad. | |
1240 | ||
1241 | 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com> | |
1242 | ||
1243 | * parser.cc (cp_parser_omp_clause_name): Move handling of indirect | |
1244 | clause to correspond to alphabetical order. | |
1245 | ||
ad41bd84 | 1246 | \f |
8c22aed4 | 1247 | Copyright (C) 2024 Free Software Foundation, Inc. |
ad41bd84 JM |
1248 | |
1249 | Copying and distribution of this file, with or without modification, | |
1250 | are permitted in any medium without royalty provided the copyright | |
1251 | notice and this notice are preserved. |