]>
Commit | Line | Data |
---|---|---|
1cda629f GA |
1 | 2022-05-18 Marek Polacek <polacek@redhat.com> |
2 | ||
3 | PR c++/105634 | |
4 | * call.cc (maybe_warn_class_memaccess): Avoid % by zero. | |
5 | ||
3d9439b1 GA |
6 | 2022-05-17 Jason Merrill <jason@redhat.com> |
7 | ||
8 | PR c++/102307 | |
9 | * decl.cc (check_initializer): Use build_cplus_new in case of | |
10 | constexpr failure. | |
11 | ||
12 | 2022-05-17 Jakub Jelinek <jakub@redhat.com> | |
13 | ||
14 | * parser.cc (cp_parser_omp_clause_depend): Parse | |
15 | inoutset depend-kind. | |
16 | (cp_parser_omp_depobj): Likewise. | |
17 | * cxx-pretty-print.cc (cxx_pretty_printer::statement): Handle | |
18 | OMP_CLAUSE_DEPEND_INOUTSET. | |
19 | ||
702bd11f GA |
20 | 2022-05-16 Martin Liska <mliska@suse.cz> |
21 | ||
22 | * module.cc (depset::entity_kind_name): Use ARRAY_SIZE. | |
23 | * name-lookup.cc (get_std_name_hint): Likewise. | |
24 | * parser.cc (cp_parser_new): Likewise. | |
25 | ||
26 | 2022-05-16 Marcel Vollweiler <marcel@codesourcery.com> | |
27 | ||
28 | * pt.cc (tsubst_omp_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR. | |
29 | * semantics.cc (finish_omp_clauses): Added template decl processing. | |
30 | ||
ac6a32f6 GA |
31 | 2022-05-15 Jason Merrill <jason@redhat.com> |
32 | ||
33 | PR c++/100502 | |
34 | PR c++/58993 | |
35 | * friend.cc (is_friend): Hidden friends count as members. | |
36 | * search.cc (friend_accessible_p): Likewise. | |
37 | ||
38 | 2022-05-15 Jason Merrill <jason@redhat.com> | |
39 | ||
40 | * parser.cc (cp_parser_template_name): Look through | |
41 | injected-class-name. | |
42 | ||
43 | 2022-05-15 Jason Merrill <jason@redhat.com> | |
44 | ||
45 | PR c++/105589 | |
46 | PR c++/105191 | |
47 | PR c++/92385 | |
48 | * init.cc (build_value_init): Handle class in template. | |
49 | ||
9df4ffe4 GA |
50 | 2022-05-13 Nathan Sidwell <nathan@acm.org> |
51 | ||
52 | * mangle.cc (maybe_write_module): Check external linkage. | |
53 | ||
54 | 2022-05-13 Richard Biener <rguenther@suse.de> | |
55 | ||
56 | * constexpr.cc: Remove gimple-fold.h include. | |
57 | ||
49ace834 GA |
58 | 2022-05-12 Patrick Palka <ppalka@redhat.com> |
59 | ||
60 | * cp-tree.h (TMPL_ARGS_LEVEL): Assert LEVEL is 1 when | |
61 | TMPL_ARGS_HAVE_MULTIPLE_LEVELS is false. | |
62 | * pt.cc (try_class_unification): Correctly copy multidimensional | |
63 | targs. Free the copy of targs. | |
64 | (unify_pack_expansion): Fix level comparison. | |
65 | ||
66 | 2022-05-12 Nathan Sidwell <nathan@acm.org> | |
67 | ||
68 | * parser.cc (cp_parser_linkage_specification): Implement | |
69 | global module attachment semantics. | |
70 | ||
71 | 2022-05-12 Jakub Jelinek <jakub@redhat.com> | |
72 | ||
73 | * lex.cc (init_reswords): Register omp_all_memory as keyword | |
74 | if flag_openmp. | |
75 | * parser.cc (cp_parser_primary_expression): Diagnose uses of | |
76 | omp_all_memory in postfix expressions. | |
77 | (cp_parser_omp_var_list_no_open): Handle omp_all_memory in depend | |
78 | clause. | |
79 | * semantics.cc (finish_omp_clauses): Handle omp_all_memory | |
80 | keyword in depend clause as null_pointer_node, diagnose invalid | |
81 | uses. | |
82 | * pt.cc (tsubst_omp_clause_decl): Pass through omp_all_memory. | |
83 | ||
d0d513b5 GA |
84 | 2022-05-11 Patrick Palka <ppalka@redhat.com> |
85 | ||
86 | * constraint.cc (tsubst_parameter_mapping): Convert loop over | |
87 | TREE_VEC into a range-based for loop using tree_vec_range. | |
88 | * pt.cc (iterative_hash_template_arg): Likewise. | |
89 | (template_parms_level_to_args): Likewise. | |
90 | (deducible_template_args): Likewise. | |
91 | (check_undeduced_parms): Likewise. | |
92 | (dependent_type_p_r): Likewise. | |
93 | (value_dependent_expression_p) <case NONTYPE_ARGUMENT_PACK>: | |
94 | Likewise. | |
95 | (dependent_template_arg_p): Likewise. | |
96 | * tree.cc (cp_walk_subtrees) <case NONTYPE_ARGUMENT_PACK>: | |
97 | Likewise. | |
98 | ||
99 | 2022-05-11 Jason Merrill <jason@redhat.com> | |
100 | ||
101 | PR c++/105541 | |
102 | * cp-tree.h (TMPL_ARGS_DEPTH): 0 for null args. | |
103 | * parser.cc (cp_parser_enclosed_template_argument_list): | |
104 | Use 0-length TREE_VEC for <>. | |
105 | ||
106 | 2022-05-11 Jason Merrill <jason@redhat.com> | |
107 | ||
108 | PR bootstrap/105567 | |
109 | * typeck.cc (check_return_expr): Don't mess with ctor return value | |
110 | while parsing a template. | |
111 | ||
112 | 2022-05-11 Nathan Sidwell <nathan@acm.org> | |
113 | ||
114 | * cp-tree.h (DECL_MODULE_ATTACH_P): New. | |
115 | (struct lang_decl_base): Add module_attach_p flag. | |
116 | * decl.cc (duplicate_decls): Rework module redeclaration | |
117 | checking. | |
118 | * module.cc (trees_out::lang_decl_bools): Write attach flag. | |
119 | (trees_in::lang_decl_bools): ... and read it back. | |
120 | (trees_out::decl_value): Rework module attachment handling. | |
121 | (trees_in::decl_value): Rename local var to reflect meaning. | |
122 | (trees_in::key_mergeable): Likewise. | |
123 | (get_originating_module): Use DECL_MODULE_ATTACH_P. No need | |
124 | to special-case mangling. | |
125 | (module_may_redeclare): Reimplement. | |
126 | (set_originating_module): Deal with attachment. | |
127 | * name-lookup.cc (maybe_record_mergeable_decl): Deal with | |
128 | attachment. | |
129 | (mergeable_namespace_slots): Likewise. | |
130 | (do_nonmember_using_decl): Likewise. | |
131 | * name-lookup.h (mergeable_namespace_slots): Adjust parm | |
132 | meaning. | |
133 | * ptree.cc (cxx_print_decl): Adjust purview & attach printing. | |
134 | ||
135 | 2022-05-11 Martin Liska <mliska@suse.cz> | |
136 | ||
137 | PR target/105355 | |
138 | * lang-specs.h: Use Separate syntax. | |
139 | ||
e8778989 GA |
140 | 2022-05-10 Patrick Palka <ppalka@redhat.com> |
141 | ||
142 | * coroutines.cc (instantiate_coro_traits): Adjust accordingly. | |
143 | * cp-tree.def: Remove mention of SET_PACK_EXPANSION_PATTERN. | |
144 | * cp-tree.h (SET_PACK_EXPANSION_PATTERN): Remove. | |
145 | (SET_ARGUMENT_PACK_ARGS): Remove. | |
146 | * module.cc (trees_in::tree_node): Adjust accordingly. | |
147 | * parser.cc (make_char_string_pack): Likewise. | |
148 | (make_string_pack): Likewise. | |
149 | * pt.cc (make_pack_expansion): Likewise. | |
150 | (template_parm_to_arg): Likewise. | |
151 | (coerce_template_parameter_pack): Likewise. | |
152 | (extract_fnparm_pack): Likewise. | |
153 | (extract_locals_r): Likewise. | |
154 | (make_argument_pack): Likewise. | |
155 | (tsubst_argument_pack): Likewise. | |
156 | (lookup_init_capture_pack): Likewise. | |
157 | (type_unification_real): Likewise. | |
158 | (unify_pack_expansion): Likewise. | |
159 | (tsubst_initializer_list): Likewise. | |
160 | ||
161 | 2022-05-10 Patrick Palka <ppalka@redhat.com> | |
162 | ||
163 | * cp-tree.h (PACK_EXPANSION_CHECK): Define. | |
164 | (PACK_EXPANSION_PATTERN): Use PACK_EXPANSION_CHECK. | |
165 | (SET_PACK_EXPANSION_PATTERN): Likewise. | |
166 | (PACK_EXPANSION_PARAMETER_PACKS): Likewise. | |
167 | (PACK_EXPANSION_EXTRA_ARGS): Likewise. | |
168 | (PACK_EXPANSION_LOCAL_P): Likewise. | |
169 | (PACK_EXPANSION_SIZEOF_P): Likewise. | |
170 | (PACK_EXPANSION_AUTO_P): Likewise. | |
171 | (PACK_EXPANSION_FORCE_EXTRA_ARGS_P): Likewise. | |
172 | (ARGUMENT_PACK_CHECK): Define. | |
173 | (ARGUMENT_PACK_ARGS): Use ARGUMENT_PACK_CHECK. | |
174 | (SET_ARGUMENT_PACK_ARGS): Likewise. | |
175 | * parser.cc (cp_parser_sizeof_pack): Check for error_mark_node | |
176 | before setting PACK_EXPANSION_SIZEOF_P. | |
177 | ||
178 | 2022-05-10 Nathan Sidwell <nathan@acm.org> | |
179 | ||
180 | * cp-tree.h (enum module_kind_bits): Disambiguate purview, | |
181 | attach, named module vs header-unit. | |
182 | (global_purview_p, not_module_p): Delete. | |
183 | (named_module_p): New. | |
184 | (header_module_p, module_purview_p): Adjust. | |
185 | (module_attach_p, named_module_purview_p): New. | |
186 | * decl.cc (duplicate_decls): Adjust. | |
187 | * module.cc (declare_module, preprocessed_module): Adjust. | |
188 | * name-lookup.cc (init_global_partition): Adjust. | |
189 | (get_fixed_binding_slot, pushdecl): Adjust. | |
190 | * parser.cc (cp_parser_module_declaration): Adjust. | |
191 | (cp_parser_import_declaration, cp_parser_declaration): Adjust. | |
192 | ||
193 | 2022-05-10 Jason Merrill <jason@redhat.com> | |
194 | ||
195 | PR c++/105529 | |
196 | * decl.cc (maybe_return_this): Replace... | |
197 | (finish_constructor_body, finish_destructor_body): ...these. | |
198 | (finish_function_body): Call it. | |
199 | * optimize.cc (build_delete_destructor_body): Call it. | |
200 | * cp-tree.h (maybe_return_this): Declare. | |
201 | ||
bd022ff9 GA |
202 | 2022-05-09 Marek Polacek <polacek@redhat.com> |
203 | ||
204 | PR c++/103539 | |
205 | * parser.cc (cp_parser_statement): Constify the in_compound parameter. | |
206 | Create a modifiable copy. Allow labels at the end of compound | |
207 | statements. | |
208 | ||
209 | 2022-05-09 Patrick Palka <ppalka@redhat.com> | |
210 | ||
211 | PR c++/105491 | |
212 | * call.cc (field_in_pset): Adjust after next_initializable_field | |
213 | renaming. | |
214 | (build_aggr_conv): Likewise. | |
215 | (convert_like_internal): Likewise. | |
216 | (type_has_extended_temps): Likewise. | |
217 | * class.cc (default_init_uninitialized_part): Likewise. | |
218 | (finish_struct): Likewise. | |
219 | * constexpr.cc (cx_check_missing_mem_inits): Likewise. | |
220 | (reduced_constant_expression_p): Use next_subobject_field | |
221 | instead. | |
222 | * cp-gimplify.cc (get_source_location_impl_type): Adjust after | |
223 | next_initializable_field renaming. | |
224 | (fold_builtin_source_location): Likewise. | |
225 | * cp-tree.h (next_initializable_field): Rename to ... | |
226 | (next_aggregate_field): ... this. | |
227 | (next_subobject_field): Declare. | |
228 | * decl.cc (next_aggregate_field): Renamed from ... | |
229 | (next_initializable_field): ... this. Skip over vptr fields | |
230 | again. | |
231 | (next_subobject_field): Define. | |
232 | (reshape_init_class): Adjust after next_initializable_field | |
233 | renaming. | |
234 | * init.cc (build_value_init_noctor): Likewise. | |
235 | (emit_mem_initializers): Likewise. | |
236 | * lambda.cc (build_capture_proxy): Likewise. | |
237 | * method.cc (build_comparison_op): Likewise. | |
238 | * pt.cc (maybe_aggr_guide): Likewise. | |
239 | * tree.cc (structural_type_p): Likewise. | |
240 | * typeck2.cc (split_nonconstant_init_1): Likewise. | |
241 | (digest_init_r): Likewise. | |
242 | ||
243 | 2022-05-09 Nathan Sidwell <nathan@acm.org> | |
244 | ||
245 | * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Renamed from | |
246 | DECL_MODULE_ATTACHMENTS_P. | |
247 | (struct lane_decl_base): Rename module_attached_p to | |
248 | module_keyed_decls_p. | |
249 | (maybe_key_decl): Renamed from maybe_attach_decl. | |
250 | * lambda.cc (record_lambda_scope): Adjust. | |
251 | * lex.cc (cxx_dup_lang_specific_decl): Adjust. | |
252 | * module.cc (keyed_map_t, keyed_table): Renamed from attached_map_t, | |
253 | attached_table. | |
254 | (enum merge_kind): Rename MK_attached to MK_keyed. | |
255 | (trees_out::lang_decl_bools): Adjust. | |
256 | (trees_in::lang_decl_bools): Adjust. | |
257 | (trees_in::decl_value): Adjust. | |
258 | (trees_out::get_merge_kind): Adjust. | |
259 | (trees_out::key_mergeable): Adjust. | |
260 | (trees_in::key_mergeable): Adjust. | |
261 | (maybe_key_decl): Rename from maybe_attach_decl. | |
262 | (direct_import): Adjust. | |
263 | (fini_modules): Adjust. | |
264 | ||
265 | 2022-05-09 Martin Liska <mliska@suse.cz> | |
266 | ||
267 | * cp-gimplify.cc (cp_genericize_r): Use {,UN}LIKELY | |
268 | macros. | |
269 | * parser.cc (cp_finalize_omp_declare_simd): Likewise. | |
270 | (cp_finalize_oacc_routine): Likewise. | |
271 | ||
a1947c92 GA |
272 | 2022-05-07 Marek Polacek <polacek@redhat.com> |
273 | ||
274 | PR c++/101833 | |
275 | PR c++/47634 | |
276 | * tree.cc (maybe_adjust_arg_pos_for_attribute): New. | |
277 | ||
ea3fbfda GA |
278 | 2022-05-06 Jason Merrill <jason@redhat.com> |
279 | ||
280 | * error.cc (decl_to_string): Add show_color parameter. | |
281 | (subst_to_string): Likewise. | |
282 | (cp_printer): Pass it. | |
283 | (type_to_string): Set pp_show_color. | |
284 | (dump_function_name): Use "fnname" color. | |
285 | (dump_template_bindings): Use "targs" color. | |
286 | (struct colorize_guard): New. | |
287 | (reinit_cxx_pp): Clear pp_show_color. | |
288 | ||
289 | 2022-05-06 Jason Merrill <jason@redhat.com> | |
290 | ||
291 | PR c++/105245 | |
292 | PR c++/100111 | |
293 | * constexpr.cc (cxx_eval_store_expression): Reorganize empty base | |
294 | handling. | |
295 | ||
ab869e7f GA |
296 | 2022-05-05 Marek Polacek <polacek@redhat.com> |
297 | ||
298 | PR c++/64679 | |
299 | * parser.cc (cp_parser_parameter_declaration_clause): Maintain | |
300 | a vector of parameters that haven't been pushed yet. Push them at the | |
301 | end of a valid parameter-declaration-clause. | |
302 | (cp_parser_parameter_declaration_list): Take a new auto_vec parameter. | |
303 | Do not pushdecl while parsing tentatively when pushdecl-ing a parameter | |
304 | would result in a hard error. | |
305 | (cp_parser_cache_defarg): Adjust the call to | |
306 | cp_parser_parameter_declaration_list. | |
307 | ||
308 | 2022-05-05 Richard Biener <rguenther@suse.de> | |
309 | ||
310 | * module.cc (trees_in::core_vals): Remove separate allocation | |
311 | for REAL_CST. | |
312 | ||
3e7db517 GA |
313 | 2022-05-04 Jason Merrill <jason@redhat.com> |
314 | ||
315 | PR c++/104470 | |
316 | * pt.cc (maybe_dependent_member_ref): Handle types. | |
317 | (tsubst, tsubst_copy): Use it. | |
318 | (tsubst_aggr_type, instantiate_alias_template): Don't handle | |
319 | tf_dguide here. | |
320 | ||
321 | 2022-05-04 Patrick Palka <ppalka@redhat.com> | |
322 | ||
323 | PR c++/105476 | |
324 | * pt.cc (maybe_aggr_guide): Set processing_template_decl when | |
325 | partially instantiating the guide's parameter list. | |
326 | ||
327 | 2022-05-04 Marek Polacek <polacek@redhat.com> | |
328 | ||
329 | PR c++/64679 | |
330 | * parser.cc (cp_parser_init_declarator): Properly handle a series of | |
331 | operator() calls, they are not part of an init-declarator. | |
332 | ||
333 | 2022-05-04 Jason Merrill <jason@redhat.com> | |
334 | ||
335 | * decl.cc (reshape_init): Shortcut already-reshaped init. | |
336 | (reshape_init_class): Assert not getting one here. | |
337 | ||
338 | 2022-05-04 Jason Merrill <jason@redhat.com> | |
339 | ||
340 | * error.cc (cp_print_error_function): Use %qD. | |
341 | (function_category): Use %qD. | |
342 | ||
343 | 2022-05-04 Marek Polacek <polacek@redhat.com> | |
344 | ||
345 | PR c++/105436 | |
346 | * parser.cc (cp_parser_next_token_ends_template_argument_p): Don't | |
347 | return true for CPP_GREATER_EQ. | |
348 | ||
349 | 2022-05-04 Jason Merrill <jason@redhat.com> | |
350 | ||
351 | * cp-tree.h (struct language_function): Remove x_cdtor_label. | |
352 | (cdtor_label, LABEL_DECL_CDTOR): Remove. | |
353 | * constexpr.cc (returns): Don't check LABEL_DECL_CDTOR. | |
354 | (cxx_eval_constant_expression): Don't call returns. | |
355 | * decl.cc (check_goto): Don't check cdtor_label. | |
356 | (start_preparsed_function): And don't set it. | |
357 | (finish_constructor_body, finish_destructor_body): Remove. | |
358 | (finish_function_body): Don't call them. | |
359 | * typeck.cc (check_return_expr): Handle cdtor_returns_this here. | |
360 | * semantics.cc (finish_return_stmt): Not here. | |
361 | ||
362 | 2022-05-04 Jakub Jelinek <jakub@redhat.com> | |
363 | ||
364 | * lambda.cc: Include decl.h. | |
365 | (maybe_add_lambda_conv_op): Temporarily override deprecated_state to | |
366 | UNAVAILABLE_DEPRECATED_SUPPRESS. | |
367 | ||
e66af28d GA |
368 | 2022-05-03 Patrick Palka <ppalka@redhat.com> |
369 | ||
370 | PR c++/105351 | |
371 | * cp-tree.h (finish_non_static_data_member): Add defaulted | |
372 | complain parameter. | |
373 | * pt.cc (tsubst_copy_and_build): Pass complain to | |
374 | finish_non_static_data_member. | |
375 | * semantics.cc (finish_non_static_data_member): Respect complain | |
376 | parameter. | |
377 | (finish_qualified_id_expr): Pass complain to | |
378 | finish_non_static_data_member. | |
379 | ||
6259d8aa GA |
380 | 2022-05-02 Jason Merrill <jason@redhat.com> |
381 | ||
382 | * pt.cc (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Copy location. | |
383 | (do_auto_deduction): Use expr location. | |
384 | ||
385 | 2022-05-02 Jason Merrill <jason@redhat.com> | |
386 | ||
387 | * class.cc (maybe_note_name_used_in_class): Note in all enclosing | |
388 | classes. Remember location of use. | |
389 | (note_name_declared_in_class): Adjust. | |
390 | ||
391 | 2022-05-02 Marek Polacek <polacek@redhat.com> | |
392 | ||
393 | * cp-tree.h (uses_template_parms): Adjust declaration. | |
394 | * pt.cc (uses_template_parms): Return bool. Use a RAII sentinel. | |
395 | ||
396 | 2022-05-02 Richard Biener <rguenther@suse.de> | |
397 | ||
398 | * constexpr.cc (fold_simple_1): Use CASE_CONVERT. | |
399 | * cp-gimplify.cc (cp_fold): Likewise. | |
400 | * pt.cc (tsubst_copy): Likewise. | |
401 | ||
66d1e440 GA |
402 | 2022-04-29 Jason Merrill <jason@redhat.com> |
403 | ||
404 | PR c++/91618 | |
405 | PR c++/96604 | |
406 | * friend.cc (do_friend): Call check_explicit_specialization here. | |
407 | * decl.cc (grokdeclarator): Not here. | |
408 | * decl2.cc (check_classfn): Or here. | |
409 | ||
410 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
411 | ||
412 | PR c++/104470 | |
413 | * cp-tree.h (enum tsubst_flags): Add tf_dguide. | |
414 | * pt.cc (tsubst_aggr_type): Check it. | |
415 | (tsubst_baselink, tsubst_copy): Check it. | |
416 | (maybe_dependent_member_ref): Check it. | |
417 | (instantiate_alias_template): Handle it. | |
418 | (build_deduction_guide): Set it. | |
419 | ||
420 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
421 | ||
422 | PR c++/82980 | |
423 | * lambda.cc (type_deducible_expression_p): Allow more types. | |
424 | ||
425 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
426 | ||
427 | * decl.cc (cp_finish_decl): Only consider auto for vars. | |
428 | ||
429 | 2022-04-29 Marek Polacek <polacek@redhat.com> | |
430 | ||
431 | PR c++/67048 | |
432 | * parser.cc (cp_parser_enum_specifier): Warn about empty unnamed enum | |
433 | only when it's followed by a semicolon. | |
434 | ||
435 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
436 | ||
437 | PR c++/80351 | |
438 | * decl.cc (cp_finish_decl): Check completeness of deduced type. | |
439 | ||
440 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
441 | ||
442 | PR c++/102987 | |
443 | * error.cc (dump_decl) [USING_DECL]: Respect flags. | |
444 | ||
445 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
446 | ||
447 | * error.cc (dump_decl): Check TFF_UNQUALIFIED_NAME. | |
448 | ||
449 | 2022-04-29 Jakub Jelinek <jakub@redhat.com> | |
450 | ||
451 | PR c++/104319 | |
452 | * parser.cc (cp_parser_template_argument): Treat >= like C++98 >> | |
453 | after a type id by setting maybe_type_id and aborting tentative | |
454 | parse. | |
455 | (cp_parser_enclosed_template_argument_list): Handle | |
456 | CPP_GREATER_EQ like misspelled CPP_GREATER CPP_RQ and | |
457 | CPP_RSHIFT_EQ like misspelled CPP_GREATER CPP_GREATER_EQ | |
458 | or CPP_RSHIFT CPP_EQ or CPP_GREATER CPP_GREATER CPP_EQ. | |
459 | (cp_parser_next_token_ends_template_argument_p): Return true | |
460 | also for CPP_GREATER_EQ and CPP_RSHIFT_EQ. | |
461 | ||
462 | 2022-04-29 Iain Sandoe <iain@sandoe.co.uk> | |
463 | ||
464 | PR c++/105426 | |
465 | * coroutines.cc (register_local_var_uses): Allow promotion of unnamed | |
466 | temporaries to coroutine frame copies. | |
467 | ||
468 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
469 | ||
470 | * semantics.cc (check_trait_type): Don't check completeness | |
471 | of element type of array of unknown bound. | |
472 | ||
473 | 2022-04-29 Jason Merrill <jason@redhat.com> | |
474 | ||
475 | PR c++/102651 | |
476 | PR c++/49387 | |
477 | * rtti.cc (get_tinfo_decl_direct): Don't complete_type. | |
478 | (emit_tinfo_decl): Update tdesc type if needed. | |
479 | ||
480 | 2022-04-29 Zhao Wei Liew <zhaoweiliew@gmail.com> | |
481 | ||
482 | PR c++/25689 | |
483 | * call.cc (extract_call_expr): Return a NULL_TREE on failure | |
484 | instead of asserting. | |
485 | (build_new_method_call): Suppress -Wparentheses diagnostic for | |
486 | MODIFY_EXPR. | |
487 | * semantics.cc (is_assignment_op_expr_p): Add function to check | |
488 | if an expression is a call to an op= operator expression. | |
489 | (maybe_convert_cond): Handle the case of a op= operator expression | |
490 | for the -Wparentheses diagnostic. | |
491 | ||
6b6f53d8 GA |
492 | 2022-04-28 Patrick Palka <ppalka@redhat.com> |
493 | ||
494 | PR c++/105425 | |
495 | * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Treat | |
496 | DEPENDENT_OPERATOR_TYPE like an empty type. | |
497 | ||
498 | 2022-04-28 Iain Sandoe <iain@sandoe.co.uk> | |
499 | ||
500 | PR c++/104051 | |
501 | * coroutines.cc (coro_diagnose_throwing_final_aw_expr): Handle | |
502 | non-target expression inputs. | |
503 | ||
504 | 2022-04-28 Iain Sandoe <iain@sandoe.co.uk> | |
505 | ||
506 | PR c++/105301 | |
507 | * coroutines.cc (coro_promise_type_found_p): Account for possible | |
508 | mutliple overloads of the promise return_value() method. | |
509 | ||
510 | 2022-04-28 Iain Sandoe <iain@sandoe.co.uk> | |
511 | ||
512 | PR c++/105287 | |
513 | * coroutines.cc (maybe_promote_temps): Ensure generated temporaries | |
514 | are added to the bind expr. | |
515 | (add_var_to_bind): Fix local var naming to use portable punctuation. | |
516 | (register_local_var_uses): Do not add synthetic names to unnamed | |
517 | temporaries. | |
518 | ||
519 | 2022-04-28 Nathan Sidwell <nathan@acm.org> | |
520 | Iain Sandoe <iain@sandoe.co.uk> | |
521 | ||
522 | PR c++/103868 | |
523 | * coroutines.cc (finish_co_await_expr): Do not process non-dependent | |
524 | coroutine expressions at template definition time. | |
525 | (finish_co_yield_expr): Likewise. | |
526 | (finish_co_return_stmt): Likewise. | |
527 | ||
528 | 2022-04-28 Marek Polacek <polacek@redhat.com> | |
529 | ||
530 | PR c++/90107 | |
531 | * parser.cc (cp_parser_class_specifier_1): Accept :: after a class | |
532 | definition. | |
533 | ||
ba949a6a GA |
534 | 2022-04-27 Jason Merrill <jason@redhat.com> |
535 | ||
536 | * tree.cc (strip_typedefs): Add default argument comments. | |
537 | ||
538 | 2022-04-27 Marek Polacek <polacek@redhat.com> | |
539 | ||
540 | PR c++/105398 | |
541 | * pt.cc (uses_template_parms): Return false for any NAMESPACE_DECL. | |
542 | ||
01ad093b GA |
543 | 2022-04-26 Jason Merrill <jason@redhat.com> |
544 | ||
545 | PR c++/102629 | |
546 | * pt.cc (gen_elem_of_pack_expansion_instantiation): Clear | |
547 | TEMPLATE_TYPE_PARAMETER_PACK on auto. | |
548 | ||
549 | 2022-04-26 Patrick Palka <ppalka@redhat.com> | |
550 | ||
551 | PR c++/105386 | |
552 | * semantics.cc (finish_decltype_type): Pass tf_decltype to | |
553 | instantiate_non_dependent_expr_sfinae. | |
554 | ||
555 | 2022-04-26 Jason Merrill <jason@redhat.com> | |
556 | ||
557 | PR c++/104624 | |
558 | * pt.cc (check_for_bare_parameter_packs): Check for lambda | |
559 | function parameter pack. | |
560 | ||
561 | 2022-04-26 Patrick Palka <ppalka@redhat.com> | |
562 | ||
563 | PR c++/105289 | |
564 | PR c++/86193 | |
565 | * pt.cc (process_partial_specialization): Downgrade "partial | |
566 | specialization isn't more specialized" diagnostic from permerror | |
567 | to an on-by-default pedwarn. | |
568 | (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the | |
569 | NTTP type a second time, use the original type not the | |
570 | substituted type. | |
571 | ||
98de0da6 GA |
572 | 2022-04-25 Marek Polacek <polacek@redhat.com> |
573 | ||
574 | PR c++/105353 | |
575 | * typeck.cc (build_x_shufflevector): Use | |
576 | instantiation_dependent_expression_p except for the first two | |
577 | arguments. | |
578 | ||
c1a9cf67 GA |
579 | 2022-04-21 Marek Polacek <polacek@redhat.com> |
580 | ||
581 | * constexpr.cc (cxx_eval_logical_expression): Remove unused | |
582 | parameter. | |
583 | (cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>, | |
584 | <case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression. | |
585 | ||
586 | 2022-04-21 Marek Polacek <polacek@redhat.com> | |
587 | ||
588 | PR c++/105321 | |
589 | * constexpr.cc (cxx_eval_logical_expression): Always pass false for lval | |
590 | to cxx_eval_constant_expression. | |
591 | ||
29a25a60 GA |
592 | 2022-04-20 Ed Catmur <ed@catmur.uk> |
593 | ||
594 | PR c++/104996 | |
595 | * call.cc (compare_ics): When comparing list-initialization | |
596 | sequences, do not return early. | |
597 | ||
d1d57187 GA |
598 | 2022-04-19 Jakub Jelinek <jakub@redhat.com> |
599 | ||
600 | PR c++/105256 | |
601 | * typeck2.cc (process_init_constructor_array, | |
602 | process_init_constructor_record, process_init_constructor_union): Move | |
603 | CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag from CONSTRUCTOR elements to the | |
604 | containing CONSTRUCTOR. | |
605 | ||
587953f0 GA |
606 | 2022-04-15 Marek Polacek <polacek@redhat.com> |
607 | ||
608 | PR c++/105268 | |
609 | * parser.cc (cp_parser_placeholder_type_specifier): Return | |
610 | error_mark_node when trying to build up a constrained parameter in | |
611 | a default argument. | |
612 | ||
613 | 2022-04-15 Jason Merrill <jason@redhat.com> | |
614 | ||
615 | PR c++/102804 | |
616 | * decl.cc (grokdeclarator): Drop typedef used with 'unsigned'. | |
617 | ||
618 | 2022-04-15 Jason Merrill <jason@redhat.com> | |
619 | ||
620 | PR c++/102987 | |
621 | * error.cc (dump_expr): Handle USING_DECL. | |
622 | [VIEW_CONVERT_EXPR]: Just look through location wrapper. | |
623 | ||
031bd52e GA |
624 | 2022-04-14 Jason Merrill <jason@redhat.com> |
625 | ||
626 | PR c++/104646 | |
627 | * constexpr.cc (maybe_save_constexpr_fundef): Don't do extra | |
628 | checks for defaulted ctors. | |
629 | ||
630 | 2022-04-14 Jason Merrill <jason@redhat.com> | |
631 | ||
632 | PR c++/82980 | |
633 | * lambda.cc (type_deducible_expression_p): New. | |
634 | (lambda_capture_field_type): Check it. | |
635 | ||
636 | 2022-04-14 Jason Merrill <jason@redhat.com> | |
637 | ||
638 | PR c++/65211 | |
639 | * pt.cc (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN. | |
640 | ||
641 | 2022-04-14 Jason Merrill <jason@redhat.com> | |
642 | ||
643 | PR c++/97219 | |
644 | * name-lookup.cc (dependent_local_decl_p): New. | |
645 | * cp-tree.h (dependent_local_decl_p): Declare. | |
646 | * semantics.cc (finish_call_expr): Use it. | |
647 | * pt.cc (tsubst_arg_types): Also substitute default args | |
648 | for local externs. | |
649 | ||
650 | 2022-04-14 Jason Merrill <jason@redhat.com> | |
651 | ||
652 | PR c++/101698 | |
653 | * pt.cc (tsubst_baselink): Also check dependent optype. | |
654 | ||
655 | 2022-04-14 Jason Merrill <jason@redhat.com> | |
656 | ||
657 | PR c++/101442 | |
658 | * decl.cc (cp_finish_decl): Don't pass decl to push_cleanup. | |
659 | * init.cc (perform_member_init): Likewise. | |
660 | * semantics.cc (push_cleanup): Adjust comment. | |
661 | ||
247bbed1 GA |
662 | 2022-04-13 Jason Merrill <jason@redhat.com> |
663 | ||
664 | PR c++/105245 | |
665 | PR c++/100111 | |
666 | * constexpr.cc (cxx_eval_store_expression): Build a CONSTRUCTOR | |
667 | as needed in empty base handling. | |
668 | ||
669 | 2022-04-13 Jakub Jelinek <jakub@redhat.com> | |
670 | ||
671 | PR c++/105233 | |
672 | * decl2.cc (cp_check_const_attributes): For aligned attribute | |
673 | pass manifestly_const_eval=true to fold_non_dependent_expr. | |
674 | ||
675 | 2022-04-13 Marek Polacek <polacek@redhat.com> | |
676 | ||
677 | PR c++/97296 | |
678 | * call.cc (direct_reference_binding): strip_top_quals when creating | |
679 | a ck_qual. | |
680 | ||
504dae1d GA |
681 | 2022-04-12 Jason Merrill <jason@redhat.com> |
682 | ||
683 | PR c++/104669 | |
684 | * decl.cc (decls_match): Compare versions even if not recording. | |
685 | (duplicate_decls): Propagate attributes to alias. | |
686 | * decl2.cc (find_last_decl): Give up if versioned. | |
687 | ||
688 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
689 | ||
690 | PR c++/102071 | |
691 | * init.cc (build_new_1): Check array_p for alignment. | |
692 | ||
693 | 2022-04-12 Patrick Palka <ppalka@redhat.com> | |
694 | ||
695 | PR c++/103105 | |
696 | * pt.cc (build_extra_args): Call preserve_args. | |
697 | ||
698 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
699 | ||
700 | PR c++/104142 | |
701 | * decl.cc (check_initializer): Check TREE_SIDE_EFFECTS. | |
702 | ||
703 | 2022-04-12 Jason Merrill <jason@redhat.com> | |
704 | ||
705 | PR c++/105223 | |
706 | PR c++/92918 | |
707 | * class.cc (finish_struct): Always using op=. | |
708 | ||
da066c42 GA |
709 | 2022-04-11 Jason Merrill <jason@redhat.com> |
710 | ||
711 | PR c++/98249 | |
712 | * call.cc (build_operator_new_call): Just look in ::. | |
713 | ||
714 | 2022-04-11 Alexandre Oliva <oliva@adacore.com> | |
715 | ||
716 | * constexpr.cc (cxx_eval_call_expression): Disregard dtor | |
717 | result. | |
718 | ||
719 | 2022-04-11 Alexandre Oliva <oliva@adacore.com> | |
720 | ||
721 | * semantics.cc (set_cleanup_locs): Propagate locus to call | |
722 | wrapped in cast-to-void. | |
723 | ||
724 | 2022-04-11 Jason Merrill <jason@redhat.com> | |
725 | ||
726 | PR c++/100370 | |
727 | * init.cc (warn_placement_new_too_small): Check deref. | |
728 | ||
71cac7de GA |
729 | 2022-04-09 Jason Merrill <jason@redhat.com> |
730 | ||
731 | PR c++/105191 | |
732 | PR c++/92385 | |
733 | * tree.cc (build_vec_init_elt): Do {}-init for aggregates. | |
734 | * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init | |
735 | for non-aggregate types. | |
736 | (build_vec_init_expr): Also check constancy of explicit | |
737 | initializer elements. | |
738 | ||
739 | 2022-04-09 Jason Merrill <jason@redhat.com> | |
740 | ||
741 | PR c++/91618 | |
742 | PR c++/96604 | |
743 | * name-lookup.cc (set_decl_namespace): Set | |
744 | DECL_IMPLICIT_INSTANTIATION if no non-template match. | |
745 | * pt.cc (check_explicit_specialization): Check it. | |
746 | * decl2.cc (check_classfn): Call it. | |
747 | ||
df00d103 GA |
748 | 2022-04-07 Patrick Palka <ppalka@redhat.com> |
749 | ||
750 | PR c++/99479 | |
751 | * name-lookup.cc (name_lookup::using_queue): Change to an | |
752 | auto_vec (with 16 elements of internal storage). | |
753 | (name_lookup::queue_namespace): Change return type to void, | |
754 | take queue parameter by reference and adjust function body | |
755 | accordingly. | |
756 | (name_lookup::do_queue_usings): Inline into ... | |
757 | (name_lookup::queue_usings): ... here. As in queue_namespace. | |
758 | (name_lookup::search_unqualified): Don't make queue static, | |
759 | remove length variable, and adjust function body accordingly. | |
760 | ||
761 | 2022-04-07 Jakub Jelinek <jakub@redhat.com> | |
762 | ||
763 | PR tree-optimization/102586 | |
764 | * cp-objcp-common.h (cp_classtype_as_base): Declare. | |
765 | (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine. | |
766 | * cp-objcp-common.cc (cp_classtype_as_base): New function. | |
767 | ||
768 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
769 | ||
770 | PR c++/101051 | |
771 | * decl.cc (grokdeclarator): Reject conversion with trailing return | |
772 | sooner. | |
773 | ||
774 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
775 | ||
776 | PR c++/101717 | |
777 | * lambda.cc (lambda_expr_this_capture): Check all enclosing | |
778 | lambdas for completeness. | |
779 | ||
780 | 2022-04-07 Jason Merrill <jason@redhat.com> | |
781 | ||
782 | PR c++/105187 | |
783 | * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for | |
784 | vectors. | |
785 | ||
80eb8ec6 GA |
786 | 2022-04-06 Jakub Jelinek <jakub@redhat.com> |
787 | ||
788 | PR c++/104668 | |
789 | * decl2.cc (splice_template_attributes): Return NULL if *p is | |
790 | error_mark_node. | |
791 | (cplus_decl_attributes): Return early if attributes is | |
792 | error_mark_node. Don't check that later. | |
793 | ||
794 | 2022-04-06 Patrick Palka <ppalka@redhat.com> | |
795 | ||
796 | PR c++/105143 | |
797 | * pt.cc (do_class_deduction): Check complain before attempting | |
798 | to issue a -Wctad-maybe-unsupported warning. | |
799 | ||
800 | 2022-04-06 Jason Merrill <jason@redhat.com> | |
801 | ||
802 | PR c++/104702 | |
803 | * init.cc (build_vec_init): Use a reference for the result. | |
804 | ||
805 | 2022-04-06 Jason Merrill <jason@redhat.com> | |
806 | ||
807 | PR c++/100608 | |
808 | * name-lookup.cc (check_local_shadow): Use -Wshadow=local | |
809 | if exactly one of 'old' and 'decl' is a type. | |
810 | ||
9d84ed68 GA |
811 | 2022-04-05 Jason Merrill <jason@redhat.com> |
812 | ||
813 | PR c++/103852 | |
814 | DR 1286 | |
815 | * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17. | |
816 | ||
817 | 2022-04-05 Jason Merrill <jason@redhat.com> | |
818 | ||
819 | PR c++/101677 | |
820 | * name-lookup.h (struct cp_binding_level): Add requires_expression | |
821 | bit-field. | |
822 | * parser.cc (cp_parser_requires_expression): Set it. | |
823 | (synthesize_implicit_template_parm): Check it. | |
824 | ||
5e09bb1b GA |
825 | 2022-04-04 Jason Merrill <jason@redhat.com> |
826 | ||
827 | PR c++/101894 | |
828 | * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT. | |
829 | ||
830 | 2022-04-04 Jason Merrill <jason@redhat.com> | |
831 | ||
832 | PR c++/103852 | |
833 | DR 1286 | |
834 | * pt.cc (get_underlying_template): Compare default template args. | |
835 | ||
8af4270d GA |
836 | 2022-04-03 Benno Evers <benno.evers@tenzir.com> |
837 | Iain Sandoe <iain@sandoe.co.uk> | |
838 | ||
839 | PR c++/103328 | |
840 | * coroutines.cc (morph_fn_to_coro): Reset | |
841 | current_binding_level->blocks. | |
842 | ||
447ac3c5 ML |
843 | 2022-04-01 Jason Merrill <jason@redhat.com> |
844 | ||
845 | Revert: | |
846 | 2022-03-31 Jason Merrill <jason@redhat.com> | |
847 | ||
848 | PR c++/96645 | |
849 | * parser.cc (cp_parser_early_parsing_nsdmi): New. | |
850 | (cp_parser_member_declaration): Call it. | |
851 | ||
852 | 2022-04-01 Jason Merrill <jason@redhat.com> | |
853 | ||
854 | Revert: | |
855 | 2022-03-24 Jason Merrill <jason@redhat.com> | |
856 | ||
857 | PR c++/96645 | |
858 | * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. | |
859 | * class.cc (type_has_default_ctor_to_be_synthesized): New. | |
860 | (type_has_non_user_provided_default_constructor_1): Support it. | |
861 | (type_has_non_user_provided_default_constructor): Now a wrapper. | |
862 | * method.cc (complain_about_unparsed_dmi): New. | |
863 | (constructible_expr): Call it. | |
864 | ||
8af4270d GA |
865 | 2022-04-01 Patrick Palka <ppalka@redhat.com> |
866 | ||
867 | PR c++/105110 | |
868 | * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from | |
869 | the argument type of an NTTP before deducing from it. | |
870 | ||
57ad4462 GA |
871 | 2022-03-31 Jason Merrill <jason@redhat.com> |
872 | ||
873 | PR c++/96645 | |
874 | * parser.cc (cp_parser_early_parsing_nsdmi): New. | |
875 | (cp_parser_member_declaration): Call it. | |
876 | ||
150ab50f GA |
877 | 2022-03-30 Patrick Palka <ppalka@redhat.com> |
878 | ||
879 | PR c++/100474 | |
880 | * constraint.cc (diagnose_trait_expr): Handle all remaining | |
881 | traits appropriately. Remove default case. | |
882 | ||
883 | 2022-03-30 Marek Polacek <polacek@redhat.com> | |
884 | ||
885 | PR c++/93280 | |
886 | PR c++/104583 | |
887 | * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor. | |
888 | ||
889 | 2022-03-30 Jakub Jelinek <jakub@redhat.com> | |
890 | ||
891 | PR c++/105092 | |
892 | * pt.cc (tsubst_omp_clause_decl): When handling iterators, set | |
893 | DECL_CONTEXT of the iterator var to current_function_decl and | |
894 | call pushdecl. | |
895 | ||
896 | 2022-03-30 Jakub Jelinek <jakub@redhat.com> | |
897 | ||
898 | PR c++/105061 | |
899 | * parser.cc (cp_parser_template_introduction): If member_p, temporarily | |
900 | clear parser->colon_corrects_to_scope_p around tentative parsing of | |
901 | nested name specifier. | |
902 | ||
aab0127d GA |
903 | 2022-03-28 Jason Merrill <jason@redhat.com> |
904 | ||
905 | * pt.cc (determine_specialization): Add comment. | |
906 | ||
907 | 2022-03-28 Patrick Palka <ppalka@redhat.com> | |
908 | ||
909 | PR c++/105067 | |
910 | * pt.cc (finish_concept_definition): Check that a concept is | |
911 | declared with exactly one template parameter list. | |
912 | ||
913 | 2022-03-28 Patrick Palka <ppalka@redhat.com> | |
914 | ||
915 | PR c++/105064 | |
916 | * constraint.cc (maybe_substitute_reqs_for): Don't assume | |
917 | DECL_TEMPLATE_INFO is available. | |
918 | ||
919 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
920 | ||
921 | PR c++/105003 | |
922 | PR c++/104008 | |
923 | PR c++/102869 | |
924 | * pt.cc (complex_alias_template_r): walk_tree callback, replacing | |
925 | uses_all_template_parms_r, complex_pack_expansion_r. | |
926 | (complex_alias_template_p): Adjust. | |
927 | * tree.cc (strip_typedefs): Revert r12-7710 change. | |
928 | ||
929 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
930 | ||
931 | PR c++/102071 | |
932 | * init.cc (build_new_1): Include cookie in alignment. Omit | |
933 | constexpr wrapper from alloc_call. | |
934 | ||
935 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
936 | ||
937 | PR c++/103291 | |
938 | * name-lookup.cc (push_local_extern_decl_alias): Call | |
939 | determine_visibility. | |
940 | ||
941 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
942 | ||
943 | PR c++/102123 | |
944 | * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting | |
945 | a type template reference. | |
946 | ||
947 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
948 | ||
949 | PR c++/103968 | |
950 | * pt.cc (value_dependent_expression_p): Check | |
951 | has_value_dependent_address for conversion to reference. | |
952 | ||
953 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
954 | ||
955 | PR c++/103943 | |
956 | * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from | |
957 | tsubst_baselink. | |
958 | (instantiation_dependent_scope_ref_p): Check dependent_scope_p. | |
959 | ||
960 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
961 | ||
962 | PR c++/102045 | |
963 | * call.cc (make_base_init_ok): Call make_used. | |
964 | ||
965 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
966 | ||
967 | PR c++/104847 | |
968 | * mangle.cc (write_expression): Don't write a union designator when | |
969 | undigested. | |
970 | ||
971 | 2022-03-28 Jason Merrill <jason@redhat.com> | |
972 | ||
973 | PR c++/99445 | |
974 | PR c++/103769 | |
975 | * tree.cc (strip_typedefs): Use build_distinct_type_copy. | |
976 | ||
d2906412 GA |
977 | 2022-03-26 Patrick Palka <ppalka@redhat.com> |
978 | ||
979 | PR c++/105050 | |
980 | * constexpr.cc (potential_constant_expression_1) <case IF_STMT>: | |
981 | Clarify error message when a if-stmt is non-constant because its | |
982 | branches are non-constant. | |
983 | ||
984 | 2022-03-26 Patrick Palka <ppalka@redhat.com> | |
985 | ||
986 | PR c++/103455 | |
987 | * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test | |
988 | CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P. | |
989 | ||
31e989a2 GA |
990 | 2022-03-26 Jakub Jelinek <jakub@redhat.com> |
991 | ||
992 | * parser.cc (cp_parser_postfix_expression) | |
993 | <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't | |
994 | return cp_build_{vec,convert,bit_cast} result right away, instead | |
995 | set postfix_expression to it and break. | |
996 | ||
997 | 2022-03-25 Marek Polacek <polacek@redhat.com> | |
998 | ||
999 | PR c++/104944 | |
1000 | * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void). | |
1001 | (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with | |
1002 | complain == true. | |
1003 | ||
6fc4a993 GA |
1004 | 2022-03-24 Marek Polacek <polacek@redhat.com> |
1005 | ||
1006 | PR c++/104284 | |
1007 | * decl.cc (check_initializer): Don't call build_aggr_init in | |
1008 | a template. | |
1009 | ||
1010 | 2022-03-24 Jason Merrill <jason@redhat.com> | |
1011 | ||
1012 | PR c++/96645 | |
1013 | * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. | |
1014 | * class.cc (type_has_default_ctor_to_be_synthesized): New. | |
1015 | (type_has_non_user_provided_default_constructor_1): Support it. | |
1016 | (type_has_non_user_provided_default_constructor): Now a wrapper. | |
1017 | * method.cc (complain_about_unparsed_dmi): New. | |
1018 | (constructible_expr): Call it. | |
1019 | ||
1020 | 2022-03-24 Marek Polacek <polacek@redhat.com> | |
1021 | ||
1022 | PR c++/102990 | |
1023 | * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs. | |
1024 | ||
1025 | 2022-03-24 Patrick Palka <ppalka@redhat.com> | |
1026 | ||
1027 | PR c++/104620 | |
1028 | * call.cc (build_over_call): Use cxx_constant_value_sfinae | |
1029 | instead of cxx_constant_value to evaluate a consteval call. | |
1030 | * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter | |
1031 | and pass it to cxx_eval_outermost_constant_expr. | |
1032 | * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter. | |
1033 | * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to | |
1034 | cxx_constant_value_sfinae. | |
1035 | ||
1036 | 2022-03-24 Jakub Jelinek <jakub@redhat.com> | |
1037 | ||
1038 | PR c++/104994 | |
1039 | * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing | |
1040 | through extern thread_local declarations. Change wording from | |
1041 | declaration to definition. | |
1042 | (potential_constant_expression_1): Don't diagnose extern thread_local | |
1043 | declarations. Change wording from declared to defined. | |
1044 | * decl.cc (start_decl): Likewise. | |
1045 | ||
d1ca63a1 GA |
1046 | 2022-03-23 Jason Merrill <jason@redhat.com> |
1047 | ||
1048 | PR c++/103337 | |
1049 | * decl.cc (reshape_single_init): New. | |
1050 | (reshape_init_class): Use it. | |
1051 | ||
1052 | 2022-03-23 Jason Merrill <jason@redhat.com> | |
1053 | ||
1054 | PR c++/105006 | |
1055 | * name-lookup.cc (lookup_using_decl): Check that scope is | |
1056 | a dependent type before looking for dependent using. | |
1057 | ||
1058 | 2022-03-23 Jason Merrill <jason@redhat.com> | |
1059 | ||
1060 | PR c++/105006 | |
1061 | * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup | |
1062 | finds a dependent using. | |
1063 | ||
d156bb87 GA |
1064 | 2022-03-21 Jason Merrill <jason@redhat.com> |
1065 | ||
1066 | PR c++/58646 | |
1067 | * init.cc (build_vec_init): Check for vla element type. | |
1068 | ||
1069 | 2022-03-21 Jason Merrill <jason@redhat.com> | |
1070 | ||
1071 | PR c++/103337 | |
1072 | PR c++/102740 | |
1073 | PR c++/103299 | |
1074 | PR c++/102538 | |
1075 | * decl.cc (reshape_init_class): Avoid looking for designator | |
1076 | after we found it. | |
1077 | (reshape_init_r): Keep looking for designator. | |
1078 | ||
1079 | 2022-03-21 Jason Merrill <jason@redhat.com> | |
1080 | ||
1081 | PR c++/101767 | |
1082 | * decl.cc (reshape_init_class): Back out of anon struct | |
1083 | if a designator doesn't match. | |
1084 | ||
8ca61ad1 GA |
1085 | 2022-03-18 Jason Merrill <jason@redhat.com> |
1086 | ||
1087 | PR c++/92918 | |
1088 | PR c++/104476 | |
1089 | * class.cc (add_method): Avoid adding the same used function twice. | |
1090 | (handle_using_decl): Don't add_method. | |
1091 | (finish_struct): Don't using op= if we have one already. | |
1092 | (maybe_push_used_methods): New. | |
1093 | * semantics.cc (finish_member_declaration): Call it. | |
1094 | * name-lookup.cc (diagnose_name_conflict): No longer static. | |
1095 | (push_class_level_binding): Revert 92918 patch, limit | |
1096 | to dependent using. | |
1097 | * cp-tree.h: Adjust. | |
1098 | ||
1099 | 2022-03-18 Jakub Jelinek <jakub@redhat.com> | |
1100 | ||
1101 | PR c++/104568 | |
1102 | * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE | |
1103 | argument and its handling, instead add ITYPE2 argument. Only | |
1104 | support COOKIE_SIZE != NULL. | |
1105 | (build_new_1): If size is 0, change it to 0 * outer_nelts if | |
1106 | outer_nelts is non-NULL. Pass type rather than elt_type to | |
1107 | maybe_wrap_new_for_constexpr. | |
1108 | * constexpr.cc (build_new_constexpr_heap_type): New function. | |
1109 | (cxx_eval_constant_expression) <case CONVERT_EXPR>: | |
1110 | If elt_size is zero sized type, try to recover outer_nelts from | |
1111 | the size argument to operator new/new[] and pass that as | |
1112 | arg_size to build_new_constexpr_heap_type. Pass ctx, | |
1113 | non_constant_p and overflow_p to that call too. | |
1114 | ||
1115 | 2022-03-18 Marek Polacek <polacek@redhat.com> | |
1116 | ||
1117 | PR c++/104008 | |
1118 | * tree.cc (strip_typedefs): Don't strip an alias template when | |
1119 | doing so would result in losing a parameter pack. | |
1120 | ||
9fc8f278 GA |
1121 | 2022-03-16 Patrick Palka <ppalka@redhat.com> |
1122 | ||
1123 | * search.cc (lookup_member): Simplify by handling all values | |
1124 | of protect together in the ambiguous case. Don't modify protect. | |
1125 | ||
1126 | 2022-03-16 Patrick Palka <ppalka@redhat.com> | |
1127 | ||
1128 | PR c++/96780 | |
1129 | * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to | |
1130 | std::move/forward and other cast-like functions into simple | |
1131 | casts. | |
1132 | ||
14d2ac82 GA |
1133 | 2022-03-15 Patrick Palka <ppalka@redhat.com> |
1134 | ||
1135 | PR c++/103177 | |
1136 | * search.cc (lookup_field_info::errstr): Remove this data | |
1137 | member. | |
1138 | (lookup_field_r): Don't set errstr. | |
1139 | (lookup_member): Check ambiguity before checking access. | |
1140 | Simplify accordingly after errstr removal. Exit early upon | |
1141 | error or empty result. | |
1142 | ||
1143 | 2022-03-15 Jakub Jelinek <jakub@redhat.com> | |
1144 | ||
1145 | PR c++/104623 | |
1146 | * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens. | |
1147 | ||
510613e7 GA |
1148 | 2022-03-14 Jakub Jelinek <jakub@redhat.com> |
1149 | ||
1150 | PR tree-optimization/102586 | |
1151 | * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where | |
1152 | first argument's type is pointer to non-trivially-copyable type unless | |
1153 | it is address of a variable or parameter. | |
1154 | ||
57eeedda GA |
1155 | 2022-03-12 Patrick Palka <ppalka@redhat.com> |
1156 | ||
1157 | PR c++/104641 | |
1158 | * cp-tree.h (tsubst_flags::tf_tst_ok): New flag. | |
1159 | * decl.cc (make_typename_type): Allow a typename-specifier to | |
1160 | resolve to a template when tf_tst_ok, in which case return | |
1161 | a CTAD placeholder for the template. | |
1162 | * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when | |
1163 | substituting the type. | |
1164 | (tsubst): Clear tf_tst_ok and remember if it was set. | |
1165 | <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type | |
1166 | appropriately. | |
1167 | (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting | |
1168 | the type. | |
1169 | (tsubst_copy_and_build) <case CAST_EXPR>: Likewise. | |
1170 | <case CONSTRUCTOR>: Likewise. | |
1171 | ||
1172 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
1173 | ||
1174 | PR c++/104622 | |
1175 | * call.cc (missing_conversion_p): Define. | |
1176 | (add_candidates): Use it. | |
1177 | * pt.cc (check_non_deducible_conversion): Change type of strict | |
1178 | parameter to unification_kind_t and directly test for DEDUCE_CALL. | |
1179 | ||
1180 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
1181 | ||
1182 | PR c++/104527 | |
1183 | * constraint.cc (normalize_atom): Set | |
1184 | ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately. | |
1185 | (get_mapped_args): Make static, adjust parameters. Always | |
1186 | return a vector whose depth corresponds to the template depth of | |
1187 | the context of the atomic constraint expression. Micro-optimize | |
1188 | by passing false as exact to safe_grow_cleared and by collapsing | |
1189 | a multi-level depth-one argument vector. | |
1190 | (satisfy_atom): Adjust call to get_mapped_args and | |
1191 | diagnose_atomic_constraint. | |
1192 | (diagnose_atomic_constraint): Replace map parameter with an args | |
1193 | parameter. | |
1194 | * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define. | |
1195 | (get_mapped_args): Remove declaration. | |
1196 | ||
1197 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
1198 | Jason Merrill <jason@redhat.com> | |
1199 | ||
1200 | PR c++/98644 | |
1201 | * constexpr.cc (mark_non_constant): Define, split out from ... | |
1202 | (cxx_eval_outermost_constant_expr): ... here. | |
1203 | (maybe_constant_value): Use it. | |
1204 | ||
1205 | 2022-03-12 Patrick Palka <ppalka@redhat.com> | |
1206 | ||
1207 | * semantics.cc (finish_unary_fold_expr): Use input_location | |
1208 | instead of UNKNOWN_LOCATION. | |
1209 | (finish_binary_fold_expr): Likewise. | |
1210 | ||
1211 | 2022-03-12 Thomas Schwinge <thomas@codesourcery.com> | |
1212 | ||
1213 | PR other/65095 | |
1214 | * semantics.cc (handle_omp_array_sections_1) | |
1215 | (cp_oacc_check_attachments): Call 'user_omp_clause_code_name' | |
1216 | instead of 'c_omp_map_clause_name'. | |
1217 | ||
5e28be89 GA |
1218 | 2022-03-10 Marek Polacek <polacek@redhat.com> |
1219 | ||
1220 | PR c++/104608 | |
1221 | * parser.cc (cp_parser_template_name): Repeat lookup of | |
1222 | TYPE_DECLs. | |
1223 | ||
1224 | 2022-03-10 Marek Polacek <polacek@redhat.com> | |
1225 | ||
1226 | PR c++/104752 | |
1227 | * semantics.cc (finish_compound_literal): Disallow auto{x} for | |
1228 | is_constrained_auto. | |
1229 | * typeck2.cc (build_functional_cast_1): Likewise. | |
1230 | ||
1231 | 2022-03-10 Marek Polacek <polacek@redhat.com> | |
1232 | ||
1233 | PR c++/104846 | |
1234 | * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving | |
1235 | data member errors. | |
1236 | ||
1237 | 2022-03-10 Jakub Jelinek <jakub@redhat.com> | |
1238 | ||
1239 | PR c++/103460 | |
1240 | * decl.cc (grok_op_properties): Allow variadic operator[] for | |
1241 | C++23. | |
1242 | ||
1243 | 2022-03-10 Roger Sayle <roger@nextmovesoftware.com> | |
1244 | ||
1245 | PR c++/95999 | |
1246 | * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST | |
1247 | consider it to be zero (i.e. treat it like error_mark_node). | |
1248 | (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST, | |
1249 | set VALUE to error_mark_node. | |
1250 | ||
1251 | 2022-03-10 Roger Sayle <roger@nextmovesoftware.com> | |
1252 | ||
1253 | PR c++/39751 | |
1254 | * parser.cc (cp_parser_late_parsing_for_member): Confirm the token | |
1255 | stream hasn't been purged before processing DECL_PENDING_INLINE. | |
1256 | ||
8cc4f9cd GA |
1257 | 2022-03-09 Patrick Palka <ppalka@redhat.com> |
1258 | ||
1259 | PR c++/104823 | |
1260 | * except.cc (build_noexcept_spec): Strengthen dependence check | |
1261 | to instantiation_dependent_expression_p. | |
1262 | * parser.cc (cp_parser_parenthesized_expression_list_elt): | |
1263 | Remove fold_expr_p parameter, and don't call | |
1264 | instantiate_non_dependent_expr. | |
1265 | (cp_parser_parenthesized_expression_list): Adjust accordingly. | |
1266 | * pt.cc (expand_integer_pack): Strengthen dependence check | |
1267 | to instantiation_dependent_expression_p. | |
1268 | (instantiate_non_dependent_expr_internal): Adjust comment. | |
1269 | (instantiate_non_dependent_expr_sfinae): Likewise. Drop | |
1270 | the potentially-constant check, and relax and turn the | |
1271 | dependence check into a checking assert. | |
1272 | (instantiate_non_dependent_or_null): Adjust comment. | |
1273 | * semantics.cc (finish_decltype_type): Keep | |
1274 | processing_template_decl cleared after calling | |
1275 | instantiate_non_dependent_expr_sfinae. | |
1276 | ||
1277 | 2022-03-09 Patrick Palka <ppalka@redhat.com> | |
1278 | ||
1279 | PR c++/102137 | |
1280 | PR c++/87820 | |
1281 | * cp-tree.h (is_copy_initialization): Declare. | |
1282 | * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING | |
1283 | when is_copy_initialization is true. | |
1284 | * init.cc (build_aggr_init): Split out copy-initialization | |
1285 | check into ... | |
1286 | (is_copy_initialization): ... here. | |
1287 | * pt.cc (instantiate_decl): Pass 0 instead of | |
1288 | LOOKUP_ONLYCONVERTING as flags to cp_finish_decl. | |
1289 | ||
1290 | 2022-03-09 Patrick Palka <ppalka@redhat.com> | |
1291 | ||
1292 | PR c++/65396 | |
1293 | * cp-tree.h (merge_default_template_args): Declare. | |
1294 | * decl.cc (merge_default_template_args): Define, factored out | |
1295 | from redeclare_class_template. | |
1296 | (duplicate_decls): Use it when merging member function template | |
1297 | and free function declarations. | |
1298 | * pt.cc (redeclare_class_template): Factor out default argument | |
1299 | merging logic into merge_default_template_args. Improve location | |
1300 | of a note when there's a template parameter kind mismatch. | |
1301 | ||
1302 | 2022-03-09 Jakub Jelinek <jakub@redhat.com> | |
1303 | ||
1304 | PR c/104711 | |
1305 | * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS | |
1306 | instead of TYPE_UNSIGNED. | |
1307 | * typeck.cc (cp_build_binary_op): Don't emit | |
1308 | -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS. | |
1309 | ||
8d038a84 GA |
1310 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> |
1311 | ||
1312 | PR c++/96440 | |
1313 | * decl.cc (start_decl): Defend against prefix_attributes being | |
1314 | error_mark_node. | |
1315 | ||
1316 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> | |
1317 | ||
1318 | PR c++/96437 | |
1319 | * parser.cc (synthesize_implicit_template_parm): Check that | |
1320 | TREE_VALUE (new_parm) isn't error_mark_node before setting its | |
1321 | DECL_VIRTUAL_P. | |
1322 | ||
1323 | 2022-03-08 Roger Sayle <roger@nextmovesoftware.com> | |
1324 | ||
1325 | PR c++/96329 | |
1326 | * parser.cc (cp_parser_linkage_specification): Treat the case where | |
1327 | linkage is error_mark_node as "invalid linkage-specification". | |
1328 | ||
1329 | 2022-03-08 Marek Polacek <polacek@redhat.com> | |
1330 | ||
1331 | PR c++/104108 | |
1332 | * pt.cc (convert_nontype_argument): Recompute | |
1333 | value_dependent_expression_p after build_converted_constant_expr. | |
1334 | ||
1335 | 2022-03-08 Marek Polacek <polacek@redhat.com> | |
1336 | ||
1337 | * decl2.cc (is_late_template_attribute): Do not defer attribute | |
1338 | unavailable. | |
1339 | * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE. | |
1340 | ||
1341 | 2022-03-08 Jakub Jelinek <jakub@redhat.com> | |
1342 | ||
1343 | PR c++/104806 | |
1344 | * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore | |
1345 | identifiers with space at the end. | |
1346 | ||
e6533e2e GA |
1347 | 2022-03-07 Jason Merrill <jason@redhat.com> |
1348 | ||
1349 | PR c++/104618 | |
1350 | * decl2.cc (mark_single_function): Look through parens and location | |
1351 | wrapper. | |
1352 | * typeck.cc (cp_build_addr_expr_1): Not here. | |
1353 | ||
1354 | 2022-03-07 Jakub Jelinek <jakub@redhat.com> | |
1355 | ||
1356 | * parser.cc (cp_parser_omp_clause_map): Add missing space in string | |
1357 | literal. | |
1358 | ||
1359 | 2022-03-07 Jakub Jelinek <jakub@redhat.com> | |
1360 | ||
1361 | * cvt.cc: Fix up duplicated word issue in a comment. | |
1362 | * pt.cc: Likewise. | |
1363 | * module.cc: Likewise. | |
1364 | * coroutines.cc: Likewise. | |
1365 | ||
8d96e14c GA |
1366 | 2022-03-04 Nathan Sidwell <nathan@acm.org> |
1367 | ||
1368 | * mangle.cc (is_std_substitution): Check global module. | |
1369 | (is_std_substitution_char): Return bool. | |
1370 | ||
1371 | 2022-03-04 Nathan Sidwell <nathan@acm.org> | |
1372 | ||
1373 | * cp-tree.h (mangle_identifier): Replace with ... | |
1374 | (mangle_module_component): ... this. | |
1375 | * mangle.cc (dump_substitution_candidates): Adjust. | |
1376 | (add_substitution): Likewise. | |
1377 | (find_substitution): Likewise. | |
1378 | (unmangled_name_p): Likewise. | |
1379 | (mangle_module_substitution): Reimplement. | |
1380 | (mangle_module_component): New. | |
1381 | (write_module, maybe_write_module): Adjust. | |
1382 | (write_name): Drop modules here. | |
1383 | (write_unqualified): Do them here instead. | |
1384 | (mangle_global_init): Adjust. | |
1385 | * module.cc (module_state::mangle): Adjust. | |
1386 | (mangle_module): Likewise. | |
1387 | (get_originating_module): Adjust. | |
1388 | ||
a35f1697 GA |
1389 | 2022-02-28 Marek Polacek <polacek@redhat.com> |
1390 | ||
1391 | PR c++/104682 | |
1392 | * cp-tree.h (build_enumerator): Adjust. | |
1393 | * decl.cc (finish_enum): Make it return the new decl. | |
1394 | * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE. | |
1395 | ||
1396 | 2022-02-28 Marek Polacek <polacek@redhat.com> | |
1397 | ||
1398 | PR c++/104667 | |
1399 | * decl2.cc (is_late_template_attribute): Cope with a decl without | |
1400 | a type. | |
1401 | ||
88c1b038 GA |
1402 | 2022-02-27 Jason Merrill <jason@redhat.com> |
1403 | ||
1404 | PR c++/104618 | |
1405 | * typeck.cc (cp_build_addr_expr_1): Also | |
1406 | maybe_undo_parenthesized_ref. | |
1407 | ||
756a6185 GA |
1408 | 2022-02-24 Martin Liska <mliska@suse.cz> |
1409 | ||
1410 | * pt.cc (defarg_insts_for): Use braces for subobject. | |
1411 | ||
5a9ba3f2 GA |
1412 | 2022-02-18 Patrick Palka <ppalka@redhat.com> |
1413 | ||
1414 | PR c++/94944 | |
1415 | * pt.cc (maybe_instantiate_noexcept): For non-static member | |
1416 | functions, set current_class_ptr/ref to the specialized 'this' | |
1417 | instead. | |
1418 | ||
0bdb0498 GA |
1419 | 2022-02-17 Jason Merrill <jason@redhat.com> |
1420 | ||
1421 | PR c++/104539 | |
1422 | * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT. | |
1423 | ||
1424 | 2022-02-17 Jason Merrill <jason@redhat.com> | |
1425 | ||
1426 | PR c++/90451 | |
1427 | * decl2.cc (mark_single_function): New. | |
1428 | * cp-tree.h: Declare it. | |
1429 | * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF. | |
1430 | * semantics.cc (finish_qualified_id_expr): Not here. | |
1431 | (finish_id_expression_1): Or here. | |
1432 | (finish_decltype_type): Call mark_single_function. | |
1433 | * cvt.cc (convert_to_void): And here. | |
1434 | * pt.cc (convert_nontype_argument): And here. | |
1435 | * init.cc (build_offset_ref): Adjust assert. | |
1436 | ||
1437 | 2022-02-17 Patrick Palka <ppalka@redhat.com> | |
1438 | ||
1439 | PR c++/104565 | |
1440 | * semantics.cc (finish_compound_literal): Don't perform | |
1441 | non-dependent expr folding before calling check_narrowing. | |
1442 | ||
cb3afcd2 GA |
1443 | 2022-02-16 Patrick Palka <ppalka@redhat.com> |
1444 | ||
1445 | PR c++/104507 | |
1446 | * constexpr.cc (potential_constant_expression_1) | |
1447 | <case NON_DEPENDENT_EXPR>: Return false instead of recursing. | |
1448 | Assert tf_error isn't set. | |
1449 | ||
875e493b GA |
1450 | 2022-02-15 Jason Merrill <jason@redhat.com> |
1451 | ||
1452 | PR c++/104107 | |
1453 | PR c++/95036 | |
1454 | * pt.cc (coerce_template_template_parms): Take full parms. | |
1455 | Avoid adding too much of outer_args. | |
1456 | (coerce_template_template_parm): Adjust. | |
1457 | (template_template_parm_bindings_ok_p): Adjust. | |
1458 | (convert_template_argument): Adjust. | |
1459 | ||
1f8a09d2 GA |
1460 | 2022-02-14 Jakub Jelinek <jakub@redhat.com> |
1461 | ||
1462 | PR c++/104513 | |
1463 | * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>: | |
1464 | Don't punt if returns (target). | |
1465 | ||
e8d68f0a GA |
1466 | 2022-02-11 Jakub Jelinek <jakub@redhat.com> |
1467 | ||
1468 | PR c++/104472 | |
1469 | * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>: | |
1470 | Only return fold_const_call result if it is non-NULL. Otherwise | |
1471 | fall through into the default: case to return t, set *non_constant_p | |
1472 | and emit diagnostics if needed. | |
1473 | ||
a645583d GA |
1474 | 2022-02-10 Jason Merrill <jason@redhat.com> |
1475 | ||
1476 | * module.cc (depset::hash::add_specializations): Use | |
1477 | STRIP_TEMPLATE. | |
1478 | ||
1479 | 2022-02-10 Tobias Burnus <tobias@codesourcery.com> | |
1480 | ||
1481 | PR c++/102204 | |
1482 | * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual | |
1483 | members as those are permitted since OpenMP 5.0. | |
1484 | ||
1485 | 2022-02-10 Patrick Palka <ppalka@redhat.com> | |
1486 | ||
1487 | * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL | |
1488 | better. | |
1489 | ||
1490 | 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com> | |
1491 | ||
1492 | * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause. | |
1493 | (cp_parser_omp_var_list_no_open): Handle array sections. | |
1494 | (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR | |
1495 | case. | |
1496 | (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK. | |
1497 | * semantics.cc (handle_omp_array_sections): Handle clause restrictions. | |
1498 | (finish_omp_clauses): Handle array sections. | |
1499 | ||
3adf509f GA |
1500 | 2022-02-09 Patrick Palka <ppalka@redhat.com> |
1501 | ||
1502 | PR c++/104432 | |
1503 | * call.cc (build_new_method_call): When a non-dependent call | |
1504 | resolves to a specialization of a member template, always build | |
1505 | the pruned overload set using the member template, not the | |
1506 | specialization. | |
1507 | * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify | |
1508 | and correct how members from the new lookup set are matched to | |
1509 | those from the old one. | |
1510 | (tsubst_baselink): Pass binfo_type as newtype to | |
1511 | filter_memfn_lookup. | |
1512 | ||
1513 | 2022-02-09 Jason Merrill <jason@redhat.com> | |
1514 | ||
1515 | PR c++/103752 | |
1516 | * module.cc (trees_out::core_vals): Stream explicit specifier. | |
1517 | (trees_in::core_vals): Likewise. | |
1518 | * pt.cc (store_explicit_specifier): No longer static. | |
1519 | (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P. | |
1520 | * cp-tree.h (lookup_explicit_specifier): Declare. | |
1521 | ||
1522 | 2022-02-09 Jason Merrill <jason@redhat.com> | |
1523 | ||
1524 | PR c++/96876 | |
1525 | * typeck2.cc (split_nonconstant_init_1): Push cleanups for | |
1526 | preceding members with constant initialization. | |
1527 | (maybe_push_temp_cleanup): Do nothing if -fno-exceptions. | |
1528 | ||
2a2fda2d GA |
1529 | 2022-02-08 Jakub Jelinek <jakub@redhat.com> |
1530 | ||
1531 | PR c++/104379 | |
1532 | * name-lookup.cc (check_local_shadow): When diagnosing shadowing | |
1533 | of a member or global declaration, add warning suppression for | |
1534 | the decl and don't warn again on it. | |
1535 | ||
1536 | 2022-02-08 Jakub Jelinek <jakub@redhat.com> | |
1537 | ||
1538 | PR c++/104403 | |
1539 | * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs | |
1540 | of TREE_STATIC vars may only appear in -std=c++23. | |
1541 | ||
1542 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
1543 | ||
1544 | PR c++/80951 | |
1545 | * pt.cc (uses_deducible_template_parms): Consider the | |
1546 | noexcept-spec of a function type. | |
1547 | ||
1548 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
1549 | ||
1550 | PR c++/104410 | |
1551 | * constraint.cc (satisfaction_value): Relax assert to accept | |
1552 | cv-qualified bool. | |
1553 | ||
1554 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
1555 | ||
1556 | PR c++/103706 | |
1557 | * pt.cc (preserve_args): New function. | |
1558 | (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO. | |
1559 | ||
1560 | 2022-02-08 Patrick Palka <ppalka@redhat.com> | |
1561 | ||
1562 | PR c++/103706 | |
1563 | * constraint.cc (satisfy_declaration_constraints): Use | |
1564 | lambda_regenerating_args instead. | |
1565 | * cp-tree.h (lambda_regenerating_args): Declare. | |
1566 | * pt.cc (lambda_regenerating_args): Define, split out from | |
1567 | satisfy_declaration_constraints. | |
1568 | (do_auto_deduction): Use lambda_regenerating_args to obtain the | |
1569 | full set of outer template arguments for satisfaction when | |
1570 | inside a lambda. | |
1571 | ||
353f8fcc GA |
1572 | 2022-02-06 Patrick Palka <ppalka@redhat.com> |
1573 | ||
1574 | PR c++/96242 | |
1575 | * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED | |
1576 | fn by calling maybe_synthesize_method instead of relying on | |
1577 | maybe_instantiate_noexcept. Move call to m_i_n after the | |
1578 | DECL_DELETED_FN handling. | |
1579 | * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED | |
1580 | fn synthesis to only those with an implicit noexcept-spec, and | |
1581 | return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards. | |
1582 | ||
1583 | 2022-02-06 Jakub Jelinek <jakub@redhat.com> | |
1584 | ||
1585 | PR c++/89074 | |
1586 | PR c++/104033 | |
1587 | * constexpr.cc (cxx_eval_binary_expression): Temporarily set | |
1588 | folding_cxx_constexpr. | |
1589 | ||
661109b0 GA |
1590 | 2022-02-05 Jason Merrill <jason@redhat.com> |
1591 | ||
1592 | PR c++/104300 | |
1593 | PR c++/92385 | |
1594 | * cp-tree.h (get_vec_init_expr): New. | |
1595 | (target_expr_needs_replace): New. | |
1596 | * cp-gimplify.cc (cp_gimplify_init_expr): Use it. | |
1597 | (struct cp_fold_data): New. | |
1598 | (cp_fold_r): Only genericize inits at end of fn. | |
1599 | (cp_fold_function): Here. | |
1600 | (cp_fully_fold_init): Not here. | |
1601 | * init.cc (build_vec_init): Use get_vec_init_expr. | |
1602 | * tree.cc (build_vec_init_expr): Likewise. | |
1603 | * typeck2.cc (split_nonconstant_init_1): Likewise. | |
1604 | (process_init_constructor): Wrap VEC_INIT_EXPR in | |
1605 | TARGET_EXPR. | |
1606 | ||
1607 | 2022-02-05 Jason Merrill <jason@redhat.com> | |
1608 | ||
1609 | * pt.cc (iterative_hash_template_arg): Add comment. | |
1610 | ||
682ede39 GA |
1611 | 2022-02-03 Patrick Palka <ppalka@redhat.com> |
1612 | ||
1613 | PR c++/104079 | |
1614 | * pt.cc (value_dependent_noexcept_spec_p): New predicate split | |
1615 | out from ... | |
1616 | (dependent_type_p_r): ... here. | |
1617 | (instantiation_dependent_r): Use value_dependent_noexcept_spec_p | |
1618 | to consider dependence of a noexcept-spec before C++17. | |
1619 | * tree.cc (fixup_deferred_exception_variants): Clear | |
1620 | TYPE_DEPENDENT_P_VALID. | |
1621 | ||
1622 | 2022-02-03 Jason Merrill <jason@redhat.com> | |
1623 | ||
1624 | PR c++/104302 | |
1625 | * decl.cc (maybe_deduce_size_from_array_init): Give up | |
1626 | on type-dependent init. | |
1627 | (cp_complete_array_type): Only call reshape_init for character | |
1628 | array. | |
1629 | ||
ae7e4af9 GA |
1630 | 2022-02-01 Jason Merrill <jason@redhat.com> |
1631 | ||
1632 | PR c++/103186 | |
1633 | * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher. | |
1634 | (defarg_insts_for): New. | |
1635 | (tsubst_default_argument): Adjust. | |
1636 | ||
1bb52662 GA |
1637 | 2022-01-31 Marek Polacek <polacek@redhat.com> |
1638 | ||
1639 | PR c++/102414 | |
1640 | PR c++/101874 | |
1641 | * decl.cc (create_array_type_for_decl): Use template_placeholder_p. | |
1642 | Sorry on a variable-length array of auto. | |
1643 | ||
1644 | 2022-01-31 Marek Polacek <polacek@redhat.com> | |
1645 | ||
1646 | PR c++/102434 | |
1647 | * class.cc (finish_struct): Don't allow union initializer_list. | |
1648 | ||
1649 | 2022-01-31 Patrick Palka <ppalka@redhat.com> | |
1650 | ||
1651 | PR c++/104294 | |
1652 | * pt.cc (ctor_deduction_guides_for): Correct computation of | |
1653 | outer_args. | |
1654 | ||
1655 | 2022-01-31 Patrick Palka <ppalka@redhat.com> | |
1656 | ||
1657 | PR c++/104291 | |
1658 | * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear | |
1659 | walk_subtrees if !include_nondeduced_p. Simplify given that | |
1660 | cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW. | |
1661 | ||
f6f2d6cf GA |
1662 | 2022-01-28 Patrick Palka <ppalka@redhat.com> |
1663 | Jason Merrill <jason@redhat.com> | |
1664 | ||
1665 | PR c++/92752 | |
1666 | * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the | |
1667 | unqualified pointer type not the qualified one. | |
1668 | ||
1669 | 2022-01-28 Patrick Palka <ppalka@redhat.com> | |
1670 | ||
1671 | PR c++/103341 | |
1672 | * decl.cc (cp_finish_decl): Pass the template arguments of a | |
1673 | variable template specialization or a templated static data | |
1674 | member to do_auto_deduction when the auto is constrained. | |
1675 | ||
1676 | 2022-01-28 Jason Merrill <jason@redhat.com> | |
1677 | ||
1678 | PR c++/100198 | |
1679 | PR c++/100030 | |
1680 | PR c++/100282 | |
1681 | * parser.cc (cp_parser_enumerator_definition): Sorry on parameter | |
1682 | pack in lambda. | |
1683 | (cp_parser_class_head): And in class attributes. | |
1684 | * pt.cc (check_for_bare_parameter_packs): Sorry instead of error | |
1685 | in lambda. | |
1686 | ||
99f17e99 GA |
1687 | 2022-01-27 Jason Merrill <jason@redhat.com> |
1688 | ||
1689 | PR c++/104245 | |
1690 | PR c++/51344 | |
1691 | * decl2.cc (save_template_attributes): Take late attrs as parm. | |
1692 | (cplus_decl_attributes): Call it after decl_attributes, | |
1693 | splice_template_attributes before. | |
1694 | ||
1695 | 2022-01-27 Patrick Palka <ppalka@redhat.com> | |
1696 | ||
1697 | PR c++/99895 | |
1698 | * call.cc (build_over_call): For a non-dependent member call, | |
1699 | build up a CALL_EXPR using a COMPONENT_REF callee, as in | |
1700 | build_new_method_call. | |
1701 | * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either. | |
1702 | * tree.cc (build_min_non_dep_op_overload): Adjust accordingly | |
1703 | after the build_over_call change. | |
1704 | ||
1705 | 2022-01-27 Patrick Palka <ppalka@redhat.com> | |
1706 | ||
1707 | PR c++/92944 | |
1708 | PR c++/103678 | |
1709 | * parser.cc (cp_parser_class_head): Update 'type' with the result | |
1710 | of maybe_process_partial_specialization in the | |
1711 | nested_name_specifier branch. Refactor nearby code to accomodate | |
1712 | that maybe_process_partial_specialization returns a _TYPE, not a | |
1713 | TYPE_DECL, and eliminate local variable 'class_type' in passing. | |
1714 | ||
1715 | 2022-01-27 Marek Polacek <polacek@redhat.com> | |
1716 | ||
1717 | PR c++/101988 | |
1718 | * decl.cc (create_array_type_for_decl): Reject forming an array of | |
1719 | placeholder for a deduced class type. | |
1720 | ||
eaa59070 GA |
1721 | 2022-01-26 Jason Merrill <jason@redhat.com> |
1722 | ||
1723 | PR c++/104206 | |
1724 | PR c++/101072 | |
1725 | * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check. | |
1726 | ||
1727 | 2022-01-26 Jakub Jelinek <jakub@redhat.com> | |
1728 | ||
1729 | PR c++/104226 | |
1730 | * constexpr.cc (init_subob_ctx): For vector ctors containing | |
1731 | vector elements, ensure appending to the same ctor instead of | |
1732 | creating another one. | |
1733 | ||
1734 | 2022-01-26 Marek Polacek <polacek@redhat.com> | |
1735 | ||
1736 | PR target/104213 | |
1737 | * decl.cc (finish_constructor_body): Suppress -Wuse-after-free. | |
1738 | (finish_destructor_body): Likewise. | |
1739 | * optimize.cc (build_delete_destructor_body): Likewise. | |
1740 | ||
1741 | 2022-01-26 Jason Merrill <jason@redhat.com> | |
1742 | ||
1743 | PR c++/104235 | |
1744 | * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL. | |
1745 | ||
1746 | 2022-01-26 Jason Merrill <jason@redhat.com> | |
1747 | ||
1748 | PR c++/103057 | |
1749 | * pt.cc (tsubst_aggr_type): Call tsubst for alias template | |
1750 | specialization. | |
1751 | ||
e0b8716f GA |
1752 | 2022-01-25 Patrick Palka <ppalka@redhat.com> |
1753 | ||
1754 | PR c++/101532 | |
1755 | PR c++/104225 | |
1756 | * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept | |
1757 | on a deleted function. | |
1758 | ||
1759 | 2022-01-25 Jason Merrill <jason@redhat.com> | |
1760 | ||
1761 | PR c++/59950 | |
1762 | * call.cc (build_over_call): Use cp_build_indirect_ref. | |
1763 | ||
bb99171b GA |
1764 | 2022-01-24 Patrick Palka <ppalka@redhat.com> |
1765 | ||
1766 | PR c++/104197 | |
1767 | * pt.cc (make_auto_1): Use -1 as a placeholder default argument | |
1768 | for level. | |
1769 | ||
1770 | 2022-01-24 Patrick Palka <ppalka@redhat.com> | |
1771 | ||
1772 | PR c++/104173 | |
1773 | * typeck.cc (build_class_member_access_expr): Extend | |
1774 | unary_complex_lvalue result adjustment to preserve all | |
1775 | rvalues, not just xvalues. | |
1776 | ||
0c940703 GA |
1777 | 2022-01-23 Will Wray <wjwray@gmail.com> |
1778 | ||
1779 | PR c++/55227 | |
1780 | * decl.cc (reshape_init_r): Only call has_designator_check when | |
1781 | first_initializer_p or for the inner constructor element. | |
1782 | (cp_complete_array_type): Call reshape_init on braced-init-list. | |
1783 | ||
1784 | 2022-01-23 Jason Merrill <jason@redhat.com> | |
1785 | ||
1786 | PR c++/104182 | |
1787 | * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing | |
1788 | has set DECL_INITIAL on a TARGET_EXPR slot. | |
1789 | * tree.cc (is_local_temp): Don't check DECL_CONTEXT. | |
1790 | ||
1791 | 2022-01-23 Jason Merrill <jason@redhat.com> | |
1792 | ||
1793 | PR c++/101072 | |
1794 | * cp-tree.h (build_implicit_conv_flags): Declare. | |
1795 | * call.cc (build_implicit_conv_flags): Split out from... | |
1796 | (perform_implicit_conversion_flags): ...here. | |
1797 | * decl.cc (check_initializer): Use it. | |
1798 | * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling. | |
1799 | * semantics.cc (finish_compound_literal): Don't treat | |
1800 | scalar values like CONSTRUCTORs. | |
1801 | ||
9dd44357 GA |
1802 | 2022-01-21 Jason Merrill <jason@redhat.com> |
1803 | ||
1804 | * semantics.cc (find_failing_clause): Return expr if not | |
1805 | decomposable. | |
1806 | (finish_static_assert): Show constant values in failing | |
1807 | comparison. | |
1808 | ||
1809 | 2022-01-21 Jason Merrill <jason@redhat.com> | |
1810 | ||
1811 | PR c++/104084 | |
1812 | PR c++/20040 | |
1813 | * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if | |
1814 | alloc_expr is a TARGET_EXPR. | |
1815 | ||
1816 | 2022-01-21 Marek Polacek <polacek@redhat.com> | |
1817 | ||
1818 | PR c++/101715 | |
1819 | * tree.cc (fixup_deferred_exception_variants): Remove duplicate | |
1820 | variants after parsing the exception specifications. | |
1821 | ||
1822 | 2022-01-21 Jason Merrill <jason@redhat.com> | |
1823 | ||
1824 | PR c++/104139 | |
1825 | PR c++/103681 | |
1826 | * class.cc (end_of_class): Use base_binfo. | |
1827 | ||
5fa55d55 GA |
1828 | 2022-01-20 Jason Merrill <jason@redhat.com> |
1829 | ||
1830 | PR c++/101405 | |
1831 | * decl.cc (reshape_init_class): Reject designator for a member of | |
1832 | another class. | |
1833 | ||
1834 | 2022-01-20 Patrick Palka <ppalka@redhat.com> | |
1835 | ||
1836 | PR c++/91911 | |
1837 | PR c++/103672 | |
1838 | * pt.cc (keep_template_parm): Punt on a level 0 template parm. | |
1839 | (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard. | |
1840 | (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders | |
1841 | specially. | |
1842 | (make_auto_1): Add defaulted 'level' parameter. | |
1843 | (make_template_placeholder): Pass 0 as 'level' to make_auto_1. | |
1844 | ||
1845 | 2022-01-20 Patrick Palka <ppalka@redhat.com> | |
1846 | ||
1847 | * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as | |
1848 | function return type even when !funcdecl_p. | |
1849 | ||
1850 | 2022-01-20 Martin Liska <mliska@suse.cz> | |
1851 | ||
1852 | PR c++/104134 | |
1853 | * error.cc (dump_aggr_type): Partially disable the warning. | |
1854 | ||
1855 | 2022-01-20 Jason Merrill <jason@redhat.com> | |
1856 | ||
1857 | PR c++/102300 | |
1858 | * parser.cc (cp_parser_template_name): Use dependent_scope_p. | |
1859 | ||
fe1ad141 GA |
1860 | 2022-01-19 David Malcolm <dmalcolm@redhat.com> |
1861 | ||
1862 | * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc | |
1863 | renaming. | |
1864 | * cp-tree.h (cp_pt_c_tests): Rename to... | |
1865 | (cp_pt_cc_tests): ...this. | |
1866 | (cp_tree_c_tests): Rename to... | |
1867 | (cp_tree_cc_tests): ...this. | |
1868 | * pt.cc (cp_pt_c_tests): Rename to... | |
1869 | (cp_pt_cc_tests): ...this. | |
1870 | * tree.cc (cp_tree_c_tests): Rename to... | |
1871 | (cp_tree_cc_tests): ...this. | |
1872 | ||
1873 | 2022-01-19 Jason Merrill <jason@redhat.com> | |
1874 | ||
1875 | * parser.cc (saved_token_sentinel::rollback): Use | |
1876 | cp_lexer_previous_token. | |
1877 | ||
7a761ae6 GA |
1878 | 2022-01-18 Jakub Jelinek <jakub@redhat.com> |
1879 | ||
1880 | PR c++/104055 | |
1881 | * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a | |
1882 | TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather | |
1883 | than get_target_expr_sfinae with tf_no_cleanup, and don't set | |
1884 | TREE_CONSTANT. | |
1885 | ||
1886 | 2022-01-18 Jason Merrill <jason@redhat.com> | |
1887 | Jakub Jelinek <jakub@redhat.com> | |
1888 | ||
1889 | PR c++/104025 | |
1890 | * parser.cc (saved_token_sentinel::rollback): Call | |
1891 | cp_lexer_set_source_position. | |
1892 | (~saved_token_sentinel): Call rollback. | |
1893 | ||
1894 | 2022-01-18 Patrick Palka <ppalka@redhat.com> | |
1895 | ||
1896 | PR c++/104074 | |
1897 | * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so | |
1898 | that we return false for DEPENDENT_OPERATOR_TYPE too. | |
1899 | ||
fc829782 GA |
1900 | 2022-01-17 Martin Liska <mliska@suse.cz> |
1901 | ||
1902 | * Make-lang.in: Rename .c names to .cc. | |
1903 | * config-lang.in: Likewise. | |
1904 | * constexpr.cc (cxx_eval_constant_expression): Likewise. | |
1905 | * coroutines.cc (morph_fn_to_coro): Likewise. | |
1906 | * cp-gimplify.cc (cp_gimplify_expr): Likewise. | |
1907 | * cp-lang.cc (struct lang_hooks): Likewise. | |
1908 | (get_template_argument_pack_elems_folded): Likewise. | |
1909 | * cp-objcp-common.cc (cp_tree_size): Likewise. | |
1910 | (cp_unit_size_without_reusable_padding): Likewise. | |
1911 | (pop_file_scope): Likewise. | |
1912 | (cp_pushdecl): Likewise. | |
1913 | * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise. | |
1914 | (cxx_simulate_record_decl): Likewise. | |
1915 | * cp-tree.h (struct named_label_entry): Likewise. | |
1916 | (current_function_return_value): Likewise. | |
1917 | (more_aggr_init_expr_args_p): Likewise. | |
1918 | (get_function_version_dispatcher): Likewise. | |
1919 | (common_enclosing_class): Likewise. | |
1920 | (strip_fnptr_conv): Likewise. | |
1921 | (current_decl_namespace): Likewise. | |
1922 | (do_aggregate_paren_init): Likewise. | |
1923 | (cp_check_const_attributes): Likewise. | |
1924 | (qualified_name_lookup_error): Likewise. | |
1925 | (generic_targs_for): Likewise. | |
1926 | (mark_exp_read): Likewise. | |
1927 | (is_global_friend): Likewise. | |
1928 | (maybe_reject_flexarray_init): Likewise. | |
1929 | (module_token_lang): Likewise. | |
1930 | (handle_module_option): Likewise. | |
1931 | (literal_integer_zerop): Likewise. | |
1932 | (build_extra_args): Likewise. | |
1933 | (build_if_nonnull): Likewise. | |
1934 | (maybe_check_overriding_exception_spec): Likewise. | |
1935 | (finish_omp_target_clauses): Likewise. | |
1936 | (maybe_warn_zero_as_null_pointer_constant): Likewise. | |
1937 | (cxx_print_error_function): Likewise. | |
1938 | (decl_in_std_namespace_p): Likewise. | |
1939 | (merge_exception_specifiers): Likewise. | |
1940 | (mangle_module_global_init): Likewise. | |
1941 | (cxx_block_may_fallthru): Likewise. | |
1942 | (fold_builtin_source_location): Likewise. | |
1943 | (enum cp_oracle_request): Likewise. | |
1944 | (subsumes): Likewise. | |
1945 | (cp_finish_injected_record_type): Likewise. | |
1946 | (vtv_build_vtable_verify_fndecl): Likewise. | |
1947 | (cp_tree_c_finish_parsing): Likewise. | |
1948 | * cvt.cc (diagnose_ref_binding): Likewise. | |
1949 | (convert_to_void): Likewise. | |
1950 | (convert_force): Likewise. | |
1951 | (type_promotes_to): Likewise. | |
1952 | * decl.cc (make_unbound_class_template_raw): Likewise. | |
1953 | (cxx_init_decl_processing): Likewise. | |
1954 | (check_class_member_definition_namespace): Likewise. | |
1955 | (cxx_maybe_build_cleanup): Likewise. | |
1956 | * decl2.cc (maybe_emit_vtables): Likewise. | |
1957 | * error.cc (dump_function_name): Likewise. | |
1958 | * init.cc (is_class_type): Likewise. | |
1959 | (build_new_1): Likewise. | |
1960 | * lang-specs.h: Likewise. | |
1961 | * method.cc (make_alias_for_thunk): Likewise. | |
1962 | * module.cc (specialization_add): Likewise. | |
1963 | (module_state::read_cluster): Likewise. | |
1964 | * name-lookup.cc (check_extern_c_conflict): Likewise. | |
1965 | * name-lookup.h (struct cxx_binding): Likewise. | |
1966 | * parser.cc (cp_parser_identifier): Likewise. | |
1967 | * parser.h (struct cp_parser): Likewise. | |
1968 | * pt.cc (has_value_dependent_address): Likewise. | |
1969 | (push_tinst_level_loc): Likewise. | |
1970 | * semantics.cc (finish_omp_clauses): Likewise. | |
1971 | (finish_omp_atomic): Likewise. | |
1972 | * tree.cc (cp_save_expr): Likewise. | |
1973 | (cp_free_lang_data): Likewise. | |
1974 | * typeck.cc (cp_common_type): Likewise. | |
1975 | (strip_array_domain): Likewise. | |
1976 | (rationalize_conditional_expr): Likewise. | |
1977 | (check_return_expr): Likewise. | |
1978 | * vtable-class-hierarchy.cc: Likewise. | |
1979 | ||
1980 | 2022-01-17 Martin Liska <mliska@suse.cz> | |
1981 | ||
1982 | * call.c: Moved to... | |
1983 | * call.cc: ...here. | |
1984 | * class.c: Moved to... | |
1985 | * class.cc: ...here. | |
1986 | * constexpr.c: Moved to... | |
1987 | * constexpr.cc: ...here. | |
1988 | * cp-gimplify.c: Moved to... | |
1989 | * cp-gimplify.cc: ...here. | |
1990 | * cp-lang.c: Moved to... | |
1991 | * cp-lang.cc: ...here. | |
1992 | * cp-objcp-common.c: Moved to... | |
1993 | * cp-objcp-common.cc: ...here. | |
1994 | * cp-ubsan.c: Moved to... | |
1995 | * cp-ubsan.cc: ...here. | |
1996 | * cvt.c: Moved to... | |
1997 | * cvt.cc: ...here. | |
1998 | * cxx-pretty-print.c: Moved to... | |
1999 | * cxx-pretty-print.cc: ...here. | |
2000 | * decl.c: Moved to... | |
2001 | * decl.cc: ...here. | |
2002 | * decl2.c: Moved to... | |
2003 | * decl2.cc: ...here. | |
2004 | * dump.c: Moved to... | |
2005 | * dump.cc: ...here. | |
2006 | * error.c: Moved to... | |
2007 | * error.cc: ...here. | |
2008 | * except.c: Moved to... | |
2009 | * except.cc: ...here. | |
2010 | * expr.c: Moved to... | |
2011 | * expr.cc: ...here. | |
2012 | * friend.c: Moved to... | |
2013 | * friend.cc: ...here. | |
2014 | * g++spec.c: Moved to... | |
2015 | * g++spec.cc: ...here. | |
2016 | * init.c: Moved to... | |
2017 | * init.cc: ...here. | |
2018 | * lambda.c: Moved to... | |
2019 | * lambda.cc: ...here. | |
2020 | * lex.c: Moved to... | |
2021 | * lex.cc: ...here. | |
2022 | * mangle.c: Moved to... | |
2023 | * mangle.cc: ...here. | |
2024 | * method.c: Moved to... | |
2025 | * method.cc: ...here. | |
2026 | * name-lookup.c: Moved to... | |
2027 | * name-lookup.cc: ...here. | |
2028 | * optimize.c: Moved to... | |
2029 | * optimize.cc: ...here. | |
2030 | * parser.c: Moved to... | |
2031 | * parser.cc: ...here. | |
2032 | * pt.c: Moved to... | |
2033 | * pt.cc: ...here. | |
2034 | * ptree.c: Moved to... | |
2035 | * ptree.cc: ...here. | |
2036 | * rtti.c: Moved to... | |
2037 | * rtti.cc: ...here. | |
2038 | * search.c: Moved to... | |
2039 | * search.cc: ...here. | |
2040 | * semantics.c: Moved to... | |
2041 | * semantics.cc: ...here. | |
2042 | * tree.c: Moved to... | |
2043 | * tree.cc: ...here. | |
2044 | * typeck.c: Moved to... | |
2045 | * typeck.cc: ...here. | |
2046 | * typeck2.c: Moved to... | |
2047 | * typeck2.cc: ...here. | |
2048 | * vtable-class-hierarchy.c: Moved to... | |
2049 | * vtable-class-hierarchy.cc: ...here. | |
2050 | ||
2051 | 2022-01-17 Jakub Jelinek <jakub@redhat.com> | |
2052 | ||
2053 | PR c++/104031 | |
2054 | * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of | |
2055 | TARGET_EXPR_SLOT to current_function_decl if it was NULL. | |
2056 | ||
2057 | 2022-01-17 Andrew Stubbs <ams@codesourcery.com> | |
2058 | ||
2059 | * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators. | |
2060 | ||
617db51d GA |
2061 | 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com> |
2062 | ||
2063 | PR c++/103705 | |
2064 | * semantics.c (finish_omp_clauses): Also continue peeling off of | |
2065 | outer node for ARRAY_REFs. | |
2066 | ||
2067 | 2022-01-14 Jakub Jelinek <jakub@redhat.com> | |
2068 | ||
2069 | PR c++/103991 | |
2070 | * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For | |
2071 | IF_STMT_CONSTEXPR_P with constant false or true condition only | |
2072 | check if the taken clause may fall through. | |
2073 | * cp-gimplify.c (genericize_if_stmt): For consteval if, revert | |
2074 | to r12-5638^ behavior if then_ block can't fall through. For | |
2075 | constexpr if, revert to r12-5638^ behavior. | |
2076 | ||
ad3f0d08 GA |
2077 | 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com> |
2078 | Jason Merrill <jason@redhat.com> | |
2079 | ||
2080 | PR c++/70417 | |
2081 | * parser.c (cp_parser_id_expression): Handle | |
2082 | -Wmissing-template-keyword. | |
2083 | (struct saved_token_sentinel): Add modes to control what happens | |
2084 | on destruction. | |
2085 | (cp_parser_statement): Adjust. | |
2086 | (cp_parser_skip_entire_template_parameter_list): New function that | |
2087 | skips an entire template parameter list. | |
2088 | (cp_parser_require_end_of_template_parameter_list): Rename old | |
2089 | cp_parser_skip_to_end_of_template_parameter_list. | |
2090 | (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be | |
2091 | called from one of the above two functions. | |
2092 | (cp_parser_lambda_declarator_opt) | |
2093 | (cp_parser_explicit_template_declaration) | |
2094 | (cp_parser_enclosed_template_argument_list): Adjust. | |
2095 | ||
02a8a01b GA |
2096 | 2022-01-12 Jakub Jelinek <jakub@redhat.com> |
2097 | Jason Merrill <jason@redhat.com> | |
2098 | ||
2099 | PR c++/103480 | |
2100 | * tree.c (move): If expr is xvalue_p, just return expr without | |
2101 | build_static_cast. | |
2102 | ||
01a254e3 GA |
2103 | 2022-01-11 Jakub Jelinek <jakub@redhat.com> |
2104 | ||
2105 | PR c++/101597 | |
2106 | * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST | |
2107 | OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type. | |
2108 | * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of | |
2109 | OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as | |
2110 | obj_type. | |
2111 | ||
2112 | 2022-01-11 Patrick Palka <ppalka@redhat.com> | |
2113 | ||
2114 | PR c++/103831 | |
2115 | * call.c (build_new_method_call): Consider dependent bases only | |
2116 | if 'this' is available. | |
2117 | ||
2118 | 2022-01-11 Olivier Hainque <hainque@adacore.com> | |
2119 | ||
2120 | * decl.c (cxx_init_decl_processing): Move code possibly | |
2121 | altering flag_weak before code testing it. | |
2122 | ||
d9450aa0 GA |
2123 | 2022-01-10 Patrick Palka <ppalka@redhat.com> |
2124 | ||
2125 | PR c++/103879 | |
2126 | * constexpr.c (cxx_fold_indirect_ref): Split out object/offset | |
2127 | canonicalization step into a local lambda. Strengthen it to | |
2128 | absorb more components at position 0. Use it before both calls | |
2129 | to cxx_fold_indirect_ref_1. | |
2130 | ||
2131 | 2022-01-10 Patrick Palka <ppalka@redhat.com> | |
2132 | ||
2133 | PR c++/103783 | |
2134 | * call.c (cand_parms_match): Skip over 'this' when given one | |
2135 | static and one non-static member function. | |
2136 | ||
2137 | 2022-01-10 Jakub Jelinek <jakub@redhat.com> | |
2138 | ||
2139 | PR c++/103912 | |
2140 | * semantics.c (expand_or_defer_fn): For immediate functions, set | |
2141 | node->body_removed to true and clear analyzed, definition and | |
2142 | force_output. | |
2143 | * decl2.c (c_parse_final_cleanups): Ignore immediate functions for | |
2144 | expand_or_defer_fn. | |
2145 | ||
2848ef14 GA |
2146 | 2022-01-08 Jakub Jelinek <jakub@redhat.com> |
2147 | ||
2148 | PR c++/89074 | |
2149 | * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function. | |
2150 | (cxx_eval_binary_expression): Use it. | |
2151 | ||
2152 | 2022-01-08 Jason Merrill <jason@redhat.com> | |
2153 | ||
2154 | PR c++/103946 | |
2155 | * init.c (build_vec_init): Remove assert. | |
2156 | * tree.c (build_vec_init_expr): Likewise. | |
2157 | ||
2158 | 2022-01-08 Jason Merrill <jason@redhat.com> | |
2159 | ||
2160 | PR c++/100588 | |
2161 | * call.c (build_op_delete_call): Ignore destroying delete | |
2162 | if alloc_fn. | |
2163 | ||
55e96bf9 GA |
2164 | 2022-01-07 Jason Merrill <jason@redhat.com> |
2165 | ||
2166 | PR c++/20040 | |
2167 | * init.c (build_new_1): Also build pointer cleanup if | |
2168 | TYPE_GETS_DELETE. | |
2169 | * cp-tree.h (TYPE_GETS_VEC_DELETE): New. | |
2170 | ||
2171 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2172 | ||
2173 | PR c++/103936 | |
2174 | PR c++/65591 | |
2175 | * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling. | |
2176 | ||
2177 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2178 | ||
2179 | PR c++/103711 | |
2180 | * init.c (perform_target_ctor): Select destructor by in_chrg. | |
2181 | ||
2182 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2183 | ||
2184 | PR c++/61611 | |
2185 | * except.c (in_nested_catch): New. | |
2186 | (expand_end_catch_block): Check it. | |
2187 | ||
2188 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2189 | ||
2190 | PR c++/33799 | |
2191 | PR c++/102191 | |
2192 | * except.c (maybe_splice_retval_cleanup): Check | |
2193 | current_binding_level. | |
2194 | * semantics.c (do_poplevel): Call it here. | |
2195 | * parser.c (cp_parser_compound_statement): Not here. | |
2196 | ||
2197 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2198 | ||
2199 | PR c++/53868 | |
2200 | * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for | |
2201 | cleanups from set_up_extended_ref_temp. | |
2202 | (wrap_temporary_cleanups): Ignore array cleanups. | |
2203 | (initialize_local_var): Don't check for array here. | |
2204 | * cp-tree.h (BIND_EXPR_VEC_DTOR): New. | |
2205 | * init.c (build_vec_delete_1): Set it. | |
2206 | ||
2207 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2208 | ||
2209 | PR c++/66451 | |
2210 | * init.c (build_vec_delete_1): Handle throwing dtor. | |
2211 | (build_vec_init): Tell it we're in a cleanup already. | |
2212 | ||
2213 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2214 | ||
2215 | * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt. | |
2216 | (split_nonconstant_init): Adjust. | |
2217 | ||
2218 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2219 | ||
2220 | PR c++/66139 | |
2221 | PR c++/52320 | |
2222 | * constexpr.c (replace_decl): Rename from replace_result_decl. | |
2223 | * cp-tree.h (replace_decl): Declare it. | |
2224 | * cp-gimplify.c (cp_gimplify_init_expr): Call it. | |
2225 | (cp_gimplify_expr): Don't handle VEC_INIT_EXPR. | |
2226 | (cp_genericize_init, cp_genericize_init_expr) | |
2227 | (cp_genericize_target_expr): New. | |
2228 | (cp_fold_r): Call them. | |
2229 | * tree.c (build_array_copy): Add a TARGET_EXPR. | |
2230 | * typeck2.c (digest_init_r): Look through a TARGET_EXPR. | |
2231 | ||
2232 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2233 | ||
2234 | PR c++/94041 | |
2235 | * decl.c (initialize_local_var): Fix comment. | |
2236 | * init.c (build_new_1): Do stabilize array init. | |
2237 | (build_vec_init): Use TARGET_EXPR for cleanup. Initialization | |
2238 | of an element from an explicit initializer is not a | |
2239 | full-expression. | |
2240 | * tree.c (expand_vec_init_expr): Pass flags through. | |
2241 | * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR. | |
2242 | (split_nonconstant_init): Handle array cleanups. | |
2243 | * cp-tree.h: Adjust. | |
2244 | ||
2245 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2246 | ||
2247 | PR c++/94041 | |
2248 | * decl.c (check_initializer): Remove obsolete comment. | |
2249 | (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY. | |
2250 | (initialize_local_var): Change assert to test. | |
2251 | * typeck2.c (maybe_push_temp_cleanup): New. | |
2252 | (split_nonconstant_init_1): Use it. | |
2253 | (split_nonconstant_init): Clear cleanup flags. | |
2254 | ||
2255 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2256 | ||
2257 | PR c++/92385 | |
2258 | * typeck2.c (PICFLAG_VEC_INIT): New. | |
2259 | (process_init_constructor_array): Set it. | |
2260 | (process_init_constructor): Handle it. | |
2261 | (split_nonconstant_init_1): Handle VEC_INIT_EXPR. | |
2262 | * init.c (build_vec_init): Likewise. | |
2263 | * cp-gimplify.c (cp_gimplify_expr): Factor out... | |
2264 | * tree.c (expand_vec_init_expr): ...this function. | |
2265 | (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P. | |
2266 | (build_vec_init_expr): Likewise. | |
2267 | * constexpr.c (cxx_eval_vec_init): Likewise. | |
2268 | (reduced_constant_expression_p): Check arrays before C++20. | |
2269 | * cp-tree.h (expand_vec_init_expr): Declare. | |
2270 | ||
2271 | 2022-01-07 Jason Merrill <jason@redhat.com> | |
2272 | ||
2273 | * init.c (build_new_1): Remove preevaluation code. | |
2274 | ||
0fbefa25 GA |
2275 | 2022-01-05 Nathan Sidwell <nathan@acm.org> |
2276 | ||
2277 | * pt.c (instantiate_class_template_1): Process attribute((used)) set | |
2278 | in class's context. | |
2279 | ||
2280 | 2022-01-05 Nathan Sidwell <nathan@acm.org> | |
2281 | ||
2282 | * init.c (build_new_1): Check complain before alignment warning. | |
2283 | ||
7d11b64b GA |
2284 | 2022-01-04 Jason Merrill <jason@redhat.com> |
2285 | ||
2286 | * cp-tree.h (class releasing_vec): Add begin/end fns. | |
2287 | ||
2288 | 2022-01-04 Jason Merrill <jason@redhat.com> | |
2289 | ||
2290 | * init.c: Include -*- C++ -*- on first line. | |
2291 | ||
a4ae8c37 GA |
2292 | 2022-01-03 Marek Polacek <polacek@redhat.com> |
2293 | ||
2294 | PR c++/103758 | |
2295 | * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%> | |
2296 | with %qD. | |
2297 | ||
2298 | 2022-01-03 Marek Polacek <polacek@redhat.com> | |
2299 | ||
2300 | * parser.c (make_char_string_pack): Add a cast to const unsigned | |
2301 | char *. | |
2302 | ||
2303 | 2022-01-03 Jakub Jelinek <jakub@redhat.com> | |
2304 | ||
2305 | PR c++/103600 | |
2306 | * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute | |
2307 | to DECL_TINFO_P VAR_DECLs. | |
2308 | ||
5da23a13 GA |
2309 | 2022-01-02 Jason Merrill <jason@redhat.com> |
2310 | ||
2311 | * init.c (build_vec_init): Append the decrement to elt_init. | |
2312 | ||
2313 | 2022-01-02 Jason Merrill <jason@redhat.com> | |
2314 | ||
2315 | * decl.c (wrap_cleanups_r): Don't wrap if noexcept. | |
2316 | ||
ad41bd84 | 2317 | \f |
6123f29a | 2318 | Copyright (C) 2022 Free Software Foundation, Inc. |
ad41bd84 JM |
2319 | |
2320 | Copying and distribution of this file, with or without modification, | |
2321 | are permitted in any medium without royalty provided the copyright | |
2322 | notice and this notice are preserved. |