1 2017-04-21 Jason Merrill <jason@redhat.com>
3 PR c++/80179 - ICE with initialized flexible array member.
4 * constexpr.c (verify_ctor_sanity): Handle flexible array members.
6 2017-04-21 Richard Biener <rguenther@suse.de>
8 * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
10 * lex.c (copy_decl): Pass down mem-stat info.
11 (copy_type): Likewise.
13 2017-04-20 Jonathan Wakely <jwakely@redhat.com>
16 * init.c (build_new_1): Suppress notes about over-aligned new when
17 the warning is suppressed.
19 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
21 * parser.c (cp_parser_member_declaration): Add warning with fixit
22 information for extra semicolon after in-class function definition.
24 2017-04-20 Jakub Jelinek <jakub@redhat.com>
27 * tree.c (build_cplus_array_type): Call build_array_type
28 with the intended TYPE_TYPELESS_STORAGE flag value, instead
29 of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
32 2017-04-18 Marek Polacek <polacek@redhat.com>
34 PR c++/80244 - ICE with attribute in template alias.
35 * tree.c (strip_typedefs): Handle UNDERLYING_TYPE.
37 PR c++/80241 - ICE with alignas pack expansion.
38 * error.c (dump_expr): Handle TREE_LIST.
39 * parser.c (cp_parser_std_attribute_list): Return error_mark if
40 make_pack_expansion returns an error.
42 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
45 * class.c (fixup_may_alias): Fix all type variants.
47 2017-04-17 Jason Merrill <jason@redhat.com>
49 PR c++/80415 - wrong error with default arg and array reference.
50 * tree.c (lvalue_kind): Return clk_class for an array prvalue.
52 * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.
54 2017-04-15 Alexandre Oliva <aoliva@redhat.com>
56 * decl.c (name_unnamed_type): Split out of...
57 (grokdeclarator): ... this.
58 * decl.h (name_unnamed_type): Declare.
60 2017-04-12 Richard Biener <rguenther@suse.de>
61 Bernd Edlinger <bernd.edlinger@hotmail.de>
64 * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
65 for arrays of character or std::byte type.
67 2017-04-11 Jason Merrill <jason@redhat.com>
69 PR c++/80294 - ICE with constexpr and inheritance.
70 * constexpr.c (reduced_constant_expression_p):
71 A null constructor element is non-constant.
72 (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
73 returning an empty base.
75 2017-04-11 Jakub Jelinek <jakub@redhat.com>
78 * decl.c (cp_finish_decomp): If processing_template_decl on
79 non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
80 change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make
81 sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
83 * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
84 with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
87 2017-04-11 Jakub Jelinek <jakub@redhat.com>
90 * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
92 2017-04-10 Jakub Jelinek <jakub@redhat.com>
95 * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
96 operand, if it is a static member function, recurse on the
99 2017-04-10 Marek Polacek <polacek@redhat.com>
102 * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set
103 ORIG_TYPE earlier and not only when shortening.
105 2017-04-07 Jason Merrill <jason@redhat.com>
107 PR c++/80356 - ICE with reference to function template argument.
109 * pt.c (convert_nontype_argument_function): Adjust type even with a
110 value-dependent argument.
112 PR c++/80267 - ICE with nested capture of reference
114 * pt.c (tsubst_copy): Handle lookup finding a capture proxy.
116 2017-04-07 Marek Polacek <polacek@redhat.com>
119 * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.
122 * call.c (build_over_call): Don't check cxx_dialect.
123 * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor
124 whether SUB is a CONSTRUCTOR.
125 * init.c (build_new_1): Don't check cxx_dialect.
126 * tree.c (replace_placeholders): Add a function comment. Return if
127 not in C++14, or if the object isn't a (member of a) class.
128 * typeck2.c (store_init_value): Don't check cxx_dialect nor whether
129 TYPE is CLASS_TYPE_P.
131 2017-04-05 Jakub Jelinek <jakub@redhat.com>
134 * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead
135 of a loop doing vec_safe_push of NULL. Formatting fixes.
136 (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx
137 to newidx before calling canonical_type_parameter on newtype.
139 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de>
142 * cxx-pretty-print.c (cxx_pretty_printer::expression): Add
143 UNARY_PLUS_EXPR case.
145 2017-04-03 Jason Merrill <jason@redhat.com>
147 * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
149 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
151 * class.c (update_vtable_entry_for_fn): Fix typo in comment.
152 * decl2.c (one_static_initialization_or_destruction): Likewise.
153 * name-lookup.c (store_bindings): Likewise.
154 * parser.c (make_call_declarator): Likewise.
155 * pt.c (check_explicit_specialization): Likewise.
157 2017-04-03 Jason Merrill <jason@redhat.com>
159 PR sanitizer/79993 - ICE with VLA initialization from string
160 PR c++/69487 - wrong VLA initialization from string
161 * init.c (finish_length_check): Split out from build_vec_init.
162 (build_vec_init): Handle STRING_CST.
163 * typeck2.c (split_nonconstant_init): Handle STRING_CST.
164 (digest_init_r): Don't give a STRING_CST VLA type.
166 2017-03-31 Jakub Jelinek <jakub@redhat.com>
169 * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with
170 REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller
171 for NOP_EXPR to REFERENCE_TYPE.
174 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE.
175 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
177 * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE.
178 Remove extraneous parens.
179 (finish_trait_expr): Handle CPTK_IS_AGGREGATE.
180 * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE.
181 (cp_parser_trait_expr): Likewise.
183 2017-03-27 Jakub Jelinek <jakub@redhat.com>
186 * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument.
187 * typeck.c (cxx_mark_addressable): Likewise. Look through
188 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
190 (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable.
192 2017-03-24 Jason Merrill <jason@redhat.com>
194 PR c++/77339 - ICE with invalid use of alias template.
195 * pt.c (lookup_template_class_1): Don't try to enter the scope of an
198 2017-03-24 Marek Polacek <polacek@redhat.com>
201 * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression
202 doesn't have side effects.
204 2017-03-23 Jason Merrill <jason@redhat.com>
206 PR c++/80150 - ICE with overloaded variadic deduction.
207 * pt.c (try_one_overload): Remove asserts.
209 PR c++/77563 - missing ambiguous conversion error.
210 * call.c (convert_like_real): Use LOOKUP_IMPLICIT.
212 2017-03-23 Marek Polacek <polacek@redhat.com>
214 * cp-tree.h: Remove a C_RID_YYCODE reference.
216 2017-03-22 Jakub Jelinek <jakub@redhat.com>
219 * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
220 case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
221 processing_template_decl.
223 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com>
226 * name-lookup.c (pushtag_1): Add check for bogus, non template,
227 std::initializer_list.
229 2017-03-21 Jakub Jelinek <jakub@redhat.com>
232 * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.
234 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com>
237 * init.c (std_placement_new_fn_p): New.
238 (build_new_1): Call it.
240 2017-03-20 Jason Merrill <jason@redhat.com>
242 PR c++/80096 - ICE with C++17 non-type auto.
243 * pt.c (tsubst): Delay tsubst of type of template non-type
246 PR c++/79519 - ICE with deleted template friend.
247 * decl.c (grokdeclarator): Complain about misplaced function
248 definition using =, as well.
250 PR c++/79640 - infinite recursion with generic lambda.
251 * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation
252 before substituting its initializer.
254 2017-03-20 Marek Polacek <polacek@redhat.com>
255 Paolo Carlini <paolo.carlini@oracle.com>
257 PR c++/80059 - ICE with noexcept and __transaction_atomic
258 * except.c (build_must_not_throw_expr): Call
259 instantiate_non_dependent_expr.
261 2017-03-19 Jason Merrill <jason@redhat.com>
263 PR c++/80084 - wrong C++17 decomposition by reference of parameter.
264 * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a
265 reference decomposition.
267 PR c++/80077 - error with constexpr and -fno-elide-constructors.
268 * constexpr.c (cxx_eval_call_expression): Set ctx->call while
269 expanding trivial constructor.
271 2017-03-17 Jason Merrill <jason@redhat.com>
273 PR c++/78345 - ICE initializing array from lambda.
274 * init.c (build_aggr_init): Check array initializer.
275 (build_vec_init): Check the type of a CONSTRUCTOR.
277 PR c++/80073 - C++17 ICE with virtual base.
278 * decl.c (xref_basetypes): Also check for indirect vbases.
280 2017-03-16 Jason Merrill <jason@redhat.com>
282 * decl.c (start_enum): std::byte aliases anything.
285 * constexpr.c (lookup_placeholder): Tweak.
287 2017-03-15 Jason Merrill <jason@redhat.com>
289 PR c++/80043 - ICE with -fpermissive
290 * typeck.c (convert_for_assignment): Handle instantiate_type
293 2017-03-14 Nathan Sidwell <nathan@acm.org>
295 PR c++/79393 DR 1658 workaround
296 * method.c (synthesized_method_base_walk): Inihibit abstract class
297 virtual base access check here.
298 (synthesized_method_walk): Not here.
300 2017-03-13 Nathan Sidwell <nathan@acm.org>
302 PR c++/79393 DR 1658 workaround
303 * method.c (synthesized_method_walk): Check vbases of abstract
304 classes for dtor walk.
306 2017-03-10 David Malcolm <dmalcolm@redhat.com>
309 * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs".
311 2017-03-10 Jason Merrill <jason@redhat.com>
313 PR c++/79960 - alias templates and partial ordering
314 * pt.c (comp_template_args): Add partial_order parm.
315 (template_args_equal): Likewise.
316 (comp_template_args_porder): New.
317 (get_partial_spec_bindings): Use it.
319 2017-03-10 Marek Polacek <polacek@redhat.com>
322 * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
324 2017-03-10 Jakub Jelinek <jakub@redhat.com>
327 * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
328 Use XALLOCAVEC macro.
331 * decl.c (finish_enum_value_list): If value is error_mark_node,
332 don't copy it and change its type.
333 * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
334 of CONST_DECL is error_mark_node.
336 2017-03-09 Marek Polacek <polacek@redhat.com>
338 PR c++/79900 - ICE in strip_typedefs
339 * tree.c (strip_typedefs): Skip the attribute handling if T is
340 a variant type which hasn't been updated yet.
342 PR c++/79687 - wrong code with pointer-to-member
343 * init.c (constant_value_1): Break if the variable has a dynamic
346 2017-03-08 Jason Merrill <jason@redhat.com>
348 PR c++/79797 - ICE with self-reference in array DMI.
349 * constexpr.c (lookup_placeholder): Split out...
350 (cxx_eval_constant_expression): ...from here.
352 2017-03-07 Jakub Jelinek <jakub@redhat.com>
355 * parser.c (cp_parser_omp_cancellation_point,
356 cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
357 cp_parser_omp_target_update): Change "may only be used in compound
358 statements" diagnostics, such that the same translatable string is
359 used for all pragmas.
360 (cp_parser_pragma): Likewise. Use error_at instead of
361 cp_parser_error for that diagnostics.
363 2017-03-06 Marek Polacek <polacek@redhat.com>
365 PR c++/79796 - ICE with NSDMI and this pointer
366 * call.c (build_over_call): Handle NSDMI with a 'this' by calling
367 replace_placeholders.
369 2017-03-06 Jakub Jelinek <jakub@redhat.com>
372 * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
375 2017-03-06 Jason Merrill <jason@redhat.com>
377 Revert "Allow deduction guides to look into primary template."
378 * cp-tree.h, parser.c, pt.c, search.c: Revert.
380 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
383 * except.c (build_must_not_throw_expr): Perform the implicit
384 conversions on the condition.
386 2017-03-03 Jason Merrill <jason@redhat.com>
388 * mangle.c (mangle_decl): Check -Wnoexcept-type instead of
391 Core issues 2273 and 2277
392 * call.c (joust): Adjust using-declaration tiebreaker to handle
393 the intermediate base case.
394 * method.c (strip_inheriting_ctors): Just return the argument if
395 !flag_new_inheriting_ctors.
397 2017-03-03 Richard Biener <rguenther@suse.de>
400 * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.
402 2017-03-03 Marek Polacek <polacek@redhat.com>
405 * typeck.c (string_conv_p): In C++11, always call pedwarn with
408 2017-03-02 Jason Merrill <jason@redhat.com>
410 Update overload resolution with deduction guides.
411 * pt.c (do_class_deduction): Always build the copy guide.
412 (copy_guide_p, template_guide_p): New.
413 (build_deduction_guide): Remember the original constructor.
414 * call.c (joust): Prefer the copy guide and non-template guides.
416 Allow deduction guides to look into primary template.
417 * cp-tree.h (struct saved_scope): Add deduction_guide_type.
418 (struct cp_decl_specifier_seq): Add constructor_p.
419 * parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
420 (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p.
421 Clear deduction_guide_type. Don't handle deduction guide names.
422 (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
423 (cp_parser_direct_declarator): Likewise. Handle deduction guides.
424 (cp_parser_member_declaration, cp_parser_cache_defarg)
425 (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
426 * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
427 (build_deduction_guide): Set deduction_guide_type.
428 (dependent_scope_p): Check deduction_guide_type.
429 * search.c (lookup_member): Likewise.
431 2017-03-02 Jakub Jelinek <jakub@redhat.com>
434 * init.c (mark_exp_read_r): New function.
435 (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
436 whole arguments instead of plain mark_exp_read on TREE_LIST values.
438 2017-03-01 Jason Merrill <jason@redhat.com>
440 Class template argument deduction in new-expression
441 * init.c (build_new): Handle deduction from no initializer.
442 * parser.c (cp_parser_new_expression): Don't require a single
443 expression for class template deduction.
444 * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
445 class template placeholder.
446 * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
447 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
448 (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.
450 2017-03-01 Jakub Jelinek <jakub@redhat.com>
453 * init.c (emit_mem_initializers): When not constructing vbases of
454 abstract classes, mark arguments as read for
455 -Wunused-but-set-parameter.
457 2017-02-28 Jason Merrill <jason@redhat.com>
459 Class template argument deduction refinements
460 * call.c (joust): Move deduction guide tiebreaker down.
461 * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class
462 deduction with no initializer.
463 * pt.c (build_deduction_guide): Handle implicit default/copy ctor.
464 (do_class_deduction): Use that rather than special case.
465 (do_auto_deduction): Handle null initializer.
467 2017-02-28 Jakub Jelinek <jakub@redhat.com>
469 * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...")
470 instead of just cond ? "..." : "...".
471 (grokdeclarator): Likewise.
472 (build_enumerator): Likewise.
473 * init.c (build_new_1): Likewise.
474 * call.c (build_new_method_call_1): Likewise.
475 * parser.c: Include intl.h.
476 (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for
477 "enter"/"exit" keyword.
478 (cp_finalize_oacc_routine): Don't use %s to supply portions of the
481 2017-02-27 Jason Merrill <jason@redhat.com>
483 PR c++/71568 - SFINAE forming pointer to member function
484 * init.c (build_offset_ref): Check the return value of
485 perform_or_defer_access_check.
487 2017-02-27 Marek Polacek <polacek@redhat.com>
489 * decl.c (expand_static_init): Add missing } in a comment.
491 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de>
493 * init.c: Include intl.h.
494 (build_new_1): Move message strings into pedwarn to make them
495 -Wformat-security friendly. Mark string for translation.
496 * pt.c (tsubst_copy_and_build): Mark string for translation.
497 Make the pointer const.
498 * semantics.c (finish_id_expression): Mark strings for translation.
500 2017-02-25 Jakub Jelinek <jakub@redhat.com>
502 * call.c (build_op_delete_call): Make msg1 and msg2 const.
504 2017-02-24 Jakub Jelinek <jakub@redhat.com>
507 * call.c (build_over_call): Call check_function_arguments even for
508 -Wrestrict, adjust check_function_arguments caller.
509 * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict
511 * typeck.c (cp_build_function_call_vec): Adjust
512 check_function_arguments caller.
514 2017-02-24 Marek Polacek <polacek@redhat.com>
517 * decl.c (check_redeclaration_exception_specification): Mark a string
518 for translation. Make the pointer const.
520 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
523 * pt.c (register_specialization): Check duplicate_decls return value
524 for error_mark_node and pass it back.
526 2017-02-22 Jason Merrill <jason@redhat.com>
528 PR c++/79679 - missing destructor for argument
529 * call.c (build_over_call): Don't pass tf_no_cleanup to argument
532 * pt.c (do_class_deduction): Handle 0 argument case.
534 2017-02-22 Jakub Jelinek <jakub@redhat.com>
537 * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
538 SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
539 * constexpr.c (potential_constant_expression_1): Handle
540 OMP_*, OACC_* and CILK_* trees. Use error_at with
541 EXPR_LOC_OR_LOC (t, input_location) computed early
542 instead of error, or error_at with location_of (t).
544 2017-02-22 Marek Polacek <polacek@redhat.com>
547 * parser.c (cp_parser_std_attribute_spec): Don't build the attribute
548 if the alignas expression is erroneous.
549 * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
553 * semantics.c (finish_underlying_type): Bail out for incomplete enums.
555 2017-02-21 Jason Merrill <jason@redhat.com>
557 PR c++/50308 - wrong deprecated warning with ADL
558 PR c++/17729 - duplicate deprecated warning
559 * semantics.c (finish_id_expression): Only call mark_used on a
560 function if we aren't building a call.
562 PR c++/41727 - ICE with partial spec of partial instantiation
563 * pt.c (process_partial_specialization): For now, don't check more
564 specialized if there is more than one level of args.
566 2017-02-21 Marek Polacek <polacek@redhat.com>
569 * cp-tree.h (maybe_reject_flexarray_init): Declare.
570 * init.c (maybe_reject_flexarray_init): No longer static.
571 Add check for current_function_decl.
572 * parser.c (cp_parser_late_parse_one_default_arg): Reject
573 a default mem-initializer for a flexible array.
575 2017-02-21 Jakub Jelinek <jakub@redhat.com>
576 Paolo Carlini <paolo.carlini@oracle.com>
579 * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node
581 * pt.c (tsubst_decomp_names): Return error_mark_node if the first
582 decl after the decomposition artificial decl has error_mark_node.
583 * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p
584 instead of just == error_mark_node comparison.
586 2017-02-21 Jakub Jelinek <jakub@redhat.com>
589 * decl.c: Include gimplify.h.
590 (cp_finish_decomp): Make sure there is no sharing of trees
591 in between DECL_VALUE_EXPR of decomposition decls.
594 * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.
597 * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
598 call cplus_expand_constant on it first.
600 2017-02-19 Jason Merrill <jason@redhat.com>
602 PR c++/78139 - destructor needed by new-expression
603 * call.c (build_special_member_call): Use tf_no_cleanup.
605 PR c++/78282 - auto template and pack expansion
606 * pt.c (find_parameter_packs_r): Don't walk into the type of
607 templates other than template template-parameters.
609 PR c++/79606 - ICE with this->base_member in NSDMI
610 * class.c (build_base_path): Check processing_template_decl.
612 PR c++/79607 - ICE with T{} initializer
613 * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
615 PR c++/79566 - elaborated-type-specifier in range for
616 * parser.c (cp_parser_simple_declaration): Fix check for type
619 PR c++/79400 - confusing suggestion of 'noexcept'
620 * parser.c (cp_parser_exception_specification_opt): Remove
621 suggestion for deprecated dynamic exception-specification.
623 PR c++/79470 - partial ordering with reference parameters
624 * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
626 PR c++/79500 - ICE with non-template deduction guide
627 * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
628 DECL_TEMPLATE_RESULT.
630 PR c++/79580 - ICE with compound literal
631 * parser.c (cp_parser_class_head): If we're in the middle of an
632 expression, use ts_within_enclosing_non_class.
634 PR c++/79503 - inherited ctor taking base class
635 * call.c (add_function_candidate): Also check that
636 DECL_INHERITED_CTOR_BASE is reference-related to the parameter type.
638 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com>
641 * typeck.c (cxx_alignas_expr): Reject a non-integral alignas
644 2017-02-19 Eric Fiselier <eric@efcs.ca>
645 Jonathan Wakely <jwakely@redhat.com>
648 * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
649 control warning about literal suffix identifiers without a leading
652 2017-02-17 Jason Merrill <jason@redhat.com>
654 PR c++/79508 - lookup error with member template
655 * parser.c (cp_parser_template_name): Clear
656 parser->context->object_type if we aren't doing lookup.
658 PR c++/78690 - ICE with using and global type with same name
659 * pt.c (type_dependent_object_expression_p): True for
662 PR c++/79549 - C++17 ICE with non-type auto template parameter pack
663 * pt.c (convert_template_argument): Just return an auto arg pack.
664 (tsubst_template_args): Don't tsubst an auto pack type.
666 PR c++/79556 - C++17 ICE with non-type auto
667 * pt.c (do_auto_deduction): Don't try to deduce from null type.
669 PR c++/79533 - C++17 ICE with temporary cast to reference
670 * call.c (build_over_call): Conversion to a reference prevents copy
673 2017-02-16 Jakub Jelinek <jakub@redhat.com>
674 Jason Merrill <jason@redhat.com>
676 PR c++/79502 - lost nodiscard attribute
677 * pt.c (apply_late_template_attributes): Do apply non-dependent
680 2017-02-16 Jason Merrill <jason@redhat.com>
682 PR c++/78572 - ICE with self-modifying array initializer
683 * constexpr.c (cxx_eval_store_expression): The object we're
684 initializing is outside the constant-expression.
685 (cxx_eval_call_expression): Set ctx->call.
687 PR c++/79050 - ICE with undeduced auto and LTO
688 * decl.c (poplevel): Remove undeduced auto decls.
690 2017-02-16 Jakub Jelinek <jakub@redhat.com>
693 * parser.c (cp_parser_omp_target): For -fopenmp-simd
694 ignore #pragma omp target even when not followed by identifier.
696 2017-02-15 Jason Merrill <jason@redhat.com>
697 Jakub Jelinek <jakub@redhat.com>
699 PR c++/79464 - ICE in IPA with omitted constructor parms
700 * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES.
701 (adjust_clone_args): Adjust.
702 (add_method): Remember omitted parms.
703 * call.c (add_function_candidate): Likewise.
704 * mangle.c (write_method_parms): Likewise.
705 * method.c (ctor_omit_inherited_parms): Return false if there are no
708 2017-02-15 Martin Sebor <msebor@redhat.com>
711 * init.c (maybe_reject_flexarray_init): New function.
712 (perform_member_init): Call it.
714 2017-02-15 Jakub Jelinek <jakub@redhat.com>
717 * parser.c (cp_parser_std_attribute): Don't pedwarn about
718 [[deprecated]] with -std=c++11 and [[fallthrough]] with
719 -std=c++11 and -std=c++14.
722 * decl.c (grokdeclarator): For static data members, handle thread_p
723 only after handling inline.
725 2017-02-14 Marek Polacek <polacek@redhat.com>
729 * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
730 clobbering if the postfix expression isn't an EXPR_P.
732 2017-02-13 Jason Merrill <jason@redhat.com>
734 PR c++/79461 - ICE with lambda in constexpr constructor
735 * constexpr.c (build_data_member_initialization): Ignore
736 initialization of a local variable.
738 2017-02-13 Jakub Jelinek <jakub@redhat.com>
740 * init.c (warn_placement_new_too_small): Add missing space in
742 * parser.c (cp_parser_oacc_declare): Likewise.
743 * mangle.c (maybe_check_abi_tags): Likewise.
746 * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs
747 on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR
748 in the rightmost operand.
750 2017-02-13 Nathan Sidwell <nathan@acm.org>
752 PR c++/79296 - ICE mangling localized template instantiation
753 * decl2.c (determine_visibility): Use template fn context for
754 local class instantiations.
756 2017-02-11 Jason Merrill <jason@redhat.com>
758 PR c++/77659 - ICE with new and C++14 aggregate NSDMI
759 * init.c (build_new): Make backups of any CONSTRUCTORs in init.
760 (build_new_1): Use replace_placeholders.
761 * tree.c (replace_placeholders_t): Also track whether we've seen a
763 (replace_placeholders, replace_placeholders_r): Adjust.
766 PR c++/77790 - ICE with auto function in C++11 mode
767 * decl.c (undeduced_auto_decl): Remove C++14 limitation.
768 (require_deduced_type): Add complain parm, return bool.
770 * decl2.c (mark_used): Use require_deduced_type.
772 2017-02-10 Jason Merrill <jason@redhat.com>
774 PR c++/78908 - template ops and bitfields
775 * tree.c (build_min_non_dep): Use unlowered_expr_type.
777 PR c++/78897 - constexpr union
778 * constexpr.c (cxx_eval_store_expression): A store to a union member
779 erases a previous store to another member.
781 PR c++/71285 - member of fold-expression
782 * semantics.c (finish_unary_fold_expr)
783 (finish_binary_fold_expr): Use null type for fold-expressions.
785 PR c++/79401 - protected inherited constructor
786 * call.c (enforce_access): For inheriting constructor, find a base
787 binfo in the path we already have.
789 2017-02-10 Marek Polacek <polacek@redhat.com>
792 * pt.c (type_dependent_expression_p): Check if the expression type
796 * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context
797 if warnings shouldn't be given.
799 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com>
802 * pt.c (tsubst_decl): Don't try to preserve a typedef that names
803 an error_mark_node as type.
805 2017-02-09 Jakub Jelinek <jakub@redhat.com>
806 Jason Merrill <jason@redhat.com>
809 * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
810 from pattern to type.
812 2017-02-09 Jason Merrill <jason@redhat.com>
814 PR c++/79316 - default argument in deduction guide
815 PR c++/79350 - explicit deduction guide
816 * parser.c (cp_parser_constructor_declarator_p)
817 (cp_parser_direct_declarator): Parse deduction guides more like
819 * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
820 * tree.c (special_function_p): Return it.
821 * decl.c (check_special_function_return_type): Handle it.
822 (grokdeclarator, grokfndecl): Adjust.
823 (cp_finish_decl): Pass flags to do_auto_deduction.
824 * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
825 * pt.c (dguide_name_p): Take a const_tree.
826 (do_class_deduction): Handle explicit.
827 (do_auto_deduction): Pass flags through.
828 (build_deduction_guide): Copy explicit flag.
830 2017-02-09 Jakub Jelinek <jakub@redhat.com>
833 * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
834 non-pragma_compound context here.
835 (cp_parser_omp_target): Likewise.
836 (cp_parser_pragma): Don't call push_omp_privatization_clauses and
837 parsing for ordered and target omp pragmas in non-pragma_stmt
838 non-pragma_compound contexts.
841 * parser.c (cp_parser_oacc_declare): Formatting fix.
842 (cp_parser_omp_declare_target): Don't invoke symtab_node::get on
845 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
846 Chung-Lin Tang <cltang@codesourcery.com>
848 * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix
849 parsing. Parse constant expression. Remove semantic checking.
850 (cp_parser_omp_clause_collapse): Disallow tile.
851 (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse
852 error about missing for after already emitting one. Use more
853 conventional for idiom for unbounded loop.
854 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
855 * semantics.c (finish_omp_clauses): Correct TILE semantic check.
856 (finish_omp_for): Deal with tile clause.
858 2017-02-07 Nathan Sidwell <nathan@acm.org>
860 * method.c (synthesized_method_base_walk): New. Broken out of ...
861 (synthesized_method_walk): ... here. Call it. Cleanup
864 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org>
867 * typeck2.c (process_init_constructor_union): Consider only
868 FIELD_DECLs when looking for an NSDMI.
870 2017-02-06 Jason Merrill <jason@redhat.com>
872 PR c++/71193 - incomplete types in templates
873 * parser.c (cp_parser_postfix_dot_deref_expression): In a template
874 handle incomplete type by pedwarning and then treating as dependent.
876 2017-02-06 Jakub Jelinek <jakub@redhat.com>
879 * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR.
880 (potential_constant_expression_1): Likewise.
883 * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
884 allow one fewer than expected arguments if flag_permissive.
887 * decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
888 * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
889 with error_mark_node type.
891 2017-02-03 Jason Merrill <jason@redhat.com>
893 PR c++/78689 - ICE on constructor with label
894 * optimize.c (maybe_clone_body): Replace omitted parameters with
896 * class.c (build_clone): Fix logic for omitting inherited parms.
898 PR c++/12245 - excessive memory use
899 * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
900 back in. Don't cache constants.
901 (maybe_constant_init): Don't cache constants.
903 PR c++/79294 - ICE with invalid template argument
904 * pt.c (convert_nontype_argument_function): Check value-dependence.
905 (convert_nontype_argument): Don't check it here for function ptrs.
907 2017-02-02 Richard Biener <rguenther@suse.de>
910 * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy
911 it lazily on the first changed element only and copy it
912 fully upfront, only storing changed elements.
914 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com>
917 * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL
920 2017-01-31 Jakub Jelinek <jakub@redhat.com>
923 * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
926 2017-01-31 David Malcolm <dmalcolm@redhat.com>
929 * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve
930 any namespace aliases.
932 2017-01-31 Nathan Sidwell <nathan@acm.org>
935 * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING.
939 * pt.c: (instantiate_decl): Push to top level when current
940 function scope doesn't match. Only push lmabda scope stack when
943 * cp-tree.h (instantiate_decl): Make defer_ok bool.
944 * pt.c: Fix instantiate_decl calls to pass true/false not 0/1
945 (instantiate_decl): Simplify and reorder state saving and restoration.
948 * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs.
949 * semantics.c (finish_member_declaration): Assert class is being
952 2017-01-30 Alexandre Oliva <aoliva@redhat.com>
954 Introduce C++ support in libcc1.
955 * cp-tree.h (struct lang_identifier): Add oracle_looked_up.
956 (ansi_opname): Rename to...
957 (cp_operator_id): ... this. Adjust all callers.
958 (ansi_assopname): Rename to...
959 (cp_assignment_operator_id): ... this. Adjust all callers.
960 (cp_literal_operator_id): Declare.
961 (set_global_friend): Declare.
962 (is_global_friend): Declare.
963 (enum cp_oracle_request): New type.
964 (cp_binding_oracle_function): New type.
965 (cp_binding_oracle): Declare.
966 (cp_finish_injected_record_type): Declare.
967 * friend.c (global_friend): New var.
968 (set_global_friend): New fn.
969 (is_global_friend): New fn.
970 (is_friend): Call is_global_friend.
971 * name-lookup.c (cp_binding_oracle): New var.
972 (query_oracle): New fn.
973 (qualified_lookup_using_namespace): Call query_oracle.
974 (lookup_name_real_1): Likewise.
975 * parser.c (cp_literal_operator_id): Drop static.
976 * search.c (friend_accessible_p): Call is_global_friend.
977 * semantics.c (is_this_parameter): Accept a variable if the
978 binding oracle is enabled.
980 2017-01-27 Jason Merrill <jason@redhat.com>
982 PR c++/78771 - ICE with inherited constructor.
983 * call.c (build_over_call): Call deduce_inheriting_ctor here.
984 * pt.c (tsubst_decl): Not here.
985 * class.c (add_method): Or here.
986 * method.c (deduce_inheriting_ctor): Handle clones.
987 (implicitly_declare_fn): Don't deduce inheriting ctors yet.
989 2017-01-27 Adam Butcher <adam@jessamine.co.uk>
992 * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
994 * cp/cp-tree.h: Declare it.
995 * cp/semantics.c (finish_id_expression): Resolve names within a default
996 capturing generic lambda defined within a template prior to
997 instantiation to allow for captures to be added to the closure type.
999 2017-01-26 Jakub Jelinek <jakub@redhat.com>
1002 * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
1003 * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
1004 * parser.c (cp_parser_builtin_offsetof): Pass result of
1005 build_static_cast of null_pointer_node to finish_offsetof.
1006 * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
1007 it for -Winvalid-offsetof pedwarn instead of trying to guess
1008 original offsetof type from EXPR. Save OBJECT_PTR as a new
1009 second operand to OFFSETOF_EXPR.
1010 * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
1011 finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
1014 2017-01-26 Jason Merrill <jason@redhat.com>
1016 * name-lookup.c (parse_using_directive): Deprecate strong using.
1018 PR c++/79176 - lambda ICE with -flto -Os
1019 * decl2.c (vague_linkage_p): Handle decloned 'tors.
1020 * tree.c (decl_linkage): Likewise.
1022 2017-01-25 Martin Sebor <msebor@redhat.com>
1024 * decl.c (grokdeclarator): Fix a typo in a comment.
1026 2017-01-25 Jakub Jelinek <jakub@redhat.com>
1029 * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
1033 * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
1034 OPT_Wpedantic on lambda templates for -std=c++14 and higher.
1036 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1039 * decl.c (cxx_init_decl_processing): Pass main_input_filename
1040 to build_translation_unit_decl.
1042 2017-01-24 Jakub Jelinek <jakub@redhat.com>
1045 * cp-gimplify.c (cp_genericize_r): Add result of
1046 convert_from_reference on invisiref parm to p_set.
1048 2017-01-24 Nathan Sidwell <nathan@acm.org>
1050 PR c++/78469 - defaulted ctor and inaccessible dtor
1051 * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
1052 * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
1053 * tree.c (build_target_expr): Check tf_no_cleanup.
1055 PR c++/79118 - anon-members and constexpr
1056 * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
1057 ctor decl. Recursively check anonymous members.
1058 (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
1060 (explain_invalid_constexpr_fn): Likewise.
1062 2017-01-23 Nathan Sidwell <nathan@acm.org>
1064 PR c++/71710 - template using directive of field
1065 * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
1068 PR c++/71406 - ICE with scope-ref'd template id exprs
1070 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
1071 before breaking up TEMPLATE_ID_EXPR.
1073 2017-01-20 Nathan Sidwell <nathan@acm.org>
1075 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
1076 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
1078 2017-01-20 David Malcolm <dmalcolm@redhat.com>
1082 * cp-tree.h (suggest_alternatives_for): Add bool param.
1083 (suggest_alternative_in_explicit_scope): New decl.
1084 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
1085 that isn't the global one, call new function
1086 suggest_alternative_in_explicit_scope, only calling
1087 suggest_alternatives_for if it fails, and disabling near match
1088 searches fort that case. When SCOPE is the global namespace,
1089 pass true for new param to suggest_alternatives_for to allow for
1091 * lex.c (unqualified_name_lookup_error): Pass true for new param
1092 to suggest_alternatives_for.
1093 * name-lookup.c (consider_binding_level): Add forward decl.
1094 (suggest_alternatives_for): Add "suggest_misspellings" param,
1095 using it to conditionalize the fuzzy name-lookup code.
1096 (suggest_alternative_in_explicit_scope): New function.
1097 * parser.c (cp_parser_primary_expression): When calling
1098 finish_id_expression, pass location of id_expression rather
1099 than that of id_expr_token.
1100 (cp_parser_id_expression): Convert local "unqualified_id" from
1101 tree to cp_expr to avoid implicitly dropping location information.
1103 2017-01-20 Marek Polacek <polacek@redhat.com>
1106 * call.c (build_conditional_expr_1): Warn about duplicated branches.
1107 * semantics.c (finish_expr_stmt): Build statement using the proper
1110 2017-01-19 Jason Merrill <jason@redhat.com>
1112 US 20 - forwarding references and class template argument deduction
1113 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
1114 * pt.c (push_template_decl_real): Set it.
1115 (maybe_adjust_types_for_deduction): Check it.
1116 (rewrite_template_parm): Copy it.
1118 US 19 - deduction guides and constructors
1119 * call.c (joust): Prefer deduction guides to constructors.
1120 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
1121 (deduction_guide_p): Check DECL_P.
1123 * decl.c (check_initializer): Always use build_aggr_init for array
1126 PR c++/79130 - decomposition and direct-initialization
1127 * init.c (build_aggr_init): Communicate direct-initialization to
1129 (build_vec_init): Check for array copy sooner.
1130 * parser.c (cp_parser_decomposition_declaration): Remove call to
1131 build_x_compound_expr_from_list.
1133 2017-01-18 Jason Merrill <jason@redhat.com>
1135 PR c++/68666 - member variable template-id
1136 * typeck.c (finish_class_member_access_expr): Handle variable
1138 * pt.c (lookup_and_finish_template_variable): No longer static.
1139 * cp-tree.h: Declare it.
1141 2017-01-18 Nathan Sidwell <nathan@acm.org>
1144 * call.c (build_over_call): When checking ellipsis conversions for
1145 an inherited ctor, make sure there is at least one conversion.
1147 2017-01-18 Jason Merrill <jason@redhat.com>
1149 PR c++/78894 - ICE with class deduction and default arg
1150 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
1152 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1155 * mangle.c (write_discriminator): Reorganize abi warning check.
1157 2017-01-18 Nathan Sidwell <nathan@acm.org>
1159 * cp-tree.h: Clarify exception spec node comment.
1160 * except.c (nothrow_spec_p): Simplify by checking node-equality.
1163 * mangle.c (write_exception_spec): Check nothrow explicitly.
1164 (write_encoding): Don't increment processing_template_decl around
1167 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1170 * mangle.c (write_template_args): Add "on" for operator names.
1172 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1175 * mangle.c (write_discriminator): Handle discriminator >= 10.
1177 2017-01-17 Nathan Sidwell <nathan@acm.org>
1180 * cp-tree.h (maybe_generic_this_capture): Declare.
1181 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
1182 (maybe_resolve_dummy): ... here. Call it.
1183 (maybe_generic_this_capture): New.
1184 * parser.c (cp_parser_postfix_expression): Speculatively capture
1185 this in generic lambda in unresolved member function call.
1186 * pt.c (tsubst_copy_and_build): Force hard error from failed
1187 member function lookup in generic lambda.
1189 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1192 * cp-array-notation.c (expand_array_notation_exprs): Handle
1195 2017-01-11 Jason Merrill <jason@redhat.com>
1197 PR c++/78337 - ICE on invalid with generic lambda
1198 * semantics.c (process_outer_var_ref): Check if containing_function
1199 is null. Move inform call under complain test.
1201 2017-01-11 Nathan Sidwell <nathan@acm.org>
1204 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
1207 2017-01-11 Nathan Sidwell <nathan@acm.org>
1209 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
1211 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1214 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
1215 assertion. Formatting fix.
1218 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
1221 2017-01-10 David Malcolm <dmalcolm@redhat.com>
1224 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
1225 a missing semicolon if we have a valid insertion location for
1228 2017-01-10 Jason Merrill <jason@redhat.com>
1230 FI 20, decomposition declaration with parenthesized initializer.
1231 * parser.c (cp_parser_decomposition_declaration): Use
1232 cp_parser_initializer.
1234 2017-01-09 Jason Merrill <jason@redhat.com>
1236 Implement P0195R2, C++17 variadic using.
1237 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
1238 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
1239 * error.c (dump_decl): Likewise.
1241 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1243 PR translation/79019
1244 PR translation/79020
1245 * semantics.c (finish_omp_clauses): Add missing whitespace to
1246 translatable strings.
1247 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
1249 2017-01-07 Jason Merrill <jason@redhat.com>
1251 PR c++/78948 - instantiation from discarded statement
1252 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
1253 * cp-tree.h (in_discarded_stmt): Declare it.
1254 (struct saved_scope): Add discarded_stmt bitfield.
1255 (in_discarded_stmt): New macro.
1256 * decl2.c (mark_used): Check it.
1257 * parser.c (cp_parser_selection_statement): Adjust.
1258 (cp_parser_jump_statement): Adjust.
1260 2017-01-05 Jakub Jelinek <jakub@redhat.com>
1263 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
1264 REFERENCE_REF_P, set tt to its operand.
1267 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
1268 unions even for C++11 and later.
1270 2017-01-05 Nathan Sidwell <nathan@acm.org>
1273 * pt.c (convert_nontype_argument): Don't try and see if integral
1274 or enum expressions are constants prematurely.
1276 2017-01-04 Marek Polacek <polacek@redhat.com>
1279 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
1280 a zero character literal.
1282 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1285 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
1289 * parser.c (cp_parser_simple_declaration): Only complain about
1290 inconsistent auto deduction if auto_result doesn't use auto.
1292 * parser.c (cp_parser_simple_declaration): Diagnose function
1293 declaration among more than one init-declarators with auto
1297 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
1298 assertion, as lexer->buffer may be NULL.
1300 2017-01-04 Marek Polacek <polacek@redhat.com>
1304 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
1306 2017-01-04 Nathan Sidwell <nathan@acm.org>
1309 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
1310 (lambda_capture_field_type): Update prototype.
1311 * lambda.c (lambda_capture_field_type): Add is_reference parm.
1312 Add referenceness here.
1313 (add_capture): Adjust lambda_capture_field_type call, refactor
1315 * pt.c (tsubst): Adjust lambda_capture_field_type call.
1317 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1319 Update copyright years.
1321 Copyright (C) 2017 Free Software Foundation, Inc.
1323 Copying and distribution of this file, with or without modification,
1324 are permitted in any medium without royalty provided the copyright
1325 notice and this notice are preserved.