]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
793e4afffcba070b90053c45fe8b4d36060af23e
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2020-02-13 Jason Merrill <jason@redhat.com>
2
3 PR c++/93713
4 * name-lookup.c (matching_fn_p): A function does not match a
5 template.
6
7 PR c++/93643
8 PR c++/91476
9 * tree.c (decl_linkage): Always lk_none for locals.
10
11 2020-02-12 Jason Merrill <jason@redhat.com>
12
13 PR c++/92583
14 PR c++/92654
15 * tree.c (cp_walk_subtrees): Walk CONSTRUCTOR types here.
16 * pt.c (find_parameter_packs_r): Not here.
17
18 2020-02-12 Iain Sandoe <iain@sandoe.co.uk>
19
20 * coroutines.cc (build_actor_fn): Implement deallocation function
21 selection per n4849, dcl.fct.def.coroutine bullet 12.
22 (morph_fn_to_coro): Implement allocation function selection per
23 n4849, dcl.fct.def.coroutine bullets 9 and 10.
24
25 2020-02-12 Marek Polacek <polacek@redhat.com>
26
27 PR c++/93684 - ICE-on-invalid with broken attribute.
28 * parser.c (cp_parser_std_attribute): Peek a token first before
29 consuming it.
30
31 2020-02-11 Jason Merrill <jason@redhat.com>
32
33 PR c++/93675
34 * class.c (add_implicitly_declared_members): Use do_friend.
35 * method.c (implicitly_declare_fn): Fix friend handling.
36 (decl_remember_implicit_trigger_p): New.
37 (synthesize_method): Use it.
38 * decl2.c (mark_used): Use it.
39
40 2020-02-11 Jason Merrill <jason@redhat.com>
41
42 PR c++/93650
43 PR c++/90691
44 * constexpr.c (maybe_constant_value): Correct earlier change.
45 (cxx_eval_binary_expression) [SPACESHIP_EXPR]: Pass lval through.
46 * method.c (genericize_spaceship): Wrap result in TARGET_EXPR.
47
48 2020-02-12 Patrick Palka <ppalka@redhat.com>
49
50 PR c++/69448
51 PR c++/80471
52 * type-utils.h (find_type_usage): Refactor to take a tree * and to
53 return a tree *, and update documentation accordingly.
54 * pt.c (make_auto_1): Set AUTO_IS_DECLTYPE when building a
55 decltype(auto) node.
56 (make_constrained_decltype_auto): No need to explicitly set
57 AUTO_IS_DECLTYPE anymore.
58 (splice_late_return_type): Use find_type_usage to find and
59 replace a possibly nested auto node instead of using is_auto.
60 Check test for is_auto into an assert when deciding whether
61 to late_return_type.
62 (type_uses_auto): Adjust the call to find_type_usage.
63 * parser.c (cp_parser_decltype): No need to explicitly set
64 AUTO_IS_DECLTYPE anymore.
65
66 * error.c (dump_decl) [CONCEPT_DECL]: Use dump_simple_decl.
67 (dump_simple_decl): Handle standard concept definitions as well as
68 variable concept definitions.
69
70 2020-02-10 Jakub Jelinek <jakub@redhat.com>
71
72 PR other/93641
73 * error.c (dump_decl_name): Fix up last argument to strncmp.
74
75 2020-02-10 Jason Merrill <jason@redhat.com>
76
77 PR c++/93618
78 * tree.c (array_of_unknown_bound_p): New.
79 * init.c (perform_member_init): Do nothing for flexible arrays.
80
81 2020-02-09 Jakub Jelinek <jakub@redhat.com>
82
83 PR c++/93633
84 * constexpr.c (cxx_eval_constant_expression): If obj is heap var with
85 ARRAY_TYPE, use the element type. Punt if objtype after that is not
86 a class type.
87
88 2020-02-08 Jason Merrill <jason@redhat.com>
89
90 PR c++/90691
91 * expr.c (fold_for_warn): Call maybe_constant_value.
92 * constexpr.c (struct constexpr_ctx): Add uid_sensitive bit-field.
93 (maybe_constant_value): Add uid_sensitive parm.
94 (get_fundef_copy): Don't copy if it's true.
95 (cxx_eval_call_expression): Don't instantiate if it's true.
96 (cxx_eval_outermost_constant_expr): Likewise.
97
98 PR c++/92852
99 * constexpr.c (maybe_constant_value): Don't unshare if the cached
100 value is the same as the argument.
101
102 * typeck.c (maybe_warn_about_returning_address_of_local): Add
103 location parameter.
104
105 * typeck2.c (process_init_constructor): Also clear TREE_SIDE_EFFECTS
106 if appropriate.
107
108 2020-02-08 Jakub Jelinek <jakub@redhat.com>
109
110 PR c++/93549
111 * constexpr.c (find_array_ctor_elt): If last element has no index,
112 for flag_checking verify all elts have no index. If i is within the
113 elts, return it directly, if it is right after the last elt, append
114 if NULL index, otherwise force indexes on all elts.
115 (cxx_eval_store_expression): Allow cep->index to be NULL.
116
117 2020-02-07 Marek Polacek <polacek@redhat.com>
118
119 PR c++/92947 - Paren init of aggregates in unevaluated context.
120 * call.c (build_new_method_call_1): Don't check
121 cp_unevaluated_operand. Check the return value of digest_init.
122
123 2020-02-06 Jason Merrill <jason@redhat.com>
124
125 PR c++/92654
126 * tree.c (cp_walk_subtrees): Walk into type template arguments.
127 * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Use typedef_variant_p
128 instead of TYPE_ALIAS_P.
129 * pt.c (push_template_decl_real): Likewise.
130 (find_parameter_packs_r): Likewise. Remove dead code.
131 * error.c (find_typenames_r): Remove dead code.
132
133 2020-02-06 Jason Merrill <jason@redhat.com>
134
135 PR c++/92517
136 * parser.c (cp_parser_constraint_primary_expression): Do the main
137 parse non-tentatively.
138
139 2020-02-06 Marek Polacek <polacek@redhat.com>
140
141 PR c++/93597 - ICE with lambda in operator function.
142 * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn.
143
144 2020-02-05 Jason Merrill <jason@redhat.com>
145
146 PR c++/93140
147 * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in
148 handling of TREE_CHAIN for empty pack.
149
150 2020-02-05 Jakub Jelinek <jakub@redhat.com>
151
152 PR c++/93557
153 * semantics.c (cp_build_vec_convert): Call decay_conversion on arg
154 prior to passing it to c_build_vec_convert.
155
156 2020-02-05 Marek Polacek <polacek@redhat.com>
157
158 PR c++/93559 - ICE with CONSTRUCTOR flags verification.
159 * decl.c (reshape_init_array_1): Don't reuse a CONSTRUCTOR with
160 TREE_SIDE_EFFECTS.
161
162 2020-02-05 Jason Merrill <jason@redhat.com>
163
164 PR c++/92593
165 * decl.c (grokdeclarator): Reject field of current class type even
166 in a template.
167
168 2020-02-05 Bin Cheng <bin.cheng@linux.alibaba.com>
169
170 * coroutines.cc (maybe_promote_captured_temps): Increase the index
171 number for temporary variables' name.
172
173 2020-02-05 Jun Ma <JunMa@linux.alibaba.com>
174
175 * coroutines.cc (build_co_await): Call convert_from_reference
176 to wrap co_await_expr with indirect_ref which avoid
177 reference/non-reference type confusion.
178
179 (co_await_expander): Sink to call_expr if await_resume
180 is wrapped by indirect_ref.
181
182 2020-02-04 Jason Merrill <jason@redhat.com>
183
184 PR c++/93551
185 * constraint.cc (satisfy_declaration_constraints): Check return
186 value of push_tinst_level.
187
188 PR c++/90951
189 * constexpr.c (cxx_eval_array_reference): {}-initialize missing
190 elements instead of value-initializing them.
191
192 PR c++/86917
193 * init.c (perform_member_init): Simplify.
194 * constexpr.c (cx_check_missing_mem_inits): Allow uninitialized
195 flexarray.
196 (cxx_eval_vec_init_1): Handle CONSTRUCTOR.
197
198 2020-02-04 Iain Sandoe <iain@sandoe.co.uk>
199
200 * coroutines.cc (find_promise_type): Delete unused forward
201 declaration.
202 (struct coroutine_info): Add a bool for no promise type error.
203 (coro_promise_type_found_p): Only emit the error for a missing
204 promise once in each affected coroutine.
205
206 2020-02-03 Jason Merrill <jason@redhat.com>
207
208 PR c++/66477
209 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
210 defer loading the value of a reference.
211
212 2020-02-03 Jason Merrill <jason@redhat.com>
213
214 PR c++/91953
215 * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
216 empty class type.
217 [COMPONENT_REF]: A member function reference doesn't use the object
218 as an rvalue.
219
220 2020-02-03 Iain Sandoe <iain@sandoe.co.uk>
221
222 PR c++/93458
223 * coroutines.cc (struct coroutine_info): Add a bool flag to note
224 that we emitted an error for a bad function return type.
225 (get_coroutine_info): Tolerate an unset info table in case of
226 missing traits.
227 (find_coro_traits_template_decl): In case of error or if we didn't
228 find a type template, note we emitted the error and suppress
229 duplicates.
230 (find_coro_handle_template_decl): Likewise.
231 (instantiate_coro_traits): Only check for error_mark_node in the
232 return from lookup_qualified_name.
233 (coro_promise_type_found_p): Reorder initialization so that we check
234 for the traits and their usability before allocation of the info
235 table. Check for a suitable return type and emit a diagnostic for
236 here instead of relying on the lookup machinery. This allows the
237 error to have a better location, and means we can suppress multiple
238 copies.
239 (coro_function_valid_p): Re-check for a valid promise (and thus the
240 traits) before proceeding. Tolerate missing info as a fatal error.
241
242 2020-02-03 Jason Merrill <jason@redhat.com>
243
244 PR c++/88256
245 * cp-gimplify.c (predeclare_vla): New.
246 (cp_genericize_r) [NOP_EXPR]: Call it.
247
248 2020-02-03 Jun Ma <JunMa@linux.alibaba.com>
249
250 * coroutines.cc (transform_await_wrapper): Set actor funcion as
251 new context of label_decl.
252 (build_actor_fn): Fill new field of await_xform_data.
253
254 2020-02-02 Marek Polacek <polacek@redhat.com>
255
256 PR c++/93530 - ICE on invalid alignas in a template.
257 * decl.c (grokdeclarator): Call cplus_decl_attributes instead of
258 decl_attributes.
259
260 2020-01-31 Jason Merrill <jason@redhat.com>
261
262 PR c++/86216
263 * semantics.c (process_outer_var_ref): Capture VLAs even in
264 unevaluated context.
265
266 PR c++/14179
267 * decl.c (reshape_init_array_1): Reuse a single CONSTRUCTOR with
268 non-aggregate elements.
269 (reshape_init_array): Add first_initializer_p parm.
270 (reshape_init_r): Change first_initializer_p from bool to tree.
271 (reshape_init): Pass init to it.
272
273 PR c++/14179
274 * parser.c (cp_parser_initializer_list): Suppress location wrappers
275 after 256 elements.
276
277 2020-01-29 Jason Merrill <jason@redhat.com>
278
279 PR c++/82521
280 * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if
281 the expression was dependent before substitution.
282
283 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com>
284
285 * coroutines.cc (act_des_fn): New.
286 (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls.
287 Access promise via actor function's frame pointer argument.
288 (build_actor_fn, build_destroy_fn): Use frame pointer argument.
289
290 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com>
291
292 * coroutines.cc (co_await_expander): Handle type conversion case.
293
294 2020-01-29 Jason Merrill <jason@redhat.com>
295
296 PR c++/90333
297 PR c++/89640
298 PR c++/60503
299 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in
300 a trailing return type.
301 (cp_parser_lambda_declarator_opt): Parse C++11 attributes before
302 parens.
303
304 2020-01-29 Marek Polacek <polacek@redhat.com>
305
306 PR c++/91754 - Fix template arguments comparison with class NTTP.
307 * pt.c (class_nttp_const_wrapper_p): New.
308 (template_args_equal): See through class_nttp_const_wrapper_p
309 arguments.
310
311 2020-01-29 Marek Polacek <polacek@redhat.com>
312
313 PR c++/92948 - Fix class NTTP with template arguments.
314 * pt.c (convert_nontype_argument): Use IMPLICIT_CONV_EXPR when
315 converting a value-dependent expression to a class type.
316 (tsubst_copy) <case VIEW_CONVERT_EXPR>: Allow IMPLICIT_CONV_EXPR
317 as the result of the tsubst_copy call.
318
319 2020-01-29 Jakub Jelinek <jakub@redhat.com>
320
321 PR c++/91118
322 * cp-gimplify.c (cxx_omp_predetermined_sharing): Return
323 OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls.
324
325 2020-01-28 Jason Merrill <jason@redhat.com>
326
327 PR c++/93442
328 * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt.
329
330 PR c++/93477
331 PR c++/91476
332 * decl2.c (copy_linkage): Do copy DECL_ONE_ONLY and DECL_WEAK.
333
334 PR c++/90546
335 * call.c (build_user_type_conversion_1): Allow a template conversion
336 returning an rvalue reference to bind directly to an lvalue.
337
338 PR c++/90731
339 * decl.c (grokdeclarator): Propagate eh spec from typedef.
340
341 2020-01-28 Martin Liska <mliska@suse.cz>
342
343 PR c++/92440
344 * pt.c (redeclare_class_template): Group couple of
345 errors and inform messages with auto_diagnostic_group.
346
347 2020-01-28 Martin Liska <mliska@suse.cz>
348
349 PR c++/92440
350 * pt.c (redeclare_class_template): Use inform
351 for the second location.
352
353 2020-01-27 Jason Merrill <jason@redhat.com>
354
355 PR c++/90966
356 * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
357
358 2020-01-27 Iain Sandoe <iain@sandoe.co.uk>
359
360 PR c++/93443
361 * coroutines.cc (morph_fn_to_coro): Check the ramp return
362 value when it is constructed from the 'get return object'.
363
364 2020-01-27 Nathan Sidwell <nathan@acm.org>
365
366 PR c++/91826
367 * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
368
369 2020-01-26 Jason Merrill <jason@redhat.com>
370
371 PR c++/90992
372 * except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and
373 temporarily enable -Wsystem-headers. Change second warning to
374 conditional inform.
375
376 PR c++/90997
377 * semantics.c (finish_call_expr): Don't call
378 instantiate_non_dependent_expr before warn_for_memset.
379
380 2020-01-25 Marek Polacek <polacek@redhat.com>
381
382 PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context.
383 * constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference
384 dynamic_cast diagnostic.
385
386 2020-01-24 Jason Merrill <jason@redhat.com>
387
388 PR c++/93400 - ICE with constrained friend.
389 * constraint.cc (maybe_substitute_reqs_for): New.
390 * decl.c (function_requirements_equivalent_p): Call it.
391 * pt.c (tsubst_friend_function): Only substitute
392 TEMPLATE_PARMS_CONSTRAINTS.
393 (tsubst_template_parms): Copy constraints.
394
395 2020-01-24 Jason Merrill <jason@redhat.com>
396
397 PR c++/93279 - ICE with lambda in member operator.
398 * name-lookup.c (maybe_save_operator_binding): Don't remember
399 class-scope bindings.
400
401 2020-01-24 Jason Merrill <jason@redhat.com>
402
403 PR c++/93377 - ICE with member alias in constraint.
404 * pt.c (any_template_parm_r): Look at template arguments for all
405 aliases, not only alias templates.
406
407 2020-01-24 Marek Polacek <polacek@redhat.com>
408
409 PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
410 * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.
411
412 2020-01-24 Jason Merrill <jason@redhat.com>
413
414 PR c++/92852 - ICE with generic lambda and reference var.
415 * constexpr.c (maybe_constant_value): Likewise.
416
417 2020-01-23 Paolo Carlini <paolo.carlini@oracle.com>
418
419 PR c++/92804
420 * parser.c (cp_parser_nested_name_specifier_opt): Properly
421 diagnose concept-ids.
422
423 2020-01-23 Jason Merrill <jason@redhat.com>
424
425 PR c++/93331 - ICE with __builtin_strchr.
426 * constexpr.c (cxx_eval_builtin_function_call): Use the original
427 argument if we didn't manage to extract a STRING_CST.
428
429 PR c++/93345 - ICE with defaulted dtor and template.
430 PR c++/33799
431 * decl.c (cxx_maybe_build_cleanup): Don't try to set
432 throwing_cleanup in a template.
433
434 2020-01-22 Marek Polacek <polacek@redhat.com>
435
436 PR c++/92907 - noexcept does not consider "const" in member functions.
437 * g++.dg/cpp0x/noexcept56.C: New test.
438
439 2020-01-22 Marek Polacek <polacek@redhat.com>
440
441 PR c++/93324 - ICE with -Wall on constexpr if.
442 * semantics.c (is_std_constant_evaluated_p): Check fndecl.
443
444 2020-01-22 Patrick Palka <ppalka@redhat.com>
445
446 * constraint.cc (get_mapped_args): Avoid using auto_vec
447 as a vector element. Release the vectors inside the lists
448 vector.
449 * parser.c (cp_literal_operator_id): Free the buffer.
450
451 2020-01-22 Jun Ma <JunMa@linux.alibaba.com>
452
453 * coroutines.cc (finish_co_await_expr): Add error check on return
454 value of build_co_await.
455 (finish_co_yield_expr,): Ditto.
456
457 2020-01-22 Jun Ma <JunMa@linux.alibaba.com>
458
459 * coroutines.cc (lookup_awaitable_member): Lookup an awaitable member.
460 (lookup_promise_method): Emit diagnostic when get NULL_TREE back only.
461 (build_co_await): Use lookup_awaitable_member instead of lookup_member.
462
463 2020-01-21 Jason Merrill <jason@redhat.com>
464
465 PR c++/60855 - ICE with sizeof VLA capture.
466 * lambda.c (is_lambda_ignored_entity): Don't look past VLA capture.
467
468 PR c++/90732 - ICE with VLA capture and generic lambda.
469 * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs.
470
471 2020-01-21 Iain Sandoe <iain@sandoe.co.uk>
472 Bin Cheng <bin.cheng@linux.alibaba.com>
473
474 * coroutines.cc (coro_promise_type_found_p): Check for NULL return
475 from complete_type_or_else.
476 (register_param_uses): Likewise.
477 (build_co_await): Do not try to use complete_type_or_else for void
478 types, otherwise for incomplete types, check for NULL return from
479 complete_type_or_else.
480
481 2020-01-21 Jason Merrill <jason@redhat.com>
482
483 PR c++/91476 - anon-namespace reference temp clash between TUs.
484 * decl2.c (copy_linkage): Factor out of get_guard.
485 * call.c (make_temporary_var_for_ref_to_temp): Use it.
486 * decl.c (cp_finish_decomp): Use it.
487 (cp_finish_decl): determine_visibility sooner.
488
489 2020-01-21 Bin Cheng <bin.cheng@linux.alibaba.com>
490
491 * coroutines.cc (finish_co_await_expr): Set return value flag.
492 (finish_co_yield_expr, morph_fn_to_coro): Ditto.
493
494 2020-01-19 Jason Merrill <jason@redhat.com>
495
496 PR c++/33799 - destroy return value, take 2.
497 * cp-tree.h (current_retval_sentinel): New macro.
498 (struct language_function): Add throwing_cleanup bitfield.
499 * decl.c (cxx_maybe_build_cleanup): Set it.
500 * except.c (maybe_set_retval_sentinel)
501 (maybe_splice_retval_cleanup): New functions.
502 * parser.c (cp_parser_compound_statement): Call
503 maybe_splice_retval_cleanup.
504 * typeck.c (check_return_expr): Call maybe_set_retval_sentinel.
505
506 * parser.c (cp_parser_lambda_body): Use cp_parser_function_body.
507
508 2020-01-18 Jakub Jelinek <jakub@redhat.com>
509
510 * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL
511 but non-NO_DOLLAR_IN_LABEL case build.
512
513 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
514
515 * Make-lang.in: Add coroutines.o.
516 * cp-tree.h (lang_decl-fn): coroutine_p, new bit.
517 (DECL_COROUTINE_P): New.
518 * lex.c (init_reswords): Enable keywords when the coroutine flag
519 is set,
520 * operators.def (co_await): New operator.
521 * call.c (add_builtin_candidates): Handle CO_AWAIT_EXPR.
522 (op_error): Likewise.
523 (build_new_op_1): Likewise.
524 (build_new_function_call): Validate coroutine builtin arguments.
525 * constexpr.c (potential_constant_expression_1): Handle
526 CO_AWAIT_EXPR, CO_YIELD_EXPR, CO_RETURN_EXPR.
527 * coroutines.cc: New file.
528 * cp-objcp-common.c (cp_common_init_ts): Add CO_AWAIT_EXPR,
529 CO_YIELD_EXPR, CO_RETRN_EXPR as TS expressions.
530 * cp-tree.def (CO_AWAIT_EXPR, CO_YIELD_EXPR, (CO_RETURN_EXPR): New.
531 * cp-tree.h (coro_validate_builtin_call): New.
532 * decl.c (emit_coro_helper): New.
533 (finish_function): Handle the case when a function is found to
534 be a coroutine, perform the outlining and emit the outlined
535 functions. Set a bit to signal that this is a coroutine component.
536 * parser.c (enum required_token): New enumeration RT_CO_YIELD.
537 (cp_parser_unary_expression): Handle co_await.
538 (cp_parser_assignment_expression): Handle co_yield.
539 (cp_parser_statement): Handle RID_CO_RETURN.
540 (cp_parser_jump_statement): Handle co_return.
541 (cp_parser_operator): Handle co_await operator.
542 (cp_parser_yield_expression): New.
543 (cp_parser_required_error): Handle RT_CO_YIELD.
544 * pt.c (tsubst_copy): Handle CO_AWAIT_EXPR.
545 (tsubst_expr): Handle CO_AWAIT_EXPR, CO_YIELD_EXPR and
546 CO_RETURN_EXPRs.
547 * tree.c (cp_walk_subtrees): Likewise.
548
549 2020-01-17 Jason Merrill <jason@redhat.com>
550
551 PR c++/92531 - ICE with noexcept(lambda).
552 * pt.c (uses_template_parms): Don't try to enumerate all the
553 expression cases.
554
555 2020-01-17 Jakub Jelinek <jakub@redhat.com>
556
557 PR c++/93228
558 * parser.c (cp_parser_template_name): Look up deprecated attribute
559 in DECL_TEMPLATE_RESULT or its type's attributes.
560
561 2020-01-16 Jason Merrill <jason@redhat.com>
562
563 PR c++/93286 - ICE with __is_constructible and variadic template.
564 * pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
565 (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
566
567 PR c++/93280 - ICE with aggregate assignment and DMI.
568 * init.c (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P here.
569 * typeck2.c (digest_nsdmi_init): Not here.
570
571 2020-01-15 Paolo Carlini <paolo.carlini@oracle.com>
572
573 PR c++/91073
574 * cp-tree.h (is_constrained_auto): New.
575 * parser.c (cp_parser_maybe_commit_to_declaration): Correctly
576 handle concept-check expressions; take a cp_decl_specifier_seq*
577 instead of a bool.
578 (cp_parser_condition): Update call.
579 (cp_parser_simple_declaration): Likewise.
580 (cp_parser_placeholder_type_specifier): Correctly handle
581 concept-check expressions.
582
583 2020-01-15 Jason Merrill <jason@redhat.com>
584
585 Revert
586 PR c++/33799 - destroy return value if local cleanup throws.
587 * cp-tree.h (current_retval_sentinel): New macro.
588 * decl.c (start_preparsed_function): Set up cleanup for retval.
589 * typeck.c (check_return_expr): Set current_retval_sentinel.
590
591 PR c++/93257 - consteval void function.
592 * constexpr.c (verify_constant): Allow void_node.
593
594 PR c++/92871 - bad code with xvalue and GNU ?: extension.
595 * call.c (prevent_lifetime_extension): New.
596 (build_conditional_expr_1): Use it.
597
598 2020-01-14 Nathan Sidwell <nathan@acm.org>
599
600 PR c++/90916
601 * pt.c (retrieve_specialization): Use get_template_info, not open
602 coding access.
603
604 PR c++/90916
605 * pt.c (retrieve_specialization): Get the TI from the decl or the
606 classtype as appropriate.
607
608 2020-01-14 David Malcolm <dmalcolm@redhat.com>
609
610 * cp-gimplify.c (source_location_table_entry_hash::empty_zero_p):
611 New static constant.
612 * cp-tree.h (named_decl_hash::empty_zero_p): Likewise.
613 (struct named_label_hash::empty_zero_p): Likewise.
614 * decl2.c (mangled_decl_hash::empty_zero_p): Likewise.
615
616 2020-01-14 Jason Merrill <jason@redhat.com>
617
618 PR c++/92590 - wrong handling of inherited default ctor.
619 * class.c (add_method): A constrained inherited ctor doesn't hide an
620 implicit derived ctor.
621 Revert:
622 PR c++/92552 - ICE with inherited constrained default ctor.
623 * pt.c (instantiate_class_template_1): Copy
624 TYPE_HAS_USER_CONSTRUCTOR.
625 PR c++/91930 - ICE with constrained inherited default ctor.
626 * name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR
627 for inherited constructor.
628 PR c++/92594 - ICE with inherited trivial default ctor.
629 * method.c (trivial_fn_p): Treat an inherited default constructor
630 like a normal default constructor.
631
632 PR c++/92594 - ICE with inherited trivial default ctor.
633 * method.c (trivial_fn_p): Treat an inherited default constructor
634 like a normal default constructor.
635
636 PR c++/92009 - ICE with punning of typeid.
637 * rtti.c (get_tinfo_desc): Call xref_basetypes.
638 * constexpr.c (cxx_fold_indirect_ref): Don't strip
639 REINTERPRET_CAST_P.
640
641 2020-01-13 Jason Merrill <jason@redhat.com>
642
643 PR c++/92746 - ICE with noexcept of function concept check.
644 * except.c (check_noexcept_r): Handle concept-check.
645
646 PR c++/92582 - ICE with member template as requirement.
647 * pt.c (struct find_template_parameter_info): Add ctx_parms.
648 (any_template_parm_r): Handle TEMPLATE_DECL.
649 (find_template_parameters): Take parms instead of their depth.
650 * constraint.cc (build_parameter_mapping): Pass them.
651
652 PR c++/33799 - destroy return value if local cleanup throws.
653 * cp-tree.h (current_retval_sentinel): New macro.
654 * decl.c (start_preparsed_function): Set up cleanup for retval.
655 * typeck.c (check_return_expr): Set current_retval_sentinel.
656
657 PR c++/93238 - short right-shift with enum.
658 * typeck.c (cp_build_binary_op): Use folded op1 for short_shift.
659
660 2020-01-10 Jason Merrill <jason@redhat.com>
661
662 * typeck.c (cp_build_binary_op): Restore short_shift code.
663
664 PR c++/93143 - incorrect tree sharing with constexpr.
665 * constexpr.c (cxx_eval_outermost_constant_expr): Don't assume
666 CONSTRUCTORs are already unshared.
667
668 PR c++/93173 - incorrect tree sharing.
669 PR c++/93033
670 * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr): Use
671 copy_if_shared after cp_genericize_tree.
672 * typeck2.c (split_nonconstant_init): Don't unshare here.
673
674 2020-01-08 Jason Merrill <jason@redhat.com>
675
676 * cp-gimplify.c (cp_gimplify_expr) [TARGET_EXPR]: Check
677 TARGET_EXPR_DIRECT_INIT_P.
678 * constexpr.c (cxx_eval_constant_expression): Likewise.
679
680 2020-01-08 Jason Merrill <jason@redhat.com>
681
682 PR c++/91369 - constexpr destructor and member initializer.
683 * constexpr.c (cxx_eval_store_expression): Look through TARGET_EXPR
684 when not preevaluating.
685
686 2020-01-08 Jason Merrill <jason@redhat.com>
687
688 * constexpr.c (cxx_eval_call_expression): Remove DECL_BY_REFERENCE
689 support.
690
691 2020-01-07 Paolo Carlini <paolo.carlini@oracle.com>
692
693 * init.c (build_new): Add location_t parameter and use it throughout.
694 (build_raw_new_expr): Likewise.
695 * parser.c (cp_parser_new_expression): Pass the combined_loc.
696 * pt.c (tsubst_copy_and_build): Adjust call.
697 * cp-tree.h: Update declarations.
698
699 2020-01-07 Jason Merrill <jason@redhat.com>
700
701 PR c++/47877 - -fvisibility-inlines-hidden and member templates.
702 * decl2.c (determine_visibility): -fvisibility-inlines-hidden beats
703 explicit class visibility for a template.
704
705 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
706
707 * mangle.c (mangle_type_attribute_p): New function, split out from...
708 (write_CV_qualifiers_for_type): ...here. Don't mangle attributes
709 that contain a space.
710
711 2020-01-07 Jakub Jelinek <jakub@redhat.com>
712
713 PR c++/91369
714 * constexpr.c (struct constexpr_global_ctx): Add heap_alloc_count
715 member, initialize it to zero in ctor.
716 (cxx_eval_call_expression): Bump heap_dealloc_count when deleting
717 a heap object. Don't cache calls to functions which allocate some
718 heap objects and don't deallocate them or deallocate some heap
719 objects they didn't allocate.
720
721 2020-01-06 Jason Merrill <jason@redhat.com>
722
723 PR c++/92552 - ICE with inherited constrained default ctor.
724 * pt.c (instantiate_class_template_1): Copy
725 TYPE_HAS_USER_CONSTRUCTOR.
726 * class.c (one_inherited_ctor): Don't set it here.
727
728 2020-01-06 Andrew Sutton <asutton@lock3software.com>
729
730 PR c++/92739 - parsing requires clause with attributes.
731 * parser.c (cp_parser_constraint_requires_parens): Exclude
732 attributes as postfix expressions.
733
734 2020-01-05 Jakub Jelinek <jakub@redhat.com>
735
736 PR c++/93138
737 * parser.c (cp_parser_check_class_key): Disable access checks for the
738 simple name lookup.
739 (cp_parser_maybe_warn_enum_key): Likewise. Return early if
740 !warn_redundant_tags.
741
742 2010-01-05 Jakub Jelinek <jakub@redhat.com>
743
744 PR c++/93046
745 * cp-gimplify.c (cp_gimplify_init_expr): Don't look through
746 TARGET_EXPR if it has been gimplified already.
747
748 2020-01-03 Jason Merrill <jason@redhat.com>
749
750 PR c++/93033 - incorrect tree node sharing with array init.
751 * typeck2.c (split_nonconstant_init): Unshare non-decl.
752 * cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions.
753
754 2020-01-02 Jason Merrill <jason@redhat.com>
755
756 * pt.c (invalid_nontype_parm_type_p): Reject class placeholder in
757 C++17.
758
759 2020-01-02 Jakub Jelinek <jakub@redhat.com>
760
761 PR c/90677
762 * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
763 has not been found, rather than error_mark_node.
764
765 2020-01-01 Jakub Jelinek <jakub@redhat.com>
766
767 Update copyright years.
768 \f
769 Copyright (C) 2020 Free Software Foundation, Inc.
770
771 Copying and distribution of this file, with or without modification,
772 are permitted in any medium without royalty provided the copyright
773 notice and this notice are preserved.