]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[gcc.git] / gcc / cp / ChangeLog
1 2021-03-06 Tobias Burnus <tobias@codesourcery.com>
2
3 Backported from master:
4 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
5
6 PR c/99137
7 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
8
9 2021-03-04 Jason Merrill <jason@redhat.com>
10
11 PR c++/98810
12 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
13 to a class non-type template argument that needs it.
14
15 2021-03-04 Jason Merrill <jason@redhat.com>
16
17 PR c++/95675
18 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
19 if it didn't get one before.
20
21 2021-02-27 Jason Merrill <jason@redhat.com>
22
23 PR c++/90333
24 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
25 between () and ->.
26
27 2021-01-29 Jason Merrill <jason@redhat.com>
28
29 PR c++/63707
30 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
31 if we got a CONSTRUCTOR.
32
33 2020-12-16 Nathan Sidwell <nathan@acm.org>
34
35 * parser.c (cp_parser_elaborated_type_specifier): Test
36 BOUND_TEMPLATE_TEMPLATE_PARM before checking for instantiation.
37
38 2020-11-26 Thomas Schwinge <thomas@codesourcery.com>
39
40 Backported from master:
41 2020-11-26 Thomas Schwinge <thomas@codesourcery.com>
42
43 * parser.c (cp_parser_omp_var_list_no_open): Assert that array
44 section's 'low_bound', 'length' are not location wrapper nodes.
45 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache): Instantiate
46 'auto_suppress_location_wrappers'.
47
48 2020-11-25 Thomas Schwinge <thomas@codesourcery.com>
49
50 Backported from master:
51 2020-11-25 Thomas Schwinge <thomas@codesourcery.com>
52
53 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE__CACHE_'.
54 (tsubst_expr): Handle 'OACC_CACHE'.
55
56 2020-11-24 Jason Merrill <jason@redhat.com>
57
58 PR c++/95158
59 * class.c (lookup_vfn_in_binfo): New.
60 * call.c (build_over_call): Use it.
61 (build_new_method_call_1): Don't set LOOKUP_NONVIRTUAL.
62 * cp-tree.h (resolves_to_fixed_type_p): Add default argument.
63 (lookup_vfn_in_binfo): Declare.
64
65 2020-11-13 Patrick Palka <ppalka@redhat.com>
66
67 Backported from master:
68 2020-10-07 Patrick Palka <ppalka@redhat.com>
69
70 PR c++/88115
71 PR libstdc++/97273
72 * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Return false if
73 ALIGNOF_EXPR_STD_P differ.
74
75 2020-09-16 Jakub Jelinek <jakub@redhat.com>
76
77 Backported from master:
78 2020-09-03 Jakub Jelinek <jakub@redhat.com>
79
80 PR c++/96862
81 * constexpr.c (cxx_eval_outermost_constant_expr): Temporarily disable
82 flag_rounding_math during manifestly constant evaluation.
83
84 2020-09-16 Jakub Jelinek <jakub@redhat.com>
85
86 Backported from master:
87 2020-05-28 Jakub Jelinek <jakub@redhat.com>
88
89 PR c++/95328
90 * decl.c (cp_finish_decomp): Call complete_type before checking
91 COMPLETE_TYPE_P.
92
93 2020-09-16 Jakub Jelinek <jakub@redhat.com>
94
95 Backported from master:
96 2020-05-07 Jakub Jelinek <jakub@redhat.com>
97
98 PR c++/94951
99 * typeck.c (cp_strict_aliasing_warning): New function.
100 (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use
101 it instead of strict_aliasing_warning.
102
103 2020-09-16 Jakub Jelinek <jakub@redhat.com>
104
105 Backported from master:
106 2020-04-24 Jakub Jelinek <jakub@redhat.com>
107
108 PR c++/94742
109 * semantics.c (finish_call_expr): When looking if all overloads
110 are noreturn, use STRIP_TEMPLATE to look through TEMPLATE_DECLs.
111
112 2020-09-16 Jakub Jelinek <jakub@redhat.com>
113
114 Backported from master:
115 2020-04-16 Jakub Jelinek <jakub@redhat.com>
116
117 PR c++/94571
118 * parser.c (cp_parser_simple_declaration): Fix up a pasto in
119 diagnostics.
120
121 2020-09-16 Jakub Jelinek <jakub@redhat.com>
122
123 Backported from master:
124 2020-04-08 Jakub Jelinek <jakub@redhat.com>
125
126 PR c++/94325
127 * decl.c (begin_destructor_body): For CLASSTYPE_VBASECLASSES class
128 dtors, if CLASSTYPE_PRIMARY_BINFO is non-NULL, but not BINFO_VIRTUAL_P,
129 look at CLASSTYPE_PRIMARY_BINFO of its BINFO_TYPE if it is not
130 BINFO_VIRTUAL_P, and so on.
131
132 2020-06-16 Patrick Palka <ppalka@redhat.com>
133
134 PR c++/95678
135 * tree.c (zero_init_expr_p): Use uses_template_parms instead of
136 dependent_type_p.
137
138 2020-06-11 Marek Polacek <polacek@redhat.com>
139
140 PR c++/95344
141 * cp-gimplify.c (cp_fold) <case MODIFY_EXPR>: Don't set
142 TREE_THIS_VOLATILE here.
143 (cp_fold): Set it here along with TREE_NO_WARNING.
144
145 2020-06-11 Marek Polacek <polacek@redhat.com>
146
147 PR c++/95560
148 * name-lookup.c (check_local_shadow): Check if types are
149 non-null before calling same_type_p.
150
151 2020-05-25 Jason Merrill <jason@redhat.com>
152
153 PR c++/90212
154 * constexpr.c (potential_constant_expression_1): In a lambda
155 function, consider a captured variable directly.
156
157 2020-05-25 Jason Merrill <jason@redhat.com>
158
159 PR c++/90479
160 * init.c (get_nsdmi): Don't push_to_top_level for a local class.
161
162 2020-05-25 Jason Merrill <jason@redhat.com>
163
164 PR c++/91529
165 * decl.c (cp_finish_decl): Also clear TREE_READONLY if
166 -fmerge-all-constants.
167
168 2020-05-25 Jason Merrill <jason@redhat.com>
169
170 PR c++/93822
171 * pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have
172 the same type as the variable.
173
174 2020-05-06 Nathan Sidwell <nathan@acm.org>
175
176 PR c++/94946
177 * decl.c (grokdeclarator): Don't splice template attributes in
178 parm context -- they can apply to the parm.
179
180 2020-04-27 Jason Merrill <jason@redhat.com>
181
182 PR c++/90750
183 PR c++/79585
184 * decl.c (grokdeclarator): Move dependent attribute to decl.
185 * decl2.c (splice_template_attributes): No longer static.
186
187 2020-04-21 Martin Sebor <msebor@redhat.com>
188 Jason Merrill <jason@redhat.com>
189
190 PR c++/94510
191 * decl.c (reshape_init_array_1): Avoid stripping redundant trailing
192 zero initializers...
193 * mangle.c (write_expression): ...and handle them here even for
194 pointers to members by calling zero_init_expr_p.
195 * cp-tree.h (zero_init_expr_p): Declare.
196 * tree.c (zero_init_expr_p): Define.
197 (type_initializer_zero_p): Remove.
198 * pt.c (tparm_obj_values): New hash_map.
199 (get_template_parm_object): Store to it.
200 (tparm_object_argument): New.
201
202 2020-04-20 Marek Polacek <polacek@redhat.com>
203
204 Backported from mainline
205 2020-04-20 Marek Polacek <polacek@redhat.com>
206
207 PR c++/94505 - bogus -Wparentheses warning with fold-expression.
208 * pt.c (fold_expression): Add warning_sentinel for -Wparentheses
209 before calling build_x_binary_op.
210
211 2020-04-07 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/94512
214 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
215 if cp_parser_omp_master succeeded.
216
217 Backported from mainline
218 2020-04-04 Jakub Jelinek <jakub@redhat.com>
219
220 PR c++/94477
221 * pt.c (tsubst_expr) <case OMP_MASTER>: Clear
222 omp_parallel_combined_clauses.
223
224 2020-03-30 Jakub Jelinek <jakub@redhat.com>
225
226 PR c++/94385
227 * semantics.c (add_stmt): Only set STMT_IS_FULL_EXPR_P on trees with
228 STATEMENT_CODE_P code.
229
230 2020-03-19 Jakub Jelinek <jakub@redhat.com>
231
232 PR c++/93931
233 * parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref
234 on outer_automatic_var_p decls.
235 * cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for
236 capture proxy decls.
237
238 2020-03-17 Jakub Jelinek <jakub@redhat.com>
239
240 PR c++/90995
241 * parser.c (cp_parser_enum_specifier): Use temp_override for
242 parser->colon_corrects_to_scope_p, replace goto out with return.
243 If scoped enum or enum with underlying type is not followed by
244 { or ;, call cp_parser_commit_to_tentative_parse before calling
245 cp_parser_error and make sure to return error_mark_node instead of
246 NULL_TREE. Formatting fixes.
247
248 2020-04-05 Marek Polacek <polacek@redhat.com>
249
250 2020-02-06 Marek Polacek <polacek@redhat.com>
251 Backport from mainline
252
253 PR c++/93597 - ICE with lambda in operator function.
254 * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn.
255
256 2020-04-04 Jason Merrill <jason@redhat.com>
257
258 PR c++/91377
259 * mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.
260
261 2020-04-04 Jason Merrill <jason@redhat.com>
262
263 PR c++/94453
264 * constexpr.c (maybe_constant_value): Use break_out_target_exprs.
265 * expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR in
266 NON_LVALUE_EXPR.
267
268 2020-04-03 Jason Merrill <jason@redhat.com>
269
270 PR c++/91966
271 * pt.c (complex_pack_expansion_r): New.
272 (complex_alias_template_p): Use it.
273
274 2020-03-30 Jason Merrill <jason@redhat.com>
275
276 PR c++/90711
277 * tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P.
278 (called_fns_equal): Check DECL_CONTEXT.
279
280 2020-03-27 Nathan Sidwell <nathan@acm.org>
281
282 PR c++/84733
283 * name-lookup.c (do_pushdecl): Look through cleanp levels.
284
285 2020-03-14 Jason Merrill <jason@redhat.com>
286
287 PR c++/92909
288 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk
289 DECL_ORIGINAL_TYPE of a typedef.
290
291 2020-03-14 Jason Merrill <jason@redhat.com>
292
293 PR c++/92068
294 * pt.c (process_partial_specialization): Error rather than crash on
295 extra pack expansion.
296
297 2020-03-14 Jason Merrill <jason@redhat.com>
298
299 PR c++/93248
300 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for
301 substituting DECL_ARGUMENTS.
302
303 2020-03-12 Release Manager
304
305 * GCC 9.3.0 released.
306
307 2020-03-05 Jason Merrill <jason@redhat.com>
308
309 PR c++/88395
310 PR c++/93551
311 * constraint.cc (constraints_satisfied_p): Use push_tinst_level.
312
313 2020-03-05 Martin Sebor <msebor@redhat.com>
314
315 Backport from trunk.
316 2020-02-21 Martin Sebor <msebor@redhat.com>
317
318 PR gcov-profile/93753
319 * class.c (check_flexarrays): Tighten up a test for potential members
320 of anonymous structs or unions.
321
322 2020-03-05 Jason Merrill <jason@redhat.com>
323
324 PR c++/90338
325 * pt.c (invalid_nontype_parm_type_p): Check complain for non-literal
326 and mutable errors.
327
328 2020-03-04 Jason Merrill <jason@redhat.com>
329
330 PR c++/91607
331 * constexpr.c (constexpr_call_hasher::equal): Use
332 same_type_ignoring_top_level_qualifiers_p.
333
334 2020-03-04 Martin Sebor <msebor@redhat.com>
335
336 PR c++/90938
337 * tree.c (type_initializer_zero_p): Fail for structs initialized
338 with non-structs.
339
340 2020-03-04 Marek Polacek <polacek@redhat.com>
341
342 Backported from mainline
343 2020-01-24 Marek Polacek <polacek@redhat.com>
344
345 PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
346 * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.
347
348 2020-03-04 Marek Polacek <polacek@redhat.com>
349
350 Backported from mainline
351 2020-02-26 Marek Polacek <polacek@redhat.com>
352
353 PR c++/93676 - value-init crash in template.
354 * init.c (build_new_1): Don't call build_vec_init in a template.
355
356 2020-03-04 Jason Merrill <jason@redhat.com>
357 Marek Polacek <polacek@redhat.com>
358
359 PR c++/90505 - mismatch in template argument deduction.
360 * pt.c (tsubst): Don't reduce the template level of template
361 parameters when tf_partial.
362
363 2020-03-04 Jason Merrill <jason@redhat.com>
364
365 PR c++/90432
366 * init.c (perform_member_init): Don't do aggregate initialization of
367 empty field.
368 * constexpr.c (cx_check_missing_mem_inits): Don't enforce
369 initialization of empty field.
370
371 2020-03-04 Jason Merrill <jason@redhat.com>
372
373 PR c++/90997
374 * semantics.c (finish_call_expr): Don't call
375 instantiate_non_dependent_expr before warn_for_memset.
376
377 2020-03-02 Jason Merrill <jason@redhat.com>
378
379 PR c++/86917
380 * constexpr.c (cxx_eval_vec_init_1): Handle CONSTRUCTOR.
381
382 2020-03-02 Jason Merrill <jason@redhat.com>
383
384 PR c++/91953
385 * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
386 empty class type.
387 [COMPONENT_REF]: A member function reference doesn't use the object
388 as an rvalue.
389
390 2020-03-02 Jason Merrill <jason@redhat.com>
391
392 PR c++/88256
393 * cp-gimplify.c (predeclare_vla): New.
394 (cp_genericize_r) [NOP_EXPR]: Call it.
395
396 2020-03-02 Jason Merrill <jason@redhat.com>
397
398 PR c++/93442
399 * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt.
400
401 2020-03-02 Jason Merrill <jason@redhat.com>
402
403 PR c++/90732 - ICE with VLA capture and generic lambda.
404 * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs.
405
406 2020-03-02 Jason Merrill <jason@redhat.com>
407
408 PR c++/90333
409 PR c++/89640
410 PR c++/60503
411 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in
412 a trailing return type.
413 (cp_parser_lambda_declarator_opt): Parse C++11 attributes before
414 parens.
415
416 2020-02-26 Marek Polacek <polacek@redhat.com>
417
418 PR c++/92745 - bogus error when initializing array of vectors.
419 * decl.c (reshape_init_r): For a nested compound literal, do
420 call reshape_init_{class,array,vector}.
421
422 2020-02-26 Jason Merrill <jason@redhat.com>
423
424 PR c++/90951
425 * constexpr.c (cxx_eval_array_reference): {}-initialize missing
426 elements instead of value-initializing them.
427
428 2020-02-26 Jason Merrill <jason@redhat.com>
429
430 PR c++/93140
431 * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in
432 handling of TREE_CHAIN for empty pack.
433
434 2020-02-26 Jason Merrill <jason@redhat.com>
435
436 PR c++/92852
437 * constexpr.c (maybe_constant_value): Don't unshare if the cached
438 value is the same as the argument.
439
440 2020-02-14 Jakub Jelinek <jakub@redhat.com>
441
442 PR c++/61414
443 * class.c (enum_min_precision): Change prec type from int to int &.
444
445 2020-02-13 Jakub Jelinek <jakub@redhat.com>
446
447 Backported from mainline
448 2020-02-05 Jakub Jelinek <jakub@redhat.com>
449
450 PR c++/93557
451 * semantics.c (cp_build_vec_convert): Call decay_conversion on arg
452 prior to passing it to c_build_vec_convert.
453
454 2020-01-29 Jakub Jelinek <jakub@redhat.com>
455
456 PR c++/91118
457 * cp-gimplify.c (cxx_omp_predetermined_sharing): Return
458 OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls.
459
460 2020-01-28 Jason Merrill <jason@redhat.com>
461
462 PR c++/90546
463 * call.c (build_user_type_conversion_1): Allow a template conversion
464 returning an rvalue reference to bind directly to an lvalue.
465
466 PR c++/90731
467 * decl.c (grokdeclarator): Propagate eh spec from typedef.
468
469 PR c++/90966
470 * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
471
472 PR c++/93279 - ICE with lambda in member operator.
473 * name-lookup.c (maybe_save_operator_binding): Don't remember
474 class-scope bindings.
475
476 2020-01-27 Nathan Sidwell <nathan@acm.org>
477
478 PR c++/91826
479 * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
480
481 2020-01-24 Jason Merrill <jason@redhat.com>
482
483 PR c++/92852 - ICE with generic lambda and reference var.
484 * constexpr.c (maybe_constant_value): Likewise.
485
486 2020-01-22 Jakub Jelinek <jakub@redhat.com>
487
488 Backported from mainline
489 2020-01-17 Jakub Jelinek <jakub@redhat.com>
490
491 PR c++/93228
492 * parser.c (cp_parser_template_name): Look up deprecated attribute
493 in DECL_TEMPLATE_RESULT or its type's attributes.
494
495 2019-12-26 Jakub Jelinek <jakub@redhat.com>
496
497 PR c++/92438
498 * parser.c (cp_parser_constructor_declarator_p): If open paren
499 is followed by RID_ATTRIBUTE, skip over the attribute tokens and
500 try to parse type specifier.
501
502 2019-12-20 Jakub Jelinek <jakub@redhat.com>
503
504 PR c++/92992
505 * call.c (convert_arg_to_ellipsis): For decltype(nullptr) arguments
506 that have side-effects use cp_build_compound_expr.
507
508 2020-01-21 Jason Merrill <jason@redhat.com>
509
510 PR c++/91476 - anon-namespace reference temp clash between TUs.
511 * call.c (make_temporary_var_for_ref_to_temp): Clear TREE_PUBLIC
512 if DECL is in the anonymous namespace.
513
514 2020-01-17 Jason Merrill <jason@redhat.com>
515
516 PR c++/92531 - ICE with noexcept(lambda).
517 * pt.c (uses_template_parms): Don't try to enumerate all the
518 expression cases.
519
520 2020-01-16 Jason Merrill <jason@redhat.com>
521
522 PR c++/93286 - ICE with __is_constructible and variadic template.
523 * pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
524 (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
525
526 2020-01-02 Jakub Jelinek <jakub@redhat.com>
527
528 PR c/90677
529 * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
530 has not been found, rather than error_mark_node.
531
532 2019-12-20 Jakub Jelinek <jakub@redhat.com>
533
534 Backported from mainline
535 2019-12-06 Jakub Jelinek <jakub@redhat.com>
536
537 PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
538 * cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
539 default arg.
540 * call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
541 down to extend_ref_init_temps. Before pushing cleanup, if COND_GUARD
542 is non-NULL, create a bool temporary if needed, initialize to false
543 and guard the cleanup with the temporary being true.
544 (extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
545 to recursive calls and set_up_extended_ref_temp. Handle COND_EXPR.
546 (extend_ref_init_temps): Add COND_GUARD argument, pass it down to
547 recursive calls and to extend_ref_init_temps_1.
548
549 2019-12-03 Jakub Jelinek <jakub@redhat.com>
550
551 PR c++/92732
552 * typeck2.c (digest_nsdmi_init): For bitfields, use
553 DECL_BIT_FIELD_TYPE instead of TREE_TYPE.
554
555 PR c++/92695
556 * constexpr.c (cxx_bind_parameters_in_call): For virtual calls,
557 adjust the first argument to point to the derived object rather
558 than its base.
559
560 2019-12-02 Jakub Jelinek <jakub@redhat.com>
561
562 PR c++/92695
563 * constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Use
564 STRIP_NOPS before checking for ADDR_EXPR.
565
566 2019-11-29 Jakub Jelinek <jakub@redhat.com>
567
568 PR c++/60228
569 * parser.c (cp_parser_omp_declare_reduction_exprs): If
570 processing_template_decl, wrap the combiner or initializer
571 into EXPR_STMT.
572 * decl.c (start_preparsed_function): Don't start a lambda scope
573 for DECL_OMP_DECLARE_REDUCTION_P functions.
574 (finish_function): Don't finish a lambda scope for
575 DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function
576 them nor cp_genericize them.
577 * mangle.c (decl_mangling_context): Look through
578 DECL_OMP_DECLARE_REDUCTION_P functions.
579 * semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P
580 functions, use tentative linkage, don't keep their bodies with
581 -fkeep-inline-functions and return false at the end.
582
583 2019-11-28 Jakub Jelinek <jakub@redhat.com>
584
585 PR c++/92695
586 * decl2.c (mark_used): Don't call note_vague_linkage_fn for pure
587 virtual functions, even if they are declared inline.
588
589 2019-11-27 Jakub Jelinek <jakub@redhat.com>
590
591 PR c++/92524
592 * tree.c (replace_placeholders_r): Don't walk constructor elts with
593 RANGE_EXPR indexes.
594
595 2019-11-26 Jakub Jelinek <jakub@redhat.com>
596
597 PR c++/92648
598 * parser.c (cp_parser_std_attribute): For unknown attributes,
599 skip balanced token seq instead of trying to parse
600 attribute-argument-clause as expression list.
601
602 PR c++/61414
603 * class.c (enum_to_min_precision): New hash_map.
604 (enum_min_precision): New function.
605 (check_bitfield_decl): Use it.
606
607 2019-11-22 Jakub Jelinek <jakub@redhat.com>
608
609 PR c/90677
610 * cp-objcp-common.c (identifier_global_tag): Define.
611
612 2019-11-21 Jakub Jelinek <jakub@redhat.com>
613 Jason Merrill <jason@redhat.com>
614
615 PR c++/90842
616 * parser.c (cp_parser_decl_specifier_seq): For concept or typedef
617 break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
618 For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
619 if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.
620
621 2019-12-11 Jason Merrill <jason@redhat.com>
622
623 PR c++/57082 - new X{} and private destructor.
624 * init.c (build_new_1): Also pass tf_no_cleanup to
625 build_special_member_call.
626
627 2019-12-11 Jason Merrill <jason@redhat.com>
628
629 PR c++/92859 - ADL and bit-field.
630 * name-lookup.c: Use unlowered_expr_type.
631
632 2019-12-11 Jason Merrill <jason@redhat.com>
633
634 PR c++/92446 - deduction of class NTTP.
635 * pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR.
636
637 2019-11-06 Jason Merrill <jason@redhat.com>
638
639 PR c++/92150 - partial specialization with class NTTP.
640 * pt.c (unify): Handle VIEW_CONVERT_EXPR.
641
642 2019-11-20 Jakub Jelinek <jakub@redhat.com>
643
644 PR c++/90767
645 * call.c (complain_about_no_candidates_for_method_call): If
646 conv->from is not a type, pass to complain_about_bad_argument
647 lvalue_type of conv->from.
648
649 Backported from mainline
650 2019-11-19 Jakub Jelinek <jakub@redhat.com>
651
652 PR c++/92504
653 * semantics.c (handle_omp_for_class_iterator): Don't call
654 cp_fully_fold on cond.
655
656 2019-11-08 Marek Polacek <polacek@redhat.com>
657
658 Backported from mainline
659 2019-10-29 Marek Polacek <polacek@redhat.com>
660
661 PR c++/90998 - ICE with copy elision in init by ctor and -Wconversion.
662 * call.c (joust): Don't attempt to warn if ->second_conv is null.
663
664 2019-11-08 Jakub Jelinek <jakub@redhat.com>
665
666 Backported from mainline
667 2019-11-05 Jakub Jelinek <jakub@redhat.com>
668
669 PR c++/92343
670 * constexpr.c (potential_constant_expression_1): Return true rather
671 than false for PREDICT_EXPR.
672
673 2019-10-31 Jakub Jelinek <jakub@redhat.com>
674
675 PR c++/90947
676 * cp-tree.h (type_initializer_zero_p): Declare.
677 * decl.c (reshape_init_array_1): Formatting fix.
678 * tree.c (type_initializer_zero_p): New function. Moved from
679 ../tree.c, use next_initializable_field, formatting fix. Return
680 false for TYPE_NON_AGGREGATE_CLASS types.
681
682 2019-10-22 Jakub Jelinek <jakub@redhat.com>
683
684 PR tree-optimization/85887
685 * decl.c (expand_static_init): Drop ECF_LEAF from __cxa_guard_acquire
686 and __cxa_guard_release.
687
688 2019-10-21 Jakub Jelinek <jakub@redhat.com>
689
690 PR c++/92015
691 * constexpr.c (cxx_eval_component_reference, cxx_eval_bit_field_ref):
692 Use STRIP_ANY_LOCATION_WRAPPER on CONSTRUCTOR elts.
693
694 2019-10-29 Jakub Jelinek <jakub@redhat.com>
695
696 PR c++/92201
697 * cp-gimplify.c (cp_gimplify_expr): If gimplify_to_rvalue changes the
698 function pointer type, re-add cast to the original one.
699
700 2018-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
701
702 Backport from mainline
703
704 2019-06-01 Ville Voutilainen <ville.voutilainen@gmail.com>
705
706 PR c++/85254
707 * class.c (fixup_type_variants): Handle CLASSTYPE_FINAL.
708
709 2019-10-24 Marek Polacek <polacek@redhat.com>
710
711 * decl.c (reshape_init_r): Add missing space.
712
713 2019-10-22 Marek Polacek <polacek@redhat.com>
714
715 Backported from mainline
716 2019-10-21 Marek Polacek <polacek@redhat.com>
717
718 PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.
719 * typeck.c (maybe_warn_about_returning_address_of_local): Avoid
720 recursing on null initializer and return false instead.
721
722 PR c++/92062 - ODR-use ignored for static member of class template.
723 * pt.c (has_value_dependent_address): Strip location wrappers.
724
725 2019-10-21 Jakub Jelinek <jakub@redhat.com>
726
727 Backported from mainline
728 2019-10-04 Jakub Jelinek <jakub@redhat.com>
729
730 PR c++/91974
731 * cp-gimplify.c (cp_gimplify_expr) <case CALL_EXPR>: For
732 -fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated
733 before any arguments. Additionally, ensure CALL_EXPR_FN that isn't
734 invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary.
735
736 2019-09-27 Jakub Jelinek <jakub@redhat.com>
737
738 PR c++/88203
739 * parser.c (cp_parser_omp_var_list_no_open): Parse predefined
740 variables.
741 * semantics.c (finish_omp_clauses): Allow predefined variables in
742 shared and firstprivate clauses, even when they are predetermined
743 shared.
744 * cp-gimplify.c (cxx_omp_predetermined_sharing_1): Return
745 OMP_CLAUSE_DEFAULT_SHARED for predefined variables.
746
747 2019-08-09 Jakub Jelinek <jakub@redhat.com>
748
749 PR c/91401
750 * parser.c (cp_parser_omp_clause_dist_schedule): Comment out the
751 check_no_duplicate_clause call, instead emit a warning for duplicate
752 dist_schedule clauses.
753
754 2019-10-16 Richard Biener <rguenther@suse.de>
755
756 Backport from mainline
757 2019-10-02 Richard Biener <rguenther@suse.de>
758
759 PR c++/91606
760 * decl.c (build_ptrmemfunc_type): Mark pointer-to-member
761 fat pointer structure members as DECL_NONADDRESSABLE_P.
762
763 2019-10-08 Marek Polacek <polacek@redhat.com>
764
765 Backported from mainline
766 2019-09-15 Marek Polacek <polacek@redhat.com>
767
768 PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.
769 * pt.c (build_non_dependent_expr): Call build_non_dependent_expr for
770 the first operand.
771
772 2019-09-28 Marek Polacek <polacek@redhat.com>
773
774 Backported from mainline
775 2019-09-28 Marek Polacek <polacek@redhat.com>
776
777 PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17.
778 * pt.c (invalid_nontype_parm_type_p): Only emit errors when
779 tf_error.
780
781 2019-09-10 Marek Polacek <polacek@redhat.com>
782
783 Backported from mainline
784 2019-09-10 Marek Polacek <polacek@redhat.com>
785
786 PR c++/91705 - constexpr evaluation rejects ++/-- on floats.
787 * constexpr.c (cxx_eval_increment_expression): Call fold_simple on
788 the offset.
789
790 2019-09-01 Marek Polacek <polacek@redhat.com>
791
792 Backported from mainline
793 2019-09-01 Marek Polacek <polacek@redhat.com>
794
795 PR c++/91129 - wrong error with binary op in template argument.
796 * typeck.c (warn_for_null_address): Use fold_for_warn instead of
797 fold_non_dependent_expr.
798 (cp_build_binary_op): Likewise.
799
800 2019-08-31 Iain Sandoe <iain@sandoe.co.uk>
801
802 Backported from mainline
803 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
804
805 PR pch/61250
806 * parser.c (cp_parser_initial_pragma): Call c_common_no_more_pch ()
807 after determining that the first token is not
808 PRAGMA_GCC_PCH_PREPROCESS.
809
810 2019-08-23 Marek Polacek <polacek@redhat.com>
811
812 Backported from mainline
813 2019-08-23 Marek Polacek <polacek@redhat.com>
814
815 PR c++/91521 - wrong error with operator->.
816 * decl.c (grokdeclarator): Return error_mark_node for an invalid
817 trailing return type.
818
819 2019-08-16 Jason Merrill <jason@redhat.com>
820
821 PR c++/90393 - ICE with throw in ?:
822 * call.c (build_conditional_expr_1): Revert changes from
823 PR c++/64372 and c++/86205.
824
825 2019-08-15 Marek Polacek <polacek@redhat.com>
826
827 Backported from mainline
828 2019-08-07 Marek Polacek <polacek@redhat.com>
829
830 PR c++/81429 - wrong parsing of constructor with C++11 attribute.
831 * parser.c (cp_parser_constructor_declarator_p): Handle the scenario
832 when a parameter declaration begins with [[attribute]].
833
834 2019-08-08 Marek Polacek <polacek@redhat.com>
835
836 PR c++/87519 - bogus warning with -Wsign-conversion.
837 * typeck.c (cp_build_binary_op): Use same_type_p instead of comparing
838 the types directly.
839
840 2019-08-13 Marek Polacek <polacek@redhat.com>
841
842 PR c++/90473 - wrong code with nullptr in default argument.
843 * call.c (null_ptr_cst_p): Update quote from the standard.
844 * decl.c (check_default_argument): Don't return nullptr when the arg
845 has side-effects.
846
847 2019-06-14 Marek Polacek <polacek@redhat.com>
848
849 PR c++/90884 - stray note with -Wctor-dtor-privacy.
850 * class.c (maybe_warn_about_overly_private_class): Guard the call to
851 inform.
852
853 2019-08-14 Martin Sebor <msebor@redhat.com>
854
855 Backported from mainline
856 2019-08-01 Martin Sebor <msebor@redhat.com>
857
858 PR c++/90947
859 * decl.c (reshape_init_array_1): Avoid truncating initializer
860 lists containing string literals.
861
862 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
863
864 PR c++/91436
865 * name-lookup.c (get_std_name_hint): Fix min_dialect field for
866 complex_literals and make_unique entries.
867
868 2019-08-12 Tom Honermann <tom@honermann.net>
869
870 * parser.c (cp_parser_template_declaration_after_parameters): Enable
871 class template argument deduction for non-type template parameters
872 in literal operator templates.
873
874 2019-08-12 Jason Merrill <jason@redhat.com>
875
876 PR c++/91378 - ICE with noexcept and auto return type.
877 * pt.c (maybe_instantiate_noexcept): push_to_top_level.
878
879 PR c++/90538 - multiple expansions of capture packs
880 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): Remove.
881 * lambda.c (add_capture): Copy parameter packs from init.
882 (lambda_capture_field_type): Always use auto for init-capture.
883 * pt.c (uses_parameter_packs): Return tree.
884 (tsubst) [DECLTYPE_TYPE]: Remove init-capture handling.
885 (gen_elem_of_pack_expansion_instantiation): Don't push
886 local_specialization_stack.
887 (prepend_one_capture): New.
888 (tsubst_lambda_expr): Use it. Don't touch local_specializations.
889 (do_auto_deduction): Avoid redundant error.
890
891 2019-08-12 Release Manager
892
893 * GCC 9.2.0 released.
894
895 2019-08-02 Martin Sebor <msebor@redhat.com>
896
897 Backport from mainline
898 2019-06-05 Martin Sebor <msebor@redhat.com>
899
900 PR c/90737
901 * typeck.c (maybe_warn_about_returning_address_of_local): Only
902 consider functions returning pointers as candidates for
903 -Wreturn-local-addr.
904
905 2019-08-02 Marek Polacek <polacek@redhat.com>
906
907 Backported from mainline
908 2019-08-02 Marek Polacek <polacek@redhat.com>
909
910 PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.
911 * pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__
912 inside a template function value-dependent.
913
914 2019-07-19 Jason Merrill <jason@redhat.com>
915
916 PR c++/90098 - partial specialization and class non-type parms.
917 PR c++/90099
918 PR c++/90101
919 * call.c (build_converted_constant_expr_internal): Don't copy.
920 * pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
921 around class non-type parameter.
922 (unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.
923 (invalid_nontype_parm_type_p): Check for dependent class type.
924
925 PR c++/85552 - wrong instantiation of dtor for DMI.
926 * typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.
927
928 2019-07-19 Nina Dinka Ranns <dinka.ranns@gmail.com>
929
930 PR c++/63149 - Wrong auto deduction from braced-init-list.
931 * pt.c (listify_autos): use non cv qualified auto_node in
932 std::initializer_list<auto>.
933
934 2019-07-01 Marek Polacek <polacek@redhat.com>
935
936 Backported from mainline
937 2019-06-21 Marek Polacek <polacek@redhat.com>
938
939 PR c++/60223 - ICE with T{} in non-deduced context.
940 * pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.
941
942 PR c++/90490 - fix decltype issues in noexcept-specifier.
943 * except.c (build_noexcept_spec): Call
944 instantiate_non_dependent_expr_sfinae before
945 build_converted_constant_expr instead of calling
946 instantiate_non_dependent_expr after it. Add
947 processing_template_decl_sentinel.
948
949 2019-06-29 Jakub Jelinek <jakub@redhat.com>
950
951 Backported from mainline
952 2019-06-21 Jakub Jelinek <jakub@redhat.com>
953
954 PR c++/90950
955 * semantics.c (finish_omp_clauses): Don't reject references to
956 incomplete types if processing_template_decl.
957
958 2019-06-12 Marek Polacek <polacek@redhat.com>
959
960 PR c++/90825 - endless recursion when evaluating sizeof.
961 PR c++/90832 - endless recursion when evaluating sizeof.
962 * constexpr.c (cxx_eval_constant_expression): Don't recurse on the
963 result of fold_sizeof_expr if is returns a SIZEOF_EXPR.
964 * typeck.c (cxx_sizeof_expr): Only return a SIZEOF_EXPR if the operand
965 is instantiation-dependent.
966
967 PR c++/90736 - bogus error with alignof.
968 * constexpr.c (adjust_temp_type): Use cv_unqualified type.
969
970 2019-06-11 Jakub Jelinek <jakub@redhat.com>
971
972 PR c++/90810
973 * init.c (constant_value_1): Handle VECTOR_CST DECL_INITIAL for
974 !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P decls like CONSTRUCTOR.
975
976 2019-06-05 Jakub Jelinek <jakub@redhat.com>
977
978 Backported from mainline
979 2019-05-29 Jakub Jelinek <jakub@redhat.com>
980
981 PR c++/90598
982 * tree.c (lvalue_kind): Return clk_none for expressions with
983 with VOID_TYPE_P.
984
985 2019-05-28 Marek Polacek <polacek@redhat.com>
986
987 Backported from mainline
988 2019-05-28 Marek Polacek <polacek@redhat.com>
989
990 PR c++/90548 - ICE with generic lambda and empty pack.
991 * pt.c (tsubst_copy_and_build): Handle pack expansion properly.
992
993 2019-05-25 Marek Polacek <polacek@redhat.com>
994
995 Backported from mainline
996 2019-05-25 Marek Polacek <polacek@redhat.com>
997
998 PR c++/90572 - wrong disambiguation in friend declaration.
999 * parser.c (cp_parser_constructor_declarator_p): Don't allow missing
1000 typename for friend declarations.
1001
1002 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1003
1004 Backported from mainline
1005 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1006
1007 PR c++/90532 Ensure __is_constructible(T[]) is false
1008 * method.c (is_xible_helper): Return error_mark_node for construction
1009 of an array of unknown bound.
1010
1011 2019-05-17 Jakub Jelinek <jakub@redhat.com>
1012
1013 Backported from mainline
1014 2019-05-15 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR debug/90197
1017 * cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
1018 before the condition (or if missing or constant non-zero at the end
1019 of the loop. Emit a DEBUG_BEGIN_STMT before the increment expression
1020 if any. Don't call protected_set_expr_location on incr if it already
1021 has a location.
1022
1023 2019-05-10 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR pch/90326
1026 * config-lang.in (gtfiles): Remove c-family/c-lex.c, add
1027 c-family/c-cppbuiltin.c.
1028
1029 2019-05-10 Marek Polacek <polacek@redhat.com>
1030
1031 PR c++/78010 - bogus -Wsuggest-override warning on final function.
1032 * class.c (check_for_override): Don't warn for final functions.
1033
1034 2019-05-06 Marek Polacek <polacek@redhat.com>
1035
1036 PR c++/90265 - ICE with generic lambda.
1037 * pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
1038 element in the vector.
1039
1040 2019-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1041
1042 PR c++/90173
1043 * decl.c (grokdeclarator): Set type to error_mark_node
1044 upon error about template placeholder type non followed
1045 by a simple declarator-id.
1046
1047 2019-05-04 Michael Meissner <meissner@linux.ibm.com>
1048
1049 * ChangeLog.ibm: Delete unintentional commit on the wrong branch.
1050
1051 2019-05-03 Release Manager
1052
1053 * GCC 9.1.0 released.
1054
1055 2019-04-24 Jason Merrill <jason@redhat.com>
1056
1057 PR c++/90227 - error with template parameter packs.
1058 * pt.c (coerce_template_parms): Do add empty pack when
1059 require_all_args.
1060
1061 2019-04-24 Richard Biener <rguenther@suse.de>
1062
1063 * call.c (null_ptr_cst_p): Order checks according to expensiveness.
1064 (conversion_null_warnings): Likewise.
1065 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Return
1066 early if type1 == type2.
1067
1068 2019-04-22 Jason Merrill <jason@redhat.com>
1069
1070 PR c++/87366 - wrong error with alias template.
1071 * typeck.c (structural_comptypes): When comparing_specializations,
1072 aliases are unequal.
1073 (comptypes): When comparing_specializations, do structural
1074 comparison.
1075
1076 2019-04-19 Jason Merrill <jason@redhat.com>
1077
1078 PR c++/90190 - CTAD with list-constructor.
1079 * pt.c (do_class_deduction): Don't try the single element deduction
1080 if the single element is also a braced list.
1081
1082 PR c++/90171 - ICE with destroying delete with size_t parm.
1083 * call.c (sized_deallocation_fn_p): New. Use it instead of
1084 second_parm_is_size_t in most cases.
1085 (second_parm_is_size_t): Don't check for aligned.
1086
1087 2019-04-19 Paolo Carlini <paolo.carlini@oracle.com>
1088
1089 PR c++/89900
1090 * pt.c (fn_type_unification): When handling null explicit
1091 arguments do not special case non-parameter packs.
1092
1093 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR c++/90138
1096 * pt.c (process_template_parm): Set decl to pushdecl result. If
1097 !is_non_type, also set parm to that.
1098
1099 PR c/89888
1100 * decl.c (struct cp_switch): Remove outside_range_p member.
1101 (push_switch): Don't clear it.
1102 (pop_switch): Adjust c_do_switch_warnings caller.
1103 (finish_case_label): Adjust c_add_case_label caller.
1104
1105 PR c++/90108
1106 * decl.c (duplicate_decls): If remove is main variant and
1107 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1108 variant that has newdecl as TYPE_NAME if any.
1109
1110 2019-04-18 Jason Merrill <jason@redhat.com>
1111
1112 PR c++/87554 - ICE with extern template and reference member.
1113 * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.
1114
1115 2019-04-17 Jason Merrill <jason@redhat.com>
1116
1117 PR c++/90047 - ICE with enable_if alias template.
1118 * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the
1119 hash table when we're in SFINAE context.
1120
1121 2019-04-17 Marek Polacek <polacek@redhat.com>
1122
1123 PR c++/90124 - bogus error with incomplete type in decltype.
1124 * typeck.c (build_class_member_access_expr): Check
1125 cp_unevaluated_operand.
1126
1127 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c/89933
1130 * decl.c (duplicate_decls): When newdecl's type is its main variant,
1131 don't try to remove it from the variant list, but instead assert
1132 it has no variants.
1133
1134 2019-04-12 Martin Sebor <msebor@redhat.com>
1135
1136 PR c/88383
1137 PR c/89288
1138 * parser.c (cp_parser_has_attribute_expression): Handle assignment
1139 expressions.
1140
1141 2019-04-12 Jason Merrill <jason@redhat.com>
1142
1143 * call.c (null_member_pointer_value_p): Handle an empty CONSTRUCTOR
1144 of PMF type.
1145
1146 2019-04-12 Marek Polacek <polacek@redhat.com>
1147
1148 * except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
1149 instead of perform_implicit_conversion_flags.
1150
1151 PR c++/87603 - constexpr functions are no longer noexcept.
1152 * constexpr.c (is_sub_constant_expr): Remove unused function.
1153 * cp-tree.h (is_sub_constant_expr): Remove declaration.
1154 * except.c (check_noexcept_r): Don't consider a call to a constexpr
1155 function noexcept.
1156
1157 2019-04-11 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR translation/90035
1160 * parser.h (struct cp_parser): Add
1161 type_definition_forbidden_message_arg member.
1162 * parser.c (cp_debug_parser): Print it.
1163 (cp_parser_check_type_definition): Pass
1164 parser->type_definition_forbidden_message_arg as second argument to
1165 error.
1166 (cp_parser_has_attribute_expression, cp_parser_sizeof_operand): Set
1167 parser->type_definition_forbidden_message_arg and use G_() with
1168 %qs for parser->type_definition_forbidden_message instead of
1169 building untranslatable message using concat.
1170
1171 2019-04-09 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR translation/90011
1174 * typeck2.c (check_narrowing): Remove trailing space from diagnostics.
1175
1176 2019-04-08 Marek Polacek <polacek@redhat.com>
1177
1178 * typeck2.c (digest_init_r): Don't condition the object slicing warning
1179 on flag_checking.
1180
1181 2019-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1182
1183 PR c++/89914
1184 * semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P
1185 when maybe_instantiate_noexcept fails.
1186 (classtype_has_nothrow_assign_or_copy_p): Likewise.
1187 * method.c (implicitly_declare_fn): Avoid passing error_mark_node
1188 to build_exception_variant.
1189
1190 2019-04-05 Marek Polacek <polacek@redhat.com>
1191
1192 PR c++/87145 - bogus error converting class type in template arg list.
1193 * pt.c (convert_nontype_argument): Don't call
1194 build_converted_constant_expr if it could involve calling a conversion
1195 function with a instantiation-dependent constructor as its argument.
1196
1197 2019-04-05 Martin Sebor <msebor@redhat.com>
1198
1199 PR bootstrap/89980
1200 * decl.c (reshape_init_array_1): Avoid treating empty strings
1201 as zeros in array initializers.
1202 Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT().
1203
1204 2019-04-04 Jason Merrill <jason@redhat.com>
1205
1206 PR c++/89948 - ICE with break in statement-expr.
1207 * constexpr.c (cxx_eval_statement_list): Jumping out of a
1208 statement-expr is non-constant.
1209
1210 2019-04-04 Jason Merrill <jason@redhat.com>
1211
1212 PR c++/89966 - error with non-type auto tparm.
1213 * pt.c (do_auto_deduction): Clear tf_partial.
1214
1215 2019-04-04 Jason Merrill <jason@redhat.com>
1216
1217 PR c++/86986 - ICE with TTP with parameter pack.
1218 * pt.c (coerce_template_parameter_pack): Only look at the type of a
1219 non-type parameter pack.
1220 (fixed_parameter_pack_p_1): Don't recurse into the type of a
1221 non-type parameter pack.
1222 (coerce_template_template_parms): Call add_outermost_template_args.
1223
1224 2019-04-04 Martin Sebor <msebor@redhat.com>
1225
1226 PR c++/89974
1227 PR c++/89878
1228 PR c++/89833
1229 PR c++/47488
1230 * decl.c (reshape_init_array_1): Strip trailing zero-initializers
1231 from arrays of trivial type and known size.
1232 * mangle.c (write_expression): Convert braced initializer lists
1233 to STRING_CSTs.
1234 (write_expression): Trim trailing zero-initializers from arrays
1235 of trivial type.
1236 (write_template_arg_literal): Mangle strings the same as braced
1237 initializer lists.
1238
1239 2019-04-03 Jason Merrill <jason@redhat.com>
1240
1241 PR c++/81866 - ICE with member template and default targ.
1242 * pt.c (tsubst_template_decl): Handle getting a type from
1243 retrieve_specialization.
1244
1245 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1246 * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare.
1247
1248 PR c++/89331 - ICE with offsetof in incomplete class.
1249 * semantics.c (finish_offsetof): Handle error_mark_node.
1250 * typeck.c (build_class_member_access_expr): Call
1251 complete_type_or_maybe_complain before converting to base.
1252
1253 PR c++/89917 - ICE with lambda in variadic mem-init.
1254 * pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
1255
1256 2019-04-01 Jason Merrill <jason@redhat.com>
1257
1258 PR c++/86946 - ICE with function call in template argument.
1259 DR 1321
1260 * pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use
1261 dependent_name.
1262
1263 2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1264
1265 PR c++/62207
1266 * pt.c (tsubst_copy): Deal with lookup_name not returing a variable.
1267
1268 2019-03-31 Marek Polacek <polacek@redhat.com>
1269
1270 PR c++/89852 - ICE with C++11 functional cast with { }.
1271 * constexpr.c (fold_non_dependent_expr_template): New static function
1272 broken out of...
1273 (fold_non_dependent_expr): ...here.
1274 (fold_non_dependent_init): New function.
1275 * cp-tree.h (fold_non_dependent_init): Declare.
1276 * typeck2.c (massage_init_elt): Call fold_non_dependent_init instead
1277 of fold_non_dependent_expr. Don't call maybe_constant_init.
1278
1279 2019-03-30 Jason Merrill <jason@redhat.com>
1280
1281 PR c++/89744 - ICE with specialization of member class template.
1282 * pt.c (lookup_template_class_1): If the partial instantiation is
1283 explicitly specialized, adjust.
1284 (maybe_process_partial_specialization): Also adjust
1285 CLASSTYPE_TI_ARGS.
1286
1287 2019-03-29 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR sanitizer/89869
1290 * typeck.c: Include gimplify.h.
1291 (cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
1292 for second time. Formatting fixes.
1293
1294 2019-03-29 Marek Polacek <polacek@redhat.com>
1295
1296 PR c++/89876 - ICE with deprecated conversion.
1297 * call.c (convert_like_real): Only give warnings with tf_warning.
1298
1299 2019-03-28 Marek Polacek <polacek@redhat.com>
1300
1301 PR c++/89612 - ICE with member friend template with noexcept.
1302 * pt.c (maybe_instantiate_noexcept): For function templates, use their
1303 template result (function decl). Don't set up local specializations.
1304 Temporarily turn on processing_template_decl. Update the template type
1305 too.
1306
1307 PR c++/89836 - bool constant expression and explicit conversions.
1308 * call.c (build_converted_constant_expr_internal): New function,
1309 renamed from...
1310 (build_converted_constant_expr): ...this. New.
1311 (build_converted_constant_bool_expr): New.
1312 * cp-tree.h (build_converted_constant_bool_expr): Declare.
1313 * decl.c (build_explicit_specifier): Call
1314 build_converted_constant_bool_expr.
1315
1316 2019-03-28 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c++/89785
1319 * constexpr.c (struct check_for_return_continue_data): New type.
1320 (check_for_return_continue): New function.
1321 (potential_constant_expression_1) <case SWITCH_STMT>: Walk
1322 SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
1323 in loop bodies and set *jump_target to that if found.
1324
1325 2019-03-27 Jason Merrill <jason@redhat.com>
1326
1327 PR c++/89831 - error with qualified-id in const member function.
1328 * semantics.c (finish_non_static_data_member): Use object cv-quals
1329 in scoped case, too.
1330
1331 PR c++/89421 - ICE with lambda in template parameter list.
1332 * parser.c (cp_parser_lambda_expression): Also reject a lambda in a
1333 template parameter list before C++20.
1334 * pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
1335 * semantics.c (begin_class_definition): Restore error about defining
1336 non-lambda class in template parm list.
1337
1338 2019-03-26 Jason Merrill <jason@redhat.com>
1339
1340 PR c++/86932 - missed SFINAE with empty pack.
1341 * pt.c (coerce_template_parms): Don't add an empty pack if
1342 tf_partial.
1343 (fn_type_unification): Pass tf_partial to coerce_template_parms.
1344
1345 PR c++/86429 - constexpr variable in lambda.
1346 PR c++/82643
1347 PR c++/87327
1348 * constexpr.c (cxx_eval_constant_expression): In a lambda function,
1349 try evaluating the captured variable directly.
1350
1351 2019-03-26 Jakub Jelinek <jakub@redhat.com>
1352
1353 PR c++/89796
1354 * semantics.c (finish_omp_atomic): Add warning_sentinel for
1355 -Wunused-value around finish_expr_stmt call.
1356
1357 2019-03-25 Paolo Carlini <paolo.carlini@oracle.com>
1358
1359 PR c++/84661
1360 PR c++/85013
1361 * parser.c (cp_parser_binary_expression): Don't call cp_fully_fold
1362 to undo the disabling of warnings.
1363
1364 2019-03-25 Jason Merrill <jason@redhat.com>
1365
1366 PR c++/87748 - substitution failure error with decltype.
1367 * pt.c (most_specialized_partial_spec): Clear
1368 processing_template_decl.
1369
1370 2019-03-25 Marek Polacek <polacek@redhat.com>
1371
1372 PR c++/89214 - ICE when initializing aggregates with bases.
1373 * typeck2.c (digest_init_r): Warn about object slicing instead of
1374 crashing.
1375
1376 PR c++/89705 - ICE with reference binding with conversion function.
1377 * call.c (reference_binding): If the result of the conversion function
1378 is a prvalue of non-class type, use the cv-unqualified type.
1379
1380 2019-03-25 Nathan Sidwell <nathan@acm.org>
1381
1382 * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group.
1383
1384 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1385
1386 PR c++/60702
1387 * cp-tree.h (get_tls_wrapper_fn): Remove declaration.
1388 (maybe_get_tls_wrapper_call): Declare.
1389 * decl2.c (get_tls_wrapper_fn): Make static.
1390 (maybe_get_tls_wrapper_call): New function.
1391 * typeck.c (build_class_member_access_expr): Handle accesses to TLS
1392 variables.
1393 * semantics.c (finish_qualified_id_expr): Likewise.
1394 (finish_id_expression_1): Use maybe_get_tls_wrapper_call.
1395 * pt.c (tsubst_copy_and_build): Likewise.
1396
1397 PR c++/87481
1398 * constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
1399 (cxx_eval_constant_expression): When not skipping, not constant class
1400 or location wrapper, increment *ctx->constexpr_ops_count and if it is
1401 above constexpr_loop_nest_limit, diagnose failure.
1402 (cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
1403 initialize ctx.constexpr_ops_count to its address.
1404 (is_sub_constant_expr): Likewise.
1405
1406 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1407
1408 PR c++/71446
1409 * call.c (filed_in_pset): Change pset from hash_set<tree> * to
1410 hash_set<tree, true> &, adjust uses accordingly.
1411 (build_aggr_conv): Change pset from hash_set<tree> *
1412 to hash_set<tree, true>. Replace goto fail; with return NULL;,
1413 adjust pset uses.
1414
1415 PR c++/89767
1416 * parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
1417 variables, check for duplicates in this function.
1418 * lambda.c (add_capture): Don't check for duplicates nor use
1419 IDENTIFIER_MARKED.
1420 (register_capture_members): Don't clear IDENTIFIER_MARKED here.
1421
1422 2019-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1423
1424 PR c++/89571
1425 * method.c (after_nsdmi_defaulted_late_checks): Avoid passing
1426 error_mark_node to comp_except_specs.
1427
1428 2019-03-20 Jason Merrill <jason@redhat.com>
1429
1430 PR c++/87480 - decltype of member access in default template arg
1431 * pt.c (type_unification_real): Accept a dependent result in
1432 template context.
1433
1434 2019-03-19 Martin Sebor <msebor@redhat.com>
1435
1436 PR tree-optimization/89688
1437 * typeck2.c (store_init_value): Call braced_lists_to_string for more
1438 kinds of initializers.
1439
1440 2019-03-18 Jason Merrill <jason@redhat.com>
1441
1442 PR c++/89630 - ICE with dependent using-decl as template arg.
1443 * tree.c (cp_tree_equal): Always return false for USING_DECL.
1444
1445 PR c++/89761 - ICE with sizeof... in pack expansion.
1446 * pt.c (argument_pack_element_is_expansion_p): Handle
1447 ARGUMENT_PACK_SELECT.
1448
1449 PR c++/89640 - GNU attributes on lambda.
1450 * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes.
1451
1452 PR c++/89682 - wrong access error in default argument.
1453 * pt.c (tsubst_default_argument): Don't defer access checks.
1454
1455 2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1456
1457 PR c++/85014
1458 * semantics.c (finish_non_static_data_member): Check return value
1459 of context_for_name_lookup and immediately return error_mark_node
1460 if isn't a type.
1461
1462 2019-03-17 Jason Merrill <jason@redhat.com>
1463
1464 PR c++/89571 - ICE with ill-formed noexcept on constructor.
1465 * pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
1466 (regenerate_decl_from_template): Use it for noexcept-specs.
1467
1468 2019-03-14 Jason Merrill <jason@redhat.com>
1469
1470 * parser.c (cp_parser_decl_specifier_seq): Support C++20
1471 concept-definition syntax without 'bool'.
1472
1473 2019-03-14 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c++/89512
1476 * semantics.c (finish_qualified_id_expr): Reject variable templates.
1477
1478 PR c++/89652
1479 * constexpr.c (struct constexpr_ctx): Change save_exprs type from
1480 hash_set<tree> to vec<tree>.
1481 (cxx_eval_call_expression): Adjust for save_exprs being a vec instead
1482 of hash_set.
1483 (cxx_eval_loop_expr): Likewise. Truncate the vector after each
1484 removal of SAVE_EXPRs from values.
1485 (cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
1486 method on save_exprs instead of add.
1487
1488 2019-03-13 Jason Merrill <jason@redhat.com>
1489
1490 PR c++/86521 - C++17 copy elision in initialization by constructor.
1491 * call.c (joust_maybe_elide_copy): New.
1492 (joust): Call it.
1493
1494 2019-03-13 Marek Polacek <polacek@redhat.com>
1495
1496 PR c++/88979 - further P0634 fix for constructors.
1497 * parser.c (cp_parser_decl_specifier_seq): Pass flags to
1498 cp_parser_constructor_declarator_p.
1499 (cp_parser_direct_declarator): Allow missing typename for constructor
1500 parameters.
1501 (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to
1502 cp_parser_type_specifier.
1503
1504 PR c++/89686 - mixing init-capture and simple-capture in lambda.
1505 * parser.c (cp_parser_lambda_introducer): Give error when combining
1506 init-capture and simple-capture.
1507
1508 PR c++/89660 - bogus error with -Wredundant-move.
1509 * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
1510 as the std::move's argument. Don't call convert_for_initialization
1511 when warn_redundant_move isn't on.
1512
1513 2019-03-11 Jason Merrill <jason@redhat.com>
1514
1515 PR c++/86521 - wrong overload resolution with ref-qualifiers.
1516 * call.c (build_user_type_conversion_1): Don't use a conversion to a
1517 reference of the wrong rvalueness for direct binding.
1518
1519 2019-03-11 Martin Liska <mliska@suse.cz>
1520
1521 * cvt.c (build_expr_type_conversion): Wrap apostrophes
1522 in gcc internal format with %'.
1523 * decl.c (check_no_redeclaration_friend_default_args): Likewise.
1524 (grokfndecl): Likewise.
1525 * name-lookup.c (do_pushtag): Likewise.
1526 * pt.c (unify_parameter_deduction_failure): Likewise.
1527 (unify_template_deduction_failure): Likewise.
1528
1529 2019-03-11 Martin Liska <mliska@suse.cz>
1530
1531 * call.c (convert_arg_to_ellipsis): Wrap an option name
1532 in a string format message and fix GNU coding style.
1533 (build_over_call): Likewise.
1534 * class.c (check_field_decl): Likewise.
1535 (layout_nonempty_base_or_field): Likewise.
1536 * constexpr.c (cxx_eval_loop_expr): Likewise.
1537 * cvt.c (type_promotes_to): Likewise.
1538 * decl.c (cxx_init_decl_processing): Likewise.
1539 (mark_inline_variable): Likewise.
1540 (grokdeclarator): Likewise.
1541 * decl2.c (record_mangling): Likewise.
1542 * error.c (maybe_warn_cpp0x): Likewise.
1543 * except.c (doing_eh): Likewise.
1544 * mangle.c (maybe_check_abi_tags): Likewise.
1545 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1546 (cp_parser_userdef_numeric_literal): Likewise.
1547 (cp_parser_primary_expression): Likewise.
1548 (cp_parser_unqualified_id): Likewise.
1549 (cp_parser_pseudo_destructor_name): Likewise.
1550 (cp_parser_builtin_offsetof): Likewise.
1551 (cp_parser_lambda_expression): Likewise.
1552 (cp_parser_lambda_introducer): Likewise.
1553 (cp_parser_lambda_declarator_opt): Likewise.
1554 (cp_parser_selection_statement): Likewise.
1555 (cp_parser_init_statement): Likewise.
1556 (cp_parser_decomposition_declaration): Likewise.
1557 (cp_parser_function_specifier_opt): Likewise.
1558 (cp_parser_static_assert): Likewise.
1559 (cp_parser_simple_type_specifier): Likewise.
1560 (cp_parser_namespace_definition): Likewise.
1561 (cp_parser_using_declaration): Likewise.
1562 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1563 (cp_parser_initializer_list): Likewise.
1564 (cp_parser_type_parameter_key): Likewise.
1565 (cp_parser_member_declaration): Likewise.
1566 (cp_parser_try_block): Likewise.
1567 (cp_parser_std_attribute_spec): Likewise.
1568 (cp_parser_requires_clause_opt): Likewise.
1569 * pt.c (check_template_variable): Likewise.
1570 (check_default_tmpl_args): Likewise.
1571 (push_tinst_level_loc): Likewise.
1572 (instantiate_pending_templates): Likewise.
1573 (invalid_nontype_parm_type_p): Likewise.
1574 * repo.c (get_base_filename): Likewise.
1575 * rtti.c (typeid_ok_p): Likewise.
1576 (build_dynamic_cast_1): Likewise.
1577 * tree.c (maybe_warn_parm_abi): Likewise.
1578
1579 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1580
1581 PR other/80058
1582 * parser.c (cp_parser_template_declaration_after_parameters): Avoid
1583 one space before " at the end of line and another after " on another
1584 line in a string literal.
1585
1586 PR tree-optimization/89550
1587 * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if
1588 warning_at returned true.
1589 * decl2.c (c_parse_final_cleanups): Likewise.
1590 * typeck.c (convert_for_assignment): Likewise.
1591 * decl.c (finish_function): Likewise.
1592
1593 PR c++/89585
1594 * parser.c (cp_parser_asm_definition): Just warn instead of error
1595 on volatile qualifier outside of function body.
1596
1597 PR c++/89599
1598 * constexpr.c (potential_constant_expression_1): Reject
1599 REINTERPRET_CAST_P NOP_EXPRs.
1600
1601 PR c++/89622
1602 * call.c (joust): Call print_z_candidate only if pedwarn returned
1603 true.
1604
1605 2019-03-07 Jason Merrill <jason@redhat.com>
1606
1607 PR c++/88123 - lambda and using-directive.
1608 * name-lookup.c (op_unqualified_lookup)
1609 (maybe_save_operator_binding, discard_operator_bindings)
1610 (push_operator_bindings): New.
1611 * typeck.c (build_x_binary_op, build_x_unary_op): Call
1612 maybe_save_operator_binding.
1613 * decl.c (start_preparsed_function): Call push_operator_bindings.
1614 * tree.c (cp_free_lang_data): Call discard_operator_bindings.
1615
1616 PR c++/88820 - ICE with CTAD and member template used in DMI.
1617 * pt.c (do_class_deduction): Handle parm used as its own arg.
1618
1619 2019-03-07 Jakub Jelinek <jakub@redhat.com>
1620
1621 PR c++/89585
1622 * parser.c (cp_parser_asm_definition): Parse asm qualifiers even
1623 at toplevel, but diagnose them.
1624
1625 2019-03-06 Jason Merrill <jason@redhat.com>
1626
1627 PR c++/89381 - implicit copy and using-declaration.
1628 * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider
1629 op= brought in by a using-declaration.
1630
1631 2019-03-06 Jakub Jelinek <jakub@redhat.com>
1632
1633 PR c++/87148
1634 * init.c (build_value_init_noctor): Ignore flexible array members.
1635
1636 2019-03-06 Jason Merrill <jason@redhat.com>
1637
1638 PR c++/89576 - if constexpr of lambda capture.
1639 * semantics.c (maybe_convert_cond): Do convert a non-dependent
1640 condition in a template.
1641 * typeck.c (condition_conversion): Handle being called in a
1642 template.
1643
1644 2019-03-06 Marek Polacek <polacek@redhat.com>
1645
1646 PR c++/87378 - bogus -Wredundant-move warning.
1647 * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
1648 overload resolution would actually succeed.
1649
1650 2019-03-05 Jason Merrill <jason@redhat.com>
1651
1652 * class.c (is_really_empty_class): Add ignore_vptr parm.
1653 (trivial_default_constructor_is_constexpr): Pass it.
1654 * call.c (build_over_call): Pass it.
1655 * constexpr.c (cxx_eval_constant_expression): Pass it instead of
1656 checking TYPE_POLYMORPHIC_P.
1657 (cxx_eval_component_reference, potential_constant_expression_1):
1658 Pass it.
1659 * cp-gimplify.c (simple_empty_class_p): Pass it.
1660 * init.c (expand_aggr_init_1): Pass it.
1661
1662 2019-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1663
1664 PR c++/84605
1665 * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too.
1666
1667 2019-03-04 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR c++/71446
1670 * call.c (field_in_pset): New function.
1671 (build_aggr_conv): Handle CONSTRUCTOR_IS_DESIGNATED_INIT correctly.
1672
1673 2019-03-02 Jakub Jelinek <jakub@redhat.com>
1674
1675 PR c++/71446
1676 * cp-tree.h (CONSTRUCTOR_IS_DESIGNATED_INIT): Define.
1677 * parser.c (cp_parser_braced_list): Adjust cp_parser_initializer_list
1678 caller, set CONSTRUCTOR_IS_DESIGNATED_INIT.
1679 (cp_parser_initializer_list): Add designated parameter, set *designated
1680 to a bool whether any designators were parsed.
1681 * decl.c (reshape_init): Copy over CONSTRUCTOR_IS_DESIGNATED_INIT if
1682 needed.
1683 * pt.c (tsubst_copy_and_build): Likewise.
1684 * call.c (implicit_conversion): If CONSTRUCTOR_IS_DESIGNATED_INIT,
1685 don't call build_list_conv, nor build_complex_conv, nor attempt to
1686 convert a single element initializer to scalar.
1687
1688 2019-03-01 Marek Polacek <polacek@redhat.com>
1689
1690 PR c++/89537 - missing location for error with non-static member fn.
1691 * call.c (resolve_args): Use EXPR_LOCATION.
1692 * typeck.c (build_class_member_access_expr): Use input_location.
1693
1694 PR c++/89532 - ICE with incomplete type in decltype.
1695 * semantics.c (finish_compound_literal): Return error_mark_node
1696 if digest_init_flags returns error_mark_node.
1697
1698 2019-03-01 Jakub Jelinek <jakub@redhat.com>
1699
1700 Implement P1002R1, Try-catch blocks in constexpr functions
1701 PR c++/89513
1702 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
1703 Diagnose constexpr ctor or function with function-try-block with
1704 pedwarn for c++17 and earlier. Formatting fix.
1705 (cp_parser_try_block): Use pedwarn instead of error and only for
1706 c++17 and earlier when try block appears in constexpr function.
1707 * constexpr.c (build_constexpr_constructor_member_initializers):
1708 Handle TRY_BLOCK here instead of erroring on it.
1709
1710 2019-02-28 Jason Merrill <jason@redhat.com>
1711
1712 PR c++/88183 - ICE with .* fold-expression.
1713 * pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
1714
1715 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1716 * class.c, lambda.c, pt.c: Revert earlier change.
1717 * lambda.c (add_capture): Don't special-case capture of dependent
1718 VLA.
1719
1720 * name-lookup.c (print_binding_level): Print this_entity.
1721
1722 2019-02-27 Marek Polacek <polacek@redhat.com>
1723
1724 PR c++/88857 - ICE with value-initialization of argument in template.
1725 * call.c (convert_like_real): Don't call build_value_init in template.
1726
1727 2019-02-27 Jason Merrill <jason@redhat.com>
1728
1729 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1730 * semantics.c (process_outer_var_ref): Do capture dependent vars.
1731 * class.c (finish_struct): Only add TAG_DEFN if T is in
1732 current_function_decl.
1733 * lambda.c (vla_capture_type): Force the capture type out into the
1734 lambda's enclosing function.
1735 (add_capture): Pass in the lambda.
1736 * pt.c (tsubst_lambda_expr): complete_type a VLA capture type.
1737
1738 2019-02-27 Marek Polacek <polacek@redhat.com>
1739
1740 PR c++/89511 - ICE with using-declaration and unscoped enumerator.
1741 * parser.c (cp_parser_using_declaration): For an unscoped enum
1742 only use its context if it's not a function declaration.
1743
1744 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1745
1746 PR c++/89488
1747 * method.c (process_subob_fn): When maybe_instantiate_noexcept
1748 returns false don't call merge_exception_specifiers.
1749
1750 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1751
1752 PR c++/88987
1753 * parser.c (cp_parser_noexcept_specification_opt): Return NULL_TREE
1754 for a non-constant parsed expression.
1755
1756 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1757
1758 PR c++/89481
1759 * constexpr.c (cxx_eval_store_expression): When changing active union
1760 member, set no_zero_init.
1761
1762 2019-02-23 Marek Polacek <polacek@redhat.com>
1763
1764 PR c++/88294 - ICE with non-constant noexcept-specifier.
1765 * pt.c (maybe_instantiate_noexcept): Set up the list of local
1766 specializations. Set current_class_{ptr,ref}.
1767
1768 2019-02-22 David Malcolm <dmalcolm@redhat.com>
1769
1770 PR c++/89390
1771 * parser.c (cp_parser_unqualified_id): Capture and use locations
1772 for destructors.
1773
1774 2019-02-22 Marek Polacek <polacek@redhat.com>
1775
1776 PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
1777 * decl.c (build_explicit_specifier): Don't check
1778 processing_template_decl. Call instantiation_dependent_expression_p
1779 instead of value_dependent_expression_p. Call
1780 instantiate_non_dependent_expr_sfinae before
1781 build_converted_constant_expr instead of calling
1782 instantiate_non_dependent_expr after it. Add
1783 processing_template_decl_sentinel.
1784
1785 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1786
1787 * parser.c (cp_parser_oacc_simple_clause): Remove parser formal
1788 parameter, move loc formal parameter to the front. Adjust all
1789 users.
1790 (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust
1791 all users.
1792
1793 2019-02-21 Jason Merrill <jason@redhat.com>
1794
1795 PR c++/87685 - generic lambda 'this' capture error.
1796 * lambda.c (lambda_expr_this_capture): Change add_capture_p to int.
1797 (maybe_generic_this_capture): Pass -1.
1798
1799 PR c++/88394 - ICE with VLA init-capture.
1800 * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE.
1801
1802 PR c++/88869 - C++17 ICE with CTAD and explicit specialization.
1803 * pt.c (do_class_deduction): Don't include explicit specialization
1804 args in outer_args.
1805
1806 PR c++/89422 - ICE with -g and lambda in default arg in template.
1807 * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
1808
1809 2019-02-21 Jason Merrill <jason@redhat.com>
1810
1811 PR c++/88419 - C++17 ICE with class template arg deduction.
1812 * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
1813 CLASS_PLACEHOLDER_TEMPLATE.
1814
1815 2019-02-21 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR c++/89285
1818 * constexpr.c (struct constexpr_fundef): Add parms and result members.
1819 (retrieve_constexpr_fundef): Adjust for the above change.
1820 (register_constexpr_fundef): Save constexpr body with copy_fn,
1821 temporarily set DECL_CONTEXT on DECL_RESULT before that.
1822 (get_fundef_copy): Change FUN argument to FUNDEF with
1823 constexpr_fundef * type, grab body and parms/result out of
1824 constexpr_fundef struct and temporarily change it for copy_fn calls
1825 too.
1826 (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily
1827 adjust current_function_decl from ctx->call context. Test
1828 !potential_constant_expression instead of !is_constant_expression.
1829 (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo
1830 convert_for_arg_passing changes for TREE_ADDRESSABLE type passing.
1831 (cxx_eval_call_expression): Adjust get_fundef_copy caller.
1832 (cxx_eval_conditional_expression): For IF_STMT, allow then or else
1833 operands to be NULL.
1834 (label_matches): Handle BREAK_STMT and CONTINUE_STMT.
1835 (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT.
1836 (cxx_eval_switch_expr): Add support for SWITCH_STMT.
1837 (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT,
1838 DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT.
1839 For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore
1840 DECL_EXPR with USING_DECL operand.
1841 * lambda.c (maybe_add_lambda_conv_op): Build thisarg using
1842 build_int_cst to make it a valid constant expression.
1843
1844 2019-02-20 Jason Merrill <jason@redhat.com>
1845
1846 PR c++/88690 - C++17 ICE with empty base in aggregate.
1847 * typeck2.c (process_init_constructor_record): Skip trivial
1848 initialization of an empty base.
1849
1850 2019-02-21 Richard Biener <rguenther@suse.de>
1851
1852 PR middle-end/89392
1853 * vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
1854 make symtab process new functions here.
1855
1856 2019-02-20 Jason Merrill <jason@redhat.com>
1857
1858 PR c++/87921 - wrong error with inline static data member.
1859 * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P
1860 for a non-template inline variable. Do nothing for an
1861 already-instantiated variable.
1862 (c_parse_final_cleanups): Check DECL_IN_AGGR_P without
1863 DECL_INLINE_VAR_P.
1864 * decl.c (check_initializer): Likewise.
1865 (make_rtl_for_nonlocal_decl): Likewise.
1866 * pt.c (instantiate_decl): Likewise.
1867 * typeck2.c (store_init_value): Likewise.
1868
1869 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1870
1871 PR c++/89403
1872 * decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
1873 for flag_syntax_only from here...
1874 * semantics.c (expand_or_defer_fn_1): ... here.
1875
1876 PR c++/89405
1877 * decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
1878 DECL_COMMON, set DECL_INTERFACE_KNOWN.
1879
1880 PR c++/89336
1881 * constexpr.c (cxx_eval_store_expression): Diagnose changing of active
1882 union member for -std=c++17 and earlier.
1883
1884 2019-02-19 Jason Merrill <jason@redhat.com>
1885
1886 PR c++/87513 - 'sorry' mangling PMF template-id.
1887 * mangle.c (write_expression): Handle SCOPE_REF to BASELINK.
1888
1889 2019-02-19 Jason Merrill <jason@redhat.com>
1890
1891 PR c++/88380 - wrong-code with flexible array and NSDMI.
1892 * typeck2.c (process_init_constructor_record): Skip flexarrays.
1893
1894 2019-02-20 will wray <wjwray@gmail.com>
1895
1896 PR c++/88572 - wrong handling of braces on scalar init.
1897 * decl.c (reshape_init_r): Allow braces around scalar initializer
1898 within aggregate init. Reject double braced-init of scalar
1899 variable.
1900
1901 2019-02-20 Paolo Carlini <paolo.carlini@oracle.com>
1902
1903 PR c++/84536
1904 * pt.c (tsubst_init): Diagnose an initializer expanding to an
1905 empty list of expressions; tweak wrt dependent types.
1906 (regenerate_decl_from_template): For VAR_DECLs call tsubst_init
1907 instead of tsubst_expr.
1908
1909 2019-02-19 Jason Merrill <jason@redhat.com>
1910
1911 PR c++/88368 - wrong 'use of deleted function'
1912 * method.c (walk_field_subobs): Remember errors from get_nsdmi.
1913 (get_defaulted_eh_spec): Call push_tinst_level.
1914 * pt.c (maybe_instantiate_noexcept): Keep error_mark_node.
1915 * typeck2.c (merge_exception_specifiers): Handle error_mark_node.
1916
1917 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1918
1919 PR c/87924
1920 * parser.c (cp_parser_oacc_clause_wait): Add representation of wait
1921 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1922
1923 2019-02-19 Jakub Jelinek <jakub@redhat.com>
1924
1925 PR c++/89387
1926 * lambda.c (maybe_generic_this_capture): Don't check
1927 DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
1928
1929 PR c++/89391
1930 * typeck.c (build_reinterpret_cast_1): Don't handle void to
1931 && conversion go through build_target_expr_with_type.
1932
1933 PR c++/89390
1934 * error.c (qualified_name_lookup_error): Only call
1935 suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
1936
1937 2019-02-19 Tom Honermann <tom@honermann.net>
1938
1939 * name-lookup.c (get_std_name_hint): Added u8string as a name hint.
1940
1941 2019-02-18 Jason Merrill <jason@redhat.com>
1942
1943 PR c++/89336 - multiple stores in constexpr stmt.
1944 * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
1945 assigned value.
1946
1947 * pt.c (check_explicit_specialization): If the declarator is a
1948 template-id, only check whether the arguments are dependent.
1949
1950 Improve duplicate [[likely]] diagnostic.
1951 * parser.c (cp_parser_statement): Make attrs_loc a range. Pass it
1952 to process_stmt_hotness_attribute.
1953 * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc.
1954 (genericize_if_stmt): Use likely/unlikely instead of predictor_name.
1955
1956 2019-02-17 Marek Polacek <polacek@redhat.com>
1957
1958 PR c++/89217 - ICE with list-initialization in range-based for loop.
1959 * constexpr.c (unshare_constructor): No longer static.
1960 * cp-tree.h (unshare_constructor): Declare.
1961 * semantics.c (finish_compound_literal): When dealing with a
1962 non-dependent expression in a template, return the original
1963 expression. Pass LOOKUP_NO_NARROWING to digest_init_flags.
1964
1965 2019-02-13 Marek Polacek <polacek@redhat.com>
1966
1967 PR c++/89297 - ICE with OVERLOAD in template.
1968 * semantics.c (finish_compound_literal): Call
1969 instantiate_non_dependent_expr_sfinae.
1970
1971 2019-02-13 Alexandre Oliva <aoliva@redhat.com>
1972
1973 PR c++/86379
1974 * cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
1975 * name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
1976 * search.c (protected_accessible_p): Follow USING_DECL_DECLS.
1977 (shared_member_p): Likewise.
1978 (lookup_member): Likewise.
1979 * decl.c (grok_special_member_properties): Skip USING_DECLs.
1980 * semantics.c (finish_omp_declare_simd_methods): Likewise.
1981 (finish_qualified_id_expr): Do not call shared_member_p with
1982 a dependent expr.
1983
1984 PR c++/87322
1985 * pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
1986 Move cp_evaluated resetting before signature tsubsting.
1987 (gen_elem_of_pack_expansion_instantiation): Separate local
1988 specializations per index.
1989
1990 2019-02-13 David Malcolm <dmalcolm@redhat.com>
1991
1992 PR c++/89036
1993 * class.c (add_method): Drop destructor assertion.
1994
1995 2019-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1996
1997 PR c++/88986
1998 * decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
1999 context (the first argument).
2000 * pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
2001 as context.
2002
2003 2019-02-12 Jason Merrill <jason@redhat.com>
2004
2005 PR c++/89144 - link error with constexpr initializer_list.
2006 * call.c (convert_like_real) [ck_list]: Don't allocate a temporary
2007 array for an empty list.
2008 * typeck2.c (store_init_value): Don't use cxx_constant_init in a
2009 template.
2010
2011 2019-02-11 Jason Merrill <jason@redhat.com>
2012
2013 PR c++/89241 - ICE with __func__ in lambda in template.
2014 * pt.c (enclosing_instantiation_of): Also check
2015 instantiated_lambda_fn_p for the template context.
2016
2017 2019-02-11 Marek Polacek <polacek@redhat.com>
2018
2019 PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
2020 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
2021 null member pointer value.
2022
2023 2019-02-11 Jakub Jelinek <jakub@redhat.com>
2024
2025 PR c++/88977
2026 * pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
2027 to maybe_constant_value calls.
2028
2029 2019-02-11 Marek Polacek <polacek@redhat.com>
2030
2031 * typeck2.c (digest_init_r): Remove commented code.
2032
2033 2019-02-11 Martin Sebor <msebor@redhat.com>
2034
2035 PR c++/87996
2036 * decl.c (compute_array_index_type_loc): Preserve signed sizes
2037 for diagnostics. Call valid_array_size_p instead of error.
2038 * init.c (build_new_1): Compute size for diagnostic. Call
2039 invalid_array_size_error
2040 (build_new): Call valid_array_size_p instead of error.
2041
2042 2019-02-07 Alexandre Oliva <aoliva@redhat.com>
2043
2044 PR c++/86218
2045 * call.c (compare_ics): Deal with ck_aggr in either cs.
2046
2047 2019-02-06 David Malcolm <dmalcolm@redhat.com>
2048
2049 PR c++/71302
2050 * call.c (get_location_for_expr_unwinding_for_system_header): New
2051 function.
2052 (conversion_null_warnings): Use it when getting locations for
2053 EXPR, effectively adding a call to
2054 get_location_for_expr_unwinding_for_system_header for
2055 -Wconversion-null and making use of EXPR_LOCATION for
2056 -Wzero-as-null-pointer-constant.
2057
2058 2019-02-05 Jakub Jelinek <jakub@redhat.com>
2059
2060 PR c++/89187
2061 * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on
2062 PARM_DECLs of the thunk.
2063 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2064
2065 2019-02-05 Marek Polacek <polacek@redhat.com>
2066
2067 PR c++/89158 - by-value capture of constexpr variable broken.
2068 * call.c (convert_like_real) <case ck_user>: Call mark_exp_read
2069 instead of mark_rvalue_use.
2070
2071 2019-02-05 Alexandre Oliva <aoliva@redhat.com>
2072
2073 PR c++/87770
2074 * pt.c (instantiates_primary_template_p): New.
2075 (type_dependent_expression_p): Use it.
2076
2077 2019-02-01 Jason Merrill <jason@redhat.com>
2078
2079 PR c++/88761 - ICE with reference capture of constant.
2080 * lambda.c (mark_const_cap_r): Do walk subtrees of DECL_EXPR for
2081 non-proxy decls.
2082
2083 2019-02-01 Marek Polacek <polacek@redhat.com>
2084
2085 PR c++/88325 - ICE with invalid out-of-line template member definition.
2086 * parser.c (cp_parser_class_name): Don't call make_typename_type
2087 for overloads.
2088
2089 2019-02-01 Jakub Jelinek <jakub@redhat.com>
2090
2091 PR c++/87175
2092 * parser.c (cp_parser_gnu_attributes_opt): Set ok to false
2093 if require_open failed.
2094
2095 2019-01-31 Marek Polacek <polacek@redhat.com>
2096
2097 PR c++/89083, c++/80864 - ICE with list initialization in template.
2098 * constexpr.c (adjust_temp_type): Use copy_node and change the type
2099 instead of using build_constructor.
2100 * decl.c (reshape_init_r): Don't reshape a digested initializer.
2101 Return the initializer for COMPOUND_LITERAL_P.
2102
2103 PR c++/88983 - ICE with switch in constexpr function.
2104 * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY.
2105 (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the
2106 label in the else branch if we found it in the then branch.
2107
2108 2019-01-30 Jason Merrill <jason@redhat.com>
2109
2110 PR c++/88752 - ICE with lambda and constexpr if.
2111 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New.
2112 * pt.c (tsubst_lambda_expr): Set it.
2113 (instantiated_lambda_fn_p): Check it.
2114 (enclosing_instantiation_of): Use it.
2115
2116 2019-01-31 Jakub Jelinek <jakub@redhat.com>
2117
2118 PR libstdc++/88170
2119 * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
2120 a C cast in pp_c_flag_gnu_v3 mode.
2121
2122 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2123
2124 PR c++/88988
2125 * lambda.c (is_capture_proxy): Don't return true for
2126 DECL_OMP_PRIVATIZED_MEMBER artificial vars.
2127
2128 2019-01-30 Marek Polacek <polacek@redhat.com>
2129
2130 PR c++/89119 - ICE with value-initialization in template.
2131 * pt.c (tsubst_copy_and_build): Handle RANGE_EXPR.
2132
2133 2019-01-29 Jason Merrill <jason@redhat.com>
2134
2135 PR c++/86943 - wrong code converting lambda to function pointer.
2136 * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the
2137 call. Only forward parms for decltype.
2138 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P
2139 specially.
2140 * typeck.c (check_return_expr): Don't mess with a thunk call.
2141
2142 2019-01-28 Jason Merrill <jason@redhat.com>
2143
2144 PR c++/89089 - ICE with [[no_unique_address]].
2145 PR c++/88865 - wrong layout with [[no_unique_address]].
2146 * class.c (check_field_decls): A potentially-overlapping field makes
2147 the class non-layout-POD, but not non-empty.
2148 (end_of_class): Always consider empty data members.
2149 (layout_class_type): Set DECL_SIZE for empty fields.
2150
2151 2019-01-28 Marek Polacek <polacek@redhat.com>
2152
2153 PR c++/88358 - name wrongly treated as type.
2154 * parser.c (cp_parser_direct_declarator): Don't assume a qualified-id
2155 in parameter-list is a type if the function's declarator-id is not
2156 qualified.
2157
2158 2019-01-27 Marek Polacek <polacek@redhat.com>
2159
2160 PR c++/88815 - narrowing conversion lost in decltype.
2161 PR c++/78244 - narrowing conversion in template not detected.
2162 * cp-tree.h (CONSTRUCTOR_IS_DEPENDENT): New.
2163 * pt.c (instantiation_dependent_r): Consider a CONSTRUCTOR with
2164 CONSTRUCTOR_IS_DEPENDENT instantiation-dependent.
2165 * semantics.c (finish_compound_literal): When the compound literal
2166 isn't instantiation-dependent and the type isn't type-dependent,
2167 fall back to the normal processing. Set CONSTRUCTOR_IS_DEPENDENT.
2168
2169 PR c++/89024 - ICE with incomplete enum type.
2170 * call.c (standard_conversion): When converting an
2171 ARITHMETIC_TYPE_P to an incomplete type, return NULL.
2172
2173 2019-01-25 Paolo Carlini <paolo.carlini@oracle.com>
2174
2175 PR c++/88969
2176 * call.c (build_op_delete_call): Implement 7.6.2.5/(10.1).
2177 * decl2.c (coerce_delete_type): Use build_pointer_type instead
2178 of TYPE_POINTER_TO.
2179
2180 2019-01-24 Jason Merrill <jason@redhat.com>
2181
2182 PR c++/89001 - mangling of reference temporaries
2183 * cp-tree.h (struct saved_scope): Add ref_temp_count.
2184 (current_ref_temp_count): New macro.
2185 * mangle.c (mangle_ref_init_variable): Use it.
2186 * typeck2.c (store_init_value): Clear it.
2187 * call.c (make_temporary_var_for_ref_to_temp): Copy public and
2188 comdat.
2189
2190 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2191
2192 PR c++/88976
2193 * semantics.c (finish_omp_cancel): Diagnose more than one if
2194 on #pragma omp cancel with different modifiers. Use
2195 maybe_convert_cond when not in template or build_x_binary_op
2196 otherwise.
2197
2198 2019-01-23 Marek Polacek <polacek@redhat.com>
2199
2200 PR c++/88757 - qualified name treated wrongly as type.
2201 * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids
2202 in parameter-list as types if name lookup for declarator-id didn't
2203 find one or more function templates.
2204
2205 2019-01-23 Jakub Jelinek <jakub@redhat.com>
2206
2207 PR c/44715
2208 * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only
2209 after genericizing cond and incr expressions.
2210
2211 PR c++/88984
2212 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
2213 before the begin_bc_block call.
2214
2215 2019-01-21 Jason Merrill <jason@redhat.com>
2216
2217 PR c++/87893 - constexpr ctor ICE on ARM.
2218 PR c++/88293 - ICE with comma expression.
2219 * constexpr.c (initialized_type): Don't shortcut non-void type.
2220 Handle COMPOUND_EXPR.
2221 (cxx_eval_outermost_constant_expr): Return early for void type.
2222
2223 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c++/88949
2226 * optimize.c (cxx_copy_decl): New function.
2227 (clone_body): Use it instead of copy_decl_no_change.
2228
2229 PR sanitizer/88901
2230 * typeck.c (cp_build_binary_op): Don't instrument
2231 SANITIZE_POINTER_COMPARE if processing_template_decl.
2232 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
2233
2234 2019-01-18 Jason Merrill <jason@redhat.com>
2235
2236 PR c++/88875 - error with explicit list constructor.
2237 * call.c (reference_binding): Don't modify EXPR. Set
2238 need_temporary_p on the ck_user conversion for a temporary.
2239 (convert_like_real): Check it.
2240
2241 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2242
2243 PR c/51628
2244 PR c/88664
2245 * call.c (convert_for_arg_passing): Upate the
2246 warn_for_address_or_pointer_of_packed_member call.
2247 * typeck.c (convert_for_assignment): Likewise.
2248
2249 2019-01-17 Jason Merrill <jason@redhat.com>
2250
2251 PR c++/86205 - ICE with ?: of throw and template-id.
2252 * pt.c (resolve_nondeduced_context_or_error): Split out from...
2253 * typeck.c (decay_conversion): ...here.
2254 * call.c (build_conditional_expr_1): Use it.
2255
2256 PR c++/86740, ICE with constexpr if and nested generic lambdas.
2257 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
2258
2259 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2260
2261 * decl.c (grokdeclarator): Use typespec_loc in error messages
2262 about 'auto' and trailing return type.
2263
2264 2019-01-17 David Malcolm <dmalcolm@redhat.com>
2265
2266 PR c++/88699
2267 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
2268 USING_DECLs.
2269
2270 2019-01-17 Nathan Sidwell <nathan@acm.org>
2271
2272 PR c++/86610
2273 * semantics.c (process_outer_var_ref): Only skip dependent types
2274 in templates.
2275
2276 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
2277
2278 PR c++/87768
2279 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
2280 * name-lookup.c (do_push_to_top_level): Save and reset it.
2281 (do_pop_from_top_level): Restore it.
2282
2283 PR c++/86648
2284 * pt.c (make_template_placeholder): Use auto_identifier.
2285 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
2286 * error.c (dump_type): Handle template placeholders.
2287 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
2288
2289 PR c++/88146
2290 * cvt.c (convert_to_void): Handle all cdtor calls as if
2291 returning void.
2292
2293 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2294
2295 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
2296 error messages about ill-formed uses of mutable.
2297
2298 2019-01-16 Marek Polacek <polacek@redhat.com>
2299
2300 PR c++/78244 - narrowing conversion in template not detected.
2301 * call.c (perform_implicit_conversion_flags): Set
2302 IMPLICIT_CONV_EXPR_BRACED_INIT.
2303 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
2304 * pt.c (tsubst_copy_and_build): Use it.
2305
2306 2019-01-15 David Malcolm <dmalcolm@redhat.com>
2307
2308 PR c++/88795
2309 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
2310 fails.
2311
2312 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2313
2314 * decl.c (start_decl): Improve error location.
2315 * decl2.c (grokfield): Likewise.
2316
2317 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2318
2319 * decl.c (grokdeclarator): Move further up the location_t loc
2320 declaration and use the location when building a TYPE_DECL for
2321 a typedef name.
2322 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
2323 about an ill-formed bit-field as typedef.
2324
2325 2019-01-14 Marek Polacek <polacek@redhat.com>
2326
2327 PR c++/88830 - ICE with abstract class.
2328 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
2329 Fix formatting.
2330
2331 PR c++/88825 - ICE with bogus function return type deduction.
2332 * typeck.c (can_do_nrvo_p): Check error_mark_node.
2333
2334 2019-01-14 Tom Honermann <tom@honermann.net>
2335
2336 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2337 * cvt.c (type_promotes_to): Handle char8_t promotion.
2338 * decl.c (grokdeclarator): Handle invalid type specifier
2339 combinations involving char8_t.
2340 * lex.c (init_reswords): Add char8_t as a reserved word.
2341 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
2342 * parser.c (cp_keyword_starts_decl_specifier_p)
2343 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
2344 type specifier.
2345 (cp_parser_string_literal): Use char8_array_type_node for the type
2346 of CPP_UTF8STRING.
2347 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
2348 headers.
2349 * rtti.c (emit_support_tinfos): type_info support for char8_t.
2350 * tree.c (char_type_p): Recognize char8_t as a character type.
2351 * typeck.c (string_conv_p): Handle conversions of u8 string
2352 literals of char8_t type.
2353 (check_literal_operator_args): Handle UDLs with u8 string literals
2354 of char8_t type.
2355 * typeck2.c (ordinary_char_type_p): New.
2356 (digest_init_r): Disallow initializing a char array with a u8 string
2357 literal.
2358
2359 2019-01-14 Martin Liska <mliska@suse.cz>
2360
2361 PR gcov-profile/88263
2362 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
2363 as location of the TLS wrapper.
2364
2365 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
2366
2367 * decl.c (cp_finish_decl): Improve error location.
2368 * decl2.c (grokfield): Likewise, improve two locations.
2369
2370 2019-01-11 Marek Polacek <polacek@redhat.com>
2371
2372 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
2373 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
2374 ADDR_EXPR.
2375
2376 2019-01-11 Jason Merrill <jason@redhat.com>
2377
2378 PR c++/88312 - pack expansion of decltype.
2379 * pt.c (instantiation_dependent_r): A template non-type parameter
2380 pack is instantiation-dependent.
2381
2382 2019-01-11 Jason Merrill <jason@redhat.com>
2383
2384 PR c++/88613 - ICE with use of const var in lambda.
2385 * expr.c (mark_use): Fix location wrapper handling.
2386 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
2387
2388 2019-01-11 Tobias Burnus <burnus@net-b.de>
2389
2390 PR C++/88114
2391 * decl2.c (maybe_emit_vtables): If needed, generate code for
2392 the destructor of an abstract class.
2393 (mark_used): Update comment for older function-name change.
2394
2395 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
2396
2397 * decl.c (start_decl): Improve error location.
2398 (grokdeclarator): Likewise, improve two locations.
2399
2400 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2401
2402 PR other/16615
2403
2404 * cp-tree.h: Mechanically replace "can not" with "cannot".
2405 * parser.c: Likewise.
2406 * pt.c: Likewise.
2407
2408 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2409
2410 * decl.c (grok_reference_init): Improve error location.
2411 (grokdeclarator): Likewise, improve two locations.
2412
2413 2019-01-08 Marek Polacek <polacek@redhat.com>
2414
2415 PR c++/88538 - braced-init-list in template-argument-list.
2416 * parser.c (cp_parser_template_argument): Handle braced-init-list when
2417 in C++20.
2418
2419 PR c++/88548 - this accepted in static member functions.
2420 * parser.c (cp_debug_parser): Adjust printing of
2421 local_variables_forbidden_p.
2422 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
2423 (cp_parser_primary_expression): When checking
2424 local_variables_forbidden_p, use THIS_FORBIDDEN or
2425 LOCAL_VARS_FORBIDDEN.
2426 (cp_parser_lambda_body): Update the type of
2427 local_variables_forbidden_p. Set it to 0 rather than false.
2428 (cp_parser_condition): Adjust call to cp_parser_declarator.
2429 (cp_parser_explicit_instantiation): Likewise.
2430 (cp_parser_init_declarator): Likewise.
2431 (cp_parser_declarator): New parameter. Use it.
2432 (cp_parser_direct_declarator): New parameter. Use it to set
2433 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
2434 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
2435 (cp_parser_parameter_declaration): Likewise.
2436 (cp_parser_default_argument): Update the type of
2437 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2438 rather than true.
2439 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
2440 'static' or 'friend'.
2441 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
2442 (cp_parser_late_parsing_default_args): Update the type of
2443 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2444 rather than true.
2445 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
2446 (cp_parser_objc_class_ivars): Likewise.
2447 (cp_parser_objc_struct_declaration): Likewise.
2448 (cp_parser_omp_for_loop_init): Likewise.
2449 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
2450 to unsigned char.
2451 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
2452 Define.
2453
2454 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2455
2456 * decl.c (start_decl): Improve permerror location.
2457
2458 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2459 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c++/88554
2462 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
2463 fixit hint if current_class_ref is NULL. Use a single if instead of
2464 two nested ones.
2465
2466 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2467
2468 * decl.c (start_decl): Improve two error_at locations.
2469 (expand_static_init): Likewise.
2470
2471 2019-01-07 Marek Polacek <polacek@redhat.com>
2472
2473 PR c++/88741 - wrong error with initializer-string.
2474 * decl.c (cp_complete_array_type): Strip any location wrappers.
2475
2476 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2477
2478 PR c++/88261
2479 PR c++/69338
2480 PR c++/69696
2481 PR c++/69697
2482 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
2483 * typeck2.c (digest_init_r): Raise an error for non-static
2484 initialization of a flexible array member.
2485 (process_init_constructor, massage_init_elt,
2486 process_init_constructor_array, process_init_constructor_record,
2487 process_init_constructor_union, process_init_constructor): Add the
2488 flags parameter and pass it thru.
2489 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
2490 digest_init_flags for static decls.
2491
2492 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2493
2494 PR c++/85052
2495 * cp-tree.h (cp_build_vec_convert): Declare.
2496 * parser.c (cp_parser_postfix_expression): Parse
2497 __builtin_convertvector.
2498 * constexpr.c: Include fold-const-call.h.
2499 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
2500 (potential_constant_expression_1): Likewise.
2501 * semantics.c (cp_build_vec_convert): New function.
2502 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
2503 IFN_VEC_CONVERT.
2504
2505 2019-01-03 Jakub Jelinek <jakub@redhat.com>
2506
2507 PR c++/88636
2508 * decl.c (builtin_function_1): Return result of pushdecl_top_level
2509 or pushdecl rather than decl.
2510
2511 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2512
2513 * tree.c (handle_nodiscard_attribute): Improve warning location.
2514
2515 2019-01-02 Marek Polacek <polacek@redhat.com>
2516
2517 PR c++/88612 - ICE with -Waddress-of-packed-member.
2518 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
2519 * typeck.c (convert_for_assignment): Likewise.
2520
2521 PR c++/88631 - CTAD failing for value-initialization.
2522 * typeck2.c (build_functional_cast): Try deducing the template
2523 arguments even if there are no arguments to deduce from.
2524
2525 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2526
2527 Update copyright years.
2528 \f
2529 Copyright (C) 2019 Free Software Foundation, Inc.
2530
2531 Copying and distribution of this file, with or without modification,
2532 are permitted in any medium without royalty provided the copyright
2533 notice and this notice are preserved.
This page took 0.155774 seconds and 5 git commands to generate.