]>
Commit | Line | Data |
---|---|---|
b7c1f3d6 GA |
1 | 2021-04-02 Patrick Palka <ppalka@redhat.com> |
2 | ||
3 | PR c++/99869 | |
4 | * parser.c (do_range_for_auto_deduction): Pass adc_variable_type | |
5 | to do_auto_deduction. | |
6 | ||
7 | 2021-04-02 Patrick Palka <ppalka@redhat.com> | |
8 | ||
9 | PR c++/99586 | |
10 | * semantics.c (finish_compound_literal): Check | |
11 | template_placeholder_p instead of type_uses_auto. | |
12 | ||
13 | 2021-04-02 Jason Merrill <jason@redhat.com> | |
14 | ||
15 | PR c++/97938 | |
16 | * cp-tree.h (PACK_EXPANSION_AUTO_P): New. | |
17 | * lambda.c (add_capture): Set it. | |
18 | * pt.c (tsubst_pack_expansion): Handle it. | |
19 | ||
20 | 2021-04-02 Nathan Sidwell <nathan@acm.org> | |
21 | ||
22 | * cp-tree.h (lang_decl_base): Correct module flag comment. | |
23 | * module.cc (trees_in::assert_definition): Break out | |
24 | not_tmpl var. | |
25 | (trees_out::lang_decl_bools): Do not write purview for header units. | |
26 | ||
f1607029 GA |
27 | 2021-04-01 Marek Polacek <polacek@redhat.com> |
28 | ||
29 | PR c++/99831 | |
30 | * method.c (defaulted_late_check): ++ and -- function_depth around | |
31 | the call to synthesize_method. | |
32 | * pt.c: Remove the saved_trees global. | |
33 | ||
34 | 2021-04-01 Jason Merrill <jason@redhat.com> | |
35 | ||
36 | PR c++/99583 | |
37 | PR c++/99584 | |
38 | * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into | |
39 | TYPE_RAISES_EXCEPTIONS. | |
40 | ||
41 | 2021-04-01 Iain Sandoe <iain@sandoe.co.uk> | |
42 | ||
43 | * mapper-client.cc (INCLUDE_MAP): New; require map to be | |
44 | included from system.h. | |
45 | * mapper-resolver.cc (INCLUDE_MAP): Likewise. | |
46 | ||
47 | 2021-04-01 Jason Merrill <jason@redhat.com> | |
48 | ||
49 | PR c++/98481 | |
50 | * mangle.c (write_expression): Adjust. | |
51 | * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14. | |
52 | (mark_abi_tags_r): Likewise. | |
53 | ||
54 | 2021-04-01 Nathan Sidwell <nathan@acm.org> | |
55 | ||
56 | PR c++/99283 | |
57 | * module.cc (trees_out::decl_node): Adjust importedness reference | |
58 | assert. | |
59 | (module_state::intercluster_seed): New. Seed both imports and | |
60 | inter-cluster references. Broken out of ... | |
61 | (module_state::write_cluster): ... here. Call it. | |
62 | ||
95d217ab GA |
63 | 2021-03-31 Jason Merrill <jason@redhat.com> |
64 | ||
65 | PR c++/99445 | |
66 | * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION. | |
67 | ||
68 | 2021-03-31 Patrick Palka <ppalka@redhat.com> | |
69 | ||
70 | PR c++/88115 | |
71 | * mangle.c (write_expression): Adjust the mangling of | |
72 | __alignof__. | |
73 | ||
74 | 2021-03-31 Patrick Palka <ppalka@redhat.com> | |
75 | ||
76 | PR c++/99815 | |
77 | * pt.c (placeholder_type_constraint_dependent_p): Expand | |
78 | argument packs to separate the first non-pack argument | |
79 | from the rest. | |
80 | ||
08d2edae GA |
81 | 2021-03-30 Nathan Sidwell <nathan@acm.org> |
82 | ||
83 | PR c++/99283 | |
84 | * module.cc (dumper::operator): Make less brittle. | |
85 | (trees_out::core_bools): VAR_DECLs always have a context. | |
86 | (trees_out::key_mergeable): Use same_type_p for asserting. | |
87 | (trees_in::read_var_def): Propagate | |
88 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
89 | ||
90 | 2021-03-30 Jakub Jelinek <jakub@redhat.com> | |
91 | ||
92 | PR c++/99790 | |
93 | * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST. | |
94 | ||
651684b4 GA |
95 | 2021-03-26 Marek Polacek <polacek@redhat.com> |
96 | ||
97 | PR c++/98352 | |
98 | * method.c (implicitly_declare_fn): Pass &raises to | |
99 | synthesized_method_walk. | |
100 | ||
101 | 2021-03-26 Nathan Sidwell <nathan@acm.org> | |
102 | ||
103 | PR c++/99283 | |
104 | * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL. | |
105 | (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting. | |
106 | * decl.c (duplicate_decls): Remove template_decl module flag | |
107 | propagation. | |
108 | * module.cc (merge_kind_name): Add alias tmpl spec as a thing. | |
109 | (dumper::impl::nested_name): Adjust for template-decl module flag | |
110 | change. | |
111 | (trees_in::assert_definition): Likewise. | |
112 | (trees_in::install_entity): Likewise. | |
113 | (trees_out::decl_value): Likewise. Remove alias template | |
114 | separation of template and type_decl. | |
115 | (trees_in::decl_value): Likewise. | |
116 | (trees_out::key_mergeable): Likewise, | |
117 | (trees_in::key_mergeable): Likewise. | |
118 | (trees_out::decl_node): Adjust for template-decl module flag | |
119 | change. | |
120 | (depset::hash::make_dependency): Likewise. | |
121 | (get_originating_module, module_may_redeclare): Likewise. | |
122 | (set_instantiating_module, set_defining_module): Likewise. | |
123 | * name-lookup.c (name_lookup::search_adl): Likewise. | |
124 | (do_pushdecl): Likewise. | |
125 | * pt.c (build_template_decl): Likewise. | |
126 | (lookup_template_class_1): Remove special alias_template handling | |
127 | of DECL_TI_TEMPLATE. | |
128 | (tsubst_template_decl): Likewise. | |
129 | ||
130 | 2021-03-26 Jakub Jelinek <jakub@redhat.com> | |
131 | ||
132 | PR c++/99705 | |
133 | * tree.c (bot_manip): Remap artificial automatic temporaries mentioned | |
134 | in DECL_EXPR or in BIND_EXPR_VARS. | |
135 | ||
4493b1c1 GA |
136 | 2021-03-25 Jakub Jelinek <jakub@redhat.com> |
137 | ||
138 | PR c++/99672 | |
139 | * parser.c (cp_parser_postfix_expression): For calls, create | |
140 | combined_loc and temporarily set input_location to it before | |
141 | calling finish_call_expr. | |
142 | ||
143 | 2021-03-25 Marek Polacek <polacek@redhat.com> | |
144 | ||
145 | PR c++/94751 | |
146 | * call.c (build_over_call): Maybe call mark_used in case | |
147 | deduce_inheriting_ctor fails and return error_mark_node. | |
148 | * cp-tree.h (deduce_inheriting_ctor): Adjust declaration. | |
149 | * method.c (deduce_inheriting_ctor): Return bool if the deduction | |
150 | fails. | |
151 | (implicitly_declare_fn): If raises is error_mark_node, call | |
152 | synthesized_method_walk with diag being true. | |
153 | ||
154 | 2021-03-25 Jakub Jelinek <jakub@redhat.com> | |
155 | ||
156 | PR c++/99745 | |
157 | * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter | |
158 | packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case. | |
159 | ||
160 | 2021-03-25 Marek Polacek <polacek@redhat.com> | |
161 | ||
162 | PR c++/99331 | |
163 | * call.c (build_converted_constant_expr_internal): Don't emit | |
164 | -Wconversion warnings. | |
165 | ||
166 | 2021-03-25 Jakub Jelinek <jakub@redhat.com> | |
167 | ||
168 | PR c++/99565 | |
169 | * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD | |
170 | to operand_equal_p. | |
171 | * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or | |
172 | or COMPOUND_EXPR. | |
173 | ||
bf1f3168 GA |
174 | 2021-03-23 Nathan Sidwell <nathan@acm.org> |
175 | ||
176 | PR c++/99283 | |
177 | * name-lookup.c (check_module_override): Set global or partition | |
178 | DUP on the binding vector. | |
179 | ||
180 | 2021-03-23 Marek Polacek <polacek@redhat.com> | |
181 | ||
182 | PR c++/99318 | |
183 | * decl2.c (cp_warn_deprecated_use_scopes): Only call | |
184 | cp_warn_deprecated_use when decl is a namespace, class, or enum. | |
185 | ||
186 | 2021-03-23 Nathan Sidwell <nathan@acm.org> | |
187 | ||
188 | PR c++/99239 | |
189 | * decl.c (duplicate_decls): Remove assert about maybe-imported | |
190 | artificial decls. | |
191 | ||
192 | 2021-03-23 Jakub Jelinek <jakub@redhat.com> | |
193 | ||
194 | PR c++/99650 | |
195 | * decl.c (cp_finish_decomp): Diagnose void initializers when | |
196 | using tuple_element and get. | |
197 | ||
8b744f46 GA |
198 | 2021-03-22 Nathan Sidwell <nathan@acm.org> |
199 | ||
200 | PR c++/99480 | |
201 | * module.cc (depset::hash::make_dependency): Propagate flags for | |
202 | partial specialization. | |
203 | (module_may_redeclare): Handle partial specialization. | |
204 | ||
205 | 2021-03-22 Nathan Sidwell <nathan@acm.org> | |
206 | ||
207 | PR c++/99425 | |
208 | * cp-tree.h (map_context_from, map_context_to): Delete. | |
209 | (add_mergeable_specialization): Add is_alias parm. | |
210 | * pt.c (add_mergeable_specialization): Add is_alias parm, add them. | |
211 | * module.cc (map_context_from, map_context_to): Delete. | |
212 | (trees_in::decl_value): Add specializations later, adjust call. | |
213 | Drop useless alias lookup. Set duplicate fn parm context. | |
214 | (check_mergeable_decl): Drop context mapping. | |
215 | (trees_in::is_matching_decl): Likewise. | |
216 | (trees_in::read_function_def): Drop parameter context adjustment | |
217 | here. | |
218 | ||
219 | 2021-03-22 Martin Liska <mliska@suse.cz> | |
220 | ||
221 | PR c++/99687 | |
222 | * module.cc (fini_modules): Call vec_free instead of delete. | |
223 | ||
6af7b307 GA |
224 | 2021-03-20 Jakub Jelinek <jakub@redhat.com> |
225 | ||
226 | PR debug/99230 | |
227 | * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove | |
228 | special code, instead call c_genericize_control_stmt. | |
229 | ||
5f256a70 GA |
230 | 2021-03-19 Jakub Jelinek <jakub@redhat.com> |
231 | ||
232 | PR c++/99456 | |
233 | * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from | |
234 | INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval | |
235 | don't diagnose it, set *non_constant_p nor return t. | |
236 | ||
287e3e84 GA |
237 | 2021-03-19 Marek Polacek <polacek@redhat.com> |
238 | ||
239 | PR c++/99500 | |
240 | * parser.c (cp_parser_requirement_parameter_list): Handle | |
241 | error_mark_node. | |
242 | ||
243 | 2021-03-18 Marek Polacek <polacek@redhat.com> | |
244 | ||
245 | * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove. | |
246 | ||
247 | 2021-03-18 Marek Polacek <polacek@redhat.com> | |
248 | ||
249 | * pt.c (tsubst_copy_and_build): Add assert. | |
250 | ||
251 | 2021-03-18 Iain Sandoe <iain@sandoe.co.uk> | |
252 | ||
253 | PR objc++/49070 | |
254 | * parser.c (cp_debug_parser): Add Objective-C++ message | |
255 | state flag. | |
256 | (cp_parser_nested_name_specifier_opt): Allow colon to | |
257 | terminate an assignment-expression when parsing Objective- | |
258 | C++ messages. | |
259 | (cp_parser_objc_message_expression): Set and clear message | |
260 | parsing state on entry and exit. | |
261 | * parser.h (struct cp_parser): Add a context flag for | |
262 | Objective-C++ message state. | |
263 | ||
264 | 2021-03-18 Martin Liska <mliska@suse.cz> | |
265 | ||
266 | PR c++/99617 | |
267 | * coroutines.cc (struct var_nest_node): Init then_cl and else_cl | |
268 | to NULL. | |
269 | ||
19ac7c94 GA |
270 | 2021-03-17 Marek Polacek <polacek@redhat.com> |
271 | ||
272 | PR c++/97973 | |
273 | * call.c (conv_unsafe_in_template_p): New. | |
274 | (convert_like): Use it. | |
275 | ||
276 | 2021-03-17 Anthony Sharp <anthonysharp15@gmail.com> | |
277 | Jason Merrill <jason@redhat.com> | |
278 | ||
279 | * semantics.c (get_class_access_diagnostic_decl): New | |
280 | function that examines special cases when a parent | |
281 | class causes a private access failure. | |
282 | (enforce_access): Slightly modified to call function | |
283 | above. | |
284 | ||
bc212776 GA |
285 | 2021-03-16 Jason Merrill <jason@redhat.com> |
286 | ||
287 | * tree.c (cp_tree_equal): Use real_identical. | |
288 | ||
289 | 2021-03-16 Jakub Jelinek <jakub@redhat.com> | |
290 | ||
291 | PR c++/99613 | |
292 | * decl.c (expand_static_init): For thread guards, call __cxa_atexit | |
293 | before calling __cxa_guard_release rather than after it. Formatting | |
294 | fixes. | |
295 | ||
296 | 2021-03-16 Martin Liska <mliska@suse.cz> | |
297 | Jason Merrill <jason@redhat.com> | |
298 | ||
299 | PR c++/99108 | |
300 | * call.c (get_function_version_dispatcher): Handle | |
301 | DECL_LOCAL_DECL_P. | |
302 | * decl.c (maybe_version_functions): Likewise. | |
303 | (maybe_mark_function_versioned): New. | |
304 | * name-lookup.c (push_local_extern_decl_alias): No longer static. | |
305 | * name-lookup.h (push_local_extern_decl_alias): Adjust. | |
306 | ||
307 | 2021-03-16 Nathan Sidwell <nathan@acm.org> | |
308 | ||
309 | PR c++/99496 | |
310 | * module.cc (trees_out::decl_value): Adjust typedef streaming, | |
311 | indicate whether it is a dependent alias. | |
312 | (trees_in::decl_value): Likewise. Set as dependent alias, if it | |
313 | is one. | |
314 | ||
3c5b6d24 GA |
315 | 2021-03-15 Iain Sandoe <iain@sandoe.co.uk> |
316 | ||
317 | PR c++/99047 | |
318 | * coroutines.cc (expand_one_await_expression): If the | |
319 | await_ready() expression is not a boolean then convert it | |
320 | as required. | |
321 | ||
322 | 2021-03-15 Iain Sandoe <iain@sandoe.co.uk> | |
323 | ||
324 | PR c++/98704 | |
325 | * coroutines.cc (build_actor_fn): Make destroy index 1 | |
326 | correspond to the abnormal unhandled_exception() exit. | |
327 | Substitute the proxy for the resume index. | |
328 | (coro_rewrite_function_body): Arrange to reset the resume | |
329 | index and make done = true for a rethrown exception from | |
330 | unhandled_exception (). | |
331 | (morph_fn_to_coro): Adjust calls to build_actor_fn and | |
332 | coro_rewrite_function_body. | |
333 | ||
334 | 2021-03-15 Iain Sandoe <iain@sandoe.co.uk> | |
335 | ||
336 | PR c++/98480 | |
337 | * coroutines.cc (replace_continue): Rewrite continue into | |
338 | 'goto label'. | |
339 | (await_statement_walker): Handle await expressions in the | |
340 | initializer, condition and iteration expressions of for | |
341 | loops. | |
342 | ||
343 | 2021-03-15 Iain Sandoe <iain@sandoe.co.uk> | |
344 | ||
345 | PR c++/96749 | |
346 | * coroutines.cc (flatten_await_stmt): Allow for the case | |
347 | where a target expression variable only has uses in the | |
348 | second part of a compound expression. | |
349 | (maybe_promote_temps): Avoid emiting empty statements. | |
350 | ||
351 | 2021-03-15 Tobias Burnus <tobias@codesourcery.com> | |
352 | ||
353 | PR c++/99509 | |
354 | * decl.c (cp_finish_decl): For 'omp declare target implicit' vars, | |
355 | ensure that the varpool node is marked as offloadable. | |
356 | ||
6da2762a GA |
357 | 2021-03-12 Nathan Sidwell <nathan@acm.org> |
358 | ||
359 | PR c++/99238 | |
360 | * module.cc (depset::hash::add_binding_entity): Assert not | |
361 | visited. | |
362 | (depset::add::add_specializations): Likewise. | |
363 | * name-lookup.c (name_lookup::dedup): New. | |
364 | (name_lookup::~name_lookup): Assert not deduping. | |
365 | (name_lookup::restore_state): Likewise. | |
366 | (name_lookup::add_overload): Replace outlined code with dedup | |
367 | call. | |
368 | (name_lookup::add_value): Likewise. | |
369 | (name_lookup::search_namespace_only): Likewise. | |
370 | (name_lookup::adl_namespace_fns): Likewise. | |
371 | (name_lookup::adl_class_fns): Likewise. | |
372 | (name_lookup::search_adl): Likewise. Add clearing dedup call. | |
373 | (name_lookup::search_qualified): Likewise. | |
374 | (name_lookup::search_unqualified): Likewise. | |
375 | ||
376 | 2021-03-12 Jakub Jelinek <jakub@redhat.com> | |
377 | ||
378 | PR c++/99507 | |
379 | * call.c (build_over_call): For immediate evaluation of functions | |
380 | that return references, undo convert_from_reference effects before | |
381 | calling cxx_constant_value and call convert_from_reference | |
382 | afterwards. | |
383 | ||
48ff383f GA |
384 | 2021-03-11 Nathan Sidwell <nathan@acm.org> |
385 | ||
386 | PR c++/99248 | |
387 | * name-lookup.c (lookup_elaborated_type_1): Access slot not bind | |
388 | when there's a binding vector. | |
389 | * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing. | |
390 | ||
391 | 2021-03-11 Nathan Sidwell <nathan@acm.org> | |
392 | ||
393 | PR c++/99528 | |
394 | * module.cc (enum merge_kind): Delete MK_type_tmpl_spec, | |
395 | MK_decl_tmpl_spec. | |
396 | (trees_in::decl_value): Adjust add_mergeable_specialization call. | |
397 | (trees_out::get_merge_kind): Adjust detecting a partial template | |
398 | instantiation. | |
399 | (trees_out::key_mergeable): Adjust handling same. | |
400 | (trees_in::key_mergeabvle): Likewise. | |
401 | ||
e9800852 GA |
402 | 2021-03-10 Nathan Sidwell <nathan@acm.org> |
403 | ||
404 | PR c++/99423 | |
405 | * module.cc (post_load_processing): Assert not gcable. | |
406 | (laxy_load_pendings): Extend no-gc region around | |
407 | post_load_processing. | |
408 | ||
409 | 2021-03-10 Nathan Sidwell <nathan@acm.org> | |
410 | ||
411 | PR c++/99508 | |
412 | * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's | |
413 | assembler name to the ns alias. | |
414 | ||
8dc225d3 GA |
415 | 2021-03-09 Jakub Jelinek <jakub@redhat.com> |
416 | ||
417 | PR c++/99459 | |
418 | * coroutines.cc (build_co_await): Look through NOP_EXPRs in | |
419 | build_special_member_call return value to find the CALL_EXPR. | |
420 | Simplify. | |
421 | ||
422 | 2021-03-09 Nathan Sidwell <nathan@acm.org> | |
423 | ||
424 | PR c++/99472 | |
425 | * parser.c (cp_parser_diagnose_invalid_type_name): Clarify | |
426 | that C++20 does not yet imply modules. | |
427 | ||
6405b40f GA |
428 | 2021-03-08 Nathan Sidwell <nathan@acm.org> |
429 | ||
430 | PR c++/99436 | |
431 | * name-lookup.c (get_cxx_dialect_name): Add cxx23. | |
432 | ||
433 | 2021-03-08 Nathan Sidwell <nathan@acm.org> | |
434 | ||
435 | * lex.c (module_token_filter::resume): Ignore module-decls inside | |
436 | header-unit. | |
437 | * parser.c (cp_parser_module_declaration): Reject in header-unit. | |
438 | ||
439 | 2021-03-08 Nathan Sidwell <nathan@acm.org> | |
440 | ||
441 | PR c++/99285 | |
442 | * cp-tree.h (match_mergeable_specialization) | |
443 | (add_mergeable_specialization): Adjust parms. | |
444 | * module.cc (trees_in::decl_value): Adjust | |
445 | add_mergeable_specialization calls. | |
446 | (trees_out::key_mergeable): Adjust match_mergeable_specialization | |
447 | calls. | |
448 | (specialization_add): Likewise. | |
449 | * pt.c (match_mergeable_specialization): Do not insert. | |
450 | (add_mergeable_specialization): Add to hash table here. | |
451 | ||
0ad6a2e2 GA |
452 | 2021-03-06 Patrick Palka <ppalka@redhat.com> |
453 | Jakub Jelinek <jakub@redhat.com> | |
454 | ||
455 | PR c++/99287 | |
456 | * constexpr.c (cxx_eval_increment_expression): Pass lval when | |
457 | evaluating the MODIFY_EXPR, and update 'mod' with the result of | |
458 | this evaluation. Check *non_constant_p afterwards. For prefix | |
459 | ops, just return 'mod'. | |
460 | ||
461 | 2021-03-06 Patrick Palka <ppalka@redhat.com> | |
462 | Jakub Jelinek <jakub@redhat.com> | |
463 | ||
464 | PR c++/96330 | |
465 | * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local | |
466 | variable 'fn' to 'tmpl'. Handle a variable template-id by | |
467 | calling lookup_template_variable. | |
468 | ||
469 | 2021-03-06 Patrick Palka <ppalka@redhat.com> | |
470 | ||
471 | PR c++/99365 | |
472 | * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as | |
473 | outer_targs to do_auto_deduction. | |
474 | (placeholder_type_constraint_dependent_p): Define. | |
475 | (do_auto_deduction): When processing_template_decl != 0 | |
476 | and context is adc_unify and we have constraints, pretend the | |
477 | constraints are satisfied instead of punting. Otherwise don't | |
478 | punt unless placeholder_type_constraint_dependent_p holds. | |
479 | Add some clarifying sanity checks. Add a hack to add missing | |
480 | outermost template levels to outer_args before checking | |
481 | satisfaction. Don't substitute outer_targs into type if it's | |
482 | already been done. | |
483 | ||
ceae9533 GA |
484 | 2021-03-05 Marek Polacek <polacek@redhat.com> |
485 | ||
486 | PR c++/99374 | |
487 | * call.c (standard_conversion): When converting pointers to | |
488 | member, don't return NULL when the bases are equivalent but | |
489 | incomplete. | |
490 | ||
491 | 2021-03-05 Marek Polacek <polacek@redhat.com> | |
492 | ||
493 | PR c++/99120 | |
494 | * name-lookup.c (check_local_shadow): Check if the type of decl | |
495 | is non-null before checking TYPE_PTR*. | |
496 | ||
497 | 2021-03-05 Nathan Sidwell <nathan@acm.org> | |
498 | ||
499 | PR c++/99245 | |
500 | * module.cc (module_state::write_cluster): Relax binding assert. | |
501 | ||
502 | 2021-03-05 Nathan Sidwell <nathan@acm.org> | |
503 | ||
504 | PR c++/99377 | |
505 | * pt.c (instantiate_decl): Call set_instantiating_module. | |
506 | ||
507 | 2021-03-05 Iain Sandoe <iain@sandoe.co.uk> | |
508 | ||
509 | PR c++/98118 | |
510 | * coroutines.cc (build_co_await): Use type_build_ctor_call() | |
511 | to determine cases when a CTOR needs to be built. | |
512 | (flatten_await_stmt): Likewise. | |
513 | (morph_fn_to_coro): Likewise. | |
514 | ||
515 | 2021-03-05 Iain Sandoe <iain@sandoe.co.uk> | |
516 | ||
517 | PR c++/95616 | |
518 | * coroutines.cc (coro_diagnose_throwing_fn): New helper. | |
519 | (coro_diagnose_throwing_final_aw_expr): New helper. | |
520 | (build_co_await): Diagnose throwing final await expression | |
521 | components. | |
522 | (build_init_or_final_await): Diagnose a throwing promise | |
523 | final_suspend() call. | |
524 | ||
525 | 2021-03-05 Iain Sandoe <iain@sandoe.co.uk> | |
526 | ||
527 | PR c++/95615 | |
528 | * coroutines.cc (struct param_info): Track parameter copies that need | |
529 | a DTOR. | |
530 | (coro_get_frame_dtor): New helper function factored from build_actor(). | |
531 | (build_actor_fn): Use coro_get_frame_dtor(). | |
532 | (morph_fn_to_coro): Track parameters that need DTORs on exception, | |
533 | likewise the frame promise and the return object. On exception, run the | |
534 | DTORs for these, destroy the frame and then rethrow the exception. | |
535 | ||
536 | 2021-03-05 Nathan Sidwell <nathan@acm.org> | |
537 | ||
538 | PR c++/99389 | |
539 | * pt.c (instantiate_class_template_1): Set instantiating module | |
540 | here. | |
541 | ||
542 | 2021-03-05 Tobias Burnus <tobias@codesourcery.com> | |
543 | ||
544 | PR c/99137 | |
545 | * parser.c (cp_parser_oacc_clause_async): Reject comma expressions. | |
546 | ||
67f10d28 GA |
547 | 2021-03-04 Jakub Jelinek <jakub@redhat.com> |
548 | ||
549 | PR c++/88146 | |
550 | PR c++/99362 | |
551 | * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify | |
552 | comment. | |
553 | ||
554 | 2021-03-04 Nathan Sidwell <nathan@acm.org> | |
555 | ||
556 | PR c++/99170 | |
557 | * module.cc (class uintset): Delete. | |
558 | (typedef attached_map_t): A hash map. | |
559 | (attached_table): Use attached_map_t. Adjust uses ... | |
560 | (trees_out::decl_value, trees_in::decl_value): ... here ... | |
561 | (trees_out::key_mergeable): ... here ... | |
562 | (trees_in::key_mergeable): ... here ... | |
563 | (maybe_attach_decl): ... here ... | |
564 | (direct_import): ... and here. | |
565 | ||
566 | 2021-03-04 Nathan Sidwell <nathan@acm.org> | |
567 | ||
568 | PR c++/99170 | |
569 | * cp-tree.h | |
570 | * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p | |
571 | rename. | |
572 | * module.cc (class pending_key): New. | |
573 | (default_hash_traits<pending_key>): New specialization. | |
574 | (pending_map_t): New typedef. | |
575 | (pending_table): Replace old table. | |
576 | (trees_out::lang_decl_bools): Adjust. | |
577 | (trees_in::lang_decl_bools): Adjust. | |
578 | (trees_in::install_entity): Drop pending member and specialization | |
579 | handling. | |
580 | (find_pending_key): New. | |
581 | (depset::hash::fiund_dependencies): Use it. | |
582 | (pendset_lazy_load): Delete. | |
583 | (module_state::write_cluster): Don't count pendings here. Bye | |
584 | Duff's device-like thing. | |
585 | (module_state::write_pendings): Reimplement. | |
586 | (module_state::read_pendings): Reimplement. | |
587 | (lazy_specializations_p): Delete. | |
588 | (module_state::write): Adjust write_pendings call. | |
589 | (lazy_load_pendings): New. | |
590 | (lazy_load_specializations): Delete. | |
591 | (lazy_load_members): Delete. | |
592 | (init_modules): Adjust. | |
593 | * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings | |
594 | not lazy_load_members. | |
595 | (note_pending_specializations): Delete. | |
596 | (load_pending_specializations): Delete. | |
597 | * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete. | |
598 | (BINDING_VECTOR_PENDING_MEMBERS_P): Delete. | |
599 | (BINDING_VECTR_PENDING_MEMBERS_P): Delete. | |
600 | (note_pending_specializations): Delete. | |
601 | (load_pending_specializations): Delete. | |
602 | * pt.c (lookup_template_class_1): Call lazy_load_pendings not | |
603 | lazy_load_specializations. | |
604 | (instantiate_template_class_1): Likewise. | |
605 | (instantiate_decl): Call lazy_load_pendings. | |
606 | * typeck.c (complete_type): Likewise. | |
607 | ||
f3641ac7 GA |
608 | 2021-03-03 Nathan Sidwell <nathan@acm.org> |
609 | ||
610 | PR c++/99170 | |
611 | * module.cc (post_load_decls): New. | |
612 | (lazy_snum, recursive_lazy): Move earlier. | |
613 | (module_state::read_cluster): Push cloning onto post_load_decls. | |
614 | (post_load_processing): New. Do the cloning here. | |
615 | (module_state::read_inits): Call post_load_processing. | |
616 | (module_state::read_language): Likewise. | |
617 | (lazy_load_binding, lazy_load_specializations): Likewise | |
618 | (lazy_load_members): Likewise | |
619 | ||
620 | 2021-03-03 Nathan Sidwell <nathan@acm.org> | |
621 | ||
622 | PR c++/99170 | |
623 | * module.cc (trees_out::decl_value): Stream specialization keys | |
624 | after decl. | |
625 | (trees_in::decl_value): Stream them back and insert after | |
626 | completing the decl. | |
627 | (trees_out::key_mergeable): Drop some streaming here ... | |
628 | (trees_in::key_mergeable): ... and here. Don't insert into | |
629 | specialization tables. | |
630 | ||
631 | 2021-03-03 Patrick Palka <ppalka@redhat.com> | |
632 | ||
633 | * constraint.cc (struct sat_info): Document the different | |
634 | meanings of noisy() and diagnose_unsatisfaction_p() during | |
635 | satisfaction and requires-expression evaluation. | |
636 | (tsubst_valid_expression_requirement): Take a sat_info instead | |
637 | of a subst_info. Perform the substitution quietly first. Fold | |
638 | in error-replaying code from diagnose_valid_expression. | |
639 | (tsubst_simple_requirement): Take a sat_info instead of a | |
640 | subst_info. | |
641 | (tsubst_type_requirement_1): New. Fold in error-replaying code | |
642 | from diagnose_valid_type. | |
643 | (tsubst_type_requirement): Use the above. Take a sat_info | |
644 | instead of a subst_info. | |
645 | (tsubst_compound_requirement): Likewise. Fold in | |
646 | error-replaying code from diagnose_compound_requirement. | |
647 | (tsubst_nested_requirement): Take a sat_info instead of a | |
648 | subst_info. Fold in error-replaying code from | |
649 | diagnose_nested_requirement. | |
650 | (tsubst_requirement): Take a sat_info instead of a subst_info. | |
651 | (tsubst_requires_expr): Split into two versions, one that takes | |
652 | a sat_info argument and another that takes a complain and | |
653 | in_decl argument. Remove outdated documentation. Document the | |
654 | effects of the sat_info argument. Don't short-circuit | |
655 | processing of requirements when diagnosing unsatisfaction, | |
656 | mirroring diagnose_requires_expr. | |
657 | (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove | |
658 | assert, and se the three-parameter version of tsubst_requires_expr. | |
659 | (diagnose_trait_expr): Make static. Take a template argument | |
660 | vector instead of a parameter mapping. | |
661 | (diagnose_valid_expression): Remove. | |
662 | (diagnose_valid_type): Remove. | |
663 | (diagnose_simple_requirement): Remove. | |
664 | (diagnose_compound_requirement): Remove. | |
665 | (diagnose_type_requirement): Remove. | |
666 | (diagnose_nested_requirement): Remove. | |
667 | (diagnose_requirement): Remove. | |
668 | (diagnose_requires_expr): Remove. | |
669 | (diagnose_atomic_constraint): Take a sat_info instead of a | |
670 | subst_info. Adjust call to diagnose_trait_expr. Call | |
671 | tsubst_requires_expr instead of diagnose_requires_expr. | |
672 | (diagnose_constraints): Remove special casing of REQUIRES_EXPR | |
673 | and just always call constraint_satisfaction_value. | |
674 | ||
675 | 2021-03-03 Patrick Palka <ppalka@redhat.com> | |
676 | ||
677 | * constexpr.c (cxx_eval_call_expression): Adjust call to | |
678 | evaluate_concept_check. | |
679 | (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use | |
680 | evaluate_requires_expression instead of | |
681 | satisfy_constraint_expression. | |
682 | <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check. | |
683 | * constraint.cc (struct sat_info): Adjust comment about which | |
684 | satisfaction entrypoints use noisy-unsat. | |
685 | (normalize_template_requirements): Remove (and adjust callers | |
686 | appropriately). | |
687 | (normalize_nontemplate_requirements): Likewise. | |
688 | (tsubst_nested_requirement): Use constraint_satisfaction_value | |
689 | instead of satisfy_constraint_expression, which'll do the | |
690 | noisy replaying of ill-formed quiet satisfaction for us. | |
691 | (decl_satisfied_cache): Adjust comment. | |
692 | (satisfy_constraint): Rename to ... | |
693 | (satisfy_normalized_constraints): ... this. | |
694 | (satisfy_associated_constraints): Remove (and make its | |
695 | callers check for dependent arguments). | |
696 | (satisfy_constraint_expression): Rename to ... | |
697 | (satisfy_nondeclaration_constraints): ... this. Assert that | |
698 | 'args' is empty when 't' is a concept-id. Removing handling | |
699 | bare constraint-expressions, and handle REQUIRES_EXPRs | |
700 | specially. Adjust comment accordingly. | |
701 | (satisfy_declaration_constraints): Assert in the two-parameter | |
702 | version that 't' is not a TEMPLATE_DECL. Adjust following | |
703 | removal of normalize_(non)?template_requirements and | |
704 | satisfy_asociated_constraints. | |
705 | (constraint_satisfaction_value): Combine the two- and | |
706 | three-parameter versions in the natural way. | |
707 | (constraints_satisfied_p): Combine the one- and two-parameter | |
708 | versions in the natural way. Improve documentation. | |
709 | (evaluate_requires_expr): Define. | |
710 | (evaluate_concept_check): Remove 'complain' parameter. Use | |
711 | constraint_satisfaction_value instead of | |
712 | satisfy_constraint_expression. | |
713 | (diagnose_nested_requirement): Adjust following renaming of | |
714 | satisfy_constraint_expression. | |
715 | (diagnose_constraints): Handle REQUIRES_EXPR by going through | |
716 | diagnose_requires_expr directly instead of treating it as a | |
717 | constraint-expression. Improve documentation. | |
718 | * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call | |
719 | to evaluate_concept_check. | |
720 | <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of | |
721 | constraints_satisfied_p. | |
722 | <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check. | |
723 | * cp-tree.h (evaluate_requires_expr): Declare. | |
724 | (evaluate_concept_check): Remove tsubst_flag_t parameter. | |
725 | (satisfy_constraint_expression): Remove declaration. | |
726 | (constraints_satisfied_p): Remove one-parameter declaration. | |
727 | Add a default argument to the two-parameter declaration. | |
728 | * cvt.c (convert_to_void): Adjust call to | |
729 | evaluate_concept_check. | |
730 | ||
731 | 2021-03-03 Jakub Jelinek <jakub@redhat.com> | |
732 | ||
733 | PR c++/82959 | |
734 | * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR | |
735 | and COMPOUND_EXPR. | |
736 | ||
737 | 2021-03-03 Marek Polacek <polacek@redhat.com> | |
738 | ||
739 | PR c++/97034 | |
740 | PR c++/99009 | |
741 | * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS. | |
742 | (maybe_aggr_guide): Use the original template type where needed. In | |
743 | a class member template, partially instantiate the result of | |
744 | collect_ctor_idx_types. | |
745 | (do_class_deduction): Defer the deduction until the enclosing | |
746 | scope is non-dependent. | |
747 | ||
748 | 2021-03-03 Jason Merrill <jason@redhat.com> | |
749 | ||
750 | PR c++/95675 | |
751 | * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR | |
752 | if it didn't get one before. | |
753 | ||
754 | 2021-03-03 Nathan Sidwell <nathan@acm.org> | |
755 | ||
756 | PR c++/99344 | |
757 | * module.cc (trees_out::decl_node): Small refactor. | |
758 | (depset::hash::add_binding_entity): Return true on meeting an | |
759 | import. Set namespace's import here. | |
760 | (module_state:write_namespaces): Inform of purview too. | |
761 | (module_state:read_namespaces): Adjust. | |
762 | * name-lookup.c (implicitly_export_namespace): Delete. | |
763 | (do_pushdecl): Don't call it. | |
764 | (push_namespace): Likewise, set purview. | |
765 | (add_imported_namespace): Reorder parms. | |
766 | * name-lookup.h (add_imported_namespace): Alter param ordering. | |
767 | ||
d97a92dc GA |
768 | 2021-03-02 Martin Sebor <msebor@redhat.com> |
769 | ||
770 | PR c++/99251 | |
771 | * class.c (build_base_path): Call build_if_nonnull. | |
772 | * cp-tree.h (build_if_nonnull): Declare. | |
773 | * rtti.c (ifnonnull): Rename... | |
774 | (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR. | |
775 | (build_dynamic_cast_1): Adjust to name change. | |
776 | ||
777 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
778 | ||
779 | PR c++/96443 | |
780 | PR c++/96960 | |
781 | * constraint.cc (type_deducible_p): Don't substitute into the | |
782 | constraints, and instead just pass 'args' to do_auto_deduction | |
783 | as the outer template arguments. | |
784 | (tsubst_parameter_mapping): Remove confused code for handling | |
785 | placeholder type arguments. | |
786 | (normalize_placeholder_type_constraint): Define. | |
787 | (satisfy_constraint_expression): Use it to handle placeholder | |
788 | 'auto' types. | |
789 | * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define. | |
790 | (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above. | |
791 | * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use | |
792 | PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead. | |
793 | (make_constrained_placeholder_type): Set | |
794 | PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead. | |
795 | (do_auto_deduction): Clarify comments about the outer_targs | |
796 | parameter. Rework satisfaction of a placeholder type constraint | |
797 | to pass in the complete set of template arguments directly to | |
798 | constraints_satisfied_p. | |
799 | (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO | |
800 | instead. Also rebuild the the constraint info on the new auto. | |
801 | ||
802 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
803 | ||
804 | * constraint.cc (build_parameter_mapping): Rely on the caller to | |
805 | determine the in-scope template parameters. | |
806 | (norm_info::norm_info): Delegate the tsubst_flags_t constructor | |
807 | to the two-parameter constructor. In the two-parameter | |
808 | constructor, fold in the definition of make_context, set | |
809 | initial_parms appropriately, and don't set the now-removed | |
810 | orig_decl member. | |
811 | (norm_info::make_context): Remove, now that its only use is | |
812 | inlined into the caller. | |
813 | (norm_info::update_context): Adjust call to | |
814 | build_parameter_mapping to pass in the relevant set of in-scope | |
815 | template parameters. | |
816 | (norm_info::ctx_parms): Define this member function. | |
817 | (norm_info::context): Initialize to NULL_TREE. | |
818 | (norm_info::orig_decl): Remove this data member. | |
819 | (norm_info::initial_parms): Define this data member. | |
820 | (normalize_atom): Adjust call to build_parameter_mapping to pass | |
821 | in the relevant set of in-scope template parameters. Use | |
822 | info.initial_parms instead of info.orig_decl. | |
823 | (normalize_constraint_expression): Take a norm_info object | |
824 | instead of a bool. Cache the result of normalization. | |
825 | (tsubst_nested_requirement): Call satisfy_constraint_expression | |
826 | instead of satisfy_constraint, so that we normalize on demand. | |
827 | (satisfy_constraint_expression): Handle a NESTED_REQ argument. | |
828 | Adjust call to normalize_constraint_expression. | |
829 | (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ | |
830 | to current_template_parms. | |
831 | (diagnose_nested_requirements): Go through | |
832 | satisfy_constraint_expression, as with tsubst_nested_requirement. | |
833 | ||
834 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
835 | ||
836 | * constraint.cc (tsubst_parameter_mapping): Canonicalize the | |
837 | arguments of a substituted TYPE_ARGUMENT_PACK even if we've | |
838 | started with a TYPE_ARGUMENT_PACK. | |
839 | (finish_requires_expr): Don't set DECL_CONTEXT and | |
840 | CONSTRAINT_VAR_P on each of the introduced parameters here. | |
841 | * parser.c (cp_parser_requirement_parameter_list): Instead set | |
842 | these fields earlier, here. | |
843 | * pt.c (do_auto_deduction): Canonicalize the result of | |
844 | do_auto_deduction. Pass 'complain' to finish_decltype_type. | |
845 | ||
846 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
847 | ||
848 | * constraint.cc (tsubst_simple_requirement): Just return | |
849 | boolean_true_node on success. | |
850 | (tsubst_type_requirement): Likewise. | |
851 | (tsubst_compound_requirement): Likewise. | |
852 | (tsubst_nested_requirement): Likewise. | |
853 | (tsubst_requirement_body): Remove. | |
854 | (check_constaint_variables): Rename to ... | |
855 | (check_constraint_variables): ... this. | |
856 | (tsubst_constraint_variables): Adjust. | |
857 | (tsubst_requires_expr): Fold tsubst_requirement_body into here. | |
858 | ||
88938886 GA |
859 | 2021-03-01 Nathan Sidwell <nathan@acm.org> |
860 | ||
861 | PR c++/99294 | |
862 | * class.c (fixup_type_variants): Propagate mode, precision, | |
863 | alignment & emptiness. | |
864 | * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW. | |
865 | (trees_in::tree_node): Rematerialize alignment here. | |
866 | ||
ec9dc4fa GA |
867 | 2021-02-27 Jason Merrill <jason@redhat.com> |
868 | ||
869 | PR c++/90333 | |
870 | * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes | |
871 | between () and ->. | |
872 | ||
06a9f20f GA |
873 | 2021-02-26 Jakub Jelinek <jakub@redhat.com> |
874 | ||
875 | * parser.c (cp_parser_lambda_declarator_opt): Implement | |
876 | P1102R2 - Down with ()! Make ()s optional before lambda specifiers | |
877 | for -std={c,gnu}++2b or with pedwarn in earlier versions. | |
878 | ||
879 | 2021-02-26 Jakub Jelinek <jakub@redhat.com> | |
880 | ||
881 | PR c++/95451 | |
882 | * lambda.c (is_lambda_ignored_entity): Before checking for | |
883 | LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check. | |
884 | ||
885 | 2021-02-26 Jason Merrill <jason@redhat.com> | |
886 | ||
887 | PR c++/98810 | |
888 | * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const | |
889 | to a class non-type template argument that needs it. | |
890 | ||
891 | 2021-02-26 Patrick Palka <ppalka@redhat.com> | |
892 | ||
893 | PR c++/98990 | |
894 | * pt.c (splice_late_return_type): Rebuild the entire return type | |
895 | if we have to adjust the level of an auto within. | |
896 | (type_uses_auto): Adjust call to find_type_usage. | |
897 | * type-utils.h (find_type_usage): Revert r10-6571 change that | |
898 | made this function return a pointer to the auto node. | |
899 | ||
daa68844 GA |
900 | 2021-02-25 Patrick Palka <ppalka@redhat.com> |
901 | ||
902 | PR c++/99213 | |
903 | PR c++/94521 | |
904 | * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of | |
905 | TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope. | |
906 | ||
907 | 2021-02-25 Patrick Palka <ppalka@redhat.com> | |
908 | ||
909 | PR c++/99103 | |
910 | * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'. | |
911 | (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived. | |
912 | ||
913 | 2021-02-25 Marek Polacek <polacek@redhat.com> | |
914 | ||
915 | DR 1312 | |
916 | PR c++/99176 | |
917 | * constexpr.c (is_std_construct_at): New overload. | |
918 | (is_std_allocator_allocate): New overload. | |
919 | (cxx_eval_call_expression): Use the new overloads. | |
920 | (cxx_eval_constant_expression): Reject casting | |
921 | from void * as per DR 1312. Don't check can_convert. | |
922 | ||
923 | 2021-02-25 Iain Sandoe <iain@sandoe.co.uk> | |
924 | ||
925 | PR c++/97587 | |
926 | * coroutines.cc (struct param_info): Track rvalue refs. | |
927 | (morph_fn_to_coro): Track rvalue refs, and call the promise | |
928 | CTOR with the frame copy of passed parms. | |
929 | ||
930 | 2021-02-25 Iain Sandoe <iain@sandoe.co.uk> | |
931 | ||
932 | PR c++/95822 | |
933 | * coroutines.cc (morph_fn_to_coro): Unconditionally remove any | |
934 | set throwing_cleanup marker. | |
935 | ||
936 | 2021-02-25 Nathan Sidwell <nathan@acm.org> | |
937 | ||
938 | PR c++/99166 | |
939 | * module.cc (module_state::inform_cmi_p): Renamed field. | |
940 | (module_state::do_import): Adjust. | |
941 | (init_modules, finish_module_processing): Likewise. | |
942 | (handle_module_option): Likewise. | |
943 | ||
944 | 2021-02-25 Nathan Sidwell <nathan@acm.org> | |
945 | ||
946 | PR c++/98318 | |
947 | * mapper-client.cc (module_client::open_module_client): Fix typo | |
948 | of fd init. | |
949 | ||
4028d01a GA |
950 | 2021-02-24 Nathan Sidwell <nathan@acm.org> |
951 | ||
952 | PR c++/98718 | |
953 | * module.cc (ool): New indirection vector. | |
954 | (loc_spans::maybe_propagate): Location is not optional. | |
955 | (loc_spans::open): Likewise. Assert monotonically advancing. | |
956 | (module_for_ordinary_loc): Use ool indirection vector. | |
957 | (module_state::write_prepare_maps): Do not count empty macro | |
958 | expansions. Elide empty spans. | |
959 | (module_state::write_macro_maps): Skip empty expansions. | |
960 | (ool_cmp): New qsort comparator. | |
961 | (module_state::write): Create and destroy ool vector. | |
962 | (name_pending_imports): Fix dump push/pop. | |
963 | (preprocess_module): Likewise. Add more dumping. | |
964 | (preprocessed_module): Likewise. | |
965 | ||
966 | 2021-02-24 Iain Sandoe <iain@sandoe.co.uk> | |
967 | ||
968 | PR c++/96251 | |
969 | * coroutines.cc (coro_common_keyword_context_valid_p): Suppress | |
970 | error reporting when instantiating for a constexpr. | |
971 | ||
71e24b06 GA |
972 | 2021-02-23 Nathan Sidwell <nathan@acm.org> |
973 | ||
974 | PR c++/99208 | |
975 | * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER | |
976 | identity. | |
977 | ||
978 | 2021-02-23 Patrick Palka <ppalka@redhat.com> | |
979 | ||
980 | PR c++/95468 | |
981 | * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied | |
982 | over from tsubst_copy. | |
983 | ||
984 | 2021-02-23 Patrick Palka <ppalka@redhat.com> | |
985 | ||
986 | * pt.c (instantiation_dependent_expression_p): Check | |
987 | processing_template_decl before calling | |
988 | potential_constant_expression. | |
989 | ||
2f5765cf GA |
990 | 2021-02-22 Nathan Sidwell <nathan@acm.org> |
991 | ||
992 | PR c++/99174 | |
993 | * module.cc (struct module_state): Add visited_p flag. | |
994 | (name_pending_imports): Use it to avoid duplicate requests. | |
995 | (preprocess_module): Don't read preprocessor state if we failed to | |
996 | load a module's config. | |
997 | ||
998 | 2021-02-22 Nathan Sidwell <nathan@acm.org> | |
999 | ||
1000 | PR c++/99153 | |
1001 | * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation | |
1002 | to common-path. | |
1003 | * module.cc (set_defining_module): Add assert. | |
1004 | ||
50352c6c GA |
1005 | 2021-02-19 Nathan Sidwell <nathan@acm.org> |
1006 | ||
1007 | PR c++/98741 | |
1008 | * module.cc (pending_imports): New. | |
1009 | (declare_module): Adjust test condition. | |
1010 | (name_pending_imports): New. | |
1011 | (preprocess_module): Reimplement using pending_imports. | |
1012 | (preprocessed_module): Move name-getting to name_pending_imports. | |
1013 | * name-lookup.c (append_imported_binding_slot): Assert module | |
1014 | ordering is increasing. | |
1015 | ||
1016 | 2021-02-19 Nathan Sidwell <nathan@acm.org> | |
1017 | ||
1018 | * module.cc (note_cmis): New. | |
1019 | (struct module_state): Add inform_read_p bit. | |
1020 | (module_state::do_import): Inform of CMI location, if enabled. | |
1021 | (init_modules): Canonicalize note_cmis entries. | |
1022 | (handle_module_option): Handle -flang-info-module-read=FOO. | |
1023 | ||
1024 | 2021-02-19 Jason Merrill <jason@redhat.com> | |
1025 | ||
1026 | PR c++/96926 | |
1027 | * call.c (perfect_conversion_p): Limit rvalueness | |
1028 | test to reference bindings. | |
1029 | ||
1030 | 2021-02-19 Jason Merrill <jason@redhat.com> | |
1031 | ||
1032 | PR c++/96926 | |
1033 | * call.c (perfect_conversion_p): New. | |
1034 | (perfect_candidate_p): New. | |
1035 | (add_candidates): Ignore templates after a perfect non-template. | |
1036 | ||
bf81237e GA |
1037 | 2021-02-18 Nathan Sidwell <nathan@acm.org> |
1038 | ||
1039 | PR c++/99023 | |
1040 | * module.cc (canonicalize_header_name): Use | |
1041 | cpp_probe_header_unit. | |
1042 | (maybe_translate_include): Fix note_includes comparison. | |
1043 | (init_modules): Fix note_includes string termination. | |
1044 | ||
1045 | 2021-02-18 Jakub Jelinek <jakub@redhat.com> | |
1046 | ||
1047 | PR c++/99132 | |
1048 | * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use | |
1049 | cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check | |
1050 | for immediate function calls. | |
1051 | ||
acc0ee5c GA |
1052 | 2021-02-17 Nathan Sidwell <nathan@acm.org> |
1053 | ||
1054 | PR c++/99023 | |
1055 | * module.cc (struct macro_export): Add GTY markers. | |
1056 | (macro_exports): Likewise, us a va_gc Vector. | |
1057 | ||
1058 | 2021-02-17 Jakub Jelinek <jakub@redhat.com> | |
1059 | ||
1060 | PR sanitizer/99106 | |
1061 | * init.c (build_zero_init_1): For flexible array members just return | |
1062 | NULL_TREE instead of returning empty CONSTRUCTOR with non-complete | |
1063 | ARRAY_TYPE. | |
1064 | ||
1065 | 2021-02-17 Nathan Sidwell <nathan@acm.org> | |
1066 | ||
1067 | PR c++/99116 | |
1068 | * name-lookup.c (do_pushdecl): Don't peek under template_parm | |
1069 | bindings here ... | |
1070 | (set_identifier_type_value_with_scope): ... or here. | |
1071 | (do_pushtag): Only set_identifier_type_value_with_scope at | |
1072 | non-class template parm scope, and use parent scope. | |
1073 | ||
1074 | 2021-02-17 Nathan Sidwell <nathan@acm.org> | |
1075 | ||
1076 | PR c++/99071 | |
1077 | * name-lookup.c (maybe_record_mergeable_decl): Deref the correct | |
1078 | pointer. | |
1079 | ||
1080 | 2021-02-17 Patrick Palka <ppalka@redhat.com> | |
1081 | ||
1082 | PR debug/96997 | |
1083 | PR c++/94034 | |
1084 | * tree.c (build_aggr_init_expr): Revert r10-7718 change. | |
1085 | ||
fab095da GA |
1086 | 2021-02-12 Nathan Sidwell <nathan@acm.org> |
1087 | ||
1088 | * module.cc (module_state::write_cluster): Check bindings for | |
1089 | imported using-decls. | |
1090 | ||
1091 | 2021-02-12 Nathan Sidwell <nathan@acm.org> | |
1092 | ||
1093 | PR c++/99040 | |
1094 | * module.cc (trees_in::decl_value): Call add_module_namespace_decl | |
1095 | for new namespace-scope entities. | |
1096 | (module_state::read_cluster): Don't call add_module_decl here. | |
1097 | * name-lookup.h (add_module_decl): Rename to ... | |
1098 | (add_module_namespace_decl): ... this. | |
1099 | * name-lookup.c (newbinding_bookkeeping): Move into ... | |
1100 | (do_pushdecl): ... here. Its only remaining caller. | |
1101 | (add_module_decl): Rename to ... | |
1102 | (add_module_namespace_decl): ... here. Add checking-assert for | |
1103 | circularity. Don't call newbinding_bookkeeping, just extern_c | |
1104 | checking and incomplete var checking. | |
1105 | ||
1106 | 2021-02-12 Nathan Sidwell <nathan@acm.org> | |
1107 | ||
1108 | PR c++/99039 | |
1109 | PR c++/99040 | |
1110 | * cp-tree.h (CPTI_GLOBAL_TYPE): Delete. | |
1111 | (global_type_node): Delete. | |
1112 | (IDENTIFIER_TYPE_VALUE): Delete. | |
1113 | (IDENTIFIER_HAS_TYPE_VALUE): Delete. | |
1114 | (get_type_value): Delete. | |
1115 | * name-lookup.h (identifier_type_value): Delete. | |
1116 | * name-lookup.c (check_module_override): Don't | |
1117 | SET_IDENTIFIER_TYPE_VALUE here. | |
1118 | (do_pushdecl): Nor here. | |
1119 | (identifier_type_value_1, identifier_type_value): Delete. | |
1120 | (set_identifier_type_value_with_scope): Only | |
1121 | SET_IDENTIFIER_TYPE_VALUE for local and class scopes. | |
1122 | (pushdecl_nanmespace_level): Remove shadow stack nadgering. | |
1123 | (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE. | |
1124 | * call.c (check_dtor_name): Use lookup_name. | |
1125 | * decl.c (cxx_init_decl_processing): Drop global_type_node. | |
1126 | * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE | |
1127 | here. | |
1128 | * init.c (get_type_value): Delete. | |
1129 | * pt.c (instantiate_class_template_1): Don't call pushtag or | |
1130 | SET_IDENTIFIER_TYPE_VALUE here. | |
1131 | (tsubst): Assert never an identifier. | |
1132 | (dependent_type_p): Drop global_type_node assert. | |
1133 | * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE | |
1134 | to determine ctorness. | |
1135 | ||
1136 | 2021-02-12 Jakub Jelinek <jakub@redhat.com> | |
1137 | ||
1138 | PR c++/97742 | |
1139 | * parser.c (cp_parser_requirement_seq): Stop iterating after reaching | |
1140 | CPP_EOF. | |
1141 | ||
1142 | 2021-02-12 Jason Merrill <jason@redhat.com> | |
1143 | ||
1144 | PR c++/97246 | |
1145 | PR c++/94546 | |
1146 | * pt.c (extract_fnparm_pack): Check DECL_PACK_P here. | |
1147 | (register_parameter_specializations): Not here. | |
1148 | ||
0c5cdb31 GA |
1149 | 2021-02-11 Marek Polacek <polacek@redhat.com> |
1150 | ||
1151 | PR c++/95888 | |
1152 | * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking | |
1153 | for the partial instantiation. | |
1154 | ||
1155 | 2021-02-11 Jakub Jelinek <jakub@redhat.com> | |
1156 | ||
1157 | PR c++/99033 | |
1158 | * init.c (build_zero_init_1): Handle zero initialiation of | |
1159 | flexible array members like initialization of [0] arrays. | |
1160 | Use integer_minus_onep instead of comparison to integer_minus_one_node | |
1161 | and integer_zerop instead of comparison against size_zero_node. | |
1162 | Formatting fixes. | |
1163 | ||
1164 | 2021-02-11 Marek Polacek <polacek@redhat.com> | |
1165 | ||
1166 | PR c++/99063 | |
1167 | * semantics.c (finish_do_stmt): Check for unexpanded parameter packs. | |
1168 | ||
1169 | 2021-02-11 Patrick Palka <ppalka@redhat.com> | |
1170 | ||
1171 | PR c++/97582 | |
1172 | * name-lookup.c (op_unqualified_lookup): Handle an ambiguous | |
1173 | lookup result by discarding it if the first element is a | |
1174 | class-scope declaration, otherwise return it. | |
1175 | (push_operator_bindings): Handle an ambiguous lookup result by | |
1176 | doing push_local_binding on each element in the list. | |
1177 | ||
1178 | 2021-02-11 Marek Polacek <polacek@redhat.com> | |
1179 | ||
1180 | * parser.c (cp_parser_selection_statement): Use vec_free. | |
1181 | ||
4b37c3ea GA |
1182 | 2021-02-10 Jakub Jelinek <jakub@redhat.com> |
1183 | ||
1184 | PR c++/98988 | |
1185 | PR c++/99031 | |
1186 | * constexpr.c: Include cgraph.h. | |
1187 | (cxx_eval_call_expression): Call varpool_node::finalize_decl on | |
1188 | heap artificial vars. | |
1189 | (cxx_eval_outermost_constant_expr): Remove varpool nodes for | |
1190 | heap artificial vars. | |
1191 | ||
1192 | 2021-02-10 Nathan Sidwell <nathan@acm.org> | |
1193 | ||
1194 | PR c++/99030 | |
1195 | * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the | |
1196 | answer if there's no local specialization. | |
1197 | ||
0a91b73e GA |
1198 | 2021-02-09 Nathan Sidwell <nathan@acm.org> |
1199 | ||
1200 | PR c++/98944 | |
1201 | * module.cc (module_state::is_rooted): Rename to ... | |
1202 | (module_state::has_location): ... here. Adjust callers. | |
1203 | (module_state::read_partitions): Adjust validity check. | |
1204 | Don't overwrite a known location. | |
1205 | ||
1206 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
1207 | ||
1208 | PR c++/96905 | |
1209 | * pt.c (mark_decl_instantiated): Exit early if consteval. | |
1210 | ||
1211 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
1212 | ||
1213 | PR c++/98326 | |
1214 | PR c++/20408 | |
1215 | * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref | |
1216 | parm. | |
1217 | ||
1218 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
1219 | ||
1220 | PR c++/98994 | |
1221 | PR c++/97566 | |
1222 | * constexpr.c (cxx_eval_store_expression): Only skip empty fields in | |
1223 | RECORD_TYPE. | |
1224 | ||
2da7ce23 GA |
1225 | 2021-02-08 Nathan Sidwell <nathan@acm.org> |
1226 | ||
1227 | * decl.c (start_cleanup_fn): Push function into | |
1228 | namespace. | |
1229 | ||
1230 | 2021-02-08 Nathan Sidwell <nathan@acm.org> | |
1231 | ||
1232 | PR c++/98531 | |
1233 | * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare. | |
1234 | * decl.c (push_abi_namespace, pop_abi_namespace): Moved | |
1235 | from rtti.c, add default namespace arg. | |
1236 | (check_redeclaration_exception_specification): Allow a lazy | |
1237 | builtin's eh spec to differ from an lready-declared user | |
1238 | declaration. | |
1239 | (declare_global_var): Use push/pop_abi_namespace. | |
1240 | (get_atexit_node): Push the fndecl into a namespace. | |
1241 | * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to | |
1242 | decl.c. | |
1243 | ||
1244 | 2021-02-08 Marek Polacek <polacek@redhat.com> | |
1245 | ||
1246 | * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo. | |
1247 | ||
1ed59127 GA |
1248 | 2021-02-05 Marek Polacek <polacek@redhat.com> |
1249 | ||
1250 | PR c++/98947 | |
1251 | * call.c (build_conditional_expr_1): Don't call mark_lvalue_use | |
1252 | on arg2/arg3. | |
1253 | * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when | |
1254 | issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if | |
1255 | a warning was emitted. | |
1256 | ||
1257 | 2021-02-05 Marek Polacek <polacek@redhat.com> | |
1258 | ||
1259 | PR c++/96462 | |
1260 | * name-lookup.c (lookup_using_decl): Hoist the destructor check. | |
1261 | ||
1262 | 2021-02-05 Jakub Jelinek <jakub@redhat.com> | |
1263 | ||
1264 | PR c++/97878 | |
1265 | * decl.c (check_array_initializer): For structured bindings, require | |
1266 | the array type to be complete. | |
1267 | ||
a19dd5e6 GA |
1268 | 2021-02-04 Jason Merrill <jason@redhat.com> |
1269 | ||
1270 | PR c++/98717 | |
1271 | * constraint.cc (build_concept_check_arguments): Remove assert. | |
1272 | (build_concept_check): Allow empty args. | |
1273 | ||
1274 | 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com> | |
1275 | ||
1276 | PR c++/90926 | |
1277 | * call.c (can_convert_array): Extend to handle all valid aggregate | |
1278 | initializers of an array; including by string literals, not just by | |
1279 | brace-init-list. | |
1280 | (build_aggr_conv): Call can_convert_array more often, not just in | |
1281 | brace-init-list case. | |
1282 | * typeck2.c (array_string_literal_compatible_p): New function. | |
1283 | (digest_init_r): call array_string_literal_compatible_p | |
1284 | * cp-tree.h: (array_string_literal_compatible_p): Declare. | |
1285 | ||
1286 | 2021-02-04 Jason Merrill <jason@redhat.com> | |
1287 | ||
1288 | PR c++/98802 | |
1289 | * pt.c (do_class_deduction): No aggregate guide if any_dguides_p. | |
1290 | ||
1291 | 2021-02-04 Jason Merrill <jason@redhat.com> | |
1292 | ||
1293 | PR c++/95192 | |
1294 | * pt.c (tsubst_attribute): Handle error. | |
1295 | (apply_late_template_attributes): Return false on error. | |
1296 | (tsubst_function_decl): Check its return value. | |
1297 | (tsubst_decl): Likewise. | |
1298 | (push_template_decl): Assert current_template_parms. | |
1299 | (tsubst_template_decl): Set current_template_parms. | |
1300 | ||
9faaa807 GA |
1301 | 2021-02-03 Marek Polacek <polacek@redhat.com> |
1302 | ||
1303 | PR c++/98951 | |
1304 | * call.c (struct z_candidate): Mark rewritten and reversed as const. | |
1305 | (struct NonPublicField): Mark operator() as const. | |
1306 | (struct NonTrivialField): Likewise. | |
1307 | ||
1308 | 2021-02-03 Jason Merrill <jason@redhat.com> | |
1309 | ||
1310 | PR c++/98926 | |
1311 | PR c++/98570 | |
1312 | * pt.c (spec_hasher::equal): Set processing_template_decl. | |
1313 | * Make-lang.in (check-g++-strict-gc): Add --param | |
1314 | hash-table-verification-limit=10000. | |
1315 | ||
1316 | 2021-02-03 Marek Polacek <polacek@redhat.com> | |
1317 | ||
1318 | PR c++/98899 | |
1319 | * parser.c (cp_parser_class_specifier_1): Use any possible | |
1320 | DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN. | |
1321 | (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS. | |
1322 | * pt.c (tsubst_exception_specification): Stash new_specs into | |
1323 | DEFPARSE_INSTANTIATIONS. | |
1324 | * tree.c (fixup_deferred_exception_variants): Use | |
1325 | UNPARSED_NOEXCEPT_SPEC_P. | |
1326 | ||
548b75d8 GA |
1327 | 2021-02-02 Jason Merrill <jason@redhat.com> |
1328 | ||
1329 | PR c++/98929 | |
1330 | PR c++/96199 | |
1331 | * error.c (dump_expr): Ignore dummy object. | |
1332 | * pt.c (tsubst_baselink): Handle dependent scope. | |
1333 | ||
f7884fb1 GA |
1334 | 2021-02-01 Patrick Palka <ppalka@redhat.com> |
1335 | ||
1336 | PR c++/98295 | |
1337 | * constexpr.c (cxx_eval_array_reference): Also set | |
1338 | new_ctx.object when setting new_ctx.ctor. | |
1339 | ||
1340 | 2021-02-01 Marek Polacek <polacek@redhat.com> | |
1341 | ||
1342 | PR c++/98355 | |
1343 | * parser.c (cp_parser_has_attribute_expression): Use | |
1344 | uses_template_parms instead of type_dependent_expression_p. | |
1345 | ||
1346 | 2021-02-01 Jason Merrill <jason@redhat.com> | |
1347 | ||
1348 | PR c++/98570 | |
1349 | * cp-tree.h: Declare it. | |
1350 | * pt.c (comparing_dependent_aliases): New flag. | |
1351 | (template_args_equal, spec_hasher::equal): Set it. | |
1352 | (dependent_alias_template_spec_p): Assert that we don't | |
1353 | get non-types other than error_mark_node. | |
1354 | (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY | |
1355 | on complex alias specializations. Set TYPE_DEPENDENT_P here. | |
1356 | (tsubst_decl): Not here. | |
1357 | * module.cc (module_state::read_cluster): Set | |
1358 | comparing_dependent_aliases instead of | |
1359 | comparing_specializations. | |
1360 | * tree.c (cp_tree_equal): Remove comparing_specializations | |
1361 | module handling. | |
1362 | * typeck.c (structural_comptypes): Adjust. | |
1363 | (comptypes): Remove comparing_specializations handling. | |
1364 | ||
2900f2f2 GA |
1365 | 2021-01-29 Nathan Sidwell <nathan@acm.org> |
1366 | ||
1367 | PR c++/98843 | |
1368 | * module.cc (module_state_config): Add num_entities field. | |
1369 | (module_state::read_entities): The entity_ary span is | |
1370 | already allocated. | |
1371 | (module_state::write_config): Write num_entities. | |
1372 | (module_state::read_config): Read num_entities. | |
1373 | (module_state::write): Set config's num_entities. | |
1374 | (module_state::read_initial): Allocate the entity ary | |
1375 | span here. | |
1376 | (module_state::read_language): Do not set entity_lwm | |
1377 | here. | |
1378 | ||
1379 | 2021-01-29 Marek Polacek <polacek@redhat.com> | |
1380 | ||
1381 | PR c++/96137 | |
1382 | * parser.c (cp_parser_class_name): If parser->scope is | |
1383 | error_mark_node, return it, otherwise continue. | |
1384 | ||
85d04a2e GA |
1385 | 2021-01-28 Jakub Jelinek <jakub@redhat.com> |
1386 | ||
1387 | PR c++/98841 | |
1388 | * typeck.c (build_x_indirect_ref): For *this, return current_class_ref. | |
1389 | ||
1390 | 2021-01-28 Jakub Jelinek <jakub@redhat.com> | |
1391 | ||
1392 | PR c++/33661 | |
1393 | PR c++/98847 | |
1394 | * decl.c (cp_finish_decl): For register vars with asmspec in templates | |
1395 | call set_user_assembler_name and set DECL_HARD_REGISTER. | |
1396 | * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars, | |
1397 | pass asmspec_tree to cp_finish_decl. | |
1398 | ||
1399 | 2021-01-28 Nathan Sidwell <nathan@acm.org> | |
1400 | ||
1401 | PR c++/98770 | |
1402 | * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME | |
1403 | check order. | |
1404 | (trees_in::decl_value): Do typedef frobbing only when installing | |
1405 | a new typedef, adjust is_matching_decl call. Swap is_typedef | |
1406 | & TYPE_NAME check. | |
1407 | (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable | |
1408 | names and deal with typedef checking. | |
1409 | ||
aa69f0a8 GA |
1410 | 2021-01-27 Jason Merrill <jason@redhat.com> |
1411 | ||
1412 | PR c++/97874 | |
1413 | * name-lookup.c (lookup_using_decl): Clean up handling | |
1414 | of dependency and inherited constructors. | |
1415 | (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P. | |
1416 | * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P. | |
1417 | ||
e62bb7f0 GA |
1418 | 2021-01-26 Jason Merrill <jason@redhat.com> |
1419 | ||
1420 | PR c++/97474 | |
1421 | * call.c (type_passed_as): Don't mark invisiref restrict. | |
1422 | ||
1423 | 2021-01-26 Jason Merrill <jason@redhat.com> | |
1424 | ||
1425 | PR c++/97566 | |
1426 | PR c++/98463 | |
1427 | * class.c (layout_class_type): An empty field gets size 0. | |
1428 | (is_empty_field): New. | |
1429 | (check_bases): Check it. | |
1430 | * cp-tree.h (is_empty_field): Declare it. | |
1431 | * constexpr.c (cxx_eval_store_expression): Check it. | |
1432 | (cx_check_missing_mem_inits): Likewise. | |
1433 | * init.c (perform_member_init): Likewise. | |
1434 | * typeck2.c (process_init_constructor_record): Likewise. | |
1435 | ||
161e4c08 GA |
1436 | 2021-01-25 Martin Sebor <msebor@redhat.com> |
1437 | ||
1438 | PR c++/98646 | |
1439 | * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING. | |
1440 | ||
1441 | 2021-01-25 Jason Merrill <jason@redhat.com> | |
1442 | ||
1443 | PR c++/98463 | |
1444 | * constexpr.c (get_or_insert_ctor_field): Add check. | |
1445 | (cxx_eval_store_expression): Handle discontinuity of refs. | |
1446 | ||
6b163337 GA |
1447 | 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com> |
1448 | ||
1449 | * call.c (complain_about_access): Altered function. | |
1450 | * cp-tree.h (complain_about_access): Changed parameters of function. | |
1451 | (get_parent_with_private_access): Declared new function. | |
1452 | * search.c (get_parent_with_private_access): Defined new function. | |
1453 | * semantics.c (enforce_access): Modified function. | |
1454 | * typeck.c (complain_about_unrecognized_member): Updated function | |
1455 | arguments in complain_about_access. | |
1456 | ||
1457 | 2021-01-23 Patrick Palka <ppalka@redhat.com> | |
1458 | ||
1459 | PR c++/97399 | |
1460 | * cp-tree.h (shared_member_p): Adjust declaration. | |
1461 | * parser.c (cp_parser_init_declarator): If the storage class | |
1462 | specifier is sc_static, pass true for static_p to | |
1463 | cp_parser_declarator. | |
1464 | (cp_parser_direct_declarator): Don't do inject_this_parm when | |
1465 | the declarator is a friend. | |
1466 | * search.c (shared_member_p): Change return type to bool and | |
1467 | adjust function body accordingly. Return false for a dependent | |
1468 | USING_DECL instead of aborting. | |
1469 | * semantics.c (finish_qualified_id_expr): Rely on shared_member_p | |
1470 | even when type-dependent. | |
1471 | ||
8502e23d GA |
1472 | 2021-01-22 Marek Polacek <polacek@redhat.com> |
1473 | ||
1474 | PR c++/96623 | |
1475 | * parser.c (inject_parm_decls): Remove a redundant assignment. | |
1476 | (cp_parser_class_specifier_1): Clear current_class_{ptr,ref} | |
1477 | before calling inject_parm_decls. | |
1478 | ||
1479 | 2021-01-22 Jason Merrill <jason@redhat.com> | |
1480 | ||
1481 | PR c++/98744 | |
1482 | * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P. | |
1483 | ||
1484 | 2021-01-22 Jakub Jelinek <jakub@redhat.com> | |
1485 | ||
1486 | PR sanitizer/95693 | |
1487 | * init.c (build_zero_init_1): Revert the 2018-03-06 change to | |
1488 | return build_zero_cst for reference types. | |
1489 | * typeck2.c (process_init_constructor_record): Instead call | |
1490 | build_zero_cst here during error recovery instead of build_zero_init. | |
1491 | ||
1492 | 2021-01-22 Marek Polacek <polacek@redhat.com> | |
1493 | ||
1494 | PR c++/98545 | |
1495 | * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses | |
1496 | warnings regardless of abi_version_at_least. | |
1497 | (write_expression): When the expression is a dependent name | |
1498 | and an operator name, write "on" before writing its name. | |
1499 | ||
1500 | 2021-01-22 Marek Polacek <polacek@redhat.com> | |
1501 | ||
1502 | PR c++/97966 | |
1503 | * pt.c (instantiate_class_template_1): Instantiate members | |
1504 | marked with attribute used only after we're done instantiating | |
1505 | the class. | |
1506 | ||
7559d465 GA |
1507 | 2021-01-21 Patrick Palka <ppalka@redhat.com> |
1508 | ||
1509 | PR c++/71879 | |
1510 | * semantics.c (finish_decltype_type): Set up a cp_unevaluated | |
1511 | sentinel at the start of the function. Remove a now-redundant | |
1512 | manual adjustment of cp_unevaluated_operand. | |
1513 | ||
1514 | 2021-01-21 Nathan Sidwell <nathan@acm.org> | |
1515 | ||
1516 | PR c++/98624 | |
1517 | * module.cc (depset::hash::find_dependencies): Add | |
1518 | module arg. | |
1519 | (trees_out::core_vals): Check state before calling | |
1520 | write_location. | |
1521 | (sort_cluster, module_state::write): Adjust | |
1522 | find_dependencies call. | |
1523 | ||
1524 | 2021-01-21 Jakub Jelinek <jakub@redhat.com> | |
1525 | ||
1526 | PR c++/98672 | |
1527 | * constexpr.c (check_for_return_continue_data): Add break_stmt member. | |
1528 | (check_for_return_continue): Also look for BREAK_STMT. Handle | |
1529 | SWITCH_STMT by ignoring break_stmt from its body. | |
1530 | (potential_constant_expression_1) <case FOR_STMT>, | |
1531 | <case WHILE_STMT>: If the condition isn't constant true, check if | |
1532 | the loop body can contain a return stmt. | |
1533 | <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer. | |
1534 | <case IF_STMT>: If recursion with tf_none is successful, | |
1535 | merge *jump_target from the branches - returns with highest priority, | |
1536 | breaks or continues lower. If then branch is potentially constant and | |
1537 | doesn't return, check the else branch if it could return, break or | |
1538 | continue. | |
1539 | ||
1540 | 2021-01-21 Nathan Sidwell <nathan@acm.org> | |
1541 | ||
1542 | PR c++/98530 | |
1543 | * name-lookup.c (lookup_class_binding): Rearrange a stat-hack. | |
1544 | ||
b93d0e36 GA |
1545 | 2021-01-20 Nathan Sidwell <nathan@acm.org> |
1546 | ||
1547 | * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of | |
1548 | signed type. | |
1549 | ||
1550 | 2021-01-20 Patrick Palka <ppalka@redhat.com> | |
1551 | ||
1552 | PR c++/95434 | |
1553 | * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting | |
1554 | CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM, | |
1555 | adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. | |
1556 | ||
1557 | 2021-01-20 Patrick Palka <ppalka@redhat.com> | |
1558 | ||
1559 | PR c++/82613 | |
1560 | * parser.c (cp_parser_class_head): Defer access checking when | |
1561 | parsing the base-clause until all bases are seen and attached | |
1562 | to the class type. | |
1563 | * pt.c (instantiate_class_template): Likewise when substituting | |
1564 | into dependent bases. | |
1565 | ||
1566 | 2021-01-20 Jakub Jelinek <jakub@redhat.com> | |
1567 | ||
1568 | PR c++/98742 | |
1569 | * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If | |
1570 | error_operand_p, remove clause without further checking. Check | |
1571 | for non-NULL TYPE_NAME. | |
1572 | ||
f35a4f96 GA |
1573 | 2021-01-19 Marek Polacek <polacek@redhat.com> |
1574 | ||
1575 | PR c++/98659 | |
1576 | * pt.c (maybe_instantiate_noexcept): Return false if FN is | |
1577 | error_mark_node. | |
1578 | ||
1579 | 2021-01-19 Marek Polacek <polacek@redhat.com> | |
1580 | ||
1581 | PR c++/98687 | |
1582 | * name-lookup.c (push_using_decl_bindings): New, broken out of... | |
1583 | (finish_nonmember_using_decl): ...here. | |
1584 | * name-lookup.h (push_using_decl_bindings): Update declaration. | |
1585 | * pt.c (tsubst_expr): Update the call to push_using_decl_bindings. | |
1586 | ||
1587 | 2021-01-19 Patrick Palka <ppalka@redhat.com> | |
1588 | ||
1589 | PR c++/41437 | |
1590 | PR c++/58993 | |
1591 | * search.c (friend_accessible_p): If scope is a hidden friend | |
1592 | defined inside a dependent class, consider access from the | |
1593 | class. | |
1594 | * parser.c (cp_parser_late_parsing_for_member): Don't push a | |
1595 | dk_no_check access state. | |
1596 | ||
1597 | 2021-01-19 Marek Polacek <polacek@redhat.com> | |
1598 | ||
1599 | PR c++/98333 | |
1600 | * parser.c (cp_parser_class_specifier_1): Perform late-parsing | |
1601 | of NSDMIs before late-parsing of noexcept-specifiers. | |
1602 | ||
1603 | 2021-01-19 Nathan Sidwell <nathan@acm.org> | |
1604 | ||
1605 | * module.cc (identifier): Merge overloads. | |
1606 | ||
1607 | 2021-01-19 Nathan Sidwell <nathan@acm.org> | |
1608 | ||
1609 | PR c++/98624 | |
1610 | * module.cc (trees_out::write_location): Make static. | |
1611 | ||
59cf67d1 GA |
1612 | 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com> |
1613 | ||
1614 | * parser.c (cp_parser_omp_clause_detach): New. | |
1615 | (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH. | |
1616 | (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH. | |
1617 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause. | |
1618 | * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause. | |
1619 | Prevent use of detach with mergeable and overriding the data sharing | |
1620 | mode of the event handle. | |
1621 | ||
2f7f0d32 GA |
1622 | 2021-01-15 Nathan Sidwell <nathan@acm.org> |
1623 | ||
1624 | PR c++/98538 | |
1625 | * tree.c (cp_build_qualified_type_real): Propagate an array's | |
1626 | dependentness to the copy, if known. | |
1627 | ||
1628 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1629 | ||
1630 | PR c++/98642 | |
1631 | * call.c (unsafe_return_slot_p): Return int. | |
1632 | (init_by_return_slot_p): Split out from... | |
1633 | (unsafe_copy_elision_p): ...here. | |
1634 | (unsafe_copy_elision_p_opt): New name for old meaning. | |
1635 | (build_over_call): Adjust. | |
1636 | (make_safe_copy_elision): New. | |
1637 | * typeck2.c (split_nonconstant_init_1): Elide copy from safe | |
1638 | list-initialization. | |
1639 | * cp-tree.h: Adjust. | |
1640 | ||
1641 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1642 | ||
1643 | * call.c (base_ctor_for, make_base_init_ok): New. | |
1644 | (build_over_call): Use make_base_init_ok. | |
1645 | ||
1646 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1647 | ||
1648 | PR c++/63707 | |
1649 | * tree.c (build_vec_init_expr): Don't call build_vec_init_elt | |
1650 | if we got a CONSTRUCTOR. | |
1651 | ||
1652 | 2021-01-15 Nathan Sidwell <nathan@acm.org> | |
1653 | ||
1654 | PR c++/98591 | |
1655 | * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only. | |
1656 | ||
5fff80fd GA |
1657 | 2021-01-14 Jason Merrill <jason@redhat.com> |
1658 | ||
1659 | * typeck2.c (process_init_constructor_record): Use fldtype | |
1660 | variable consistently. | |
1661 | ||
1662 | 2021-01-14 Nathan Sidwell <nathan@acm.org> | |
1663 | ||
1664 | PR c++/98372 | |
1665 | * tree.c (cp_tree_equal): Correct map_context logic. | |
1666 | ||
be0851b8 GA |
1667 | 2021-01-13 Marek Polacek <polacek@redhat.com> |
1668 | ||
1669 | PR c++/98231 | |
1670 | * name-lookup.c (push_using_decl_bindings): New. | |
1671 | * name-lookup.h (push_using_decl_bindings): Declare. | |
1672 | * pt.c (tsubst_expr): Call push_using_decl_bindings. | |
1673 | ||
1674 | 2021-01-13 Nathan Sidwell <nathan@acm.org> | |
1675 | ||
1676 | PR c++/98626 | |
1677 | * module.cc (module_add_import_initializers): Pass a | |
1678 | zero-element argument vector. | |
1679 | ||
6851dda2 GA |
1680 | 2021-01-12 Patrick Palka <ppalka@redhat.com> |
1681 | ||
1682 | PR c++/98611 | |
1683 | * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit | |
1684 | the template of a CTAD placeholder. | |
1685 | ||
1686 | 2021-01-12 Marek Polacek <polacek@redhat.com> | |
1687 | ||
1688 | PR c++/98620 | |
1689 | * typeck2.c (process_init_constructor_record): Don't emit | |
1690 | -Wmissing-field-initializers warnings in unevaluated contexts. | |
1691 | ||
67fbb7f0 GA |
1692 | 2021-01-11 Jakub Jelinek <jakub@redhat.com> |
1693 | ||
1694 | PR c++/98481 | |
1695 | * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1 | |
1696 | for types. | |
1697 | (mark_abi_tags_r): Likewise. | |
1698 | * decl2.c (min_vis_r): Likewise. | |
1699 | * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through | |
1700 | typedefs. | |
1701 | ||
bf5cbb9e GA |
1702 | 2021-01-08 Patrick Palka <ppalka@redhat.com> |
1703 | ||
1704 | PR c++/98551 | |
1705 | * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P | |
1706 | instead of AGGREGATE_TYPE_P before calling replace_result_decl. | |
1707 | ||
1708 | 2021-01-08 Patrick Palka <ppalka@redhat.com> | |
1709 | ||
1710 | PR c++/98515 | |
1711 | * semantics.c (check_accessibility_of_qualified_id): Punt if | |
1712 | we're checking access of a scoped non-static member inside a | |
1713 | class template. | |
1714 | ||
7d187e4f GA |
1715 | 2021-01-07 Jakub Jelinek <jakub@redhat.com> |
1716 | ||
1717 | PR c++/98329 | |
1718 | * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call | |
1719 | cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set | |
1720 | its location. | |
1721 | (tsubst_copy_and_build): Handle BIT_CAST_EXPR. | |
1722 | ||
1723 | 2021-01-07 Marek Polacek <polacek@redhat.com> | |
1724 | ||
1725 | PR c++/98441 | |
1726 | * decl.c (grokdeclarator): Move the !funcdecl_p check inside the | |
1727 | !late_return_type block. | |
1728 | ||
1729 | 2021-01-07 Jason Merrill <jason@redhat.com> | |
1730 | ||
1731 | * constexpr.c (cxx_bind_parameters_in_call): Add comment. | |
1732 | (cxx_eval_store_expression): Add comment. | |
1733 | ||
1734 | 2021-01-07 Jason Merrill <jason@redhat.com> | |
1735 | ||
1736 | * call.c (has_next): Factor out from... | |
1737 | (next_conversion): ...here. | |
1738 | (strip_standard_conversion): And here. | |
1739 | (is_subseq): And here. | |
1740 | (build_conv): Check it. | |
1741 | (standard_conversion): Don't call build_conv | |
1742 | for ck_identity. | |
1743 | ||
942ae5be GA |
1744 | 2021-01-06 Martin Sebor <msebor@redhat.com> |
1745 | ||
1746 | PR c++/95768 | |
1747 | * error.c (dump_expr): Call c_pretty_printer::unary_expression. | |
1748 | ||
651b8a50 GA |
1749 | 2021-01-05 Patrick Palka <ppalka@redhat.com> |
1750 | ||
1751 | * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into | |
1752 | the type of the NTTP, substitute into the type again. If the | |
1753 | type is still dependent, don't unify the NTTP. | |
1754 | ||
1755 | 2021-01-05 Jakub Jelinek <jakub@redhat.com> | |
1756 | ||
1757 | * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add | |
1758 | $(CODYLIB) after $(BACKEND). | |
1759 | ||
1760 | 2021-01-05 Jakub Jelinek <jakub@redhat.com> | |
1761 | ||
1762 | PR c++/98469 | |
1763 | * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>: | |
1764 | Punt if lval is true. | |
1765 | * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on | |
1766 | the result if it has a class type. | |
1767 | ||
1768 | 2021-01-05 Marek Polacek <polacek@redhat.com> | |
1769 | ||
1770 | PR c++/82099 | |
1771 | * pt.c (resolve_overloaded_unification): Call | |
1772 | maybe_instantiate_noexcept after instantiating the function | |
1773 | decl. | |
1774 | ||
1775 | 2021-01-05 Nathan Sidwell <nathan@acm.org> | |
1776 | ||
1777 | * parser.c (cp_parser_module_declaration): Alter diagnostic | |
1778 | text to say where is permissable. | |
1779 | ||
1780 | 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | |
1781 | ||
1782 | PR c++/98316 | |
1783 | * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS). | |
1784 | ||
2eacfdbd GA |
1785 | 2021-01-02 Jan Hubicka <jh@suse.cz> |
1786 | ||
1787 | * cp-tree.h (cp_tree_c_finish_parsing): Declare. | |
1788 | * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing. | |
1789 | * tree.c (cp_tree_c_finish_parsing): New function. | |
1790 | ||
b6dd195a GA |
1791 | 2021-01-01 Jakub Jelinek <jakub@redhat.com> |
1792 | ||
1793 | * ChangeLog-2020: Rotate ChangeLog. New file. | |
1794 | ||
ad41bd84 | 1795 | \f |
618e665a | 1796 | Copyright (C) 2021 Free Software Foundation, Inc. |
ad41bd84 JM |
1797 | |
1798 | Copying and distribution of this file, with or without modification, | |
1799 | are permitted in any medium without royalty provided the copyright | |
1800 | notice and this notice are preserved. |