]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Fix numerous typos in comments
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
2fbe7a32 12017-04-03 Jonathan Wakely <jwakely@redhat.com>
2
3 * class.c (update_vtable_entry_for_fn): Fix typo in comment.
4 * decl2.c (one_static_initialization_or_destruction): Likewise.
5 * name-lookup.c (store_bindings): Likewise.
6 * parser.c (make_call_declarator): Likewise.
7 * pt.c (check_explicit_specialization): Likewise.
8
c571b0c6 92017-04-03 Jason Merrill <jason@redhat.com>
10
11 PR sanitizer/79993 - ICE with VLA initialization from string
12 PR c++/69487 - wrong VLA initialization from string
13 * init.c (finish_length_check): Split out from build_vec_init.
14 (build_vec_init): Handle STRING_CST.
15 * typeck2.c (split_nonconstant_init): Handle STRING_CST.
16 (digest_init_r): Don't give a STRING_CST VLA type.
17
ca2af7df 182017-03-31 Jakub Jelinek <jakub@redhat.com>
19
3ddb3278 20 PR c++/79572
21 * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with
22 REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller
23 for NOP_EXPR to REFERENCE_TYPE.
24
ca2af7df 25 PR libstdc++/80251
26 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE.
27 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
28 CPTK_IS_AGGREGATE.
29 * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE.
30 Remove extraneous parens.
31 (finish_trait_expr): Handle CPTK_IS_AGGREGATE.
32 * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE.
33 (cp_parser_trait_expr): Likewise.
34
3385a573 352017-03-27 Jakub Jelinek <jakub@redhat.com>
36
37 PR middle-end/80162
38 * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument.
39 * typeck.c (cxx_mark_addressable): Likewise. Look through
40 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
41 to ARRAY_TYPE.
42 (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable.
43
b4e232ea 442017-03-24 Jason Merrill <jason@redhat.com>
45
46 PR c++/77339 - ICE with invalid use of alias template.
47 * pt.c (lookup_template_class_1): Don't try to enter the scope of an
48 alias template.
49
d1cd4a64 502017-03-24 Marek Polacek <polacek@redhat.com>
51
52 PR c++/80119
53 * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression
54 doesn't have side effects.
55
94b464a5 562017-03-23 Jason Merrill <jason@redhat.com>
57
e73288d3 58 PR c++/80150 - ICE with overloaded variadic deduction.
59 * pt.c (try_one_overload): Remove asserts.
60
94b464a5 61 PR c++/77563 - missing ambiguous conversion error.
62 * call.c (convert_like_real): Use LOOKUP_IMPLICIT.
63
5c1d51e3 642017-03-23 Marek Polacek <polacek@redhat.com>
65
66 * cp-tree.h: Remove a C_RID_YYCODE reference.
67
d4d3d389 682017-03-22 Jakub Jelinek <jakub@redhat.com>
69
70 PR c++/80141
71 * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
72 case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
73 processing_template_decl.
74
67dd55bd 752017-03-21 Paolo Carlini <paolo.carlini@oracle.com>
76
77 PR c++/77752
78 * name-lookup.c (pushtag_1): Add check for bogus, non template,
79 std::initializer_list.
80
3b7f953b 812017-03-21 Jakub Jelinek <jakub@redhat.com>
82
83 PR c++/35878
84 * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.
85
4885982f 862017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com>
87
88 PR c++/35878
3b7f953b 89 * init.c (std_placement_new_fn_p): New.
4885982f 90 (build_new_1): Call it.
91
9a964bc1 922017-03-20 Jason Merrill <jason@redhat.com>
93
a1f4b308 94 PR c++/80096 - ICE with C++17 non-type auto.
95 * pt.c (tsubst): Delay tsubst of type of template non-type
96 parameter.
97
96ffae61 98 PR c++/79519 - ICE with deleted template friend.
99 * decl.c (grokdeclarator): Complain about misplaced function
100 definition using =, as well.
101
9a964bc1 102 PR c++/79640 - infinite recursion with generic lambda.
103 * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation
104 before substituting its initializer.
105
7f690134 1062017-03-20 Marek Polacek <polacek@redhat.com>
107 Paolo Carlini <paolo.carlini@oracle.com>
108
109 PR c++/80059 - ICE with noexcept and __transaction_atomic
110 * except.c (build_must_not_throw_expr): Call
2e5e78a2 111 instantiate_non_dependent_expr.
7f690134 112
0ce12360 1132017-03-19 Jason Merrill <jason@redhat.com>
114
b5f774d6 115 PR c++/80084 - wrong C++17 decomposition by reference of parameter.
116 * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a
117 reference decomposition.
118
0ce12360 119 PR c++/80077 - error with constexpr and -fno-elide-constructors.
120 * constexpr.c (cxx_eval_call_expression): Set ctx->call while
121 expanding trivial constructor.
122
0c2b7cde 1232017-03-17 Jason Merrill <jason@redhat.com>
124
91781282 125 PR c++/78345 - ICE initializing array from lambda.
126 * init.c (build_aggr_init): Check array initializer.
127 (build_vec_init): Check the type of a CONSTRUCTOR.
128
0c2b7cde 129 PR c++/80073 - C++17 ICE with virtual base.
130 * decl.c (xref_basetypes): Also check for indirect vbases.
131
def8e41f 1322017-03-16 Jason Merrill <jason@redhat.com>
133
85d41712 134 * decl.c (start_enum): std::byte aliases anything.
135
def8e41f 136 PR c++/79797
137 * constexpr.c (lookup_placeholder): Tweak.
138
2c7d98a7 1392017-03-15 Jason Merrill <jason@redhat.com>
140
141 PR c++/80043 - ICE with -fpermissive
142 * typeck.c (convert_for_assignment): Handle instantiate_type
143 not giving an error.
144
e6c88bc4 1452017-03-14 Nathan Sidwell <nathan@acm.org>
146
147 PR c++/79393 DR 1658 workaround
148 * method.c (synthesized_method_base_walk): Inihibit abstract class
149 virtual base access check here.
150 (synthesized_method_walk): Not here.
151
11c999a2 1522017-03-13 Nathan Sidwell <nathan@acm.org>
153
154 PR c++/79393 DR 1658 workaround
155 * method.c (synthesized_method_walk): Check vbases of abstract
156 classes for dtor walk.
157
ca1f4c7a 1582017-03-10 David Malcolm <dmalcolm@redhat.com>
159
160 PR translation/79848
161 * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs".
162
12ac1288 1632017-03-10 Jason Merrill <jason@redhat.com>
164
165 PR c++/79960 - alias templates and partial ordering
166 * pt.c (comp_template_args): Add partial_order parm.
167 (template_args_equal): Likewise.
168 (comp_template_args_porder): New.
169 (get_partial_spec_bindings): Use it.
170
91158b2e 1712017-03-10 Marek Polacek <polacek@redhat.com>
172
173 PR c++/79967
174 * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
175
19bf26a8 1762017-03-10 Jakub Jelinek <jakub@redhat.com>
177
4611960c 178 PR c++/79899
179 * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
180 Use XALLOCAVEC macro.
181
19bf26a8 182 PR c++/79896
183 * decl.c (finish_enum_value_list): If value is error_mark_node,
184 don't copy it and change its type.
185 * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
186 of CONST_DECL is error_mark_node.
187
0eea69ee 1882017-03-09 Marek Polacek <polacek@redhat.com>
189
190 PR c++/79900 - ICE in strip_typedefs
191 * tree.c (strip_typedefs): Skip the attribute handling if T is
192 a variant type which hasn't been updated yet.
193
182bef63 194 PR c++/79687 - wrong code with pointer-to-member
195 * init.c (constant_value_1): Break if the variable has a dynamic
196 initializer.
197
85de9604 1982017-03-08 Jason Merrill <jason@redhat.com>
199
200 PR c++/79797 - ICE with self-reference in array DMI.
201 * constexpr.c (lookup_placeholder): Split out...
202 (cxx_eval_constant_expression): ...from here.
203
d87f668a 2042017-03-07 Jakub Jelinek <jakub@redhat.com>
205
206 PR c/79834
207 * parser.c (cp_parser_omp_cancellation_point,
208 cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
209 cp_parser_omp_target_update): Change "may only be used in compound
210 statements" diagnostics, such that the same translatable string is
211 used for all pragmas.
212 (cp_parser_pragma): Likewise. Use error_at instead of
213 cp_parser_error for that diagnostics.
214
1be5de3f 2152017-03-06 Marek Polacek <polacek@redhat.com>
216
217 PR c++/79796 - ICE with NSDMI and this pointer
218 * call.c (build_over_call): Handle NSDMI with a 'this' by calling
219 replace_placeholders.
220
efea7c64 2212017-03-06 Jakub Jelinek <jakub@redhat.com>
222
223 PR c++/79822
224 * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
225 ({ (void) 0; }).
226
f282fca6 2272017-03-06 Jason Merrill <jason@redhat.com>
228
229 Revert "Allow deduction guides to look into primary template."
230 * cp-tree.h, parser.c, pt.c, search.c: Revert.
231
cf1bf3ab 2322017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
233
234 PR c++/70266
235 * except.c (build_must_not_throw_expr): Perform the implicit
236 conversions on the condition.
237
15c1cd60 2382017-03-03 Jason Merrill <jason@redhat.com>
239
957a727b 240 * mangle.c (mangle_decl): Check -Wnoexcept-type instead of
241 -Wc++1z-compat.
242
15c1cd60 243 Core issues 2273 and 2277
244 * call.c (joust): Adjust using-declaration tiebreaker to handle
245 the intermediate base case.
246 * method.c (strip_inheriting_ctors): Just return the argument if
247 !flag_new_inheriting_ctors.
248
550c1405 2492017-03-03 Richard Biener <rguenther@suse.de>
250
251 PR c++/79825
252 * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.
253
b4b5f44c 2542017-03-03 Marek Polacek <polacek@redhat.com>
255
256 PR c++/79791
257 * typeck.c (string_conv_p): In C++11, always call pedwarn with
258 OPT_Wwrite_strings.
259
e04737a5 2602017-03-02 Jason Merrill <jason@redhat.com>
261
387e18c9 262 Update overload resolution with deduction guides.
263 * pt.c (do_class_deduction): Always build the copy guide.
264 (copy_guide_p, template_guide_p): New.
265 (build_deduction_guide): Remember the original constructor.
266 * call.c (joust): Prefer the copy guide and non-template guides.
267
e04737a5 268 Allow deduction guides to look into primary template.
269 * cp-tree.h (struct saved_scope): Add deduction_guide_type.
270 (struct cp_decl_specifier_seq): Add constructor_p.
271 * parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
272 (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p.
273 Clear deduction_guide_type. Don't handle deduction guide names.
274 (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
275 (cp_parser_direct_declarator): Likewise. Handle deduction guides.
276 (cp_parser_member_declaration, cp_parser_cache_defarg)
277 (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
278 * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
279 (build_deduction_guide): Set deduction_guide_type.
280 (dependent_scope_p): Check deduction_guide_type.
281 * search.c (lookup_member): Likewise.
282
aea47f82 2832017-03-02 Jakub Jelinek <jakub@redhat.com>
284
285 PR c++/79782
286 * init.c (mark_exp_read_r): New function.
287 (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
288 whole arguments instead of plain mark_exp_read on TREE_LIST values.
289
11aaa98e 2902017-03-01 Jason Merrill <jason@redhat.com>
291
292 Class template argument deduction in new-expression
293 * init.c (build_new): Handle deduction from no initializer.
294 * parser.c (cp_parser_new_expression): Don't require a single
295 expression for class template deduction.
296 * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
297 class template placeholder.
298 * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
299 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
300 (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.
301
bd66dbce 3022017-03-01 Jakub Jelinek <jakub@redhat.com>
303
304 PR c++/79746
305 * init.c (emit_mem_initializers): When not constructing vbases of
306 abstract classes, mark arguments as read for
307 -Wunused-but-set-parameter.
308
42decc18 3092017-02-28 Jason Merrill <jason@redhat.com>
310
311 Class template argument deduction refinements
312 * call.c (joust): Move deduction guide tiebreaker down.
313 * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class
314 deduction with no initializer.
315 * pt.c (build_deduction_guide): Handle implicit default/copy ctor.
316 (do_class_deduction): Use that rather than special case.
317 (do_auto_deduction): Handle null initializer.
318
1caf9cb4 3192017-02-28 Jakub Jelinek <jakub@redhat.com>
320
321 * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...")
322 instead of just cond ? "..." : "...".
323 (grokdeclarator): Likewise.
324 (build_enumerator): Likewise.
325 * init.c (build_new_1): Likewise.
326 * call.c (build_new_method_call_1): Likewise.
327 * parser.c: Include intl.h.
328 (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for
329 "enter"/"exit" keyword.
330 (cp_finalize_oacc_routine): Don't use %s to supply portions of the
331 message.
332
8e5d6d2a 3332017-02-27 Jason Merrill <jason@redhat.com>
334
335 PR c++/71568 - SFINAE forming pointer to member function
336 * init.c (build_offset_ref): Check the return value of
337 perform_or_defer_access_check.
338
e420ba82 3392017-02-27 Marek Polacek <polacek@redhat.com>
340
341 * decl.c (expand_static_init): Add missing } in a comment.
342
a3f68502 3432017-02-27 Volker Reichelt <v.reichelt@netcologne.de>
344
345 * init.c: Include intl.h.
346 (build_new_1): Move message strings into pedwarn to make them
347 -Wformat-security friendly. Mark string for translation.
348 * pt.c (tsubst_copy_and_build): Mark string for translation.
349 Make the pointer const.
350 * semantics.c (finish_id_expression): Mark strings for translation.
351
7385b605 3522017-02-25 Jakub Jelinek <jakub@redhat.com>
353
354 * call.c (build_op_delete_call): Make msg1 and msg2 const.
355
bbd5521e 3562017-02-24 Jakub Jelinek <jakub@redhat.com>
357
358 PR c++/79588
359 * call.c (build_over_call): Call check_function_arguments even for
360 -Wrestrict, adjust check_function_arguments caller.
361 * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict
362 here.
363 * typeck.c (cp_build_function_call_vec): Adjust
364 check_function_arguments caller.
365
4d8987f7 3662017-02-24 Marek Polacek <polacek@redhat.com>
367
368 PR translation/79705
369 * decl.c (check_redeclaration_exception_specification): Mark a string
370 for translation. Make the pointer const.
371
c994735e 3722017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
373
374 PR c++/79361
375 * pt.c (register_specialization): Check duplicate_decls return value
376 for error_mark_node and pass it back.
377
5c566a08 3782017-02-22 Jason Merrill <jason@redhat.com>
379
1555b8a1 380 PR c++/79679 - missing destructor for argument
381 * call.c (build_over_call): Don't pass tf_no_cleanup to argument
382 conversions.
383
5c566a08 384 * pt.c (do_class_deduction): Handle 0 argument case.
385
d6a08f5c 3862017-02-22 Jakub Jelinek <jakub@redhat.com>
387
388 PR c++/79664
389 * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
390 SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
391 * constexpr.c (potential_constant_expression_1): Handle
392 OMP_*, OACC_* and CILK_* trees. Use error_at with
393 EXPR_LOC_OR_LOC (t, input_location) computed early
394 instead of error, or error_at with location_of (t).
395
aba254d0 3962017-02-22 Marek Polacek <polacek@redhat.com>
397
398 PR c++/79653
399 * parser.c (cp_parser_std_attribute_spec): Don't build the attribute
400 if the alignas expression is erroneous.
401 * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
402 error_mark_node.
403
2c2c1504 404 PR c++/79657
405 * semantics.c (finish_underlying_type): Bail out for incomplete enums.
406
fc71eeab 4072017-02-21 Jason Merrill <jason@redhat.com>
408
46b926f0 409 PR c++/50308 - wrong deprecated warning with ADL
410 PR c++/17729 - duplicate deprecated warning
411 * semantics.c (finish_id_expression): Only call mark_used on a
412 function if we aren't building a call.
413
fc71eeab 414 PR c++/41727 - ICE with partial spec of partial instantiation
415 * pt.c (process_partial_specialization): For now, don't check more
416 specialized if there is more than one level of args.
417
8b744dc9 4182017-02-21 Marek Polacek <polacek@redhat.com>
419
420 PR c++/79535
421 * cp-tree.h (maybe_reject_flexarray_init): Declare.
422 * init.c (maybe_reject_flexarray_init): No longer static.
423 Add check for current_function_decl.
424 * parser.c (cp_parser_late_parse_one_default_arg): Reject
425 a default mem-initializer for a flexible array.
426
c209618b 4272017-02-21 Jakub Jelinek <jakub@redhat.com>
428 Paolo Carlini <paolo.carlini@oracle.com>
429
430 PR c++/79654
431 * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node
432 on error.
433 * pt.c (tsubst_decomp_names): Return error_mark_node if the first
434 decl after the decomposition artificial decl has error_mark_node.
435 * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p
436 instead of just == error_mark_node comparison.
437
6993e708 4382017-02-21 Jakub Jelinek <jakub@redhat.com>
439
6966c201 440 PR sanitizer/79589
441 * decl.c: Include gimplify.h.
442 (cp_finish_decomp): Make sure there is no sharing of trees
443 in between DECL_VALUE_EXPR of decomposition decls.
444
0acc6340 445 PR c++/79655
446 * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.
447
6993e708 448 PR c++/79639
449 * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
450 call cplus_expand_constant on it first.
451
67378ae5 4522017-02-19 Jason Merrill <jason@redhat.com>
453
b50909bb 454 PR c++/78139 - destructor needed by new-expression
455 * call.c (build_special_member_call): Use tf_no_cleanup.
456
02b6d4df 457 PR c++/78282 - auto template and pack expansion
458 * pt.c (find_parameter_packs_r): Don't walk into the type of
459 templates other than template template-parameters.
460
8de85597 461 PR c++/79606 - ICE with this->base_member in NSDMI
462 * class.c (build_base_path): Check processing_template_decl.
463
9722fa48 464 PR c++/79607 - ICE with T{} initializer
465 * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
466
c462f4c4 467 PR c++/79566 - elaborated-type-specifier in range for
468 * parser.c (cp_parser_simple_declaration): Fix check for type
469 definition.
470
3d83084a 471 PR c++/79400 - confusing suggestion of 'noexcept'
472 * parser.c (cp_parser_exception_specification_opt): Remove
473 suggestion for deprecated dynamic exception-specification.
474
155f7f70 475 PR c++/79470 - partial ordering with reference parameters
476 * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
477
ef9d5293 478 PR c++/79500 - ICE with non-template deduction guide
479 * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
480 DECL_TEMPLATE_RESULT.
481
a37a80f8 482 PR c++/79580 - ICE with compound literal
483 * parser.c (cp_parser_class_head): If we're in the middle of an
484 expression, use ts_within_enclosing_non_class.
485
67378ae5 486 PR c++/79503 - inherited ctor taking base class
487 * call.c (add_function_candidate): Also check that
488 DECL_INHERITED_CTOR_BASE is reference-related to the parameter type.
489
4488d9ee 4902017-02-19 Paolo Carlini <paolo.carlini@oracle.com>
491
492 PR c++/79380
493 * typeck.c (cxx_alignas_expr): Reject a non-integral alignas
494 argument.
495
ac8df55e 4962017-02-19 Eric Fiselier <eric@efcs.ca>
497 Jonathan Wakely <jwakely@redhat.com>
498
499 PR c++/69523
500 * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
501 control warning about literal suffix identifiers without a leading
502 underscore.
503
a4d6d852 5042017-02-17 Jason Merrill <jason@redhat.com>
505
bb5c918a 506 PR c++/79508 - lookup error with member template
507 * parser.c (cp_parser_template_name): Clear
508 parser->context->object_type if we aren't doing lookup.
509
b7204f70 510 PR c++/78690 - ICE with using and global type with same name
511 * pt.c (type_dependent_object_expression_p): True for
512 IDENTIFIER_NODE.
513
6757cb00 514 PR c++/79549 - C++17 ICE with non-type auto template parameter pack
515 * pt.c (convert_template_argument): Just return an auto arg pack.
516 (tsubst_template_args): Don't tsubst an auto pack type.
517
5928444e 518 PR c++/79556 - C++17 ICE with non-type auto
519 * pt.c (do_auto_deduction): Don't try to deduce from null type.
520
a4d6d852 521 PR c++/79533 - C++17 ICE with temporary cast to reference
522 * call.c (build_over_call): Conversion to a reference prevents copy
523 elision.
524
e0ac1f17 5252017-02-16 Jakub Jelinek <jakub@redhat.com>
526 Jason Merrill <jason@redhat.com>
527
528 PR c++/79502 - lost nodiscard attribute
529 * pt.c (apply_late_template_attributes): Do apply non-dependent
530 attributes to types.
531
08d009ac 5322017-02-16 Jason Merrill <jason@redhat.com>
533
43b7271d 534 PR c++/78572 - ICE with self-modifying array initializer
535 * constexpr.c (cxx_eval_store_expression): The object we're
536 initializing is outside the constant-expression.
537 (cxx_eval_call_expression): Set ctx->call.
538
08d009ac 539 PR c++/79050 - ICE with undeduced auto and LTO
540 * decl.c (poplevel): Remove undeduced auto decls.
541
79878c89 5422017-02-16 Jakub Jelinek <jakub@redhat.com>
543
544 PR c++/79512
545 * parser.c (cp_parser_omp_target): For -fopenmp-simd
546 ignore #pragma omp target even when not followed by identifier.
547
b4c5b883 5482017-02-15 Jason Merrill <jason@redhat.com>
549 Jakub Jelinek <jakub@redhat.com>
550
551 PR c++/79464 - ICE in IPA with omitted constructor parms
552 * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES.
553 (adjust_clone_args): Adjust.
554 (add_method): Remember omitted parms.
555 * call.c (add_function_candidate): Likewise.
556 * mangle.c (write_method_parms): Likewise.
557 * method.c (ctor_omit_inherited_parms): Return false if there are no
558 parms to omit.
559
2c133d28 5602017-02-15 Martin Sebor <msebor@redhat.com>
561
562 PR c++/79363
563 * init.c (maybe_reject_flexarray_init): New function.
564 (perform_member_init): Call it.
565
84d1a421 5662017-02-15 Jakub Jelinek <jakub@redhat.com>
567
c0375791 568 PR c++/79301
569 * parser.c (cp_parser_std_attribute): Don't pedwarn about
570 [[deprecated]] with -std=c++11 and [[fallthrough]] with
571 -std=c++11 and -std=c++14.
572
84d1a421 573 PR c++/79288
574 * decl.c (grokdeclarator): For static data members, handle thread_p
575 only after handling inline.
576
0dd2f857 5772017-02-14 Marek Polacek <polacek@redhat.com>
578
579 PR c++/79420
580 PR c++/79463
581 * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
582 clobbering if the postfix expression isn't an EXPR_P.
583
4952bc85 5842017-02-13 Jason Merrill <jason@redhat.com>
585
586 PR c++/79461 - ICE with lambda in constexpr constructor
587 * constexpr.c (build_data_member_initialization): Ignore
588 initialization of a local variable.
589
cd7580a0 5902017-02-13 Jakub Jelinek <jakub@redhat.com>
591
67af79be 592 * init.c (warn_placement_new_too_small): Add missing space in
593 diagnostics.
594 * parser.c (cp_parser_oacc_declare): Likewise.
595 * mangle.c (maybe_check_abi_tags): Likewise.
596
cd7580a0 597 PR c++/79232
598 * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs
599 on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR
600 in the rightmost operand.
601
5d5f1138 6022017-02-13 Nathan Sidwell <nathan@acm.org>
603
604 PR c++/79296 - ICE mangling localized template instantiation
605 * decl2.c (determine_visibility): Use template fn context for
606 local class instantiations.
607
71d4cbd2 6082017-02-11 Jason Merrill <jason@redhat.com>
609
0bc8e9cf 610 PR c++/77659 - ICE with new and C++14 aggregate NSDMI
611 * init.c (build_new): Make backups of any CONSTRUCTORs in init.
612 (build_new_1): Use replace_placeholders.
613 * tree.c (replace_placeholders_t): Also track whether we've seen a
614 placeholder.
615 (replace_placeholders, replace_placeholders_r): Adjust.
616 * cp-tree.h: Adjust.
617
71d4cbd2 618 PR c++/77790 - ICE with auto function in C++11 mode
619 * decl.c (undeduced_auto_decl): Remove C++14 limitation.
620 (require_deduced_type): Add complain parm, return bool.
621 * cp-tree.h: Adjust.
622 * decl2.c (mark_used): Use require_deduced_type.
623
d0ff7ded 6242017-02-10 Jason Merrill <jason@redhat.com>
625
143b3290 626 PR c++/78908 - template ops and bitfields
627 * tree.c (build_min_non_dep): Use unlowered_expr_type.
628
ef782365 629 PR c++/78897 - constexpr union
630 * constexpr.c (cxx_eval_store_expression): A store to a union member
631 erases a previous store to another member.
632
eb80a58e 633 PR c++/71285 - member of fold-expression
634 * semantics.c (finish_unary_fold_expr)
635 (finish_binary_fold_expr): Use null type for fold-expressions.
636
d0ff7ded 637 PR c++/79401 - protected inherited constructor
638 * call.c (enforce_access): For inheriting constructor, find a base
639 binfo in the path we already have.
640
e40bdc89 6412017-02-10 Marek Polacek <polacek@redhat.com>
642
643 PR c++/79435
644 * pt.c (type_dependent_expression_p): Check if the expression type
645 is null.
646
493196c0 647 PR c++/79184
648 * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context
649 if warnings shouldn't be given.
650
db462d66 6512017-02-10 Paolo Carlini <paolo.carlini@oracle.com>
652
653 PR c++/71737
654 * pt.c (tsubst_decl): Don't try to preserve a typedef that names
655 an error_mark_node as type.
656
48840b6b 6572017-02-09 Jakub Jelinek <jakub@redhat.com>
658 Jason Merrill <jason@redhat.com>
659
660 PR c++/79143
661 * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
662 from pattern to type.
663
f31d89ff 6642017-02-09 Jason Merrill <jason@redhat.com>
665
666 PR c++/79316 - default argument in deduction guide
667 PR c++/79350 - explicit deduction guide
668 * parser.c (cp_parser_constructor_declarator_p)
669 (cp_parser_direct_declarator): Parse deduction guides more like
670 constructors.
671 * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
672 * tree.c (special_function_p): Return it.
673 * decl.c (check_special_function_return_type): Handle it.
674 (grokdeclarator, grokfndecl): Adjust.
675 (cp_finish_decl): Pass flags to do_auto_deduction.
676 * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
677 * pt.c (dguide_name_p): Take a const_tree.
678 (do_class_deduction): Handle explicit.
679 (do_auto_deduction): Pass flags through.
680 (build_deduction_guide): Copy explicit flag.
681
b5c83b44 6822017-02-09 Jakub Jelinek <jakub@redhat.com>
683
b404970b 684 PR c++/79429
685 * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
686 non-pragma_compound context here.
687 (cp_parser_omp_target): Likewise.
688 (cp_parser_pragma): Don't call push_omp_privatization_clauses and
689 parsing for ordered and target omp pragmas in non-pragma_stmt
690 non-pragma_compound contexts.
691
b5c83b44 692 PR c/79431
693 * parser.c (cp_parser_oacc_declare): Formatting fix.
694 (cp_parser_omp_declare_target): Don't invoke symtab_node::get on
695 automatic variables.
696
719a7570 6972016-02-09 Nathan Sidwell <nathan@codesourcery.com>
698 Chung-Lin Tang <cltang@codesourcery.com>
699
700 * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix
701 parsing. Parse constant expression. Remove semantic checking.
702 (cp_parser_omp_clause_collapse): Disallow tile.
703 (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse
704 error about missing for after already emitting one. Use more
705 conventional for idiom for unbounded loop.
706 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
707 * semantics.c (finish_omp_clauses): Correct TILE semantic check.
708 (finish_omp_for): Deal with tile clause.
709
af18e61a 7102017-02-07 Nathan Sidwell <nathan@acm.org>
711
712 * method.c (synthesized_method_base_walk): New. Broken out of ...
713 (synthesized_method_walk): ... here. Call it. Cleanup
714 initializations.
715
b06ecd3c 7162017-02-07 Patrick Palka <ppalka@gcc.gnu.org>
717
718 PR c++/79360
719 * typeck2.c (process_init_constructor_union): Consider only
720 FIELD_DECLs when looking for an NSDMI.
721
bd2417ed 7222017-02-06 Jason Merrill <jason@redhat.com>
723
724 PR c++/71193 - incomplete types in templates
725 * parser.c (cp_parser_postfix_dot_deref_expression): In a template
726 handle incomplete type by pedwarning and then treating as dependent.
727
b5cc540a 7282017-02-06 Jakub Jelinek <jakub@redhat.com>
729
24c6ee98 730 PR c++/79379
731 * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR.
732 (potential_constant_expression_1): Likewise.
733
cba2f106 734 PR c++/79377
735 * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
736 allow one fewer than expected arguments if flag_permissive.
737
b5cc540a 738 PR c++/79372
739 * decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
740 * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
741 with error_mark_node type.
742
41ac8cbf 7432017-02-03 Jason Merrill <jason@redhat.com>
744
bfd3584e 745 PR c++/78689 - ICE on constructor with label
746 * optimize.c (maybe_clone_body): Replace omitted parameters with
747 null lvalues.
748 * class.c (build_clone): Fix logic for omitting inherited parms.
749
b601ad30 750 PR c++/12245 - excessive memory use
751 * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
752 back in. Don't cache constants.
753 (maybe_constant_init): Don't cache constants.
754
41ac8cbf 755 PR c++/79294 - ICE with invalid template argument
756 * pt.c (convert_nontype_argument_function): Check value-dependence.
757 (convert_nontype_argument): Don't check it here for function ptrs.
758
4ecaaab2 7592017-02-02 Richard Biener <rguenther@suse.de>
760
761 PR cp/14179
762 * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy
763 it lazily on the first changed element only and copy it
764 fully upfront, only storing changed elements.
765
82c53ea9 7662017-02-02 Paolo Carlini <paolo.carlini@oracle.com>
767
768 PR c++/69637
769 * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL
770 to the width.
771
636eeb71 7722017-01-31 Jakub Jelinek <jakub@redhat.com>
773
774 PR c++/79304
775 * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
776 after ARROW_EXPR.
777
90b33123 7782017-01-31 David Malcolm <dmalcolm@redhat.com>
779
780 PR c++/79298
781 * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve
782 any namespace aliases.
783
3ac2178b 7842017-01-31 Nathan Sidwell <nathan@acm.org>
785
3ce5daa2 786 PR c++/79290
787 * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING.
788
42c456a7 789 PR c++/67273
790 PR c++/79253
791 * pt.c: (instantiate_decl): Push to top level when current
792 function scope doesn't match. Only push lmabda scope stack when
793 pushing to top.
794
655df35b 795 * cp-tree.h (instantiate_decl): Make defer_ok bool.
796 * pt.c: Fix instantiate_decl calls to pass true/false not 0/1
797 (instantiate_decl): Simplify and reorder state saving and restoration.
798
3ac2178b 799 PR c++/79264
800 * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs.
801 * semantics.c (finish_member_declaration): Assert class is being
802 defined.
803
37af486a 8042017-01-30 Alexandre Oliva <aoliva@redhat.com>
805
806 Introduce C++ support in libcc1.
807 * cp-tree.h (struct lang_identifier): Add oracle_looked_up.
808 (ansi_opname): Rename to...
809 (cp_operator_id): ... this. Adjust all callers.
810 (ansi_assopname): Rename to...
811 (cp_assignment_operator_id): ... this. Adjust all callers.
812 (cp_literal_operator_id): Declare.
813 (set_global_friend): Declare.
814 (is_global_friend): Declare.
815 (enum cp_oracle_request): New type.
816 (cp_binding_oracle_function): New type.
817 (cp_binding_oracle): Declare.
818 (cp_finish_injected_record_type): Declare.
819 * friend.c (global_friend): New var.
820 (set_global_friend): New fn.
821 (is_global_friend): New fn.
822 (is_friend): Call is_global_friend.
823 * name-lookup.c (cp_binding_oracle): New var.
824 (query_oracle): New fn.
825 (qualified_lookup_using_namespace): Call query_oracle.
826 (lookup_name_real_1): Likewise.
827 * parser.c (cp_literal_operator_id): Drop static.
828 * search.c (friend_accessible_p): Call is_global_friend.
829 * semantics.c (is_this_parameter): Accept a variable if the
830 binding oracle is enabled.
831
a294cb9e 8322017-01-27 Jason Merrill <jason@redhat.com>
833
834 PR c++/78771 - ICE with inherited constructor.
835 * call.c (build_over_call): Call deduce_inheriting_ctor here.
836 * pt.c (tsubst_decl): Not here.
837 * class.c (add_method): Or here.
838 * method.c (deduce_inheriting_ctor): Handle clones.
839 (implicitly_declare_fn): Don't deduce inheriting ctors yet.
840
59fdc96f 8412017-01-27 Adam Butcher <adam@jessamine.co.uk>
842
843 PR c++/64382
844 * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
845 New function.
846 * cp/cp-tree.h: Declare it.
847 * cp/semantics.c (finish_id_expression): Resolve names within a default
848 capturing generic lambda defined within a template prior to
849 instantiation to allow for captures to be added to the closure type.
850
d91fe718 8512017-01-26 Jakub Jelinek <jakub@redhat.com>
852
853 PR c++/68727
854 * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
855 * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
856 * parser.c (cp_parser_builtin_offsetof): Pass result of
857 build_static_cast of null_pointer_node to finish_offsetof.
858 * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
859 it for -Winvalid-offsetof pedwarn instead of trying to guess
860 original offsetof type from EXPR. Save OBJECT_PTR as a new
861 second operand to OFFSETOF_EXPR.
862 * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
863 finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
864 as OBJECT_PTR.
865
d7670757 8662017-01-26 Jason Merrill <jason@redhat.com>
867
6b4374bc 868 * name-lookup.c (parse_using_directive): Deprecate strong using.
869
d7670757 870 PR c++/79176 - lambda ICE with -flto -Os
871 * decl2.c (vague_linkage_p): Handle decloned 'tors.
872 * tree.c (decl_linkage): Likewise.
873
50a16e31 8742017-01-25 Martin Sebor <msebor@redhat.com>
875
329b8a24 876 * decl.c (grokdeclarator): Fix a typo in a comment.
50a16e31 877
ff45b474 8782017-01-25 Jakub Jelinek <jakub@redhat.com>
879
ecdf7514 880 PR c++/78896
881 * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
882 lambda expressions.
883
ff45b474 884 PR c++/77914
885 * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
886 OPT_Wpedantic on lambda templates for -std=c++14 and higher.
887
96afa092 8882017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
889
890 PR lto/79061
891 * decl.c (cxx_init_decl_processing): Pass main_input_filename
892 to build_translation_unit_decl.
893
0e899ffe 8942017-01-24 Jakub Jelinek <jakub@redhat.com>
895
896 PR c++/79205
897 * cp-gimplify.c (cp_genericize_r): Add result of
898 convert_from_reference on invisiref parm to p_set.
899
2f4cab3c 9002017-01-24 Nathan Sidwell <nathan@acm.org>
901
e07fb6a7 902 PR c++/78469 - defaulted ctor and inaccessible dtor
903 * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
904 * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
905 * tree.c (build_target_expr): Check tf_no_cleanup.
906
2f4cab3c 907 PR c++/79118 - anon-members and constexpr
908 * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
909 ctor decl. Recursively check anonymous members.
910 (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
911 call.
912 (explain_invalid_constexpr_fn): Likewise.
913
340a2497 9142017-01-23 Nathan Sidwell <nathan@acm.org>
915
76b0d9e5 916 PR c++/71710 - template using directive of field
917 * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
918 check earlier.
919
340a2497 920 PR c++/71406 - ICE with scope-ref'd template id exprs
921 PR c++/77508
922 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
923 before breaking up TEMPLATE_ID_EXPR.
924
6f0a524c 9252017-01-20 Nathan Sidwell <nathan@acm.org>
926
927 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
928 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
929
f778e503 9302017-01-20 David Malcolm <dmalcolm@redhat.com>
931
932 PR c++/77829
933 PR c++/78656
934 * cp-tree.h (suggest_alternatives_for): Add bool param.
935 (suggest_alternative_in_explicit_scope): New decl.
936 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
937 that isn't the global one, call new function
938 suggest_alternative_in_explicit_scope, only calling
939 suggest_alternatives_for if it fails, and disabling near match
940 searches fort that case. When SCOPE is the global namespace,
941 pass true for new param to suggest_alternatives_for to allow for
942 fuzzy name lookups.
943 * lex.c (unqualified_name_lookup_error): Pass true for new param
944 to suggest_alternatives_for.
945 * name-lookup.c (consider_binding_level): Add forward decl.
946 (suggest_alternatives_for): Add "suggest_misspellings" param,
947 using it to conditionalize the fuzzy name-lookup code.
948 (suggest_alternative_in_explicit_scope): New function.
949 * parser.c (cp_parser_primary_expression): When calling
950 finish_id_expression, pass location of id_expression rather
951 than that of id_expr_token.
952 (cp_parser_id_expression): Convert local "unqualified_id" from
953 tree to cp_expr to avoid implicitly dropping location information.
954
3ef7eab1 9552017-01-20 Marek Polacek <polacek@redhat.com>
956
957 PR c/64279
958 * call.c (build_conditional_expr_1): Warn about duplicated branches.
959 * semantics.c (finish_expr_stmt): Build statement using the proper
960 location.
961
46fd36c9 9622017-01-19 Jason Merrill <jason@redhat.com>
963
fb14a947 964 US 20 - forwarding references and class template argument deduction
965 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
966 * pt.c (push_template_decl_real): Set it.
967 (maybe_adjust_types_for_deduction): Check it.
968 (rewrite_template_parm): Copy it.
969
d5d551c7 970 US 19 - deduction guides and constructors
971 * call.c (joust): Prefer deduction guides to constructors.
972 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
973 (deduction_guide_p): Check DECL_P.
974
6d0c5d85 975 * decl.c (check_initializer): Always use build_aggr_init for array
976 decomposition.
977
46fd36c9 978 PR c++/79130 - decomposition and direct-initialization
979 * init.c (build_aggr_init): Communicate direct-initialization to
980 build_vec_init.
981 (build_vec_init): Check for array copy sooner.
982 * parser.c (cp_parser_decomposition_declaration): Remove call to
983 build_x_compound_expr_from_list.
984
4e2cb1d9 9852017-01-18 Jason Merrill <jason@redhat.com>
986
987 PR c++/68666 - member variable template-id
988 * typeck.c (finish_class_member_access_expr): Handle variable
989 template-id.
990 * pt.c (lookup_and_finish_template_variable): No longer static.
991 * cp-tree.h: Declare it.
992
5dd8ae13 9932017-01-18 Nathan Sidwell <nathan@acm.org>
994
995 PR c++/78488
996 * call.c (build_over_call): When checking ellipsis conversions for
997 an inherited ctor, make sure there is at least one conversion.
998
7ad17b58 9992017-01-18 Jason Merrill <jason@redhat.com>
3af292f3 1000
1001 PR c++/78894 - ICE with class deduction and default arg
1002 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
1003
32d3ed1d 10042017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1005
1006 PR c++/77489
1007 * mangle.c (write_discriminator): Reorganize abi warning check.
1008
4afe894b 10092017-01-18 Nathan Sidwell <nathan@acm.org>
1010
8a0fefbc 1011 * cp-tree.h: Clarify exception spec node comment.
1012 * except.c (nothrow_spec_p): Simplify by checking node-equality.
1013
4afe894b 1014 PR c++/79091
1015 * mangle.c (write_exception_spec): Check nothrow explicitly.
1016 (write_encoding): Don't increment processing_template_decl around
1017 encoding.
1018
322066d8 10192017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1020
1021 PR c++/70182
1022 * mangle.c (write_template_args): Add "on" for operator names.
1023
a2929a3a 10242017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1025
1026 PR c++/77489
1027 * mangle.c (write_discriminator): Handle discriminator >= 10.
1028
e395357f 10292017-01-17 Nathan Sidwell <nathan@acm.org>
1030
1031 PR c++/61636
1032 * cp-tree.h (maybe_generic_this_capture): Declare.
1033 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
1034 (maybe_resolve_dummy): ... here. Call it.
1035 (maybe_generic_this_capture): New.
1036 * parser.c (cp_parser_postfix_expression): Speculatively capture
1037 this in generic lambda in unresolved member function call.
1038 * pt.c (tsubst_copy_and_build): Force hard error from failed
1039 member function lookup in generic lambda.
1040
54b39471 10412017-01-17 Aldy Hernandez <aldyh@redhat.com>
1042
1043 PR c++/70565
1044 * cp-array-notation.c (expand_array_notation_exprs): Handle
1045 OMP_PARALLEL.
1046
608d104a 10472017-01-11 Jason Merrill <jason@redhat.com>
1048
1049 PR c++/78337 - ICE on invalid with generic lambda
1050 * semantics.c (process_outer_var_ref): Check if containing_function
1051 is null. Move inform call under complain test.
1052
a9306ccb 10532017-01-11 Nathan Sidwell <nathan@acm.org>
1054
1055 PR c++/77812
1056 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
1057 is a new overload.
1058
3b8d663f 10592017-01-11 Nathan Sidwell <nathan@acm.org>
1060
1061 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
1062
9a26d403 10632017-01-11 Jakub Jelinek <jakub@redhat.com>
1064
945272da 1065 PR c++/78341
1066 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
1067 assertion. Formatting fix.
1068
9a26d403 1069 PR c++/72813
1070 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
1071 writing PCH file.
1072
9348467c 10732017-01-10 David Malcolm <dmalcolm@redhat.com>
1074
1075 PR c++/77949
1076 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
1077 a missing semicolon if we have a valid insertion location for
1078 the fix-it hint.
1079
593b46d1 10802017-01-10 Jason Merrill <jason@redhat.com>
1081
1082 FI 20, decomposition declaration with parenthesized initializer.
1083 * parser.c (cp_parser_decomposition_declaration): Use
1084 cp_parser_initializer.
1085
caba101f 10862017-01-09 Jason Merrill <jason@redhat.com>
1087
1088 Implement P0195R2, C++17 variadic using.
1089 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
1090 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
1091 * error.c (dump_decl): Likewise.
1092
d0abd9e0 10932017-01-09 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR translation/79019
1096 PR translation/79020
1097 * semantics.c (finish_omp_clauses): Add missing whitespace to
1098 translatable strings.
1099 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
1100
66d09a96 11012017-01-07 Jason Merrill <jason@redhat.com>
1102
1103 PR c++/78948 - instantiation from discarded statement
1104 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
1105 * cp-tree.h (in_discarded_stmt): Declare it.
1106 (struct saved_scope): Add discarded_stmt bitfield.
1107 (in_discarded_stmt): New macro.
1108 * decl2.c (mark_used): Check it.
1109 * parser.c (cp_parser_selection_statement): Adjust.
1110 (cp_parser_jump_statement): Adjust.
1111
e6ceca69 11122017-01-05 Jakub Jelinek <jakub@redhat.com>
1113
9d7b3aa6 1114 PR c++/78931
1115 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
1116 REFERENCE_REF_P, set tt to its operand.
1117
e6ceca69 1118 PR c++/78890
1119 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
1120 unions even for C++11 and later.
1121
54631f19 11222017-01-05 Nathan Sidwell <nathan@acm.org>
1123
1124 PR c++/78765
1125 * pt.c (convert_nontype_argument): Don't try and see if integral
1126 or enum expressions are constants prematurely.
1127
6124217c 11282017-01-04 Marek Polacek <polacek@redhat.com>
1129
1130 PR c++/64767
1131 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
1132 a zero character literal.
1133
424874ef 11342017-01-04 Jakub Jelinek <jakub@redhat.com>
1135
0b16b811 1136 PR c++/78949
1137 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
1138 vector type.
1139
eccc8e87 1140 PR c++/78693
1141 * parser.c (cp_parser_simple_declaration): Only complain about
1142 inconsistent auto deduction if auto_result doesn't use auto.
1143
04e02ebd 1144 * parser.c (cp_parser_simple_declaration): Diagnose function
1145 declaration among more than one init-declarators with auto
1146 specifier.
1147
424874ef 1148 PR c++/71182
1149 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
1150 assertion, as lexer->buffer may be NULL.
1151
fd130325 11522017-01-04 Marek Polacek <polacek@redhat.com>
1153
1154 PR c++/77545
1155 PR c++/77284
1156 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
1157
adcbdb02 11582017-01-04 Nathan Sidwell <nathan@acm.org>
1159
1160 PR c++/66735
1161 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
1162 (lambda_capture_field_type): Update prototype.
1163 * lambda.c (lambda_capture_field_type): Add is_reference parm.
1164 Add referenceness here.
1165 (add_capture): Adjust lambda_capture_field_type call, refactor
1166 error checking.
1167 * pt.c (tsubst): Adjust lambda_capture_field_type call.
1168
aad93da1 11692017-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 1170
1171 Update copyright years.
7dfbd804 1172\f
aad93da1 1173Copyright (C) 2017 Free Software Foundation, Inc.
7dfbd804 1174
1175Copying and distribution of this file, with or without modification,
1176are permitted in any medium without royalty provided the copyright
1177notice and this notice are preserved.