]>
Commit | Line | Data |
---|---|---|
67f10d28 GA |
1 | 2021-03-04 Jakub Jelinek <jakub@redhat.com> |
2 | ||
3 | PR c++/88146 | |
4 | PR c++/99362 | |
5 | * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify | |
6 | comment. | |
7 | ||
8 | 2021-03-04 Nathan Sidwell <nathan@acm.org> | |
9 | ||
10 | PR c++/99170 | |
11 | * module.cc (class uintset): Delete. | |
12 | (typedef attached_map_t): A hash map. | |
13 | (attached_table): Use attached_map_t. Adjust uses ... | |
14 | (trees_out::decl_value, trees_in::decl_value): ... here ... | |
15 | (trees_out::key_mergeable): ... here ... | |
16 | (trees_in::key_mergeable): ... here ... | |
17 | (maybe_attach_decl): ... here ... | |
18 | (direct_import): ... and here. | |
19 | ||
20 | 2021-03-04 Nathan Sidwell <nathan@acm.org> | |
21 | ||
22 | PR c++/99170 | |
23 | * cp-tree.h | |
24 | * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p | |
25 | rename. | |
26 | * module.cc (class pending_key): New. | |
27 | (default_hash_traits<pending_key>): New specialization. | |
28 | (pending_map_t): New typedef. | |
29 | (pending_table): Replace old table. | |
30 | (trees_out::lang_decl_bools): Adjust. | |
31 | (trees_in::lang_decl_bools): Adjust. | |
32 | (trees_in::install_entity): Drop pending member and specialization | |
33 | handling. | |
34 | (find_pending_key): New. | |
35 | (depset::hash::fiund_dependencies): Use it. | |
36 | (pendset_lazy_load): Delete. | |
37 | (module_state::write_cluster): Don't count pendings here. Bye | |
38 | Duff's device-like thing. | |
39 | (module_state::write_pendings): Reimplement. | |
40 | (module_state::read_pendings): Reimplement. | |
41 | (lazy_specializations_p): Delete. | |
42 | (module_state::write): Adjust write_pendings call. | |
43 | (lazy_load_pendings): New. | |
44 | (lazy_load_specializations): Delete. | |
45 | (lazy_load_members): Delete. | |
46 | (init_modules): Adjust. | |
47 | * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings | |
48 | not lazy_load_members. | |
49 | (note_pending_specializations): Delete. | |
50 | (load_pending_specializations): Delete. | |
51 | * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete. | |
52 | (BINDING_VECTOR_PENDING_MEMBERS_P): Delete. | |
53 | (BINDING_VECTR_PENDING_MEMBERS_P): Delete. | |
54 | (note_pending_specializations): Delete. | |
55 | (load_pending_specializations): Delete. | |
56 | * pt.c (lookup_template_class_1): Call lazy_load_pendings not | |
57 | lazy_load_specializations. | |
58 | (instantiate_template_class_1): Likewise. | |
59 | (instantiate_decl): Call lazy_load_pendings. | |
60 | * typeck.c (complete_type): Likewise. | |
61 | ||
f3641ac7 GA |
62 | 2021-03-03 Nathan Sidwell <nathan@acm.org> |
63 | ||
64 | PR c++/99170 | |
65 | * module.cc (post_load_decls): New. | |
66 | (lazy_snum, recursive_lazy): Move earlier. | |
67 | (module_state::read_cluster): Push cloning onto post_load_decls. | |
68 | (post_load_processing): New. Do the cloning here. | |
69 | (module_state::read_inits): Call post_load_processing. | |
70 | (module_state::read_language): Likewise. | |
71 | (lazy_load_binding, lazy_load_specializations): Likewise | |
72 | (lazy_load_members): Likewise | |
73 | ||
74 | 2021-03-03 Nathan Sidwell <nathan@acm.org> | |
75 | ||
76 | PR c++/99170 | |
77 | * module.cc (trees_out::decl_value): Stream specialization keys | |
78 | after decl. | |
79 | (trees_in::decl_value): Stream them back and insert after | |
80 | completing the decl. | |
81 | (trees_out::key_mergeable): Drop some streaming here ... | |
82 | (trees_in::key_mergeable): ... and here. Don't insert into | |
83 | specialization tables. | |
84 | ||
85 | 2021-03-03 Patrick Palka <ppalka@redhat.com> | |
86 | ||
87 | * constraint.cc (struct sat_info): Document the different | |
88 | meanings of noisy() and diagnose_unsatisfaction_p() during | |
89 | satisfaction and requires-expression evaluation. | |
90 | (tsubst_valid_expression_requirement): Take a sat_info instead | |
91 | of a subst_info. Perform the substitution quietly first. Fold | |
92 | in error-replaying code from diagnose_valid_expression. | |
93 | (tsubst_simple_requirement): Take a sat_info instead of a | |
94 | subst_info. | |
95 | (tsubst_type_requirement_1): New. Fold in error-replaying code | |
96 | from diagnose_valid_type. | |
97 | (tsubst_type_requirement): Use the above. Take a sat_info | |
98 | instead of a subst_info. | |
99 | (tsubst_compound_requirement): Likewise. Fold in | |
100 | error-replaying code from diagnose_compound_requirement. | |
101 | (tsubst_nested_requirement): Take a sat_info instead of a | |
102 | subst_info. Fold in error-replaying code from | |
103 | diagnose_nested_requirement. | |
104 | (tsubst_requirement): Take a sat_info instead of a subst_info. | |
105 | (tsubst_requires_expr): Split into two versions, one that takes | |
106 | a sat_info argument and another that takes a complain and | |
107 | in_decl argument. Remove outdated documentation. Document the | |
108 | effects of the sat_info argument. Don't short-circuit | |
109 | processing of requirements when diagnosing unsatisfaction, | |
110 | mirroring diagnose_requires_expr. | |
111 | (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove | |
112 | assert, and se the three-parameter version of tsubst_requires_expr. | |
113 | (diagnose_trait_expr): Make static. Take a template argument | |
114 | vector instead of a parameter mapping. | |
115 | (diagnose_valid_expression): Remove. | |
116 | (diagnose_valid_type): Remove. | |
117 | (diagnose_simple_requirement): Remove. | |
118 | (diagnose_compound_requirement): Remove. | |
119 | (diagnose_type_requirement): Remove. | |
120 | (diagnose_nested_requirement): Remove. | |
121 | (diagnose_requirement): Remove. | |
122 | (diagnose_requires_expr): Remove. | |
123 | (diagnose_atomic_constraint): Take a sat_info instead of a | |
124 | subst_info. Adjust call to diagnose_trait_expr. Call | |
125 | tsubst_requires_expr instead of diagnose_requires_expr. | |
126 | (diagnose_constraints): Remove special casing of REQUIRES_EXPR | |
127 | and just always call constraint_satisfaction_value. | |
128 | ||
129 | 2021-03-03 Patrick Palka <ppalka@redhat.com> | |
130 | ||
131 | * constexpr.c (cxx_eval_call_expression): Adjust call to | |
132 | evaluate_concept_check. | |
133 | (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use | |
134 | evaluate_requires_expression instead of | |
135 | satisfy_constraint_expression. | |
136 | <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check. | |
137 | * constraint.cc (struct sat_info): Adjust comment about which | |
138 | satisfaction entrypoints use noisy-unsat. | |
139 | (normalize_template_requirements): Remove (and adjust callers | |
140 | appropriately). | |
141 | (normalize_nontemplate_requirements): Likewise. | |
142 | (tsubst_nested_requirement): Use constraint_satisfaction_value | |
143 | instead of satisfy_constraint_expression, which'll do the | |
144 | noisy replaying of ill-formed quiet satisfaction for us. | |
145 | (decl_satisfied_cache): Adjust comment. | |
146 | (satisfy_constraint): Rename to ... | |
147 | (satisfy_normalized_constraints): ... this. | |
148 | (satisfy_associated_constraints): Remove (and make its | |
149 | callers check for dependent arguments). | |
150 | (satisfy_constraint_expression): Rename to ... | |
151 | (satisfy_nondeclaration_constraints): ... this. Assert that | |
152 | 'args' is empty when 't' is a concept-id. Removing handling | |
153 | bare constraint-expressions, and handle REQUIRES_EXPRs | |
154 | specially. Adjust comment accordingly. | |
155 | (satisfy_declaration_constraints): Assert in the two-parameter | |
156 | version that 't' is not a TEMPLATE_DECL. Adjust following | |
157 | removal of normalize_(non)?template_requirements and | |
158 | satisfy_asociated_constraints. | |
159 | (constraint_satisfaction_value): Combine the two- and | |
160 | three-parameter versions in the natural way. | |
161 | (constraints_satisfied_p): Combine the one- and two-parameter | |
162 | versions in the natural way. Improve documentation. | |
163 | (evaluate_requires_expr): Define. | |
164 | (evaluate_concept_check): Remove 'complain' parameter. Use | |
165 | constraint_satisfaction_value instead of | |
166 | satisfy_constraint_expression. | |
167 | (diagnose_nested_requirement): Adjust following renaming of | |
168 | satisfy_constraint_expression. | |
169 | (diagnose_constraints): Handle REQUIRES_EXPR by going through | |
170 | diagnose_requires_expr directly instead of treating it as a | |
171 | constraint-expression. Improve documentation. | |
172 | * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call | |
173 | to evaluate_concept_check. | |
174 | <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of | |
175 | constraints_satisfied_p. | |
176 | <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check. | |
177 | * cp-tree.h (evaluate_requires_expr): Declare. | |
178 | (evaluate_concept_check): Remove tsubst_flag_t parameter. | |
179 | (satisfy_constraint_expression): Remove declaration. | |
180 | (constraints_satisfied_p): Remove one-parameter declaration. | |
181 | Add a default argument to the two-parameter declaration. | |
182 | * cvt.c (convert_to_void): Adjust call to | |
183 | evaluate_concept_check. | |
184 | ||
185 | 2021-03-03 Jakub Jelinek <jakub@redhat.com> | |
186 | ||
187 | PR c++/82959 | |
188 | * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR | |
189 | and COMPOUND_EXPR. | |
190 | ||
191 | 2021-03-03 Marek Polacek <polacek@redhat.com> | |
192 | ||
193 | PR c++/97034 | |
194 | PR c++/99009 | |
195 | * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS. | |
196 | (maybe_aggr_guide): Use the original template type where needed. In | |
197 | a class member template, partially instantiate the result of | |
198 | collect_ctor_idx_types. | |
199 | (do_class_deduction): Defer the deduction until the enclosing | |
200 | scope is non-dependent. | |
201 | ||
202 | 2021-03-03 Jason Merrill <jason@redhat.com> | |
203 | ||
204 | PR c++/95675 | |
205 | * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR | |
206 | if it didn't get one before. | |
207 | ||
208 | 2021-03-03 Nathan Sidwell <nathan@acm.org> | |
209 | ||
210 | PR c++/99344 | |
211 | * module.cc (trees_out::decl_node): Small refactor. | |
212 | (depset::hash::add_binding_entity): Return true on meeting an | |
213 | import. Set namespace's import here. | |
214 | (module_state:write_namespaces): Inform of purview too. | |
215 | (module_state:read_namespaces): Adjust. | |
216 | * name-lookup.c (implicitly_export_namespace): Delete. | |
217 | (do_pushdecl): Don't call it. | |
218 | (push_namespace): Likewise, set purview. | |
219 | (add_imported_namespace): Reorder parms. | |
220 | * name-lookup.h (add_imported_namespace): Alter param ordering. | |
221 | ||
d97a92dc GA |
222 | 2021-03-02 Martin Sebor <msebor@redhat.com> |
223 | ||
224 | PR c++/99251 | |
225 | * class.c (build_base_path): Call build_if_nonnull. | |
226 | * cp-tree.h (build_if_nonnull): Declare. | |
227 | * rtti.c (ifnonnull): Rename... | |
228 | (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR. | |
229 | (build_dynamic_cast_1): Adjust to name change. | |
230 | ||
231 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
232 | ||
233 | PR c++/96443 | |
234 | PR c++/96960 | |
235 | * constraint.cc (type_deducible_p): Don't substitute into the | |
236 | constraints, and instead just pass 'args' to do_auto_deduction | |
237 | as the outer template arguments. | |
238 | (tsubst_parameter_mapping): Remove confused code for handling | |
239 | placeholder type arguments. | |
240 | (normalize_placeholder_type_constraint): Define. | |
241 | (satisfy_constraint_expression): Use it to handle placeholder | |
242 | 'auto' types. | |
243 | * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define. | |
244 | (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above. | |
245 | * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use | |
246 | PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead. | |
247 | (make_constrained_placeholder_type): Set | |
248 | PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead. | |
249 | (do_auto_deduction): Clarify comments about the outer_targs | |
250 | parameter. Rework satisfaction of a placeholder type constraint | |
251 | to pass in the complete set of template arguments directly to | |
252 | constraints_satisfied_p. | |
253 | (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO | |
254 | instead. Also rebuild the the constraint info on the new auto. | |
255 | ||
256 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
257 | ||
258 | * constraint.cc (build_parameter_mapping): Rely on the caller to | |
259 | determine the in-scope template parameters. | |
260 | (norm_info::norm_info): Delegate the tsubst_flags_t constructor | |
261 | to the two-parameter constructor. In the two-parameter | |
262 | constructor, fold in the definition of make_context, set | |
263 | initial_parms appropriately, and don't set the now-removed | |
264 | orig_decl member. | |
265 | (norm_info::make_context): Remove, now that its only use is | |
266 | inlined into the caller. | |
267 | (norm_info::update_context): Adjust call to | |
268 | build_parameter_mapping to pass in the relevant set of in-scope | |
269 | template parameters. | |
270 | (norm_info::ctx_parms): Define this member function. | |
271 | (norm_info::context): Initialize to NULL_TREE. | |
272 | (norm_info::orig_decl): Remove this data member. | |
273 | (norm_info::initial_parms): Define this data member. | |
274 | (normalize_atom): Adjust call to build_parameter_mapping to pass | |
275 | in the relevant set of in-scope template parameters. Use | |
276 | info.initial_parms instead of info.orig_decl. | |
277 | (normalize_constraint_expression): Take a norm_info object | |
278 | instead of a bool. Cache the result of normalization. | |
279 | (tsubst_nested_requirement): Call satisfy_constraint_expression | |
280 | instead of satisfy_constraint, so that we normalize on demand. | |
281 | (satisfy_constraint_expression): Handle a NESTED_REQ argument. | |
282 | Adjust call to normalize_constraint_expression. | |
283 | (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ | |
284 | to current_template_parms. | |
285 | (diagnose_nested_requirements): Go through | |
286 | satisfy_constraint_expression, as with tsubst_nested_requirement. | |
287 | ||
288 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
289 | ||
290 | * constraint.cc (tsubst_parameter_mapping): Canonicalize the | |
291 | arguments of a substituted TYPE_ARGUMENT_PACK even if we've | |
292 | started with a TYPE_ARGUMENT_PACK. | |
293 | (finish_requires_expr): Don't set DECL_CONTEXT and | |
294 | CONSTRAINT_VAR_P on each of the introduced parameters here. | |
295 | * parser.c (cp_parser_requirement_parameter_list): Instead set | |
296 | these fields earlier, here. | |
297 | * pt.c (do_auto_deduction): Canonicalize the result of | |
298 | do_auto_deduction. Pass 'complain' to finish_decltype_type. | |
299 | ||
300 | 2021-03-02 Patrick Palka <ppalka@redhat.com> | |
301 | ||
302 | * constraint.cc (tsubst_simple_requirement): Just return | |
303 | boolean_true_node on success. | |
304 | (tsubst_type_requirement): Likewise. | |
305 | (tsubst_compound_requirement): Likewise. | |
306 | (tsubst_nested_requirement): Likewise. | |
307 | (tsubst_requirement_body): Remove. | |
308 | (check_constaint_variables): Rename to ... | |
309 | (check_constraint_variables): ... this. | |
310 | (tsubst_constraint_variables): Adjust. | |
311 | (tsubst_requires_expr): Fold tsubst_requirement_body into here. | |
312 | ||
88938886 GA |
313 | 2021-03-01 Nathan Sidwell <nathan@acm.org> |
314 | ||
315 | PR c++/99294 | |
316 | * class.c (fixup_type_variants): Propagate mode, precision, | |
317 | alignment & emptiness. | |
318 | * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW. | |
319 | (trees_in::tree_node): Rematerialize alignment here. | |
320 | ||
ec9dc4fa GA |
321 | 2021-02-27 Jason Merrill <jason@redhat.com> |
322 | ||
323 | PR c++/90333 | |
324 | * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes | |
325 | between () and ->. | |
326 | ||
06a9f20f GA |
327 | 2021-02-26 Jakub Jelinek <jakub@redhat.com> |
328 | ||
329 | * parser.c (cp_parser_lambda_declarator_opt): Implement | |
330 | P1102R2 - Down with ()! Make ()s optional before lambda specifiers | |
331 | for -std={c,gnu}++2b or with pedwarn in earlier versions. | |
332 | ||
333 | 2021-02-26 Jakub Jelinek <jakub@redhat.com> | |
334 | ||
335 | PR c++/95451 | |
336 | * lambda.c (is_lambda_ignored_entity): Before checking for | |
337 | LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check. | |
338 | ||
339 | 2021-02-26 Jason Merrill <jason@redhat.com> | |
340 | ||
341 | PR c++/98810 | |
342 | * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const | |
343 | to a class non-type template argument that needs it. | |
344 | ||
345 | 2021-02-26 Patrick Palka <ppalka@redhat.com> | |
346 | ||
347 | PR c++/98990 | |
348 | * pt.c (splice_late_return_type): Rebuild the entire return type | |
349 | if we have to adjust the level of an auto within. | |
350 | (type_uses_auto): Adjust call to find_type_usage. | |
351 | * type-utils.h (find_type_usage): Revert r10-6571 change that | |
352 | made this function return a pointer to the auto node. | |
353 | ||
daa68844 GA |
354 | 2021-02-25 Patrick Palka <ppalka@redhat.com> |
355 | ||
356 | PR c++/99213 | |
357 | PR c++/94521 | |
358 | * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of | |
359 | TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope. | |
360 | ||
361 | 2021-02-25 Patrick Palka <ppalka@redhat.com> | |
362 | ||
363 | PR c++/99103 | |
364 | * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'. | |
365 | (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived. | |
366 | ||
367 | 2021-02-25 Marek Polacek <polacek@redhat.com> | |
368 | ||
369 | DR 1312 | |
370 | PR c++/99176 | |
371 | * constexpr.c (is_std_construct_at): New overload. | |
372 | (is_std_allocator_allocate): New overload. | |
373 | (cxx_eval_call_expression): Use the new overloads. | |
374 | (cxx_eval_constant_expression): Reject casting | |
375 | from void * as per DR 1312. Don't check can_convert. | |
376 | ||
377 | 2021-02-25 Iain Sandoe <iain@sandoe.co.uk> | |
378 | ||
379 | PR c++/97587 | |
380 | * coroutines.cc (struct param_info): Track rvalue refs. | |
381 | (morph_fn_to_coro): Track rvalue refs, and call the promise | |
382 | CTOR with the frame copy of passed parms. | |
383 | ||
384 | 2021-02-25 Iain Sandoe <iain@sandoe.co.uk> | |
385 | ||
386 | PR c++/95822 | |
387 | * coroutines.cc (morph_fn_to_coro): Unconditionally remove any | |
388 | set throwing_cleanup marker. | |
389 | ||
390 | 2021-02-25 Nathan Sidwell <nathan@acm.org> | |
391 | ||
392 | PR c++/99166 | |
393 | * module.cc (module_state::inform_cmi_p): Renamed field. | |
394 | (module_state::do_import): Adjust. | |
395 | (init_modules, finish_module_processing): Likewise. | |
396 | (handle_module_option): Likewise. | |
397 | ||
398 | 2021-02-25 Nathan Sidwell <nathan@acm.org> | |
399 | ||
400 | PR c++/98318 | |
401 | * mapper-client.cc (module_client::open_module_client): Fix typo | |
402 | of fd init. | |
403 | ||
4028d01a GA |
404 | 2021-02-24 Nathan Sidwell <nathan@acm.org> |
405 | ||
406 | PR c++/98718 | |
407 | * module.cc (ool): New indirection vector. | |
408 | (loc_spans::maybe_propagate): Location is not optional. | |
409 | (loc_spans::open): Likewise. Assert monotonically advancing. | |
410 | (module_for_ordinary_loc): Use ool indirection vector. | |
411 | (module_state::write_prepare_maps): Do not count empty macro | |
412 | expansions. Elide empty spans. | |
413 | (module_state::write_macro_maps): Skip empty expansions. | |
414 | (ool_cmp): New qsort comparator. | |
415 | (module_state::write): Create and destroy ool vector. | |
416 | (name_pending_imports): Fix dump push/pop. | |
417 | (preprocess_module): Likewise. Add more dumping. | |
418 | (preprocessed_module): Likewise. | |
419 | ||
420 | 2021-02-24 Iain Sandoe <iain@sandoe.co.uk> | |
421 | ||
422 | PR c++/96251 | |
423 | * coroutines.cc (coro_common_keyword_context_valid_p): Suppress | |
424 | error reporting when instantiating for a constexpr. | |
425 | ||
71e24b06 GA |
426 | 2021-02-23 Nathan Sidwell <nathan@acm.org> |
427 | ||
428 | PR c++/99208 | |
429 | * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER | |
430 | identity. | |
431 | ||
432 | 2021-02-23 Patrick Palka <ppalka@redhat.com> | |
433 | ||
434 | PR c++/95468 | |
435 | * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied | |
436 | over from tsubst_copy. | |
437 | ||
438 | 2021-02-23 Patrick Palka <ppalka@redhat.com> | |
439 | ||
440 | * pt.c (instantiation_dependent_expression_p): Check | |
441 | processing_template_decl before calling | |
442 | potential_constant_expression. | |
443 | ||
2f5765cf GA |
444 | 2021-02-22 Nathan Sidwell <nathan@acm.org> |
445 | ||
446 | PR c++/99174 | |
447 | * module.cc (struct module_state): Add visited_p flag. | |
448 | (name_pending_imports): Use it to avoid duplicate requests. | |
449 | (preprocess_module): Don't read preprocessor state if we failed to | |
450 | load a module's config. | |
451 | ||
452 | 2021-02-22 Nathan Sidwell <nathan@acm.org> | |
453 | ||
454 | PR c++/99153 | |
455 | * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation | |
456 | to common-path. | |
457 | * module.cc (set_defining_module): Add assert. | |
458 | ||
50352c6c GA |
459 | 2021-02-19 Nathan Sidwell <nathan@acm.org> |
460 | ||
461 | PR c++/98741 | |
462 | * module.cc (pending_imports): New. | |
463 | (declare_module): Adjust test condition. | |
464 | (name_pending_imports): New. | |
465 | (preprocess_module): Reimplement using pending_imports. | |
466 | (preprocessed_module): Move name-getting to name_pending_imports. | |
467 | * name-lookup.c (append_imported_binding_slot): Assert module | |
468 | ordering is increasing. | |
469 | ||
470 | 2021-02-19 Nathan Sidwell <nathan@acm.org> | |
471 | ||
472 | * module.cc (note_cmis): New. | |
473 | (struct module_state): Add inform_read_p bit. | |
474 | (module_state::do_import): Inform of CMI location, if enabled. | |
475 | (init_modules): Canonicalize note_cmis entries. | |
476 | (handle_module_option): Handle -flang-info-module-read=FOO. | |
477 | ||
478 | 2021-02-19 Jason Merrill <jason@redhat.com> | |
479 | ||
480 | PR c++/96926 | |
481 | * call.c (perfect_conversion_p): Limit rvalueness | |
482 | test to reference bindings. | |
483 | ||
484 | 2021-02-19 Jason Merrill <jason@redhat.com> | |
485 | ||
486 | PR c++/96926 | |
487 | * call.c (perfect_conversion_p): New. | |
488 | (perfect_candidate_p): New. | |
489 | (add_candidates): Ignore templates after a perfect non-template. | |
490 | ||
bf81237e GA |
491 | 2021-02-18 Nathan Sidwell <nathan@acm.org> |
492 | ||
493 | PR c++/99023 | |
494 | * module.cc (canonicalize_header_name): Use | |
495 | cpp_probe_header_unit. | |
496 | (maybe_translate_include): Fix note_includes comparison. | |
497 | (init_modules): Fix note_includes string termination. | |
498 | ||
499 | 2021-02-18 Jakub Jelinek <jakub@redhat.com> | |
500 | ||
501 | PR c++/99132 | |
502 | * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use | |
503 | cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check | |
504 | for immediate function calls. | |
505 | ||
acc0ee5c GA |
506 | 2021-02-17 Nathan Sidwell <nathan@acm.org> |
507 | ||
508 | PR c++/99023 | |
509 | * module.cc (struct macro_export): Add GTY markers. | |
510 | (macro_exports): Likewise, us a va_gc Vector. | |
511 | ||
512 | 2021-02-17 Jakub Jelinek <jakub@redhat.com> | |
513 | ||
514 | PR sanitizer/99106 | |
515 | * init.c (build_zero_init_1): For flexible array members just return | |
516 | NULL_TREE instead of returning empty CONSTRUCTOR with non-complete | |
517 | ARRAY_TYPE. | |
518 | ||
519 | 2021-02-17 Nathan Sidwell <nathan@acm.org> | |
520 | ||
521 | PR c++/99116 | |
522 | * name-lookup.c (do_pushdecl): Don't peek under template_parm | |
523 | bindings here ... | |
524 | (set_identifier_type_value_with_scope): ... or here. | |
525 | (do_pushtag): Only set_identifier_type_value_with_scope at | |
526 | non-class template parm scope, and use parent scope. | |
527 | ||
528 | 2021-02-17 Nathan Sidwell <nathan@acm.org> | |
529 | ||
530 | PR c++/99071 | |
531 | * name-lookup.c (maybe_record_mergeable_decl): Deref the correct | |
532 | pointer. | |
533 | ||
534 | 2021-02-17 Patrick Palka <ppalka@redhat.com> | |
535 | ||
536 | PR debug/96997 | |
537 | PR c++/94034 | |
538 | * tree.c (build_aggr_init_expr): Revert r10-7718 change. | |
539 | ||
fab095da GA |
540 | 2021-02-12 Nathan Sidwell <nathan@acm.org> |
541 | ||
542 | * module.cc (module_state::write_cluster): Check bindings for | |
543 | imported using-decls. | |
544 | ||
545 | 2021-02-12 Nathan Sidwell <nathan@acm.org> | |
546 | ||
547 | PR c++/99040 | |
548 | * module.cc (trees_in::decl_value): Call add_module_namespace_decl | |
549 | for new namespace-scope entities. | |
550 | (module_state::read_cluster): Don't call add_module_decl here. | |
551 | * name-lookup.h (add_module_decl): Rename to ... | |
552 | (add_module_namespace_decl): ... this. | |
553 | * name-lookup.c (newbinding_bookkeeping): Move into ... | |
554 | (do_pushdecl): ... here. Its only remaining caller. | |
555 | (add_module_decl): Rename to ... | |
556 | (add_module_namespace_decl): ... here. Add checking-assert for | |
557 | circularity. Don't call newbinding_bookkeeping, just extern_c | |
558 | checking and incomplete var checking. | |
559 | ||
560 | 2021-02-12 Nathan Sidwell <nathan@acm.org> | |
561 | ||
562 | PR c++/99039 | |
563 | PR c++/99040 | |
564 | * cp-tree.h (CPTI_GLOBAL_TYPE): Delete. | |
565 | (global_type_node): Delete. | |
566 | (IDENTIFIER_TYPE_VALUE): Delete. | |
567 | (IDENTIFIER_HAS_TYPE_VALUE): Delete. | |
568 | (get_type_value): Delete. | |
569 | * name-lookup.h (identifier_type_value): Delete. | |
570 | * name-lookup.c (check_module_override): Don't | |
571 | SET_IDENTIFIER_TYPE_VALUE here. | |
572 | (do_pushdecl): Nor here. | |
573 | (identifier_type_value_1, identifier_type_value): Delete. | |
574 | (set_identifier_type_value_with_scope): Only | |
575 | SET_IDENTIFIER_TYPE_VALUE for local and class scopes. | |
576 | (pushdecl_nanmespace_level): Remove shadow stack nadgering. | |
577 | (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE. | |
578 | * call.c (check_dtor_name): Use lookup_name. | |
579 | * decl.c (cxx_init_decl_processing): Drop global_type_node. | |
580 | * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE | |
581 | here. | |
582 | * init.c (get_type_value): Delete. | |
583 | * pt.c (instantiate_class_template_1): Don't call pushtag or | |
584 | SET_IDENTIFIER_TYPE_VALUE here. | |
585 | (tsubst): Assert never an identifier. | |
586 | (dependent_type_p): Drop global_type_node assert. | |
587 | * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE | |
588 | to determine ctorness. | |
589 | ||
590 | 2021-02-12 Jakub Jelinek <jakub@redhat.com> | |
591 | ||
592 | PR c++/97742 | |
593 | * parser.c (cp_parser_requirement_seq): Stop iterating after reaching | |
594 | CPP_EOF. | |
595 | ||
596 | 2021-02-12 Jason Merrill <jason@redhat.com> | |
597 | ||
598 | PR c++/97246 | |
599 | PR c++/94546 | |
600 | * pt.c (extract_fnparm_pack): Check DECL_PACK_P here. | |
601 | (register_parameter_specializations): Not here. | |
602 | ||
0c5cdb31 GA |
603 | 2021-02-11 Marek Polacek <polacek@redhat.com> |
604 | ||
605 | PR c++/95888 | |
606 | * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking | |
607 | for the partial instantiation. | |
608 | ||
609 | 2021-02-11 Jakub Jelinek <jakub@redhat.com> | |
610 | ||
611 | PR c++/99033 | |
612 | * init.c (build_zero_init_1): Handle zero initialiation of | |
613 | flexible array members like initialization of [0] arrays. | |
614 | Use integer_minus_onep instead of comparison to integer_minus_one_node | |
615 | and integer_zerop instead of comparison against size_zero_node. | |
616 | Formatting fixes. | |
617 | ||
618 | 2021-02-11 Marek Polacek <polacek@redhat.com> | |
619 | ||
620 | PR c++/99063 | |
621 | * semantics.c (finish_do_stmt): Check for unexpanded parameter packs. | |
622 | ||
623 | 2021-02-11 Patrick Palka <ppalka@redhat.com> | |
624 | ||
625 | PR c++/97582 | |
626 | * name-lookup.c (op_unqualified_lookup): Handle an ambiguous | |
627 | lookup result by discarding it if the first element is a | |
628 | class-scope declaration, otherwise return it. | |
629 | (push_operator_bindings): Handle an ambiguous lookup result by | |
630 | doing push_local_binding on each element in the list. | |
631 | ||
632 | 2021-02-11 Marek Polacek <polacek@redhat.com> | |
633 | ||
634 | * parser.c (cp_parser_selection_statement): Use vec_free. | |
635 | ||
4b37c3ea GA |
636 | 2021-02-10 Jakub Jelinek <jakub@redhat.com> |
637 | ||
638 | PR c++/98988 | |
639 | PR c++/99031 | |
640 | * constexpr.c: Include cgraph.h. | |
641 | (cxx_eval_call_expression): Call varpool_node::finalize_decl on | |
642 | heap artificial vars. | |
643 | (cxx_eval_outermost_constant_expr): Remove varpool nodes for | |
644 | heap artificial vars. | |
645 | ||
646 | 2021-02-10 Nathan Sidwell <nathan@acm.org> | |
647 | ||
648 | PR c++/99030 | |
649 | * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the | |
650 | answer if there's no local specialization. | |
651 | ||
0a91b73e GA |
652 | 2021-02-09 Nathan Sidwell <nathan@acm.org> |
653 | ||
654 | PR c++/98944 | |
655 | * module.cc (module_state::is_rooted): Rename to ... | |
656 | (module_state::has_location): ... here. Adjust callers. | |
657 | (module_state::read_partitions): Adjust validity check. | |
658 | Don't overwrite a known location. | |
659 | ||
660 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
661 | ||
662 | PR c++/96905 | |
663 | * pt.c (mark_decl_instantiated): Exit early if consteval. | |
664 | ||
665 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
666 | ||
667 | PR c++/98326 | |
668 | PR c++/20408 | |
669 | * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref | |
670 | parm. | |
671 | ||
672 | 2021-02-09 Jason Merrill <jason@redhat.com> | |
673 | ||
674 | PR c++/98994 | |
675 | PR c++/97566 | |
676 | * constexpr.c (cxx_eval_store_expression): Only skip empty fields in | |
677 | RECORD_TYPE. | |
678 | ||
2da7ce23 GA |
679 | 2021-02-08 Nathan Sidwell <nathan@acm.org> |
680 | ||
681 | * decl.c (start_cleanup_fn): Push function into | |
682 | namespace. | |
683 | ||
684 | 2021-02-08 Nathan Sidwell <nathan@acm.org> | |
685 | ||
686 | PR c++/98531 | |
687 | * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare. | |
688 | * decl.c (push_abi_namespace, pop_abi_namespace): Moved | |
689 | from rtti.c, add default namespace arg. | |
690 | (check_redeclaration_exception_specification): Allow a lazy | |
691 | builtin's eh spec to differ from an lready-declared user | |
692 | declaration. | |
693 | (declare_global_var): Use push/pop_abi_namespace. | |
694 | (get_atexit_node): Push the fndecl into a namespace. | |
695 | * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to | |
696 | decl.c. | |
697 | ||
698 | 2021-02-08 Marek Polacek <polacek@redhat.com> | |
699 | ||
700 | * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo. | |
701 | ||
1ed59127 GA |
702 | 2021-02-05 Marek Polacek <polacek@redhat.com> |
703 | ||
704 | PR c++/98947 | |
705 | * call.c (build_conditional_expr_1): Don't call mark_lvalue_use | |
706 | on arg2/arg3. | |
707 | * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when | |
708 | issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if | |
709 | a warning was emitted. | |
710 | ||
711 | 2021-02-05 Marek Polacek <polacek@redhat.com> | |
712 | ||
713 | PR c++/96462 | |
714 | * name-lookup.c (lookup_using_decl): Hoist the destructor check. | |
715 | ||
716 | 2021-02-05 Jakub Jelinek <jakub@redhat.com> | |
717 | ||
718 | PR c++/97878 | |
719 | * decl.c (check_array_initializer): For structured bindings, require | |
720 | the array type to be complete. | |
721 | ||
a19dd5e6 GA |
722 | 2021-02-04 Jason Merrill <jason@redhat.com> |
723 | ||
724 | PR c++/98717 | |
725 | * constraint.cc (build_concept_check_arguments): Remove assert. | |
726 | (build_concept_check): Allow empty args. | |
727 | ||
728 | 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com> | |
729 | ||
730 | PR c++/90926 | |
731 | * call.c (can_convert_array): Extend to handle all valid aggregate | |
732 | initializers of an array; including by string literals, not just by | |
733 | brace-init-list. | |
734 | (build_aggr_conv): Call can_convert_array more often, not just in | |
735 | brace-init-list case. | |
736 | * typeck2.c (array_string_literal_compatible_p): New function. | |
737 | (digest_init_r): call array_string_literal_compatible_p | |
738 | * cp-tree.h: (array_string_literal_compatible_p): Declare. | |
739 | ||
740 | 2021-02-04 Jason Merrill <jason@redhat.com> | |
741 | ||
742 | PR c++/98802 | |
743 | * pt.c (do_class_deduction): No aggregate guide if any_dguides_p. | |
744 | ||
745 | 2021-02-04 Jason Merrill <jason@redhat.com> | |
746 | ||
747 | PR c++/95192 | |
748 | * pt.c (tsubst_attribute): Handle error. | |
749 | (apply_late_template_attributes): Return false on error. | |
750 | (tsubst_function_decl): Check its return value. | |
751 | (tsubst_decl): Likewise. | |
752 | (push_template_decl): Assert current_template_parms. | |
753 | (tsubst_template_decl): Set current_template_parms. | |
754 | ||
9faaa807 GA |
755 | 2021-02-03 Marek Polacek <polacek@redhat.com> |
756 | ||
757 | PR c++/98951 | |
758 | * call.c (struct z_candidate): Mark rewritten and reversed as const. | |
759 | (struct NonPublicField): Mark operator() as const. | |
760 | (struct NonTrivialField): Likewise. | |
761 | ||
762 | 2021-02-03 Jason Merrill <jason@redhat.com> | |
763 | ||
764 | PR c++/98926 | |
765 | PR c++/98570 | |
766 | * pt.c (spec_hasher::equal): Set processing_template_decl. | |
767 | * Make-lang.in (check-g++-strict-gc): Add --param | |
768 | hash-table-verification-limit=10000. | |
769 | ||
770 | 2021-02-03 Marek Polacek <polacek@redhat.com> | |
771 | ||
772 | PR c++/98899 | |
773 | * parser.c (cp_parser_class_specifier_1): Use any possible | |
774 | DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN. | |
775 | (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS. | |
776 | * pt.c (tsubst_exception_specification): Stash new_specs into | |
777 | DEFPARSE_INSTANTIATIONS. | |
778 | * tree.c (fixup_deferred_exception_variants): Use | |
779 | UNPARSED_NOEXCEPT_SPEC_P. | |
780 | ||
548b75d8 GA |
781 | 2021-02-02 Jason Merrill <jason@redhat.com> |
782 | ||
783 | PR c++/98929 | |
784 | PR c++/96199 | |
785 | * error.c (dump_expr): Ignore dummy object. | |
786 | * pt.c (tsubst_baselink): Handle dependent scope. | |
787 | ||
f7884fb1 GA |
788 | 2021-02-01 Patrick Palka <ppalka@redhat.com> |
789 | ||
790 | PR c++/98295 | |
791 | * constexpr.c (cxx_eval_array_reference): Also set | |
792 | new_ctx.object when setting new_ctx.ctor. | |
793 | ||
794 | 2021-02-01 Marek Polacek <polacek@redhat.com> | |
795 | ||
796 | PR c++/98355 | |
797 | * parser.c (cp_parser_has_attribute_expression): Use | |
798 | uses_template_parms instead of type_dependent_expression_p. | |
799 | ||
800 | 2021-02-01 Jason Merrill <jason@redhat.com> | |
801 | ||
802 | PR c++/98570 | |
803 | * cp-tree.h: Declare it. | |
804 | * pt.c (comparing_dependent_aliases): New flag. | |
805 | (template_args_equal, spec_hasher::equal): Set it. | |
806 | (dependent_alias_template_spec_p): Assert that we don't | |
807 | get non-types other than error_mark_node. | |
808 | (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY | |
809 | on complex alias specializations. Set TYPE_DEPENDENT_P here. | |
810 | (tsubst_decl): Not here. | |
811 | * module.cc (module_state::read_cluster): Set | |
812 | comparing_dependent_aliases instead of | |
813 | comparing_specializations. | |
814 | * tree.c (cp_tree_equal): Remove comparing_specializations | |
815 | module handling. | |
816 | * typeck.c (structural_comptypes): Adjust. | |
817 | (comptypes): Remove comparing_specializations handling. | |
818 | ||
2900f2f2 GA |
819 | 2021-01-29 Nathan Sidwell <nathan@acm.org> |
820 | ||
821 | PR c++/98843 | |
822 | * module.cc (module_state_config): Add num_entities field. | |
823 | (module_state::read_entities): The entity_ary span is | |
824 | already allocated. | |
825 | (module_state::write_config): Write num_entities. | |
826 | (module_state::read_config): Read num_entities. | |
827 | (module_state::write): Set config's num_entities. | |
828 | (module_state::read_initial): Allocate the entity ary | |
829 | span here. | |
830 | (module_state::read_language): Do not set entity_lwm | |
831 | here. | |
832 | ||
833 | 2021-01-29 Marek Polacek <polacek@redhat.com> | |
834 | ||
835 | PR c++/96137 | |
836 | * parser.c (cp_parser_class_name): If parser->scope is | |
837 | error_mark_node, return it, otherwise continue. | |
838 | ||
85d04a2e GA |
839 | 2021-01-28 Jakub Jelinek <jakub@redhat.com> |
840 | ||
841 | PR c++/98841 | |
842 | * typeck.c (build_x_indirect_ref): For *this, return current_class_ref. | |
843 | ||
844 | 2021-01-28 Jakub Jelinek <jakub@redhat.com> | |
845 | ||
846 | PR c++/33661 | |
847 | PR c++/98847 | |
848 | * decl.c (cp_finish_decl): For register vars with asmspec in templates | |
849 | call set_user_assembler_name and set DECL_HARD_REGISTER. | |
850 | * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars, | |
851 | pass asmspec_tree to cp_finish_decl. | |
852 | ||
853 | 2021-01-28 Nathan Sidwell <nathan@acm.org> | |
854 | ||
855 | PR c++/98770 | |
856 | * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME | |
857 | check order. | |
858 | (trees_in::decl_value): Do typedef frobbing only when installing | |
859 | a new typedef, adjust is_matching_decl call. Swap is_typedef | |
860 | & TYPE_NAME check. | |
861 | (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable | |
862 | names and deal with typedef checking. | |
863 | ||
aa69f0a8 GA |
864 | 2021-01-27 Jason Merrill <jason@redhat.com> |
865 | ||
866 | PR c++/97874 | |
867 | * name-lookup.c (lookup_using_decl): Clean up handling | |
868 | of dependency and inherited constructors. | |
869 | (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P. | |
870 | * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P. | |
871 | ||
e62bb7f0 GA |
872 | 2021-01-26 Jason Merrill <jason@redhat.com> |
873 | ||
874 | PR c++/97474 | |
875 | * call.c (type_passed_as): Don't mark invisiref restrict. | |
876 | ||
877 | 2021-01-26 Jason Merrill <jason@redhat.com> | |
878 | ||
879 | PR c++/97566 | |
880 | PR c++/98463 | |
881 | * class.c (layout_class_type): An empty field gets size 0. | |
882 | (is_empty_field): New. | |
883 | (check_bases): Check it. | |
884 | * cp-tree.h (is_empty_field): Declare it. | |
885 | * constexpr.c (cxx_eval_store_expression): Check it. | |
886 | (cx_check_missing_mem_inits): Likewise. | |
887 | * init.c (perform_member_init): Likewise. | |
888 | * typeck2.c (process_init_constructor_record): Likewise. | |
889 | ||
161e4c08 GA |
890 | 2021-01-25 Martin Sebor <msebor@redhat.com> |
891 | ||
892 | PR c++/98646 | |
893 | * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING. | |
894 | ||
895 | 2021-01-25 Jason Merrill <jason@redhat.com> | |
896 | ||
897 | PR c++/98463 | |
898 | * constexpr.c (get_or_insert_ctor_field): Add check. | |
899 | (cxx_eval_store_expression): Handle discontinuity of refs. | |
900 | ||
6b163337 GA |
901 | 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com> |
902 | ||
903 | * call.c (complain_about_access): Altered function. | |
904 | * cp-tree.h (complain_about_access): Changed parameters of function. | |
905 | (get_parent_with_private_access): Declared new function. | |
906 | * search.c (get_parent_with_private_access): Defined new function. | |
907 | * semantics.c (enforce_access): Modified function. | |
908 | * typeck.c (complain_about_unrecognized_member): Updated function | |
909 | arguments in complain_about_access. | |
910 | ||
911 | 2021-01-23 Patrick Palka <ppalka@redhat.com> | |
912 | ||
913 | PR c++/97399 | |
914 | * cp-tree.h (shared_member_p): Adjust declaration. | |
915 | * parser.c (cp_parser_init_declarator): If the storage class | |
916 | specifier is sc_static, pass true for static_p to | |
917 | cp_parser_declarator. | |
918 | (cp_parser_direct_declarator): Don't do inject_this_parm when | |
919 | the declarator is a friend. | |
920 | * search.c (shared_member_p): Change return type to bool and | |
921 | adjust function body accordingly. Return false for a dependent | |
922 | USING_DECL instead of aborting. | |
923 | * semantics.c (finish_qualified_id_expr): Rely on shared_member_p | |
924 | even when type-dependent. | |
925 | ||
8502e23d GA |
926 | 2021-01-22 Marek Polacek <polacek@redhat.com> |
927 | ||
928 | PR c++/96623 | |
929 | * parser.c (inject_parm_decls): Remove a redundant assignment. | |
930 | (cp_parser_class_specifier_1): Clear current_class_{ptr,ref} | |
931 | before calling inject_parm_decls. | |
932 | ||
933 | 2021-01-22 Jason Merrill <jason@redhat.com> | |
934 | ||
935 | PR c++/98744 | |
936 | * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P. | |
937 | ||
938 | 2021-01-22 Jakub Jelinek <jakub@redhat.com> | |
939 | ||
940 | PR sanitizer/95693 | |
941 | * init.c (build_zero_init_1): Revert the 2018-03-06 change to | |
942 | return build_zero_cst for reference types. | |
943 | * typeck2.c (process_init_constructor_record): Instead call | |
944 | build_zero_cst here during error recovery instead of build_zero_init. | |
945 | ||
946 | 2021-01-22 Marek Polacek <polacek@redhat.com> | |
947 | ||
948 | PR c++/98545 | |
949 | * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses | |
950 | warnings regardless of abi_version_at_least. | |
951 | (write_expression): When the expression is a dependent name | |
952 | and an operator name, write "on" before writing its name. | |
953 | ||
954 | 2021-01-22 Marek Polacek <polacek@redhat.com> | |
955 | ||
956 | PR c++/97966 | |
957 | * pt.c (instantiate_class_template_1): Instantiate members | |
958 | marked with attribute used only after we're done instantiating | |
959 | the class. | |
960 | ||
7559d465 GA |
961 | 2021-01-21 Patrick Palka <ppalka@redhat.com> |
962 | ||
963 | PR c++/71879 | |
964 | * semantics.c (finish_decltype_type): Set up a cp_unevaluated | |
965 | sentinel at the start of the function. Remove a now-redundant | |
966 | manual adjustment of cp_unevaluated_operand. | |
967 | ||
968 | 2021-01-21 Nathan Sidwell <nathan@acm.org> | |
969 | ||
970 | PR c++/98624 | |
971 | * module.cc (depset::hash::find_dependencies): Add | |
972 | module arg. | |
973 | (trees_out::core_vals): Check state before calling | |
974 | write_location. | |
975 | (sort_cluster, module_state::write): Adjust | |
976 | find_dependencies call. | |
977 | ||
978 | 2021-01-21 Jakub Jelinek <jakub@redhat.com> | |
979 | ||
980 | PR c++/98672 | |
981 | * constexpr.c (check_for_return_continue_data): Add break_stmt member. | |
982 | (check_for_return_continue): Also look for BREAK_STMT. Handle | |
983 | SWITCH_STMT by ignoring break_stmt from its body. | |
984 | (potential_constant_expression_1) <case FOR_STMT>, | |
985 | <case WHILE_STMT>: If the condition isn't constant true, check if | |
986 | the loop body can contain a return stmt. | |
987 | <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer. | |
988 | <case IF_STMT>: If recursion with tf_none is successful, | |
989 | merge *jump_target from the branches - returns with highest priority, | |
990 | breaks or continues lower. If then branch is potentially constant and | |
991 | doesn't return, check the else branch if it could return, break or | |
992 | continue. | |
993 | ||
994 | 2021-01-21 Nathan Sidwell <nathan@acm.org> | |
995 | ||
996 | PR c++/98530 | |
997 | * name-lookup.c (lookup_class_binding): Rearrange a stat-hack. | |
998 | ||
b93d0e36 GA |
999 | 2021-01-20 Nathan Sidwell <nathan@acm.org> |
1000 | ||
1001 | * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of | |
1002 | signed type. | |
1003 | ||
1004 | 2021-01-20 Patrick Palka <ppalka@redhat.com> | |
1005 | ||
1006 | PR c++/95434 | |
1007 | * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting | |
1008 | CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM, | |
1009 | adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. | |
1010 | ||
1011 | 2021-01-20 Patrick Palka <ppalka@redhat.com> | |
1012 | ||
1013 | PR c++/82613 | |
1014 | * parser.c (cp_parser_class_head): Defer access checking when | |
1015 | parsing the base-clause until all bases are seen and attached | |
1016 | to the class type. | |
1017 | * pt.c (instantiate_class_template): Likewise when substituting | |
1018 | into dependent bases. | |
1019 | ||
1020 | 2021-01-20 Jakub Jelinek <jakub@redhat.com> | |
1021 | ||
1022 | PR c++/98742 | |
1023 | * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If | |
1024 | error_operand_p, remove clause without further checking. Check | |
1025 | for non-NULL TYPE_NAME. | |
1026 | ||
f35a4f96 GA |
1027 | 2021-01-19 Marek Polacek <polacek@redhat.com> |
1028 | ||
1029 | PR c++/98659 | |
1030 | * pt.c (maybe_instantiate_noexcept): Return false if FN is | |
1031 | error_mark_node. | |
1032 | ||
1033 | 2021-01-19 Marek Polacek <polacek@redhat.com> | |
1034 | ||
1035 | PR c++/98687 | |
1036 | * name-lookup.c (push_using_decl_bindings): New, broken out of... | |
1037 | (finish_nonmember_using_decl): ...here. | |
1038 | * name-lookup.h (push_using_decl_bindings): Update declaration. | |
1039 | * pt.c (tsubst_expr): Update the call to push_using_decl_bindings. | |
1040 | ||
1041 | 2021-01-19 Patrick Palka <ppalka@redhat.com> | |
1042 | ||
1043 | PR c++/41437 | |
1044 | PR c++/58993 | |
1045 | * search.c (friend_accessible_p): If scope is a hidden friend | |
1046 | defined inside a dependent class, consider access from the | |
1047 | class. | |
1048 | * parser.c (cp_parser_late_parsing_for_member): Don't push a | |
1049 | dk_no_check access state. | |
1050 | ||
1051 | 2021-01-19 Marek Polacek <polacek@redhat.com> | |
1052 | ||
1053 | PR c++/98333 | |
1054 | * parser.c (cp_parser_class_specifier_1): Perform late-parsing | |
1055 | of NSDMIs before late-parsing of noexcept-specifiers. | |
1056 | ||
1057 | 2021-01-19 Nathan Sidwell <nathan@acm.org> | |
1058 | ||
1059 | * module.cc (identifier): Merge overloads. | |
1060 | ||
1061 | 2021-01-19 Nathan Sidwell <nathan@acm.org> | |
1062 | ||
1063 | PR c++/98624 | |
1064 | * module.cc (trees_out::write_location): Make static. | |
1065 | ||
59cf67d1 GA |
1066 | 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com> |
1067 | ||
1068 | * parser.c (cp_parser_omp_clause_detach): New. | |
1069 | (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH. | |
1070 | (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH. | |
1071 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause. | |
1072 | * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause. | |
1073 | Prevent use of detach with mergeable and overriding the data sharing | |
1074 | mode of the event handle. | |
1075 | ||
2f7f0d32 GA |
1076 | 2021-01-15 Nathan Sidwell <nathan@acm.org> |
1077 | ||
1078 | PR c++/98538 | |
1079 | * tree.c (cp_build_qualified_type_real): Propagate an array's | |
1080 | dependentness to the copy, if known. | |
1081 | ||
1082 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1083 | ||
1084 | PR c++/98642 | |
1085 | * call.c (unsafe_return_slot_p): Return int. | |
1086 | (init_by_return_slot_p): Split out from... | |
1087 | (unsafe_copy_elision_p): ...here. | |
1088 | (unsafe_copy_elision_p_opt): New name for old meaning. | |
1089 | (build_over_call): Adjust. | |
1090 | (make_safe_copy_elision): New. | |
1091 | * typeck2.c (split_nonconstant_init_1): Elide copy from safe | |
1092 | list-initialization. | |
1093 | * cp-tree.h: Adjust. | |
1094 | ||
1095 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1096 | ||
1097 | * call.c (base_ctor_for, make_base_init_ok): New. | |
1098 | (build_over_call): Use make_base_init_ok. | |
1099 | ||
1100 | 2021-01-15 Jason Merrill <jason@redhat.com> | |
1101 | ||
1102 | PR c++/63707 | |
1103 | * tree.c (build_vec_init_expr): Don't call build_vec_init_elt | |
1104 | if we got a CONSTRUCTOR. | |
1105 | ||
1106 | 2021-01-15 Nathan Sidwell <nathan@acm.org> | |
1107 | ||
1108 | PR c++/98591 | |
1109 | * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only. | |
1110 | ||
5fff80fd GA |
1111 | 2021-01-14 Jason Merrill <jason@redhat.com> |
1112 | ||
1113 | * typeck2.c (process_init_constructor_record): Use fldtype | |
1114 | variable consistently. | |
1115 | ||
1116 | 2021-01-14 Nathan Sidwell <nathan@acm.org> | |
1117 | ||
1118 | PR c++/98372 | |
1119 | * tree.c (cp_tree_equal): Correct map_context logic. | |
1120 | ||
be0851b8 GA |
1121 | 2021-01-13 Marek Polacek <polacek@redhat.com> |
1122 | ||
1123 | PR c++/98231 | |
1124 | * name-lookup.c (push_using_decl_bindings): New. | |
1125 | * name-lookup.h (push_using_decl_bindings): Declare. | |
1126 | * pt.c (tsubst_expr): Call push_using_decl_bindings. | |
1127 | ||
1128 | 2021-01-13 Nathan Sidwell <nathan@acm.org> | |
1129 | ||
1130 | PR c++/98626 | |
1131 | * module.cc (module_add_import_initializers): Pass a | |
1132 | zero-element argument vector. | |
1133 | ||
6851dda2 GA |
1134 | 2021-01-12 Patrick Palka <ppalka@redhat.com> |
1135 | ||
1136 | PR c++/98611 | |
1137 | * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit | |
1138 | the template of a CTAD placeholder. | |
1139 | ||
1140 | 2021-01-12 Marek Polacek <polacek@redhat.com> | |
1141 | ||
1142 | PR c++/98620 | |
1143 | * typeck2.c (process_init_constructor_record): Don't emit | |
1144 | -Wmissing-field-initializers warnings in unevaluated contexts. | |
1145 | ||
67fbb7f0 GA |
1146 | 2021-01-11 Jakub Jelinek <jakub@redhat.com> |
1147 | ||
1148 | PR c++/98481 | |
1149 | * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1 | |
1150 | for types. | |
1151 | (mark_abi_tags_r): Likewise. | |
1152 | * decl2.c (min_vis_r): Likewise. | |
1153 | * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through | |
1154 | typedefs. | |
1155 | ||
bf5cbb9e GA |
1156 | 2021-01-08 Patrick Palka <ppalka@redhat.com> |
1157 | ||
1158 | PR c++/98551 | |
1159 | * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P | |
1160 | instead of AGGREGATE_TYPE_P before calling replace_result_decl. | |
1161 | ||
1162 | 2021-01-08 Patrick Palka <ppalka@redhat.com> | |
1163 | ||
1164 | PR c++/98515 | |
1165 | * semantics.c (check_accessibility_of_qualified_id): Punt if | |
1166 | we're checking access of a scoped non-static member inside a | |
1167 | class template. | |
1168 | ||
7d187e4f GA |
1169 | 2021-01-07 Jakub Jelinek <jakub@redhat.com> |
1170 | ||
1171 | PR c++/98329 | |
1172 | * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call | |
1173 | cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set | |
1174 | its location. | |
1175 | (tsubst_copy_and_build): Handle BIT_CAST_EXPR. | |
1176 | ||
1177 | 2021-01-07 Marek Polacek <polacek@redhat.com> | |
1178 | ||
1179 | PR c++/98441 | |
1180 | * decl.c (grokdeclarator): Move the !funcdecl_p check inside the | |
1181 | !late_return_type block. | |
1182 | ||
1183 | 2021-01-07 Jason Merrill <jason@redhat.com> | |
1184 | ||
1185 | * constexpr.c (cxx_bind_parameters_in_call): Add comment. | |
1186 | (cxx_eval_store_expression): Add comment. | |
1187 | ||
1188 | 2021-01-07 Jason Merrill <jason@redhat.com> | |
1189 | ||
1190 | * call.c (has_next): Factor out from... | |
1191 | (next_conversion): ...here. | |
1192 | (strip_standard_conversion): And here. | |
1193 | (is_subseq): And here. | |
1194 | (build_conv): Check it. | |
1195 | (standard_conversion): Don't call build_conv | |
1196 | for ck_identity. | |
1197 | ||
942ae5be GA |
1198 | 2021-01-06 Martin Sebor <msebor@redhat.com> |
1199 | ||
1200 | PR c++/95768 | |
1201 | * error.c (dump_expr): Call c_pretty_printer::unary_expression. | |
1202 | ||
651b8a50 GA |
1203 | 2021-01-05 Patrick Palka <ppalka@redhat.com> |
1204 | ||
1205 | * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into | |
1206 | the type of the NTTP, substitute into the type again. If the | |
1207 | type is still dependent, don't unify the NTTP. | |
1208 | ||
1209 | 2021-01-05 Jakub Jelinek <jakub@redhat.com> | |
1210 | ||
1211 | * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add | |
1212 | $(CODYLIB) after $(BACKEND). | |
1213 | ||
1214 | 2021-01-05 Jakub Jelinek <jakub@redhat.com> | |
1215 | ||
1216 | PR c++/98469 | |
1217 | * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>: | |
1218 | Punt if lval is true. | |
1219 | * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on | |
1220 | the result if it has a class type. | |
1221 | ||
1222 | 2021-01-05 Marek Polacek <polacek@redhat.com> | |
1223 | ||
1224 | PR c++/82099 | |
1225 | * pt.c (resolve_overloaded_unification): Call | |
1226 | maybe_instantiate_noexcept after instantiating the function | |
1227 | decl. | |
1228 | ||
1229 | 2021-01-05 Nathan Sidwell <nathan@acm.org> | |
1230 | ||
1231 | * parser.c (cp_parser_module_declaration): Alter diagnostic | |
1232 | text to say where is permissable. | |
1233 | ||
1234 | 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | |
1235 | ||
1236 | PR c++/98316 | |
1237 | * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS). | |
1238 | ||
2eacfdbd GA |
1239 | 2021-01-02 Jan Hubicka <jh@suse.cz> |
1240 | ||
1241 | * cp-tree.h (cp_tree_c_finish_parsing): Declare. | |
1242 | * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing. | |
1243 | * tree.c (cp_tree_c_finish_parsing): New function. | |
1244 | ||
b6dd195a GA |
1245 | 2021-01-01 Jakub Jelinek <jakub@redhat.com> |
1246 | ||
1247 | * ChangeLog-2020: Rotate ChangeLog. New file. | |
1248 | ||
ad41bd84 | 1249 | \f |
618e665a | 1250 | Copyright (C) 2021 Free Software Foundation, Inc. |
ad41bd84 JM |
1251 | |
1252 | Copying and distribution of this file, with or without modification, | |
1253 | are permitted in any medium without royalty provided the copyright | |
1254 | notice and this notice are preserved. |