1 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't
5 add pedigree operation and detach call here.
6 * cp-gimplify.c (cp_gimplify_expr): Remove the calls to
7 cilk_cp_gimplify_call_params_in_spawned_fn.
8 (cilk_cp_gimplify_call_params_in_spawned_fn): Remove function.
9 * semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN.
11 2017-04-29 Volker Reichelt <v.reichelt@netcologne.de>
13 * parser.c (cp_parser_member_declaration): Add fix-it hints for
14 stray comma and missing semicolon at end of member declaration.
16 2017-04-27 Volker Reichelt <v.reichelt@netcologne.de>
18 * parser.c (cp_parser_cast_expression): Add target type of cast to
20 * error.c (type_to_string): Add '{enum}' suffix to enumeration types.
22 2017-04-26 Paolo Carlini <paolo.carlini@oracle.com>
24 * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change
26 * cp-tree.h (grok_ctor_properties): Update.
28 2017-04-26 Volker Reichelt <v.reichelt@netcologne.de>
30 * parser.c (cp_parser_nested_name_specifier_opt): Add fix-it
31 information to diagnostic of invalid colon in nested-name-specifier.
33 2017-04-25 Volker Reichelt <v.reichelt@netcologne.de>
35 * parser.c (cp_parser_elaborated_type_specifier): Add fix-it to
36 diagnostic of invalid class/struct keyword after enum.
38 2017-04-25 David Malcolm <dmalcolm@redhat.com>
40 * parser.c (cp_parser_member_declaration): Add fix-it hint
41 for removing stray semicolons.
43 2017-04-25 David Malcolm <dmalcolm@redhat.com>
45 * name-lookup.c (get_std_name_hint): New function.
46 (maybe_suggest_missing_header): New function.
47 (suggest_alternative_in_explicit_scope): Call
48 maybe_suggest_missing_header.
50 2017-04-25 David Malcolm <dmalcolm@redhat.com>
53 * name-lookup.c (suggest_alternative_in_explicit_scope): Convert
54 candidate type of bm from tree to const char *.
55 (consider_binding_level): Likewise.
56 (lookup_name_fuzzy): Likewise, using this to merge the best
57 result from the preprocessor into bm, rather than immediately
58 returning, so that better matches from reserved words can "win".
59 Guard the rejection of keywords that don't start decl-specifiers
60 so it only happens for FUZZY_LOOKUP_TYPENAME.
62 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de>
64 * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics.
65 (start_enum): Likewise.
66 (build_enumerator): Likewise. Use %qE instead of plain %E.
67 * parser.c (cp_parser_mem_initializer_list): Use %qD instead of
68 %<%D%> in diagnostics.
69 (cp_parser_elaborated_type_specifier): Likewise.
70 * pt.c (make_pack_expansion): Use %qT and %qE instead of
71 %<%T%> and %<%E%> in diagnostics.
72 (tsubst_pack_expansion): Likewise.
74 2017-04-24 David Malcolm <dmalcolm@redhat.com>
77 * parser.c (cp_parser_unary_expression): Generate a location
78 range for alignof and sizeof expressions.
80 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de>
82 * parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to
84 (cp_parser_virt_specifier_seq_opt): Likewise.
85 (set_and_check_decl_spec_loc): Likewise twice.
87 2017-04-21 Jason Merrill <jason@redhat.com>
89 PR c++/80179 - ICE with initialized flexible array member.
90 * constexpr.c (verify_ctor_sanity): Handle flexible array members.
92 2017-04-21 Richard Biener <rguenther@suse.de>
94 * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
95 (copy_type): Likewise.
96 * lex.c (copy_decl): Pass down mem-stat info.
97 (copy_type): Likewise.
99 2017-04-20 Jonathan Wakely <jwakely@redhat.com>
102 * init.c (build_new_1): Suppress notes about over-aligned new when
103 the warning is suppressed.
105 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
107 * parser.c (cp_parser_member_declaration): Add warning with fixit
108 information for extra semicolon after in-class function definition.
110 2017-04-20 Jakub Jelinek <jakub@redhat.com>
113 * tree.c (build_cplus_array_type): Call build_array_type
114 with the intended TYPE_TYPELESS_STORAGE flag value, instead
115 of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
118 2017-04-18 Marek Polacek <polacek@redhat.com>
120 PR c++/80244 - ICE with attribute in template alias.
121 * tree.c (strip_typedefs): Handle UNDERLYING_TYPE.
123 PR c++/80241 - ICE with alignas pack expansion.
124 * error.c (dump_expr): Handle TREE_LIST.
125 * parser.c (cp_parser_std_attribute_list): Return error_mark if
126 make_pack_expansion returns an error.
128 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
131 * class.c (fixup_may_alias): Fix all type variants.
133 2017-04-17 Jason Merrill <jason@redhat.com>
135 PR c++/80415 - wrong error with default arg and array reference.
136 * tree.c (lvalue_kind): Return clk_class for an array prvalue.
138 * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.
140 2017-04-15 Alexandre Oliva <aoliva@redhat.com>
142 * decl.c (name_unnamed_type): Split out of...
143 (grokdeclarator): ... this.
144 * decl.h (name_unnamed_type): Declare.
146 2017-04-12 Richard Biener <rguenther@suse.de>
147 Bernd Edlinger <bernd.edlinger@hotmail.de>
150 * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
151 for arrays of character or std::byte type.
153 2017-04-11 Jason Merrill <jason@redhat.com>
155 PR c++/80294 - ICE with constexpr and inheritance.
156 * constexpr.c (reduced_constant_expression_p):
157 A null constructor element is non-constant.
158 (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
159 returning an empty base.
161 2017-04-11 Jakub Jelinek <jakub@redhat.com>
164 * decl.c (cp_finish_decomp): If processing_template_decl on
165 non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
166 change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make
167 sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
169 * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
170 with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
173 2017-04-11 Jakub Jelinek <jakub@redhat.com>
176 * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
178 2017-04-10 Jakub Jelinek <jakub@redhat.com>
181 * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
182 operand, if it is a static member function, recurse on the
185 2017-04-10 Marek Polacek <polacek@redhat.com>
188 * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set
189 ORIG_TYPE earlier and not only when shortening.
191 2017-04-07 Jason Merrill <jason@redhat.com>
193 PR c++/80356 - ICE with reference to function template argument.
195 * pt.c (convert_nontype_argument_function): Adjust type even with a
196 value-dependent argument.
198 PR c++/80267 - ICE with nested capture of reference
200 * pt.c (tsubst_copy): Handle lookup finding a capture proxy.
202 2017-04-07 Marek Polacek <polacek@redhat.com>
205 * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.
208 * call.c (build_over_call): Don't check cxx_dialect.
209 * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor
210 whether SUB is a CONSTRUCTOR.
211 * init.c (build_new_1): Don't check cxx_dialect.
212 * tree.c (replace_placeholders): Add a function comment. Return if
213 not in C++14, or if the object isn't a (member of a) class.
214 * typeck2.c (store_init_value): Don't check cxx_dialect nor whether
215 TYPE is CLASS_TYPE_P.
217 2017-04-05 Jakub Jelinek <jakub@redhat.com>
220 * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead
221 of a loop doing vec_safe_push of NULL. Formatting fixes.
222 (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx
223 to newidx before calling canonical_type_parameter on newtype.
225 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de>
228 * cxx-pretty-print.c (cxx_pretty_printer::expression): Add
229 UNARY_PLUS_EXPR case.
231 2017-04-03 Jason Merrill <jason@redhat.com>
233 * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
235 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
237 * class.c (update_vtable_entry_for_fn): Fix typo in comment.
238 * decl2.c (one_static_initialization_or_destruction): Likewise.
239 * name-lookup.c (store_bindings): Likewise.
240 * parser.c (make_call_declarator): Likewise.
241 * pt.c (check_explicit_specialization): Likewise.
243 2017-04-03 Jason Merrill <jason@redhat.com>
245 PR sanitizer/79993 - ICE with VLA initialization from string
246 PR c++/69487 - wrong VLA initialization from string
247 * init.c (finish_length_check): Split out from build_vec_init.
248 (build_vec_init): Handle STRING_CST.
249 * typeck2.c (split_nonconstant_init): Handle STRING_CST.
250 (digest_init_r): Don't give a STRING_CST VLA type.
252 2017-03-31 Jakub Jelinek <jakub@redhat.com>
255 * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with
256 REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller
257 for NOP_EXPR to REFERENCE_TYPE.
260 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE.
261 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
263 * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE.
264 Remove extraneous parens.
265 (finish_trait_expr): Handle CPTK_IS_AGGREGATE.
266 * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE.
267 (cp_parser_trait_expr): Likewise.
269 2017-03-27 Jakub Jelinek <jakub@redhat.com>
272 * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument.
273 * typeck.c (cxx_mark_addressable): Likewise. Look through
274 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
276 (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable.
278 2017-03-24 Jason Merrill <jason@redhat.com>
280 PR c++/77339 - ICE with invalid use of alias template.
281 * pt.c (lookup_template_class_1): Don't try to enter the scope of an
284 2017-03-24 Marek Polacek <polacek@redhat.com>
287 * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression
288 doesn't have side effects.
290 2017-03-23 Jason Merrill <jason@redhat.com>
292 PR c++/80150 - ICE with overloaded variadic deduction.
293 * pt.c (try_one_overload): Remove asserts.
295 PR c++/77563 - missing ambiguous conversion error.
296 * call.c (convert_like_real): Use LOOKUP_IMPLICIT.
298 2017-03-23 Marek Polacek <polacek@redhat.com>
300 * cp-tree.h: Remove a C_RID_YYCODE reference.
302 2017-03-22 Jakub Jelinek <jakub@redhat.com>
305 * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
306 case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
307 processing_template_decl.
309 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com>
312 * name-lookup.c (pushtag_1): Add check for bogus, non template,
313 std::initializer_list.
315 2017-03-21 Jakub Jelinek <jakub@redhat.com>
318 * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.
320 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com>
323 * init.c (std_placement_new_fn_p): New.
324 (build_new_1): Call it.
326 2017-03-20 Jason Merrill <jason@redhat.com>
328 PR c++/80096 - ICE with C++17 non-type auto.
329 * pt.c (tsubst): Delay tsubst of type of template non-type
332 PR c++/79519 - ICE with deleted template friend.
333 * decl.c (grokdeclarator): Complain about misplaced function
334 definition using =, as well.
336 PR c++/79640 - infinite recursion with generic lambda.
337 * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation
338 before substituting its initializer.
340 2017-03-20 Marek Polacek <polacek@redhat.com>
341 Paolo Carlini <paolo.carlini@oracle.com>
343 PR c++/80059 - ICE with noexcept and __transaction_atomic
344 * except.c (build_must_not_throw_expr): Call
345 instantiate_non_dependent_expr.
347 2017-03-19 Jason Merrill <jason@redhat.com>
349 PR c++/80084 - wrong C++17 decomposition by reference of parameter.
350 * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a
351 reference decomposition.
353 PR c++/80077 - error with constexpr and -fno-elide-constructors.
354 * constexpr.c (cxx_eval_call_expression): Set ctx->call while
355 expanding trivial constructor.
357 2017-03-17 Jason Merrill <jason@redhat.com>
359 PR c++/78345 - ICE initializing array from lambda.
360 * init.c (build_aggr_init): Check array initializer.
361 (build_vec_init): Check the type of a CONSTRUCTOR.
363 PR c++/80073 - C++17 ICE with virtual base.
364 * decl.c (xref_basetypes): Also check for indirect vbases.
366 2017-03-16 Jason Merrill <jason@redhat.com>
368 * decl.c (start_enum): std::byte aliases anything.
371 * constexpr.c (lookup_placeholder): Tweak.
373 2017-03-15 Jason Merrill <jason@redhat.com>
375 PR c++/80043 - ICE with -fpermissive
376 * typeck.c (convert_for_assignment): Handle instantiate_type
379 2017-03-14 Nathan Sidwell <nathan@acm.org>
381 PR c++/79393 DR 1658 workaround
382 * method.c (synthesized_method_base_walk): Inihibit abstract class
383 virtual base access check here.
384 (synthesized_method_walk): Not here.
386 2017-03-13 Nathan Sidwell <nathan@acm.org>
388 PR c++/79393 DR 1658 workaround
389 * method.c (synthesized_method_walk): Check vbases of abstract
390 classes for dtor walk.
392 2017-03-10 David Malcolm <dmalcolm@redhat.com>
395 * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs".
397 2017-03-10 Jason Merrill <jason@redhat.com>
399 PR c++/79960 - alias templates and partial ordering
400 * pt.c (comp_template_args): Add partial_order parm.
401 (template_args_equal): Likewise.
402 (comp_template_args_porder): New.
403 (get_partial_spec_bindings): Use it.
405 2017-03-10 Marek Polacek <polacek@redhat.com>
408 * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
410 2017-03-10 Jakub Jelinek <jakub@redhat.com>
413 * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
414 Use XALLOCAVEC macro.
417 * decl.c (finish_enum_value_list): If value is error_mark_node,
418 don't copy it and change its type.
419 * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
420 of CONST_DECL is error_mark_node.
422 2017-03-09 Marek Polacek <polacek@redhat.com>
424 PR c++/79900 - ICE in strip_typedefs
425 * tree.c (strip_typedefs): Skip the attribute handling if T is
426 a variant type which hasn't been updated yet.
428 PR c++/79687 - wrong code with pointer-to-member
429 * init.c (constant_value_1): Break if the variable has a dynamic
432 2017-03-08 Jason Merrill <jason@redhat.com>
434 PR c++/79797 - ICE with self-reference in array DMI.
435 * constexpr.c (lookup_placeholder): Split out...
436 (cxx_eval_constant_expression): ...from here.
438 2017-03-07 Jakub Jelinek <jakub@redhat.com>
441 * parser.c (cp_parser_omp_cancellation_point,
442 cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
443 cp_parser_omp_target_update): Change "may only be used in compound
444 statements" diagnostics, such that the same translatable string is
445 used for all pragmas.
446 (cp_parser_pragma): Likewise. Use error_at instead of
447 cp_parser_error for that diagnostics.
449 2017-03-06 Marek Polacek <polacek@redhat.com>
451 PR c++/79796 - ICE with NSDMI and this pointer
452 * call.c (build_over_call): Handle NSDMI with a 'this' by calling
453 replace_placeholders.
455 2017-03-06 Jakub Jelinek <jakub@redhat.com>
458 * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
461 2017-03-06 Jason Merrill <jason@redhat.com>
463 Revert "Allow deduction guides to look into primary template."
464 * cp-tree.h, parser.c, pt.c, search.c: Revert.
466 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
469 * except.c (build_must_not_throw_expr): Perform the implicit
470 conversions on the condition.
472 2017-03-03 Jason Merrill <jason@redhat.com>
474 * mangle.c (mangle_decl): Check -Wnoexcept-type instead of
477 Core issues 2273 and 2277
478 * call.c (joust): Adjust using-declaration tiebreaker to handle
479 the intermediate base case.
480 * method.c (strip_inheriting_ctors): Just return the argument if
481 !flag_new_inheriting_ctors.
483 2017-03-03 Richard Biener <rguenther@suse.de>
486 * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.
488 2017-03-03 Marek Polacek <polacek@redhat.com>
491 * typeck.c (string_conv_p): In C++11, always call pedwarn with
494 2017-03-02 Jason Merrill <jason@redhat.com>
496 Update overload resolution with deduction guides.
497 * pt.c (do_class_deduction): Always build the copy guide.
498 (copy_guide_p, template_guide_p): New.
499 (build_deduction_guide): Remember the original constructor.
500 * call.c (joust): Prefer the copy guide and non-template guides.
502 Allow deduction guides to look into primary template.
503 * cp-tree.h (struct saved_scope): Add deduction_guide_type.
504 (struct cp_decl_specifier_seq): Add constructor_p.
505 * parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
506 (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p.
507 Clear deduction_guide_type. Don't handle deduction guide names.
508 (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
509 (cp_parser_direct_declarator): Likewise. Handle deduction guides.
510 (cp_parser_member_declaration, cp_parser_cache_defarg)
511 (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
512 * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
513 (build_deduction_guide): Set deduction_guide_type.
514 (dependent_scope_p): Check deduction_guide_type.
515 * search.c (lookup_member): Likewise.
517 2017-03-02 Jakub Jelinek <jakub@redhat.com>
520 * init.c (mark_exp_read_r): New function.
521 (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
522 whole arguments instead of plain mark_exp_read on TREE_LIST values.
524 2017-03-01 Jason Merrill <jason@redhat.com>
526 Class template argument deduction in new-expression
527 * init.c (build_new): Handle deduction from no initializer.
528 * parser.c (cp_parser_new_expression): Don't require a single
529 expression for class template deduction.
530 * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
531 class template placeholder.
532 * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
533 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
534 (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.
536 2017-03-01 Jakub Jelinek <jakub@redhat.com>
539 * init.c (emit_mem_initializers): When not constructing vbases of
540 abstract classes, mark arguments as read for
541 -Wunused-but-set-parameter.
543 2017-02-28 Jason Merrill <jason@redhat.com>
545 Class template argument deduction refinements
546 * call.c (joust): Move deduction guide tiebreaker down.
547 * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class
548 deduction with no initializer.
549 * pt.c (build_deduction_guide): Handle implicit default/copy ctor.
550 (do_class_deduction): Use that rather than special case.
551 (do_auto_deduction): Handle null initializer.
553 2017-02-28 Jakub Jelinek <jakub@redhat.com>
555 * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...")
556 instead of just cond ? "..." : "...".
557 (grokdeclarator): Likewise.
558 (build_enumerator): Likewise.
559 * init.c (build_new_1): Likewise.
560 * call.c (build_new_method_call_1): Likewise.
561 * parser.c: Include intl.h.
562 (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for
563 "enter"/"exit" keyword.
564 (cp_finalize_oacc_routine): Don't use %s to supply portions of the
567 2017-02-27 Jason Merrill <jason@redhat.com>
569 PR c++/71568 - SFINAE forming pointer to member function
570 * init.c (build_offset_ref): Check the return value of
571 perform_or_defer_access_check.
573 2017-02-27 Marek Polacek <polacek@redhat.com>
575 * decl.c (expand_static_init): Add missing } in a comment.
577 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de>
579 * init.c: Include intl.h.
580 (build_new_1): Move message strings into pedwarn to make them
581 -Wformat-security friendly. Mark string for translation.
582 * pt.c (tsubst_copy_and_build): Mark string for translation.
583 Make the pointer const.
584 * semantics.c (finish_id_expression): Mark strings for translation.
586 2017-02-25 Jakub Jelinek <jakub@redhat.com>
588 * call.c (build_op_delete_call): Make msg1 and msg2 const.
590 2017-02-24 Jakub Jelinek <jakub@redhat.com>
593 * call.c (build_over_call): Call check_function_arguments even for
594 -Wrestrict, adjust check_function_arguments caller.
595 * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict
597 * typeck.c (cp_build_function_call_vec): Adjust
598 check_function_arguments caller.
600 2017-02-24 Marek Polacek <polacek@redhat.com>
603 * decl.c (check_redeclaration_exception_specification): Mark a string
604 for translation. Make the pointer const.
606 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
609 * pt.c (register_specialization): Check duplicate_decls return value
610 for error_mark_node and pass it back.
612 2017-02-22 Jason Merrill <jason@redhat.com>
614 PR c++/79679 - missing destructor for argument
615 * call.c (build_over_call): Don't pass tf_no_cleanup to argument
618 * pt.c (do_class_deduction): Handle 0 argument case.
620 2017-02-22 Jakub Jelinek <jakub@redhat.com>
623 * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
624 SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
625 * constexpr.c (potential_constant_expression_1): Handle
626 OMP_*, OACC_* and CILK_* trees. Use error_at with
627 EXPR_LOC_OR_LOC (t, input_location) computed early
628 instead of error, or error_at with location_of (t).
630 2017-02-22 Marek Polacek <polacek@redhat.com>
633 * parser.c (cp_parser_std_attribute_spec): Don't build the attribute
634 if the alignas expression is erroneous.
635 * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
639 * semantics.c (finish_underlying_type): Bail out for incomplete enums.
641 2017-02-21 Jason Merrill <jason@redhat.com>
643 PR c++/50308 - wrong deprecated warning with ADL
644 PR c++/17729 - duplicate deprecated warning
645 * semantics.c (finish_id_expression): Only call mark_used on a
646 function if we aren't building a call.
648 PR c++/41727 - ICE with partial spec of partial instantiation
649 * pt.c (process_partial_specialization): For now, don't check more
650 specialized if there is more than one level of args.
652 2017-02-21 Marek Polacek <polacek@redhat.com>
655 * cp-tree.h (maybe_reject_flexarray_init): Declare.
656 * init.c (maybe_reject_flexarray_init): No longer static.
657 Add check for current_function_decl.
658 * parser.c (cp_parser_late_parse_one_default_arg): Reject
659 a default mem-initializer for a flexible array.
661 2017-02-21 Jakub Jelinek <jakub@redhat.com>
662 Paolo Carlini <paolo.carlini@oracle.com>
665 * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node
667 * pt.c (tsubst_decomp_names): Return error_mark_node if the first
668 decl after the decomposition artificial decl has error_mark_node.
669 * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p
670 instead of just == error_mark_node comparison.
672 2017-02-21 Jakub Jelinek <jakub@redhat.com>
675 * decl.c: Include gimplify.h.
676 (cp_finish_decomp): Make sure there is no sharing of trees
677 in between DECL_VALUE_EXPR of decomposition decls.
680 * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.
683 * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
684 call cplus_expand_constant on it first.
686 2017-02-19 Jason Merrill <jason@redhat.com>
688 PR c++/78139 - destructor needed by new-expression
689 * call.c (build_special_member_call): Use tf_no_cleanup.
691 PR c++/78282 - auto template and pack expansion
692 * pt.c (find_parameter_packs_r): Don't walk into the type of
693 templates other than template template-parameters.
695 PR c++/79606 - ICE with this->base_member in NSDMI
696 * class.c (build_base_path): Check processing_template_decl.
698 PR c++/79607 - ICE with T{} initializer
699 * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
701 PR c++/79566 - elaborated-type-specifier in range for
702 * parser.c (cp_parser_simple_declaration): Fix check for type
705 PR c++/79400 - confusing suggestion of 'noexcept'
706 * parser.c (cp_parser_exception_specification_opt): Remove
707 suggestion for deprecated dynamic exception-specification.
709 PR c++/79470 - partial ordering with reference parameters
710 * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
712 PR c++/79500 - ICE with non-template deduction guide
713 * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
714 DECL_TEMPLATE_RESULT.
716 PR c++/79580 - ICE with compound literal
717 * parser.c (cp_parser_class_head): If we're in the middle of an
718 expression, use ts_within_enclosing_non_class.
720 PR c++/79503 - inherited ctor taking base class
721 * call.c (add_function_candidate): Also check that
722 DECL_INHERITED_CTOR_BASE is reference-related to the parameter type.
724 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com>
727 * typeck.c (cxx_alignas_expr): Reject a non-integral alignas
730 2017-02-19 Eric Fiselier <eric@efcs.ca>
731 Jonathan Wakely <jwakely@redhat.com>
734 * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
735 control warning about literal suffix identifiers without a leading
738 2017-02-17 Jason Merrill <jason@redhat.com>
740 PR c++/79508 - lookup error with member template
741 * parser.c (cp_parser_template_name): Clear
742 parser->context->object_type if we aren't doing lookup.
744 PR c++/78690 - ICE with using and global type with same name
745 * pt.c (type_dependent_object_expression_p): True for
748 PR c++/79549 - C++17 ICE with non-type auto template parameter pack
749 * pt.c (convert_template_argument): Just return an auto arg pack.
750 (tsubst_template_args): Don't tsubst an auto pack type.
752 PR c++/79556 - C++17 ICE with non-type auto
753 * pt.c (do_auto_deduction): Don't try to deduce from null type.
755 PR c++/79533 - C++17 ICE with temporary cast to reference
756 * call.c (build_over_call): Conversion to a reference prevents copy
759 2017-02-16 Jakub Jelinek <jakub@redhat.com>
760 Jason Merrill <jason@redhat.com>
762 PR c++/79502 - lost nodiscard attribute
763 * pt.c (apply_late_template_attributes): Do apply non-dependent
766 2017-02-16 Jason Merrill <jason@redhat.com>
768 PR c++/78572 - ICE with self-modifying array initializer
769 * constexpr.c (cxx_eval_store_expression): The object we're
770 initializing is outside the constant-expression.
771 (cxx_eval_call_expression): Set ctx->call.
773 PR c++/79050 - ICE with undeduced auto and LTO
774 * decl.c (poplevel): Remove undeduced auto decls.
776 2017-02-16 Jakub Jelinek <jakub@redhat.com>
779 * parser.c (cp_parser_omp_target): For -fopenmp-simd
780 ignore #pragma omp target even when not followed by identifier.
782 2017-02-15 Jason Merrill <jason@redhat.com>
783 Jakub Jelinek <jakub@redhat.com>
785 PR c++/79464 - ICE in IPA with omitted constructor parms
786 * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES.
787 (adjust_clone_args): Adjust.
788 (add_method): Remember omitted parms.
789 * call.c (add_function_candidate): Likewise.
790 * mangle.c (write_method_parms): Likewise.
791 * method.c (ctor_omit_inherited_parms): Return false if there are no
794 2017-02-15 Martin Sebor <msebor@redhat.com>
797 * init.c (maybe_reject_flexarray_init): New function.
798 (perform_member_init): Call it.
800 2017-02-15 Jakub Jelinek <jakub@redhat.com>
803 * parser.c (cp_parser_std_attribute): Don't pedwarn about
804 [[deprecated]] with -std=c++11 and [[fallthrough]] with
805 -std=c++11 and -std=c++14.
808 * decl.c (grokdeclarator): For static data members, handle thread_p
809 only after handling inline.
811 2017-02-14 Marek Polacek <polacek@redhat.com>
815 * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
816 clobbering if the postfix expression isn't an EXPR_P.
818 2017-02-13 Jason Merrill <jason@redhat.com>
820 PR c++/79461 - ICE with lambda in constexpr constructor
821 * constexpr.c (build_data_member_initialization): Ignore
822 initialization of a local variable.
824 2017-02-13 Jakub Jelinek <jakub@redhat.com>
826 * init.c (warn_placement_new_too_small): Add missing space in
828 * parser.c (cp_parser_oacc_declare): Likewise.
829 * mangle.c (maybe_check_abi_tags): Likewise.
832 * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs
833 on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR
834 in the rightmost operand.
836 2017-02-13 Nathan Sidwell <nathan@acm.org>
838 PR c++/79296 - ICE mangling localized template instantiation
839 * decl2.c (determine_visibility): Use template fn context for
840 local class instantiations.
842 2017-02-11 Jason Merrill <jason@redhat.com>
844 PR c++/77659 - ICE with new and C++14 aggregate NSDMI
845 * init.c (build_new): Make backups of any CONSTRUCTORs in init.
846 (build_new_1): Use replace_placeholders.
847 * tree.c (replace_placeholders_t): Also track whether we've seen a
849 (replace_placeholders, replace_placeholders_r): Adjust.
852 PR c++/77790 - ICE with auto function in C++11 mode
853 * decl.c (undeduced_auto_decl): Remove C++14 limitation.
854 (require_deduced_type): Add complain parm, return bool.
856 * decl2.c (mark_used): Use require_deduced_type.
858 2017-02-10 Jason Merrill <jason@redhat.com>
860 PR c++/78908 - template ops and bitfields
861 * tree.c (build_min_non_dep): Use unlowered_expr_type.
863 PR c++/78897 - constexpr union
864 * constexpr.c (cxx_eval_store_expression): A store to a union member
865 erases a previous store to another member.
867 PR c++/71285 - member of fold-expression
868 * semantics.c (finish_unary_fold_expr)
869 (finish_binary_fold_expr): Use null type for fold-expressions.
871 PR c++/79401 - protected inherited constructor
872 * call.c (enforce_access): For inheriting constructor, find a base
873 binfo in the path we already have.
875 2017-02-10 Marek Polacek <polacek@redhat.com>
878 * pt.c (type_dependent_expression_p): Check if the expression type
882 * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context
883 if warnings shouldn't be given.
885 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com>
888 * pt.c (tsubst_decl): Don't try to preserve a typedef that names
889 an error_mark_node as type.
891 2017-02-09 Jakub Jelinek <jakub@redhat.com>
892 Jason Merrill <jason@redhat.com>
895 * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
896 from pattern to type.
898 2017-02-09 Jason Merrill <jason@redhat.com>
900 PR c++/79316 - default argument in deduction guide
901 PR c++/79350 - explicit deduction guide
902 * parser.c (cp_parser_constructor_declarator_p)
903 (cp_parser_direct_declarator): Parse deduction guides more like
905 * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
906 * tree.c (special_function_p): Return it.
907 * decl.c (check_special_function_return_type): Handle it.
908 (grokdeclarator, grokfndecl): Adjust.
909 (cp_finish_decl): Pass flags to do_auto_deduction.
910 * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
911 * pt.c (dguide_name_p): Take a const_tree.
912 (do_class_deduction): Handle explicit.
913 (do_auto_deduction): Pass flags through.
914 (build_deduction_guide): Copy explicit flag.
916 2017-02-09 Jakub Jelinek <jakub@redhat.com>
919 * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
920 non-pragma_compound context here.
921 (cp_parser_omp_target): Likewise.
922 (cp_parser_pragma): Don't call push_omp_privatization_clauses and
923 parsing for ordered and target omp pragmas in non-pragma_stmt
924 non-pragma_compound contexts.
927 * parser.c (cp_parser_oacc_declare): Formatting fix.
928 (cp_parser_omp_declare_target): Don't invoke symtab_node::get on
931 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
932 Chung-Lin Tang <cltang@codesourcery.com>
934 * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix
935 parsing. Parse constant expression. Remove semantic checking.
936 (cp_parser_omp_clause_collapse): Disallow tile.
937 (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse
938 error about missing for after already emitting one. Use more
939 conventional for idiom for unbounded loop.
940 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
941 * semantics.c (finish_omp_clauses): Correct TILE semantic check.
942 (finish_omp_for): Deal with tile clause.
944 2017-02-07 Nathan Sidwell <nathan@acm.org>
946 * method.c (synthesized_method_base_walk): New. Broken out of ...
947 (synthesized_method_walk): ... here. Call it. Cleanup
950 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org>
953 * typeck2.c (process_init_constructor_union): Consider only
954 FIELD_DECLs when looking for an NSDMI.
956 2017-02-06 Jason Merrill <jason@redhat.com>
958 PR c++/71193 - incomplete types in templates
959 * parser.c (cp_parser_postfix_dot_deref_expression): In a template
960 handle incomplete type by pedwarning and then treating as dependent.
962 2017-02-06 Jakub Jelinek <jakub@redhat.com>
965 * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR.
966 (potential_constant_expression_1): Likewise.
969 * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
970 allow one fewer than expected arguments if flag_permissive.
973 * decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
974 * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
975 with error_mark_node type.
977 2017-02-03 Jason Merrill <jason@redhat.com>
979 PR c++/78689 - ICE on constructor with label
980 * optimize.c (maybe_clone_body): Replace omitted parameters with
982 * class.c (build_clone): Fix logic for omitting inherited parms.
984 PR c++/12245 - excessive memory use
985 * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
986 back in. Don't cache constants.
987 (maybe_constant_init): Don't cache constants.
989 PR c++/79294 - ICE with invalid template argument
990 * pt.c (convert_nontype_argument_function): Check value-dependence.
991 (convert_nontype_argument): Don't check it here for function ptrs.
993 2017-02-02 Richard Biener <rguenther@suse.de>
996 * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy
997 it lazily on the first changed element only and copy it
998 fully upfront, only storing changed elements.
1000 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1003 * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL
1006 2017-01-31 Jakub Jelinek <jakub@redhat.com>
1009 * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
1012 2017-01-31 David Malcolm <dmalcolm@redhat.com>
1015 * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve
1016 any namespace aliases.
1018 2017-01-31 Nathan Sidwell <nathan@acm.org>
1021 * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING.
1025 * pt.c: (instantiate_decl): Push to top level when current
1026 function scope doesn't match. Only push lmabda scope stack when
1029 * cp-tree.h (instantiate_decl): Make defer_ok bool.
1030 * pt.c: Fix instantiate_decl calls to pass true/false not 0/1
1031 (instantiate_decl): Simplify and reorder state saving and restoration.
1034 * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs.
1035 * semantics.c (finish_member_declaration): Assert class is being
1038 2017-01-30 Alexandre Oliva <aoliva@redhat.com>
1040 Introduce C++ support in libcc1.
1041 * cp-tree.h (struct lang_identifier): Add oracle_looked_up.
1042 (ansi_opname): Rename to...
1043 (cp_operator_id): ... this. Adjust all callers.
1044 (ansi_assopname): Rename to...
1045 (cp_assignment_operator_id): ... this. Adjust all callers.
1046 (cp_literal_operator_id): Declare.
1047 (set_global_friend): Declare.
1048 (is_global_friend): Declare.
1049 (enum cp_oracle_request): New type.
1050 (cp_binding_oracle_function): New type.
1051 (cp_binding_oracle): Declare.
1052 (cp_finish_injected_record_type): Declare.
1053 * friend.c (global_friend): New var.
1054 (set_global_friend): New fn.
1055 (is_global_friend): New fn.
1056 (is_friend): Call is_global_friend.
1057 * name-lookup.c (cp_binding_oracle): New var.
1058 (query_oracle): New fn.
1059 (qualified_lookup_using_namespace): Call query_oracle.
1060 (lookup_name_real_1): Likewise.
1061 * parser.c (cp_literal_operator_id): Drop static.
1062 * search.c (friend_accessible_p): Call is_global_friend.
1063 * semantics.c (is_this_parameter): Accept a variable if the
1064 binding oracle is enabled.
1066 2017-01-27 Jason Merrill <jason@redhat.com>
1068 PR c++/78771 - ICE with inherited constructor.
1069 * call.c (build_over_call): Call deduce_inheriting_ctor here.
1070 * pt.c (tsubst_decl): Not here.
1071 * class.c (add_method): Or here.
1072 * method.c (deduce_inheriting_ctor): Handle clones.
1073 (implicitly_declare_fn): Don't deduce inheriting ctors yet.
1075 2017-01-27 Adam Butcher <adam@jessamine.co.uk>
1078 * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
1080 * cp/cp-tree.h: Declare it.
1081 * cp/semantics.c (finish_id_expression): Resolve names within a default
1082 capturing generic lambda defined within a template prior to
1083 instantiation to allow for captures to be added to the closure type.
1085 2017-01-26 Jakub Jelinek <jakub@redhat.com>
1088 * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
1089 * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
1090 * parser.c (cp_parser_builtin_offsetof): Pass result of
1091 build_static_cast of null_pointer_node to finish_offsetof.
1092 * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
1093 it for -Winvalid-offsetof pedwarn instead of trying to guess
1094 original offsetof type from EXPR. Save OBJECT_PTR as a new
1095 second operand to OFFSETOF_EXPR.
1096 * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
1097 finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
1100 2017-01-26 Jason Merrill <jason@redhat.com>
1102 * name-lookup.c (parse_using_directive): Deprecate strong using.
1104 PR c++/79176 - lambda ICE with -flto -Os
1105 * decl2.c (vague_linkage_p): Handle decloned 'tors.
1106 * tree.c (decl_linkage): Likewise.
1108 2017-01-25 Martin Sebor <msebor@redhat.com>
1110 * decl.c (grokdeclarator): Fix a typo in a comment.
1112 2017-01-25 Jakub Jelinek <jakub@redhat.com>
1115 * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
1119 * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
1120 OPT_Wpedantic on lambda templates for -std=c++14 and higher.
1122 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1125 * decl.c (cxx_init_decl_processing): Pass main_input_filename
1126 to build_translation_unit_decl.
1128 2017-01-24 Jakub Jelinek <jakub@redhat.com>
1131 * cp-gimplify.c (cp_genericize_r): Add result of
1132 convert_from_reference on invisiref parm to p_set.
1134 2017-01-24 Nathan Sidwell <nathan@acm.org>
1136 PR c++/78469 - defaulted ctor and inaccessible dtor
1137 * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
1138 * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
1139 * tree.c (build_target_expr): Check tf_no_cleanup.
1141 PR c++/79118 - anon-members and constexpr
1142 * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
1143 ctor decl. Recursively check anonymous members.
1144 (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
1146 (explain_invalid_constexpr_fn): Likewise.
1148 2017-01-23 Nathan Sidwell <nathan@acm.org>
1150 PR c++/71710 - template using directive of field
1151 * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
1154 PR c++/71406 - ICE with scope-ref'd template id exprs
1156 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
1157 before breaking up TEMPLATE_ID_EXPR.
1159 2017-01-20 Nathan Sidwell <nathan@acm.org>
1161 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
1162 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
1164 2017-01-20 David Malcolm <dmalcolm@redhat.com>
1168 * cp-tree.h (suggest_alternatives_for): Add bool param.
1169 (suggest_alternative_in_explicit_scope): New decl.
1170 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
1171 that isn't the global one, call new function
1172 suggest_alternative_in_explicit_scope, only calling
1173 suggest_alternatives_for if it fails, and disabling near match
1174 searches fort that case. When SCOPE is the global namespace,
1175 pass true for new param to suggest_alternatives_for to allow for
1177 * lex.c (unqualified_name_lookup_error): Pass true for new param
1178 to suggest_alternatives_for.
1179 * name-lookup.c (consider_binding_level): Add forward decl.
1180 (suggest_alternatives_for): Add "suggest_misspellings" param,
1181 using it to conditionalize the fuzzy name-lookup code.
1182 (suggest_alternative_in_explicit_scope): New function.
1183 * parser.c (cp_parser_primary_expression): When calling
1184 finish_id_expression, pass location of id_expression rather
1185 than that of id_expr_token.
1186 (cp_parser_id_expression): Convert local "unqualified_id" from
1187 tree to cp_expr to avoid implicitly dropping location information.
1189 2017-01-20 Marek Polacek <polacek@redhat.com>
1192 * call.c (build_conditional_expr_1): Warn about duplicated branches.
1193 * semantics.c (finish_expr_stmt): Build statement using the proper
1196 2017-01-19 Jason Merrill <jason@redhat.com>
1198 US 20 - forwarding references and class template argument deduction
1199 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
1200 * pt.c (push_template_decl_real): Set it.
1201 (maybe_adjust_types_for_deduction): Check it.
1202 (rewrite_template_parm): Copy it.
1204 US 19 - deduction guides and constructors
1205 * call.c (joust): Prefer deduction guides to constructors.
1206 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
1207 (deduction_guide_p): Check DECL_P.
1209 * decl.c (check_initializer): Always use build_aggr_init for array
1212 PR c++/79130 - decomposition and direct-initialization
1213 * init.c (build_aggr_init): Communicate direct-initialization to
1215 (build_vec_init): Check for array copy sooner.
1216 * parser.c (cp_parser_decomposition_declaration): Remove call to
1217 build_x_compound_expr_from_list.
1219 2017-01-18 Jason Merrill <jason@redhat.com>
1221 PR c++/68666 - member variable template-id
1222 * typeck.c (finish_class_member_access_expr): Handle variable
1224 * pt.c (lookup_and_finish_template_variable): No longer static.
1225 * cp-tree.h: Declare it.
1227 2017-01-18 Nathan Sidwell <nathan@acm.org>
1230 * call.c (build_over_call): When checking ellipsis conversions for
1231 an inherited ctor, make sure there is at least one conversion.
1233 2017-01-18 Jason Merrill <jason@redhat.com>
1235 PR c++/78894 - ICE with class deduction and default arg
1236 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
1238 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1241 * mangle.c (write_discriminator): Reorganize abi warning check.
1243 2017-01-18 Nathan Sidwell <nathan@acm.org>
1245 * cp-tree.h: Clarify exception spec node comment.
1246 * except.c (nothrow_spec_p): Simplify by checking node-equality.
1249 * mangle.c (write_exception_spec): Check nothrow explicitly.
1250 (write_encoding): Don't increment processing_template_decl around
1253 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1256 * mangle.c (write_template_args): Add "on" for operator names.
1258 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
1261 * mangle.c (write_discriminator): Handle discriminator >= 10.
1263 2017-01-17 Nathan Sidwell <nathan@acm.org>
1266 * cp-tree.h (maybe_generic_this_capture): Declare.
1267 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
1268 (maybe_resolve_dummy): ... here. Call it.
1269 (maybe_generic_this_capture): New.
1270 * parser.c (cp_parser_postfix_expression): Speculatively capture
1271 this in generic lambda in unresolved member function call.
1272 * pt.c (tsubst_copy_and_build): Force hard error from failed
1273 member function lookup in generic lambda.
1275 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1278 * cp-array-notation.c (expand_array_notation_exprs): Handle
1281 2017-01-11 Jason Merrill <jason@redhat.com>
1283 PR c++/78337 - ICE on invalid with generic lambda
1284 * semantics.c (process_outer_var_ref): Check if containing_function
1285 is null. Move inform call under complain test.
1287 2017-01-11 Nathan Sidwell <nathan@acm.org>
1290 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
1293 2017-01-11 Nathan Sidwell <nathan@acm.org>
1295 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
1297 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1300 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
1301 assertion. Formatting fix.
1304 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
1307 2017-01-10 David Malcolm <dmalcolm@redhat.com>
1310 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
1311 a missing semicolon if we have a valid insertion location for
1314 2017-01-10 Jason Merrill <jason@redhat.com>
1316 FI 20, decomposition declaration with parenthesized initializer.
1317 * parser.c (cp_parser_decomposition_declaration): Use
1318 cp_parser_initializer.
1320 2017-01-09 Jason Merrill <jason@redhat.com>
1322 Implement P0195R2, C++17 variadic using.
1323 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
1324 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
1325 * error.c (dump_decl): Likewise.
1327 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1329 PR translation/79019
1330 PR translation/79020
1331 * semantics.c (finish_omp_clauses): Add missing whitespace to
1332 translatable strings.
1333 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
1335 2017-01-07 Jason Merrill <jason@redhat.com>
1337 PR c++/78948 - instantiation from discarded statement
1338 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
1339 * cp-tree.h (in_discarded_stmt): Declare it.
1340 (struct saved_scope): Add discarded_stmt bitfield.
1341 (in_discarded_stmt): New macro.
1342 * decl2.c (mark_used): Check it.
1343 * parser.c (cp_parser_selection_statement): Adjust.
1344 (cp_parser_jump_statement): Adjust.
1346 2017-01-05 Jakub Jelinek <jakub@redhat.com>
1349 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
1350 REFERENCE_REF_P, set tt to its operand.
1353 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
1354 unions even for C++11 and later.
1356 2017-01-05 Nathan Sidwell <nathan@acm.org>
1359 * pt.c (convert_nontype_argument): Don't try and see if integral
1360 or enum expressions are constants prematurely.
1362 2017-01-04 Marek Polacek <polacek@redhat.com>
1365 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
1366 a zero character literal.
1368 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1371 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
1375 * parser.c (cp_parser_simple_declaration): Only complain about
1376 inconsistent auto deduction if auto_result doesn't use auto.
1378 * parser.c (cp_parser_simple_declaration): Diagnose function
1379 declaration among more than one init-declarators with auto
1383 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
1384 assertion, as lexer->buffer may be NULL.
1386 2017-01-04 Marek Polacek <polacek@redhat.com>
1390 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
1392 2017-01-04 Nathan Sidwell <nathan@acm.org>
1395 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
1396 (lambda_capture_field_type): Update prototype.
1397 * lambda.c (lambda_capture_field_type): Add is_reference parm.
1398 Add referenceness here.
1399 (add_capture): Adjust lambda_capture_field_type call, refactor
1401 * pt.c (tsubst): Adjust lambda_capture_field_type call.
1403 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1405 Update copyright years.
1407 Copyright (C) 2017 Free Software Foundation, Inc.
1409 Copying and distribution of this file, with or without modification,
1410 are permitted in any medium without royalty provided the copyright
1411 notice and this notice are preserved.