Daily bump.
[official-gcc.git] / gcc / cp / ChangeLog
blobcd00395f1135f49b32d540454ba31bc20b0fe9a4
1 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3         PR middle-end/60586
4         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
5         function.
6         (cp_gimplify_expr): Added a call to the function
7         cilk_cp_gimplify_call_params_in_spawned_fn.
9 2015-09-01  Paolo Carlini  <paolo.carlini@oracle.com>
11         PR c++/61753
12         * decl.c (smallest_type_quals_location): New.
13         (check_special_function_return_type): Use the latter; add int and
14         const location_t* parameters.
15         (grokdeclarator): Adjust check_special_function_return_type call.
17 2015-08-29  Markus Trippelsdorf  <markus@trippelsdorf.de>
19         PR c++/67371
20         * constexpr.c (potential_constant_expression_1): Remove IF_STMT
21         case. Move label to COND_EXPR case. Remove checking of
22         SWITCH_STMT_BODY.
24 2015-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
26         PR c++/63693
27         * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
28         only on class types.
30 2015-08-21  Jason Merrill  <jason@redhat.com>
32         PR c++/67240
33         * constraint.cc (satisfy_implicit_conversion_constraint): Also
34         check for NULL_TREE.
36 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
38         * decl.c (grokvardecl): Simplify the latter.
40 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
42         * decl.c (grokvardecl): Complete check added for c++/67065.
44 2015-08-20  Jason Merrill  <jason@redhat.com>
46         * name-lookup.c (hidden_name_p): Handle OVERLOAD.
48 2015-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
50         PR c++/67065
51         * decl.c (grokvardecl): Reject 'main' as global variable.
53 2015-08-19  Jason Merrill  <jason@redhat.com>
55         PR c++/66957
56         * search.c (protected_accessible_p): Remove redundant access_in_type.
57         Add otype parm instead of walking binfo.
58         (friend_accessible_p): Check SCOPE itself.  Handle class
59         templates.  Pass through otype.
60         (dfs_accessible_post): Handle all accessibility cases.
61         (dfs_accessible_pre): New.
62         (accessible_p): Use it.  Don't check protected access here.  Pass
63         decl and otype to dfs_walk.
64         (member_declared_in_type, dfs_access_in_type_pre): New.
65         (access_in_type): Use dfs_access_in_type_pre.
66         * friend.c (add_friend): Fix multiple friends with the same name.
68         * lambda.c (current_nonlambda_scope): New.
70 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
72         * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
73         method.c, name-lookup.h, parser.c, parser.h, rtti.c,
74         semantics.c, typeck2.c: Remove useless typedefs.
76 2015-08-18  Jason Merrill  <jason@redhat.com>
78         DR 1155
79         * pt.c (convert_nontype_argument): Allow internal linkage in C++11
80         and up.
82 2015-08-17  Paolo Carlini  <paolo.carlini@oracle.com>
84         PR c++/67216
85         * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
87 2015-08-17  Jason Merrill  <jason@redhat.com>
89         PR c++/67244
90         * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
92         PR c++/67104
93         * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
94         (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
96         * constexpr.c (cxx_eval_store_expression): Don't set
97         CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
98         without it.
99         (cxx_eval_array_reference): Check it.
101         * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
103 2015-08-14  Jason Merrill  <jason@redhat.com>
105         PR c++/65974
106         * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
108 2015-08-12  Jason Merrill  <jason@redhat.com>
110         PR c++/67104
111         * constexpr.c (cxx_eval_array_reference): Fix typo.
113         PR c++/67104
114         * constexpr.c (cxx_eval_array_reference): Handle sparse
115         CONSTRUCTORs.
117         PR c++/67108
118         * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
119         * error.c (dump_template_bindings): Don't tsubst in that case.
121         PR c++/67161
122         * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
123         TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
125 2015-08-08  Jason Merrill  <jason@redhat.com>
127         PR c++/67152
128         * pt.c (process_partial_specialization): Call
129         associate_classtype_constraints.
131         PR c++/67159
132         * constraint.cc (finish_template_introduction):
133         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
135         PR c++/67142
136         * pt.c (equal): Make sure tmpl is actually a template.
138         PR c++/67144
139         * call.c (joust): Only call more_constrained on decls.
141 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
142             Braden Obrzut  <admin@maniacsvault.net>
143             Jason Merrill  <jason@redhat.com>
144             Ville Voutilainen  <ville.voutilainen@gmail.com>
146         Add C++ Concepts TS support.
147         * constraint.cc, logic.cc: New files.
148         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
149         (c++.tags): Also process .cc files.
150         * call.c (enum rejection_reason_code): Add rr_constraint_failure.
151         (print_z_candidate): Handle it.
152         (constraint_failure): New.
153         (add_function_candidate): Check constraints.
154         (build_new_function_call): Handle evaluating concepts.
155         (joust): Check more_constrained.
156         * class.c (add_method): Check equivalently_constrained.
157         (build_clone): Copy constraints.
158         (currently_open_class): Return tree.
159         (resolve_address_of_overloaded_function): Check constraints.
160         * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
161         (potential_constant_expression_1): Likewise.
162         * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
163         (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
164         * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
165         SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
166         EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
167         EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
168         * cp-tree.h (struct tree_constraint_info, check_nonnull)
169         (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
170         (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
171         (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
172         (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
173         (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
174         (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
175         (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
176         (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
177         (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
178         (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
179         (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
180         (struct local_specialization_stack, enum auto_deduction_context)
181         (variable_concept_p, concept_template_p)
182         (struct deferring_access_check_sentinel): New.
183         (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
184         (union lang_tree_node): Add constraint_info field.
185         (struct lang_decl_base): Add concept_p flag.
186         (enum cp_decl_spec): Add ds_concept.
187         (struct cp_declarator): Add requires_clause.
188         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
189         (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
190         TRAIT_EXPR, *_CONSTR.
191         (pp_cxx_parameter_declaration_clause): Accept a chain of
192         PARM_DECLs.
193         (cxx_pretty_printer::declarator): Print requires-clause.
194         (pp_cxx_template_declaration): Likewise.
195         (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
196         (pp_cxx_requires_clause, pp_cxx_requirement)
197         (pp_cxx_requirement_list, pp_cxx_requirement_body)
198         (pp_cxx_requires_expr, pp_cxx_simple_requirement)
199         (pp_cxx_type_requirement, pp_cxx_compound_requirement)
200         (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
201         (pp_cxx_expression_constraint, pp_cxx_type_constraint)
202         (pp_cxx_implicit_conversion_constraint)
203         (pp_cxx_argument_deduction_constraint)
204         (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
205         (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
206         * cxx-pretty-print.h: Declare them.
207         * decl.c (decls_match): Compare constraints.
208         (duplicate_decls): Likewise.  Remove constraints before freeing.
209         (cxx_init_decl_processing): Call init_constraint_processing.
210         (cp_finish_decl): Diagnose concept without initializer.
211         (grokfndecl, grokvardecl): Handle concepts and constraints.
212         (grokdeclarator): Handle concept, requires-clause.
213         (grokparms): No longer static.
214         (xref_tag_1): Check constraints.
215         (finish_function): Call check_function_concept.
216         (cp_tree_node_structure): Handle CONSTRAINT_INFO.
217         (check_concept_refinement, is_concept_var, check_concept_fn): New.
218         * decl2.c (check_classfn): Compare constraints.
219         (mark_used): Don't instantiate concepts.
220         * error.c (dump_template_decl): Print constraints.
221         (dump_function_decl): Likewise.
222         (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
223         * lex.c (init_reswords): Set D_CXX_CONCEPTS.
224         * method.c (implicitly_declare_fn): Copy constraints from
225         inherited ctor.
226         * parser.h (struct cp_parser): Add in_result_type_constraint_p and
227         prevent_constrained_type_specifiers fields.
228         * parser.c (make_call_declarator): Add requires_clause parm.
229         (cp_parser_new): Clear prevent_constrained_type_specifiers.
230         (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
231         (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
232         (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
233         (cp_parser_declaration): Handle concept introduction.
234         (cp_parser_member_declaration): Likewise.
235         (cp_parser_template_parameter): Handle constrained parameter.
236         (cp_parser_type_parameter): Handle constraints.
237         (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
238         (cp_parser_template_id): Handle partial concept id.
239         (cp_parser_type_name): Add overload that takes typename_keyword_p.
240         Handle constrained parameter.
241         (cp_parser_nonclass_name): Handle concept names.
242         (cp_parser_alias_declaration): Handle constraints.
243         (cp_parser_late_return_type_opt): Also handle requires-clause.
244         (cp_parser_type_id_1): Handle deduction constraint.
245         (cp_parser_parameter_declaration): Handle constrained parameters.
246         (cp_parser_class_specifier_1): Handle constraints.
247         (cp_parser_template_declaration_after_parameters): Split out from
248         cp_parser_template_declaration_after_export.
249         (cp_parser_single_declaration): Handle constraints.
250         (synthesize_implicit_template_parm): Handle constraints.
251         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
252         (cp_parser_introduction_list, get_id_declarator)
253         (get_unqualified_id, is_constrained_parameter)
254         (cp_parser_check_constrained_type_parm)
255         (cp_parser_constrained_type_template_parm)
256         (cp_parser_constrained_template_template_parm)
257         (constrained_non_type_template_parm, finish_constrained_parameter)
258         (declares_constrained_type_template_parameter)
259         (declares_constrained_template_template_parameter)
260         (check_type_concept, cp_parser_maybe_constrained_type_specifier)
261         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
262         (cp_parser_requires_clause, cp_parser_requires_clause_opt)
263         (cp_parser_requires_expression)
264         (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
265         (cp_parser_requirement_list, cp_parser_requirement)
266         (cp_parser_simple_requirement, cp_parser_type_requirement)
267         (cp_parser_compound_requirement, cp_parser_nested_requirement)
268         (cp_parser_template_introduction)
269         (cp_parser_explicit_template_declaration)
270         (get_concept_from_constraint): New.
271         * pt.c (local_specialization_stack): Implement.
272         (maybe_new_partial_specialization): New.
273         (maybe_process_partial_specialization): Use it.
274         (retrieve_local_specialization, register_local_specialization)
275         (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
276         (tsubst_expr): No longer static.
277         (spec_hasher::equal): Compare constraints.
278         (determine_specialization): Handle constraints.
279         (check_explicit_specialization): Handle concepts.
280         (process_template_parm): Handle constraints.
281         (end_template_parm_list): Add overload taking no arguments.
282         (process_partial_specialization): Handle concepts and constraints.
283         Register partial specializations of variable templates.
284         (redeclare_class_template): Handle constraints.
285         (convert_template_argument): Handle WILDCARD_DECL.  Check
286         is_compatible_template_arg.
287         (coerce_template_parameter_pack): Handle wildcard packs.
288         (coerce_template_parms): DR 1430 also applies to concepts.  Add
289         overloads taking fewer parameters.
290         (lookup_template_class_1): Handle constraints.
291         (lookup_template_variable): Concepts are always bool.
292         (finish_template_variable): Handle concepts and constraints.
293         (tsubst_friend_class): Handle constraints.
294         (gen_elem_of_pack_expansion_instantiation): Handle constraints.
295         (tsubst_pack_expansion): Handle local parameters.
296         (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
297         (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
298         (tsubst_copy_and_build): Handle REQUIRES_EXPR.
299         (more_specialized_fn, more_specialized_partial_spec): Check constraints.
300         (more_specialized_inst): Split out from most_specialized_instantiation.
301         (most_specialized_partial_spec): Check constraints.
302         (instantiate_decl): Never instantiate a concept.
303         (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
304         variable concepts.
305         (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
306         (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
307         (do_auto_deduction): Add overload taking tsubst flags and context enum.
308         Handle constraints.
309         (get_template_for_ordering, most_constrained_function)
310         (is_compatible_template_arg, convert_wildcard_argument)
311         (struct constr_entry, struct constr_hasher, decl_constraints)
312         (valid_constraints_p, get_constraints, set_constraints)
313         (remove_constraints, init_constraint_processing): New.
314         * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
315         * search.c (lookup_member): Do lookup in the open partial
316         instantiation.
317         * semantics.c (finish_template_template_parm): Handle constraints.
318         (fixup_template_type): New.
319         (finish_template_type): Call it.
320         (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
321         * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
322         (cp_walk_subtrees): Handle REQUIRES_EXPR.
323         * typeck.c (cp_build_function_call_vec): Check constraints.
325 2015-08-06  Jason Merrill  <jason@redhat.com>
327         PR c++/66533
328         * parser.c (cp_parser_primary_expression): Don't skip to the end
329         of the statement if we're parsing tentatively.
331         PR c++/67130
332         PR c++/67131
333         PR c++/66260
334         * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
335         templates.
336         * pt.c (tsubst_copy_and_build): Check for argument substitution
337         failure.
339 2015-08-05  Jason Merrill  <jason@redhat.com>
341         * pt.c (determine_specialization): Print candidates after 'no
342         match' error.
344         * decl.c (cp_finish_decl): Tidy.
345         * typeck.c (finish_class_member_access_expr): Use
346         type_dependent_expression_p.
347         * semantics.c (finish_id_expression): Use
348         type_dependent_expression_p.  Don't build_qualified_name for a
349         decl in non-dependent scope.
350         * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
351         identifier is dependent.  Remove variable_template_p check.
353         PR c++/66260
354         PR c++/66596
355         PR c++/66649
356         PR c++/66923
357         * pt.c (lookup_template_variable): Use NULL_TREE for type.
358         (instantiate_template_1): Also set DECL_TI_ARGS based on
359         the immediate parent.
360         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
361         (finish_template_variable): Add complain parm.
362         * cp-tree.h: Adjust.
364         PR c++/65195
365         PR c++/66619
366         * semantics.c (finish_id_expression): Call convert_from_reference
367         for variable template.
369 2015-08-04  Jason Merrill  <jason@redhat.com>
371         * pt.c (lookup_template_class_1): Clear elt.spec.
373         * tree.c (build_target_expr): Copy the location from value.
375 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
377         * parser.c (cp_parser_selection_statement): Move handling of
378         semicolon body to ...
379         (cp_parser_implicitly_scoped_statement): .. here.  Call
380         warn_for_misleading_indentation even when the body is a
381         semicolon.  Extract token_indent_infos corresponding to the
382         guard, body and next tokens.  Adjust call to
383         warn_for_misleading_indentation accordingly.  Take
384         token_indent_info argument.
385         (cp_parser_already_scoped_statement): Likewise.
386         (cp_parser_selection_statement, cp_parser_iteration_statement):
387         Extract a token_indent_info corresponding to the guard token.
389 2015-08-01  Caroline Tice  <cmtice@google.com>
391         PR 66521
392         * mangle.c : Add vtable-verify.h to include files.
393         (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
394         is "<anon>" get the real mangled name for the class instead, and
395         also store the real mangled name in a vector for use later.
397 2015-07-31  Marek Polacek  <polacek@redhat.com>
399         PR sanitizer/66977
400         * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
401         RSHIFT_EXPR.
403 2015-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
405         * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
406         in warning_at instead of "%q+D" in warning.
407         (warn_hidden): Likewise but use location_of.
408         (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
409         (check_bitfield_decl, check_field_decls): Likewise in warning_at.
410         (check_field_decls): Likewise for permerror.
411         (explain_non_literal_class): Likewise for inform.
412         (check_bases_and_members, layout_class_type): Likewise for warning_at.
413         (note_name_declared_in_class): Use location_of in permerror.
414         * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
415         (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
416         inform, and warning_at.
417         (check_for_out_of_scope_variable): Likewise for warning_at and
418         permerror.
420 2015-07-30  Jason Merrill  <jason@redhat.com>
422         DR 1558
423         PR c++/67021
424         * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
426 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
428         * call.c (build_op_delete_call, convert_like_real, build_over_call):
429         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
430         of "%q+D".
431         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
432         * decl.c (duplicate_decls): Likewise for warning/warning_at.
433         * except.c (maybe_noexcept_warning): Likewise.
434         * friend.c (make_friend_class): Likewise for inform.
435         * mangle.c (mangle_decl): Likewise for warning/warning_at.
436         * method.c (process_subob_fn, walk_field_subobs,
437         maybe_explain_implicit_delete): Likewise for inform.
438         * parser.c (cp_parser_lambda_introducer): Likewise.
439         * pt.c (check_specialization_namespace,
440         maybe_process_partial_specialization): Likewise for permerror.
441         (redeclare_class_template): Likewise for inform_n.
442         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
443         * search.c (check_final_overrider): Likewise.
444         * semantics.c (process_outer_var_ref): Likewise.
446 2015-07-27  Jason Merrill  <jason@redhat.com>
448         * constexpr.c (cxx_eval_call_expression): Don't add this call to
449         the hash table if !depth_ok.
451 2015-07-27  Marek Polacek  <polacek@redhat.com>
453         PR c++/66555
454         PR c/54979
455         * call.c (build_new_op_1): Call warn_tautological_cmp.
456         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
457         compare warnings.
459 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
461         PR c++/18969
462         * typeck.c (check_return_expr): Also do the basic return-value
463         validity checking if processing_template_decl and yet types are
464         not dependent.  Remove obsolete code.
466 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
468         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
469         in warning_at instead of "%q+D" in warning.
470         (warn_extern_redeclared_static): Likewise for inform.
471         (check_redeclaration_no_default_args): Likewise for permerror.
472         (duplicate_decls): Likewise.
473         (check_previous_goto_1): Likewise for inform.
474         (check_goto, start_decl, check_for_uninitialized_const_var,
475         start_preparsed_function, finish_function§): Likewise.
476         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
477         * init.c (sort_mem_initializers): Likewise.
478         * typeck.c (convert_for_initialization): Likewise for inform.
479         (maybe_warn_about_returning_address_of_local): Likewise.
480         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
481         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
483 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
485         PR c++/66857
486         * cvt.c (ocp_convert): Don't call scalar_constant_value when
487         converting to a class type.
489 2015-07-24  Jason Merrill  <jason@redhat.com>
491         PR c++/64969
492         * pt.c (splice_late_return_type): Correct deduced return type for
493         abbreviated function template.
495 2015-07-24  Richard Biener  <rguenther@suse.de>
497         * init.c (build_vec_init): Build iterator bound in the same
498         type as the iterator.
500 2015-07-23  Marek Polacek  <polacek@redhat.com>
502         PR c++/66572
503         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
505 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
507         PR c++/52987
508         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
509         redundant error messages.
511 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
513         * decl.c (grokdeclarator): For an erroneous template parameter
514         propagate error_mark_node as type.
516 2015-07-20  Marek Polacek  <polacek@redhat.com>
518         PR c++/55095
519         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
521 2015-07-15  Jason Merrill  <jason@redhat.com>
523         PR c++/65091
524         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
525         template if there is no type x in scope.
527 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
529         PR c++/66850
530         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
531         template template parm in the redeclaration.
532         (lookup_template_class_1): Peel off irrelevant template levels
533         from current_template_parms before augmenting the argument
534         list.
536 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
538         PR c++/65071
539         * parser.c (cp_parser_sizeof_pack): Also consider template template
540         parameters.
542 2015-07-14  Jason Merrill  <jason@redhat.com>
544         * call.c (build_new_method_call_1): Call reshape_init.
546 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
548         * pt.c (check_template_shadow): Emit error + inform instead of
549         two errors.
551 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
553         PR c++/65186
554         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
555         template parm type under C++11 and later.
557 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
559         * call.c: Fix double word typos.
560         * cp-array-notation.c: Same.
561         * cp-tree.h: Same.
562         * init.c: Same.
563         * name-lookup.c: Same.
564         * parser.c: Same.
566 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
568         PR c++/30044
569         * pt.c (begin_template_parm_list): Add a dummy parameter level
570         to current_template_parms.
571         (end_template_parm_list): Remove the dummy parameter level
572         before adding the real one.
573         (tsubst): Don't attempt to substitute for template parameters
574         corresponding to a dummy argument level.
575         (template_parms_to_args): Remove obsolete hack for
576         giving template template arguments the proper level.
577         (splite_late_return_type): Remove obsolete hack for giving
578         template template arguments the proper level.
579         * error.c (dump_template_decl): Don't print dummy template
580         levels.
582 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
584         PR c++/54521
585         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
586         the second step of copy-initialization.
588 2015-07-10  Jason Merrill  <jason@redhat.com>
590         * pt.c (find_parameter_packs_r): Handle variable templates.
591         (variable_template_specialization_p): New.
592         * cp-tree.h: Declare it.
594         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
596 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
598         * decl2.c (cpp_check): Revert latest change.
600 2015-07-09  Jason Merrill  <jason@redhat.com>
602         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
603         value_dependent_expression_p.
605         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
606         template_parameter_pack_p.
607         * parser.c (declarator_can_be_parameter_pack): False if
608         parameter_pack_p is set.
609         (make_parameter_declarator): Add template_parameter_pack_p parm.
610         (cp_parser_template_parameter): Remove parameter pack parsing.
611         (cp_parser_parameter_declaration): Handle all parameter packs.
612         Tweak default argument permerror.
614 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
616         * parser.c (cp_parser_default_type_template_argument)
617         (cp_parser_default_template_template_argument): Factor out from
618         cp_parser_type_parameter.
620 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
622         * typeck.c (warn_args_num): Rename to error_args_num.
623         (convert_arguments): Adjust calls.
625 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
627         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
629 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
631         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
633 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
635         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
636         * pt.c (apply_late_template_attributes): Likewise.
638 2015-07-08  Marek Polacek  <polacek@redhat.com>
640         PR c++/66748
641         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
642         accessing TYPE_LANG_SPECIFIC node.
644 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
646         * call.c: Adjust includes.
647         * class.c: Likewise.
648         * constexpr.c: Likewise.
649         * cp-array-notation.c: Likewise.
650         * cp-gimplify.c: Likewise.
651         * cp-lang.c: Likewise.
652         * cp-objcp-common.c: Likewise.
653         * cp-ubsan.c: Likewise.
654         * cvt.c: Likewise.
655         * decl.c: Likewise.
656         * decl2.c: Likewise.
657         * dump.c: Likewise.
658         * error.c: Likewise.
659         * except.c: Likewise.
660         * expr.c: Likewise.
661         * friend.c: Likewise.
662         * init.c: Likewise.
663         * lambda.c: Likewise.
664         * lex.c: Likewise.
665         * mangle.c: Likewise.
666         * method.c: Likewise.
667         * name-lookup.c: Likewise.
668         * optimize.c: Likewise.
669         * parser.c: Likewise.
670         * pt.c: Likewise.
671         * ptree.c: Likewise.
672         * repo.c: Likewise.
673         * rtti.c: Likewise.
674         * search.c: Likewise.
675         * semantics.c: Likewise.
676         * tree.c: Likewise.
677         * typeck.c: Likewise.
678         * typeck2.c: Likewise.
680 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
682         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
684 2015-07-06  Jason Merrill  <jason@redhat.com>
686         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
687         for a template template parameter.
688         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
689         by reduce_template_parm_level.
691         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
692         expansion.
694 2015-07-02  Jason Merrill  <jason@redhat.com>
696         PR c++/66743
697         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
698         TYPE_VALUES_RAW rather than TYPE_FIELDS.
700 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
702         * pt.c (type_dependent_expression_p): Handle expressions
703         that refer to variable templates.
705 2015-07-01  Jason Merrill  <jason@redhat.com>
707         * lex.c (init_reswords): s/CXX0X/CXX11/.
708         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
710         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
711         Attribute mangling is now -fabi-version=10.
713         PR c++/65945
714         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
715         * class.c (layout_nonempty_base_or_field): Warn if that affects
716         the offset of a field.
718 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
720         PR c++/60365
721         * parser.c (cp_parser_check_std_attribute): New.
722         (cp_parser_std_attribute_list): Call it.
724 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
726         PR c++/66686
727         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
728         return 0 if tsubst returns a dependent type.
730 2015-06-30  Jason Merrill  <jason@redhat.com>
732         PR debug/66653
733         * decl2.c (is_late_template_attribute): True for tls_model.
735         PR debug/66653
736         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
737         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
738         (SET_DECL_GNU_TLS_P): New.
739         * call.c (make_temporary_var_for_ref_to_temp): Use
740         CP_DECL_THREAD_LOCAL_P.
741         (set_up_extended_ref_temp): Likewise.
742         * decl.c (duplicate_decls, expand_static_init): Likewise.
743         (redeclaration_error_message, grokvardecl): Likewise.
744         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
745         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
746         (handle_tls_init): Likewise.
747         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
748         * semantics.c (finish_id_expression): Likewise.
749         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
750         (finish_omp_threadprivate): Likewise.
751         * tree.c (decl_storage_duration): Likewise.
752         * cp-gimplify.c (omp_var_to_track): Likewise.
753         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
754         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
755         already set.
757 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
759         Implement N4197 - Adding u8 character literals
760         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
761         and CPP_UTF8CHAR_USERDEF tokens;
762         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
764 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
766         PR c++/65977
767         * decl.c (grokfndecl): Allow constexpr declarations of friend
768         template specializations.
770 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
772         PR fortran/66605
773         * decl.c (finish_function): Call do_warn_unused_parameter.
775 2015-06-29  Marek Polacek  <polacek@redhat.com>
777         PR c/66322
778         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
779         (push_switch): Set OUTSIDE_RANGE_P.
780         (pop_switch): Update c_do_switch_warnings call.
781         (finish_case_label): Update c_add_case_label call.
782         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
783         here.
785 2015-06-27  Marek Polacek  <polacek@redhat.com>
787         * call.c: Use VECTOR_TYPE_P.
788         * constexpr.c: Likewise.
789         * cvt.c: Likewise.
790         * decl.c: Likewise.
791         * decl2.c: Likewise.
792         * init.c: Likewise.
793         * semantics.c: Likewise.
794         * tree.c: Likewise.
795         * typeck.c: Likewise.
796         * typeck2.c: Likewise.
798 2015-06-27  Marek Polacek  <polacek@redhat.com>
800         * call.c (set_up_extended_ref_temp): Use VAR_P.
801         * class.c: Use VAR_P throughout.
802         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
803         * cp-array-notation.c (make_triplet_val_inv): Likewise.
804         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
805         throughout.
806         * decl2.c: Likewise.
807         * error.c (dump_decl): Use VAR_P.
808         * mangle.c (decl_implicit_alias_p): Likewise.
809         * parser.c: Use VAR_P throughout.
810         * pt.c: Likewise.
811         * semantics.c: Likewise.
812         * vtable-class-hierarchy.c: Likewise.
813         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
815 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
817         * pt.c (check_unstripped_args): Mark parameter as unused.
819 2015-06-26  Jason Merrill  <jason@redhat.com>
821         PR c++/66216
822         * class.c (finish_struct): Call fixup_attribute_variants.
824         PR c++/66684
825         * typeck2.c (merge_exception_specifiers): Allow different
826         noexcept-specifiers if we've had errors.
828         PR c++/66255
829         * pt.c (check_unstripped_args): Split out from...
830         (retrieve_specialization): ...here.  Allow typedefs in the type of
831         a non-type argument.
833         PR c++/66067
834         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
835         TYPE_DECLs.
836         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
838         PR c++/66654
839         * typeck2.c (digest_init_r): Only expect reshaping if the class is
840         aggregate.
842 2015-06-26  Marek Polacek  <polacek@redhat.com>
844         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
845         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
847 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
849         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
850         * class.c: Likewise.
851         * cp-ubsan.c: Likewise.
852         * decl.c: Likewise.
853         * decl2.c: Likewise.
854         * lambda.c: Likewise.
855         * mangle.c: Likewise.
856         * method.c: Likewise.
857         * optimize.c: Likewise.
858         * parser.c: Likewise.
859         * semantics.c: Likewise.
860         * tree.c: Likewise.
861         * vtable-class-hierarchy.c: Likewise.
863 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
865         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
866         rather than ggc_hasher.
867         (constexpr_call_hasher): Likewise.
868         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
869         * decl.c (typename_hasher): Likewise.
870         * mangle.c (conv_type_hasher): Likewise.
871         * pt.c (spec_hasher): Likewise.
872         * tree.c (cplus_array_hasher, list_hasher): Likewise.
873         * typeck2.c (abstract_type_hasher): Likewise.
875 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
877         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
878         rather than pointer_hash.
879         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
880         * semantics.c (nrv_data): Likewise.
881         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
883 2015-06-24  Jason Merrill  <jason@redhat.com>
885         PR c++/66647
886         * pt.c (dependent_type_p_r): Check for dependent alias template
887         specialization sooner.
889         PR c++/66501
890         * class.c (type_has_nontrivial_assignment): Remove.
891         * cp-tree.h: Remove declaration.
892         * init.c (vec_copy_assign_is_trivial): New.
893         (build_vec_init): Use it.
895 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
897         Implement N3928 - Extending static_assert
898         * parser.c (cp_parser_static_assert): Support static_assert with
899         no message string.  Supply an empty string in this case.
900         * semantics.c (finish_static_assert): Don't try to print a message if
901         the message strnig is empty.
903 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
905         PR c++/65750
906         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
907         implicit template parm if 'auto' is a placeholder for trailing
908         return type.
910 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
912         Revert:
913         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
915         PR c++/30044
916         * parser.c (cp_parser_template_parameter_list): Update
917         current_template_parms right after processing a paramater.
918         * pt.c (template_parms_to_args): Remove obsolete hack for
919         giving template template arguments the proper level.
920         (check_default_tmpl_args): Account for tested template
921         parameter_lists.
922         (splite_late_return_type): Remove obsolete hack for giving
923         template template arguments the proper level.
925 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
927         PR c++/65811
928         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
930 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
932         PR c++/30044
933         * parser.c (cp_parser_template_parameter_list): Update
934         current_template_parms right after processing a paramater.
935         * pt.c (template_parms_to_args): Remove obsolete hack for
936         giving template template arguments the proper level.
937         (check_default_tmpl_args): Account for tested template
938         parameter_lists.
939         (splite_late_return_type): Remove obsolete hack for giving
940         template template arguments the proper level.
942 2015-06-23  Jason Merrill  <jason@redhat.com>
944         PR c++/65879
945         * decl.c (grokfndecl): Check the linkage of ctype, not just
946         TYPE_ANONYMOUS_P.
947         * tree.c (no_linkage_check): Skip the 'this' pointer.
949         PR c++/66501
950         * class.c (type_has_nontrivial_assignment): New.
951         * init.c (build_vec_init): Use it.
952         * cp-tree.h: Declare it.
953         * method.c (trivial_fn_p): Templates aren't trivial.
955         PR c++/66542
956         * decl.c (expand_static_init): Make sure the destructor is callable
957         here even if we have an initializer.
959 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
961         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
962         -fdump-ada-spec is passed.
964 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
966         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
968 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
970         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
972 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
974         * decl.c (grokdeclarator): Remove pointless code.
976 2015-06-22  Jason Merrill  <jason@redhat.com>
978         PR c++/66515
979         * call.c (implicit_conversion): Only reshape for classes.
981 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
983         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
984         manually swapping.
985         * semantics.c (finish_omp_atomic): Likewise.
986         * typeck.c (cp_build_array_ref): Likewise.
988 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
990         PR c++/65882
991         * call.c (build_new_op_1): Check tf_warning flag in all cases.
993 2015-06-19  Jason Merrill  <jason@redhat.com>
995         PR c++/66585
996         * pt.c (instantiate_class_template_1): Clear
997         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
999         PR c++/65880
1000         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1001         cv-qualifiers.
1002         * typeck.c (merge_types): build_ptrmemfunc_type before applying
1003         quals and attributes.
1005         PR c++/65973
1006         * constexpr.c (build_constexpr_constructor_member_initializers):
1007         Handle an empty STATEMENT_LIST.
1009         PR c++/65843
1010         * pt.c (tsubst_copy_and_build): Register a capture proxy in
1011         local_specializations.
1013 2015-06-17  Jason Merrill  <jason@redhat.com>
1015         PR c++/66001
1016         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1017         TRY_FINALLY_EXPR.
1018         (potential_constant_expression_1): Likewise.
1020 2015-06-17  Jason Merrill  <jason@redhat.com>
1022         PR c++/66515
1023         * call.c (implicit_conversion): Call reshape_init here, early.
1024         (build_aggr_conv): Not here.
1026 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
1028         PR c++/66571
1029         * pt.c (tsubst_omp_clause_decl): New function.
1030         (tsubst_omp_clauses): Use it or tsubst_copy instead of
1031         tsubst_expr on OMP_CLAUSE_DECL.
1033 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1035         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1036         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1037         * decl.c (grokdeclarator, xref_tag_1): Likewise.
1038         * error.c (dump_aggr_type): likewise.
1039         * pt.c (push_template_decl_real): Likewise.
1040         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1042 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1044         * call.c: Do not include input.h, line-map.h or is-a.h.
1045         * class.c: Likewise.
1046         * constexpr.c: Likewise.
1047         * cp-array-notation.c: Likewise.
1048         * cp-gimplify.c: Likewise.
1049         * cp-lang.c: Likewise.
1050         * cp-objcp-common.c: Likewise.
1051         * cp-tree.h: Likewise.
1052         * cp-ubsan.c: Likewise.
1053         * cvt.c: Likewise.
1054         * decl.c: Likewise.
1055         * decl2.c: Likewise.
1056         * dump.c: Likewise.
1057         * error.c: Likewise.
1058         * except.c: Likewise.
1059         * expr.c: Likewise.
1060         * friend.c: Likewise.
1061         * init.c: Likewise.
1062         * lambda.c: Likewise.
1063         * lex.c: Likewise.
1064         * mangle.c: Likewise.
1065         * method.c: Likewise.
1066         * name-lookup.c: Likewise.
1067         * optimize.c: Likewise.
1068         * parser.c: Likewise.
1069         * pt.c: Likewise.
1070         * ptree.c: Likewise.
1071         * repo.c: Likewise.
1072         * rtti.c: Likewise.
1073         * search.c: Likewise.
1074         * semantics.c: Likewise.
1075         * tree.c: Likewise.
1076         * typeck.c: Likewise.
1077         * typeck2.c: Likewise.
1078         * vtable-class-hierarchy.c: Likewise.
1080 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
1082         PR c++/59682
1083         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1085 2015-06-16  Jason Merrill  <jason@redhat.com>
1087         PR c++/66536
1088         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1089         mismatch.
1091         PR c++/58063
1092         * tree.c (bot_manip): Remap SAVE_EXPR.
1094         PR c++/66387
1095         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1097 2015-06-15  Nathan Sidwell  <nathan@acm.org>
1099         PR c++/58583
1100         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1101         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1102         protect it from recursive instantiation.
1104 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
1106         PR c++/51048
1107         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1108         using a local type is pure virtual.
1110 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1112         * call.c: Remove comment documenting the long-deleted
1113         function build_method_call.
1115 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1117         PR c++/65168
1118         * typeck.c (cp_build_binary_op): Warn when comparing an address
1119         of a reference against NULL.
1121 2015-06-12  Jason Merrill  <jason@redhat.com>
1123         PR c++/65719
1124         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1125         variables as DECL_NOT_REALLY_EXTERN.
1127 2015-06-11  Jason Merrill  <jason@redhat.com>
1129         PR c++/66445
1130         * constexpr.c (potential_constant_expression_1): Handle a
1131         DECL_EXPR of TYPE_DECL.
1133         PR c++/66450
1134         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1135         ctx->ctor.
1137 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1139         * decl.c (cxx_init_decl_processing): Register the main
1140         translation unit through the new debug hook.
1142 2015-06-10  Jason Merrill  <jason@redhat.com>
1144         PR c++/66289
1145         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1146         * pt.c (push_template_decl_real): Set it.
1147         (dependent_alias_template_spec_p): Use it.
1148         (dependent_type_p_r): Use dependent_alias_template_spec_p.
1149         (uses_all_template_parms_data, uses_all_template_parms_r)
1150         (complex_alias_template_p): New.
1151         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1153 2015-06-09  Jason Merrill  <jason@redhat.com>
1155         DR 1467
1156         PR c++/51747
1157         * typeck2.c (digest_init_r): Replace previous change with
1158         gcc_unreachable.
1160         PR c++/66387
1161         * semantics.c (process_outer_var_ref): Make sure the value is
1162         actually constant before returning it.
1163         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1164         array.
1166 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1168         PR c++/65815
1169         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1170         * init.c (expand_default_init): Likewise.
1172 2015-06-09  Jason Merrill  <jason@redhat.com>
1174         PR c++/66383
1175         * tree.c (replace_placeholders_r): Handle placeholders for an
1176         outer object.
1177         * typeck2.c (store_init_value): Only replace_placeholders for
1178         objects of class type.
1180 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1182         * call.c : Adjust include files.
1183         * class.c : Likewise.
1184         * constexpr.c : Likewise.
1185         * cp-array-notation.c : Likewise.
1186         * cp-cilkplus.c : Likewise.
1187         * cp-gimplify.c : Likewise.
1188         * cp-lang.c : Likewise.
1189         * cp-objcp-common.c : Likewise.
1190         * cp-tree.h : Likewise.
1191         * cp-ubsan.c : Likewise.
1192         * cvt.c : Likewise.
1193         * decl.c : Likewise.
1194         * decl2.c : Likewise.
1195         * dump.c : Likewise.
1196         * error.c : Likewise.
1197         * except.c : Likewise.
1198         * expr.c : Likewise.
1199         * friend.c : Likewise.
1200         * init.c : Likewise.
1201         * lambda.c : Likewise.
1202         * lex.c : Likewise.
1203         * mangle.c : Likewise.
1204         * method.c : Likewise.
1205         * name-lookup.c : Likewise.
1206         * optimize.c : Likewise.
1207         * parser.c : Likewise.
1208         * pt.c : Likewise.
1209         * ptree.c : Likewise.
1210         * repo.c : Likewise.
1211         * rtti.c : Likewise.
1212         * search.c : Likewise.
1213         * semantics.c : Likewise.
1214         * tree.c : Likewise.
1215         * typeck.c : Likewise.
1216         * typeck2.c : Likewise.
1217         * vtable-class-hierarchy.c : Likewise.
1219 2015-06-05  Jason Merrill  <jason@redhat.com>
1221         PR c++/66405
1222         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1223         the expansion has extra args.
1224         (use_pack_expansion_extra_args_p): Return true in that case.
1226         PR c++/66405
1227         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1228         dependent even if it has a type.
1230 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1232         * cp-objcp-common.c: Adjust comment for
1233         cxx_warn_unused_global_decl.
1234         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1235         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1236         * cp-tree.h (note_mangling_alias): Protoize.
1237         (cp_write_global_declarations): Remove.
1238         (cxx_post_compilation_parsing_cleanups): Protoize.
1239         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1240         argument.
1241         * decl2.c (mangling_aliases): New global.
1242         (build_java_method_aliases): New.  Adapted from
1243         collect_candidates_for_java_method_aliases.
1244         (collect_candidates_for_java_method_aliases): Remove.
1245         (build_java_method_aliases): Remove.
1246         (generate_mangling_aliases): New.
1247         (note_mangling_alias): New.  Moved from mangle_decl.
1248         (locus_at_end_of_parsing): New global.
1249         (c_parse_final_cleanups): Rename from
1250         cp_write_global_declarations.
1251         Use locus_at_end_of_parsing.
1252         Call generate_mangling_aliases.
1253         Rename call to collect_candidates_for_java_method_aliases into
1254         build_java_method_aliases.
1255         Remove call to finalize_compilation_unit.
1256         Move vtable handling into cxx_post_compilation_parsing_cleanups.
1257         Do not call check_global_declarations or
1258         emit_debug_global_declarations.
1259         (cxx_post_compilation_parsing_cleanups): New.
1260         * mangle.c (mangle_decl): Move code to note_mangling_alias.
1261         * name-lookup.c (do_namespace_alias): Call early_global_decl.
1263 2015-06-05  Nathan Sidwell  <nathan@acm.org>
1265         PR c++/52595
1266         * parser.c (cp_parser_cache_defarg): Continue looking for
1267         declarators when scanning a potential template argument list of an
1268         NSDMI.
1270 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1272         * call.c: Adjust includes for restructured coretypes.h.
1273         * class.c: Likewise.
1274         * constexpr.c: Likewise.
1275         * cp-array-notation.c: Likewise.
1276         * cp-gimplify.c: Likewise.
1277         * cp-lang.c: Likewise.
1278         * cp-objcp-common.c: Likewise.
1279         * cp-tree.h: Likewise.
1280         * cp-ubsan.c: Likewise.
1281         * cvt.c: Likewise.
1282         * decl.c: Likewise.
1283         * decl2.c: Likewise.
1284         * dump.c: Likewise.
1285         * error.c: Likewise.
1286         * except.c: Likewise.
1287         * expr.c: Likewise.
1288         * friend.c: Likewise.
1289         * init.c: Likewise.
1290         * lambda.c: Likewise.
1291         * lex.c: Likewise.
1292         * mangle.c: Likewise.
1293         * method.c: Likewise.
1294         * name-lookup.c: Likewise.
1295         * optimize.c: Likewise.
1296         * parser.c: Likewise.
1297         * pt.c: Likewise.
1298         * ptree.c: Likewise.
1299         * repo.c: Likewise.
1300         * rtti.c: Likewise.
1301         * search.c: Likewise.
1302         * semantics.c: Likewise.
1303         * tree.c: Likewise.
1304         * typeck.c: Likewise.
1305         * typeck2.c: Likewise.
1306         * vtable-class-hierarchy.c: Likewise.
1308 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1310         PR c++/66192
1311         PR target/66200
1312         * cp-tree.h (get_guard_cond): Adjust declaration
1313         * decl.c (expand_static_init): Use atomic load acquire
1314         and adjust call to get_guard_cond.
1315         * decl2.c (build_atomic_load_byte): New function.
1316         (get_guard_cond): Handle thread_safety.
1317         (one_static_initialization_or_destruction): Adjust call to
1318         get_guard_cond.
1320 2015-06-03  Jason Merrill  <jason@redhat.com>
1322         PR c++/44282
1323         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1324         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1325         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1326         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1328 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1329             Paolo Carlini  <paolo.carlini@oracle.com>
1331         PR c++/66130
1332         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1333         use it in the diagnostic.
1334         (decay_conversion): Adjust call.
1335         * semantics.c (finish_decltype_type): Likewise.
1336         * call.c (resolve_args, build_new_op_1,
1337         perform_implicit_conversion_flags): Adjust calls.
1338         * cvt.c (ocp_convert, convert_to_void): Likewise.
1339         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1341 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1343         * decl.c (check_tag_decl): Use declspecs->locations as locations in
1344         error_at and warning_at calls.
1346 2015-06-03  Marek Polacek  <polacek@redhat.com>
1348         PR sanitizer/66190
1349         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1350         (cp_genericize_r): Don't instrument static initializers.
1351         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1353 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1355         * decl.c (start_function): Call plugin before parsing.
1356         (finish_function): Call plugin after parsing.
1358 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
1360         * cp-tree.h (init_error): Remove declaration.
1361         * error.c (scratch_pretty_printer): Rename to ...
1362         (actual_pretty_printer): ... this.
1363         (cxx_pp): Constify and update accordingly.
1364         (init_error): Remove definition.
1365         * lex.c (cxx_init): Do not call init_error.
1367 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1369         PR c++/61683
1370         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1372 2015-06-01  Jason Merrill  <jason@redhat.com>
1374         PR c++/65942
1375         * decl2.c (mark_used): Don't always instantiate constexpr fns.
1376         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1378         PR c++/44282
1379         * mangle.c (attr_strcmp): New.
1380         (write_CV_qualifiers_for_type): Also write out attributes that
1381         affect type identity.
1382         (write_type): Strip all attributes after writing qualifiers.
1384 2015-05-31  Jason Merrill  <jason@redhat.com>
1386         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1388         PR c++/66320
1389         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1390         with the wrong type as non-constant.
1392 2015-05-27  Jason Merrill  <jason@redhat.com>
1394         * decl.c (check_redeclaration_exception_specification): Depend on
1395         -Wsystem-headers rather than -pedantic.
1397         * decl.c (warn_extern_redeclared_static): Use the location of
1398         newdecl in diagnostics, not input_location.
1399         (validate_constexpr_redeclaration): Likewise.
1400         (check_redeclaration_no_default_args): Likewise.
1401         (duplicate_decls): Likewise.
1402         (check_redeclaration_exception_specification): Likewise.
1403         Change second diagnostic to inform.
1405 2015-05-24  Nathan Sidwell  <nathan@acm.org>
1407         PR c++/66243
1408         * decl.c (build_enumerator): Don't silently convert scoped enums.
1410 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
1412         PR lto/66180
1413         * mangle.c (mangle_decl): Mangle anonymous namespace types as
1414         "<anon>".
1416 2015-05-23  Nathan Sidwell  <nathan@acm.org>
1418         PR c++/65936
1419         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1421 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1423         * Make-lang.in (check_g++_parallelize): Update comment.
1425 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1427         PR c++/65598
1428         * decl.c (grokdeclarator): Use the correct location in error
1429         messages about 'explicit'.
1431 2015-05-22  Marek Polacek  <polacek@redhat.com>
1432             Edward Smith-Rowland  <3dw4rd@verizon.net>
1434         PR c/47043
1435         * cp-tree.h (build_enumerator): Update declaration.
1436         * decl.c (build_enumerator): Add attributes parameter.  Call
1437         cplus_decl_attributes.
1438         * init.c (constant_value_1): Pass tf_none to mark_used.
1439         * parser.c (cp_parser_enumerator_definition): Parse attributes and
1440         pass them down to build_enumerator.
1441         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1442         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1444 2015-05-21  Nathan Sidwell  <nathan@acm.org>
1446         PR c++/60943
1447         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1449 2015-05-21  Marek Polacek  <polacek@redhat.com>
1451         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1453 2015-05-20  Jason Merrill  <jason@redhat.com>
1455         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1456         before register_specialization.
1458         * decl.c (grok_op_properties): Don't complain about size_t
1459         placement delete here.
1460         * call.c (second_parm_is_size_t): Split out from...
1461         (non_placement_deallocation_fn_p): ...here.
1462         (build_op_delete_call): Warn about size_t placement delete with
1463         -Wc++14-compat.
1465 2015-05-19  Nathan Sidwell  <nathan@acm.org>
1467         PR c++/65954
1468         * typeck.c (finish_class_member_access_expr): Diagnose failed
1469         lookup of enum class member.
1471 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1473         PR middle-end/66199
1474         * parser.c (cp_parser_omp_for_loop): Don't add
1475         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1476         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1477         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1478         constructs.
1480 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1482         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1483         swaps.
1485 2015-05-18  Jason Merrill  <jason@redhat.com>
1487         * pt.c (retrieve_specialization): Make sure our arguments have
1488         gone through strip_typedefs.
1490         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1491         (determine_specialization): Call coerce_template_parms.
1493         DR 1391
1494         * pt.c (type_unification_real): Check convertibility here.
1495         (unify_one_argument): Not here.
1497         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1498         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1499         [TREE_LIST]: Fix no-change case.
1501         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1503 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1505         PR fortran/44054
1506         * error.c (cp_diagnostic_starter): Use diagnostic_location
1507         function.
1508         (cp_print_error_function): Likewise.
1509         (cp_printer): Replace locus pointer with accessor function.
1511 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1513         * parser.c (cp_parser_selection_statement): Add location and
1514         guard_kind arguments to calls to
1515         cp_parser_implicitly_scoped_statement.
1516         (cp_parser_iteration_statement): Likewise for calls to
1517         cp_parser_already_scoped_statement.
1518         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1519         "guard_kind" params; use them to warn for misleading
1520         indentation.
1521         (cp_parser_already_scoped_statement): Likewise.
1523 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
1525         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1526         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1527         * semantics.c (finish_member_declaration): Likewise.
1528         * method.c (lazily_declare_fn): Allways add method to main variant list.
1530 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
1532         PR bootstrap/66085
1533         * decl2.c (note_mangling_alias): Declare arguments as unused.
1535 2015-05-08  Jason Merrill  <jason@redhat.com>
1537         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1538         -Wc++0x-compat.
1540 2015-05-08  Jason Merrill  <jason@redhat.com>
1542         * decl2.c (mangling_aliases): New variable.
1543         (note_mangling_alias, generate_mangling_aliases): New.
1544         (cp_write_global_declarations): Call generate_mangling_aliases.
1545         (generate_mangling_alias): Split out from...
1546         * mangle.c (mangle_decl): ...here.
1547         * cp-tree.h: Declare note_mangling_alias.
1549 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
1551         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1552         (build_java_method_aliases): Adapt to use create_same_body_alias
1553         instead of assemble_alias.  Move variable declarations to
1554         definition and tidy up.
1555         (cp_write_global_declarations): Call build_java_method_aliases
1556         instead of collecting candidates first.
1558 2015-05-07  Jason Merrill  <jason@redhat.com>
1560         PR c++/59012
1561         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1562         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1563         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1564         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1565         (apply_late_template_attributes): Handle attribute pack expansion.
1567 2015-05-07  Marek Polacek  <polacek@redhat.com>
1569         PR c/65179
1570         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1571         value.
1573 2015-05-07  Jason Merrill  <jason@redhat.com>
1575         DR 1467
1576         PR c++/51747
1577         * typeck2.c (digest_init_r): Fix single element list.
1579 2015-05-05  Jason Merrill  <jason@redhat.com>
1581         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1582         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1583         MUST_NOT_THROW_EXPR.
1584         (cp_genericize_data): Add try_block field.
1585         (cp_genericize_tree): Initialize it.
1586         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1587         implicit rethrow.
1589         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1590         Return false.
1592         * semantics.c (finish_call_expr): Check complain.
1594         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1595         maybe-in-charge constructor.
1597         * decl.c (start_decl): Don't push the plain VAR_DECL for a
1598         variable template.
1600         DR 1518
1601         DR 1630
1602         PR c++/54835
1603         PR c++/60417
1604         * call.c (convert_like_real): Check value-initialization before
1605         explicit.
1606         * typeck2.c (process_init_constructor_record): Don't set
1607         CONSTRUCTOR_IS_DIRECT_INIT.
1608         (process_init_constructor_array): Likewise.
1609         * init.c (build_vec_init): Likewise.
1611 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1613         * parser.c (cp_parser_asm_definition): Only test for
1614         error_mark_node if "outputs" was just set.  Likewise for "inputs".
1616 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1617             Jakub Jelinek  <jakub@redhat.com>
1619         PR c++/66007
1620         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1621         result in an actual error.
1623 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1624             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
1626         PR c++/65858
1627         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1628         false.
1630 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
1632         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1633         trailing semicolon.
1635 2015-04-29  Jason Merrill  <jason@redhat.com>
1637         PR c++/50800
1638         * tree.c (apply_identity_attributes): Fix handling of classes.
1640 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1642         * parser.c (cp_parser_oacc_enter_exit_data): Use
1643         OMP_STANDALONE_CLAUSES.
1645 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
1647         PR c++/64667
1648         * init.c (perform_member_init): Handle references for -Winit-self.
1650 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1652         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1653         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1655 2015-04-28  Jason Merrill  <jason@redhat.com>
1657         PR c++/65896
1658         * constexpr.c (cxx_eval_store_expression): Don't try to actually
1659         store an empty class.
1661         PR c++/65656
1662         * constexpr.c (cxx_eval_builtin_function_call): Fix
1663         __builtin_constant_p.
1665         PR c++/50800
1666         * tree.c (strip_typedefs): Add remove_attributes parm.
1667         (strip_typedefs_expr): Likewise.
1668         (apply_identity_attributes): New subroutine of strip_typedefs.
1669         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1670         (convert_nontype_argument, unify): Likewise.
1671         * cp-tree.h: Adjust.
1673         PR c++/65734
1674         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1676 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1678         * class.c (layout_class_type): Remove check if
1679         PCC_BITFIELD_TYPE_MATTERS is defined.
1681 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1683         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1685 2015-04-24  Jason Merrill  <jason@redhat.com>
1687         PR c++/50800
1688         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1690         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1691         Remove obsolete code.
1692         [NE_EXPR]: Likewise.
1694 2015-04-23  Jason Merrill  <jason@redhat.com>
1696         PR c++/65646
1697         * pt.c (check_explicit_specialization): Don't
1698         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1699         headers.
1700         * decl.c (grokvardecl): Revert earlier fix.
1702 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
1704         PR c++/65801
1705         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1706         suppresses the diagnostic.
1708 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
1710         Reject trailing return type for an operator auto().
1711         * decl.c (grokdeclarator): Reject trailing return types for
1712         all conversion operators, don't handle conversion operators
1713         in the previous checks that deal with auto.
1715 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1717         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1719 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1721         * class.c (resolve_address_of_overloaded_function, instantiate_type):
1722         Rename tsubst_flags_t parameter flags -> complain.
1724 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1726         * call.c (build_op_delete_call, build_over_call): Check mark_used
1727         return value.
1728         * class.c (resolve_address_of_overloaded_function): Likewise.
1729         * decl.c (cxx_maybe_build_cleanup): Likewise.
1730         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1731         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1732         * rtti.c (build_dynamic_cast_1): Likewise.
1733         * semantics.c (process_outer_var_ref): Likewise.
1734         * typeck.c (build_class_member_access_expr,
1735         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1737 2015-04-15  Jason Merrill  <jason@redhat.com>
1739         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1740         (build_constexpr_constructor_member_initializers): Loop to find
1741         the BIND_EXPR.
1742         * decl.c (start_preparsed_function): Clobber the object at the
1743         beginning of a constructor.
1745         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1746         * method.c (implicitly_declare_fn): Likewise.
1747         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1749         * decl2.c (determine_visibility): Use get_template_info.
1751 2015-04-15  Jason Merrill  <jason@redhat.com>
1752             Marek Polacek  <polacek@redhat.com>
1754         PR c++/65727
1755         * lambda.c (lambda_expr_this_capture): In unevaluated context go
1756         through the normal loop, just don't capture.
1757         (maybe_resolve_dummy): Handle null return.
1759 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
1761         * call.c (enforce_access): Emit error + inform.
1763 2015-04-15  Marek Polacek  <polacek@redhat.com>
1765         * constexpr.c (use_new_call): Remove #define.
1766         (lookup_parameter_binding): Remove function.
1767         (cxx_bind_parameters_in_call): Remove unused code.
1768         (cxx_eval_call_expression): Likewise.
1769         (cxx_eval_constant_expression): Likewise.
1771 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
1773         * tree.c (replace_placeholders_t): Remove unused type.
1774         (replace_placeholders): Remove unused pset.
1776 2015-04-14  Jason Merrill  <jason@redhat.com>
1778         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1780         PR c++/65695
1781         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1783         PR c++/65721
1784         * name-lookup.c (do_class_using_decl): Complain about specifying
1785         the current class even if there are dependent bases.
1787 2015-04-14  David Krauss  <david_work@me.com>
1789         PR c++/59766
1790         * decl.c (grokdeclarator): Do not flag friends with deduced return.
1792 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
1793             Jason Merrill  <jason@redhat.com>
1795         PR c++/60994
1796         * parser.c (cp_parser_class_name): Add enum_ok parameter.
1797         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1798         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1799         a class template.
1801 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
1803         PR c++/65736
1804         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1805         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
1806         the expression to the original type at the end.
1808 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
1810         PR c++/65690
1811         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1812         TYPE_USER_ALIGN.
1814         PR c++/65690
1815         * tree.c (build_cplus_array_type): Layout type before variants are
1816         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1817         variant.
1819 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1821         PR c++/64085
1822         * lambda.c (add_capture): Use dependent_type_p for capture by
1823         reference too.
1825 2015-04-02  Marek Polacek  <polacek@redhat.com>
1827         PR c++/65642
1828         * constexpr.c (cxx_eval_pointer_plus_expression): Call
1829         cxx_eval_constant_expression on the first operand.
1831 2015-04-01  Jason Merrill  <jason@redhat.com>
1833         PR c++/65625
1834         * decl.c (make_typename_type): Handle seeing a variable template.
1836 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1838         PR c++/56100
1839         * pt.c (instantiating_current_function_p): New.
1840         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1841         * cp-tree.h (instantiating_current_function_p): Declare.
1843 2015-04-01  Jason Merrill  <jason@redhat.com>
1845         PR c++/65646
1846         * decl.c (grokvardecl): Don't call check_explicit_specialization
1847         for non-template members of a class template.
1849 2015-04-01  Marek Polacek  <polacek@redhat.com>
1851         PR c++/65554
1852         * class.c (finish_struct): Require that the second field of a
1853         user-defined initializer_list be of size type.
1855 2015-03-31  Marek Polacek  <polacek@redhat.com>
1857         PR c++/65390
1858         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1859         checking for constness.
1861 2015-03-30  Marek Polacek  <polacek@redhat.com>
1863         PR c++/65398
1864         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1865          *(&A[i] p+ j) => A[i + j] transformation here.
1866         (cxx_eval_pointer_plus_expression): New function.
1867         (cxx_eval_constant_expression): Use it here.
1869 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1871         PR c/65586
1872         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1873         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1874         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1875         -fopenmp-simd.
1877 2015-03-27  Marek Polacek  <polacek@redhat.com>
1879         PR c++/65556
1880         * semantics.c (finish_switch_cond): If the unlowered type is not an
1881         enum, use the type of the condition.
1883 2015-03-27  Jason Merrill  <jason@redhat.com>
1885         PR c++/65509
1886         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1887         constants.
1889 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
1891         PR c++/65154
1892         * init.c (build_vec_init): Fix initializing aggregates
1893         with empty init list.
1895 2015-03-26  Jason Merrill  <jason@redhat.com>
1897         PR c++/65525
1898         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1900 2015-03-25  Marek Polacek  <polacek@redhat.com>
1902         PR c++/65558
1903         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1904         on an anonymous namespace.
1906 2015-03-25  Marek Polacek  <polacek@redhat.com>
1908         PR c++/61670
1909         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1911 2015-03-24  Jason Merrill  <jason@redhat.com>
1913         PR c++/65046
1914         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1915         * parser.c (cp_parser_namespace_definition): Don't set it.
1916         * name-lookup.c (handle_namespace_attrs): Check
1917         DECL_NAMESPACE_ASSOCIATIONS instead.
1919         PR c++/65498
1920         * pt.c (get_mostly_instantiated_function_type): Just return the
1921         type of the partially instantiated template in DECL_TI_TEMPLATE.
1923 2015-03-20  Marek Polacek  <polacek@redhat.com>
1925         PR c++/65398
1926         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1927         A[i + j].
1929 2015-03-20  Marek Polacek  <polacek@redhat.com>
1931         PR c++/65072
1932         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1933         variant.
1935 2015-03-19  Jason Merrill  <jason@redhat.com>
1937         PR c++/65046
1938         Automatically propagate ABI tags to variables and functions
1939         from their (return) type.
1940         * class.c (check_tag): Handle variables and functions.
1941         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1942         (mark_or_check_tags): Likewise.
1943         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
1944         (check_abi_tags): Add single argument overload for decls.
1945         Handle inheriting tags for decls.
1946         * mangle.c (write_mangled_name): Call it.
1947         (mangle_return_type_p): Split out from write_encoding.
1948         (unmangled_name_p): Split out from write_mangled_name.
1949         (write_mangled_name): Ignore abi_tag on namespace.
1950         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1951         * parser.c (cp_parser_namespace_definition): Set it.
1952         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1953         about abi_tag attribute on non-inline namespace.
1954         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1955         (handle_abi_tag_attribute): Allow tags on variables.
1957 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1959         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1960         attribute for DECL_EXTERNAL VAR_DECLs.
1962 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
1964         PR c++/65340
1965         * call.c (build_over_call): Pass the tsubst_flags_t argument to
1966         mark_used.
1967         * decl2.c (mark_used): Inline the require_deduced_type call and
1968         guard the error call.
1970 2015-03-16  Jason Merrill  <jason@redhat.com>
1972         PR c++/65061
1973         * parser.c (cp_parser_template_name): Call strip_using_decl.
1975 2015-03-16  Marek Polacek  <polacek@redhat.com>
1977         DR 1688
1978         PR c++/65327
1979         * decl.c (grokdeclarator): Allow volatile and constexpr together.
1981 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1983         PR c++/65323
1984         * decl.c (check_default_argument): Don't call
1985         maybe_warn_zero_as_null_pointer_constant.
1987 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
1989         * cp-gimplify.c (simple_empty_class_p): New.
1990         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
1991         the code for empty class copies into simple_empty_class_p, and
1992         adapt it to handle COMPOUND_EXPRs.
1994 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
1996         PR c++/65370
1997         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1998         only if the location of newdecl doesn't match the location of olddecl.
2000 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2002         PR c++/65127
2003         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2004         is not a PARM_DECL.
2006 2015-03-10  Jason Merrill  <jason@redhat.com>
2008         PR c++/65333
2009         DR 1558
2010         * pt.c (dependent_type_p_r): Check both class and alias template args.
2012 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2014         PR c/65120
2015         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2016         before preparing arguments to warn_logical_not_parentheses.
2017         Use maybe_constant_value on rhs.
2019 2015-03-09  Jason Merrill  <jason@redhat.com>
2021         PR c++/65339
2022         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2024 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2026         PR c/65120
2027         * parser.c (cp_parser_binary_expression): Don't warn for
2028         !!x == y or !b == y where b is bool.
2030 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
2032         * ptree.c (cxx_print_lambda_node): New.
2033         (cxx_print_xnode): Handle LAMBDA_EXPR.
2035 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
2037         PR c++/65295
2038         * constexpr.c (cxx_eval_constant_expression): Remove assert in
2039         RESULT_DECL handling.
2041 2015-02-26  Marek Polacek  <polacek@redhat.com>
2043         PR c++/65202
2044         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2045         a RETURN_EXPR if its operand is null.
2047 2015-02-25  Jason Merrill  <jason@redhat.com>
2049         PR c++/65209
2050         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2051         DECL_COMDAT.
2052         (constrain_visibility_for_template): Handle reference arguments.
2054         PR debug/58315
2055         * decl.c (start_preparsed_function): Use create_artificial_label
2056         for cdtor_label.
2058 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
2059             Jakub Jelinek  <jakub@redhat.com>
2061         PR c++/65075
2062         * constexpr.c (check_constexpr_bind_expr_vars): Allow
2063         implicit typedefs for lambda types.
2065 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2067         PR c++/60894
2068         * decl.c (lookup_and_check_tag): Use strip_using_decl.
2070 2015-02-13  Jason Merrill  <jason@redhat.com>
2072         PR c++/65054
2073         * pt.c (template_args_equal): Look through conversions here.
2074         * tree.c (cp_tree_equal): Not here.
2076 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2078         PR c++/60211
2079         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2080         pragma_external context.
2082 2015-02-13  Jason Merrill  <jason@redhat.com>
2084         PR c++/65051
2085         * call.c (reference_binding): Don't look for bad conversion
2086         if TO is incomplete.
2088 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2090         PR c++/64970
2091         * decl.c (make_typename_type): Pass tsubst_flags_t argument
2092         to lookup_template_class.
2094 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
2096         PR ipa/65034
2097         * decl.c (start_preparsed_function): Use void_type_node instead
2098         of NULL_TREE as LABEL_DECL type.
2100 2015-02-12  Jason Merrill  <jason@redhat.com>
2102         PR c++/64898
2103         * mangle.c (write_mangled_name): Fix test for variable template
2104         instantiation.
2106         * decl.c (begin_destructor_body): Condition clobber on
2107         -flifetime-dse.
2109 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2111         PR c++/64959
2112         * parser.c (lookup_literal_operator): Return all candidates.
2113         (cp_parser_userdef_char_literal): Simplify error handling.
2114         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
2115         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2116         Also give higher priority to standard string UDL operator.
2118 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
2120         PR debug/55541
2121         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2122         * decl.c (poplevel): If functionbody, try not to create an extra
2123         BLOCK for function body and use subblocks as that, if it is non-NULL
2124         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
2125         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2127         PR sanitizer/64984
2128         * except.c (check_noexcept_r): Return NULL for internal
2129         calls.
2131 2015-02-10  Jason Merrill  <jason@redhat.com>
2133         PR c++/64994
2134         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2136 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
2138         PR ipa/64982
2139         * method.c (use_thunk): Do not check for stdarg thunks.
2141 2015-02-06  Jason Merrill  <jason@redhat.com>
2143         PR c++/64899
2144         * init.c (build_vec_init): Handle default-initialized array with
2145         constexpr default constructor.
2147 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2149         PR c/64824
2150         PR c/64868
2151         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2153 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2155         PR c++/64877
2156         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2157         for generated expressions.
2159 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
2161         PR c++/64901
2162         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2163         DECL_OVERRIDE_P.
2165 2015-02-02  Jason Merrill  <jason@redhat.com>
2167         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2169 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
2171         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2172         changed to pass input_location as first argument.
2174 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
2176         PR c++/64717
2177         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2178         into SAVE_EXPR.
2180 2015-01-29  Jason Merrill  <jason@redhat.com>
2182         PR c++/49508
2183         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2184         erroneous return statement.
2186         PR c++/64521
2187         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2188         point.
2190 2015-01-27  Caroline Tice  <cmtice@google.com>
2192         Committing VTV Cywin/Ming patch for Patrick Wollgast
2193         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2194         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2196 2015-01-27  Jason Merrill  <jason@redhat.com>
2198         PR c++/58597
2199         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2200         current_function_decl.
2202         PR c++/63889
2203         * pt.c (finish_template_variable): Move from semantics.c.
2204         Handle multiple template arg levels.  Handle coercion here.
2205         (lookup_template_variable): Not here.
2207 2015-01-23  Jason Merrill  <jason@redhat.com>
2209         PR c++/64314
2210         PR c++/57510
2211         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2212         that has been completely split out.
2214         PR c++/64701
2215         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2216         statement codes.
2218         PR c++/64727
2219         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2220         of CONST_DECL.
2222 2015-01-21  Jason Merrill  <jason@redhat.com>
2224         PR c++/64603
2225         * constexpr.c (cxx_eval_constant_expression): Only shortcut
2226         constant CONSTRUCTORs.
2228         PR c++/64647
2229         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2230         give a hard error in a template instantiation.
2232 2015-01-21  Richard Biener  <rguenther@suse.de>
2234         PR middle-end/64313
2235         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2236         for builtins the user declared correctly.
2238 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
2240         PR c++/58614
2241         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2242         TREE_TYPE (elt) == error_mark_node.
2244 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
2246         PR tree-optimization/62053
2247         * tree.c (build_cplus_array_type): Layout type after variants are set.
2249 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
2251         * cp-gimplify.c (cp_genericize_r): Call
2252         cp_ubsan_maybe_instrument_member_call for member calls.
2253         (cp_ubsan_check_member_access_r): New function.
2254         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2255         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2256         cp_ubsan_instrument_member_accesses,
2257         cp_ubsan_maybe_instrument_downcast,
2258         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2259         * cp-ubsan.c: New file.
2260         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2261         * constexpr.c (cxx_eval_call_expression): Return void_node
2262         for IFN_UBSAN_VPTR.
2263         (potential_constant_expression_1): Return true for
2264         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2265         * typeck.c (build_class_member_access_expr): Provide locus
2266         for COMPONENT_REFs.
2267         (build_static_cast_1): Instrument downcasts.
2268         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2269         add ubsan instrumentation for virtual_access.
2270         * call.c: Include internal-fn.h.
2271         (set_flags_from_callee): Handle internal calls.
2273 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
2275         PR c++/59366
2276         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2277         and function templates, declared only in the class.
2278         * decl.c (duplicate_decls): Reveal hidden friend functions or
2279         function templates, if they are redeclared outside the class.
2281 2015-01-15  Jason Merrill  <jason@redhat.com>
2283         PR c++/64356
2284         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2286         PR c++/63283
2287         * constexpr.c (potential_constant_expression_1): Handle reference
2288         args in templates.
2290 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2291             James Norris  <jnorris@codesourcery.com>
2292             Cesar Philippidis  <cesar@codesourcery.com>
2293             Ilmir Usmanov  <i.usmanov@samsung.com>
2294             Jakub Jelinek  <jakub@redhat.com>
2296         * parser.c: Include "gomp-constants.h".
2297         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2298         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2299         Use OMP_CLAUSE_SET_MAP_KIND.
2300         (cp_parser_omp_construct, cp_parser_pragma): Handle
2301         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2302         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2303         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2304         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2305         "create", "delete", "deviceptr", "host", "num_gangs",
2306         "num_workers", "present", "present_or_copy", "pcopy",
2307         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2308         "present_or_create", "pcreate", "vector_length", "wait".
2309         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2310         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2311         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2312         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2313         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2314         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2315         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2316         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2317         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2318         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2319         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2320         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2321         (cp_parser_oacc_parallel, cp_parser_oacc_update)
2322         (cp_parser_oacc_wait): New functions.
2323         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2324         (finish_oacc_parallel): New prototypes.
2325         * semantics.c: Include "gomp-constants.h".
2326         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2327         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2328         OMP_CLAUSE_SET_MAP_KIND.
2329         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2330         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2331         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2332         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2333         functions.
2335 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
2337         PR c++/58671
2338         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2339         self-initialization.
2341 2015-01-13  Jason Merrill  <jason@redhat.com>
2343         PR c++/64356
2344         PR libstdc++/58777
2345         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2346         pointer expressions.
2347         (cxx_eval_increment_expression): Likewise.
2349         PR c++/64514
2350         * pt.c (coerce_template_parameter_pack): Return NULL for a
2351         zero-length fixed parameter pack with a pack expansion arg.
2353         PR c++/64520
2354         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2356 2015-01-12  Jason Merrill  <jason@redhat.com>
2358         PR c++/64547
2359         * constexpr.c (cxx_eval_call_expression): A call to a void
2360         function doesn't need to return a value.
2362 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2364         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2365         input.h, alias.h, symtab.h, options.h, fold-const.h,
2366         wide-int.h, and inchash.h due to flattening of tree.h.
2367         * class.c: Ditto.
2368         * constexpr.c: Ditto.
2369         * cp-array-notation.c: Ditto.
2370         * cp-gimplify.c: Ditto.
2371         * cp-lang.c: Ditto.
2372         * cp-objcp-common.c: Ditto.
2373         * cvt.c: Ditto.
2374         * decl2.c: Ditto.
2375         * decl.c: Ditto.
2376         * dump.c: Ditto.
2377         * error.c: Ditto.
2378         * except.c: Ditto.
2379         * expr.c: Ditto.
2380         * friend.c: Ditto.
2381         * init.c: Ditto.
2382         * lambda.c: Ditto.
2383         * lex.c: Ditto.
2384         * mangle.c: Ditto.
2385         * name-lookup.c: Ditto.
2386         * optimize.c: Ditto.
2387         * parser.c: Ditto.
2388         * pt.c: Ditto.
2389         * ptree.c: Ditto.
2390         * repo.c: Ditto.
2391         * rtti.c: Ditto.
2392         * search.c: Ditto.
2393         * semantics.c: Ditto.
2394         * tree.c: Ditto.
2395         * typeck2.c: Ditto.
2396         * typeck.c: Ditto.
2398 2015-01-08  Jason Merrill  <jason@redhat.com>
2400         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2401         * decl.c (compute_array_index_type): Likewise.
2402         * init.c (build_vec_init): Likewise.
2403         * typeck.c (cp_build_binary_op): Likewise.
2405 2015-01-08  Jason Merrill  <jason@redhat.com>
2407         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2408         whether an initializer-list is too big for a VLA.
2409         (throw_bad_array_length): Remove.
2410         * cp-tree.h: Remove prototype.
2412 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
2414         PR c++/60753
2415         * decl.c (grokfndecl): Add bool parameter.
2416         (grokdeclarator): Adjust calls.
2417         (start_decl): Don't set DECL_DELETED_FN here.
2419 2015-01-06  Jason Merrill  <jason@redhat.com>
2421         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2422         template-ids.
2424         PR c++/64455
2425         * pt.c (type_dependent_expression_p): Handle variable templates.
2426         * constexpr.c (potential_constant_expression_1): Use it.
2428         PR c++/64487
2429         * semantics.c (finish_offsetof): Handle templates here.
2430         * parser.c (cp_parser_builtin_offsetof): Not here.
2432         PR c++/64496
2433         * semantics.c (process_outer_var_ref): Diagnose lambda in local
2434         class NSDMI.
2436 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2438         PR c++/64489
2439         * class.c (check_field_decls): Make copy assignment operators
2440         complex only in c++98 mode.
2442 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2444         PR c++/31397
2445         * class.c (check_for_override): Warn when a virtual function is an
2446         override not marked override.
2448 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2450         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2451         hold base_fndecls.
2452         (get_basefndecls): Adjust.
2454 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2456         Update copyright years.
2458 2015-01-05  Marek Polacek  <polacek@redhat.com>
2460         PR c/64423
2461         * typeck.c (cp_build_array_ref): Pass loc down to
2462         warn_array_subscript_with_type_char.
2465 Copyright (C) 2015 Free Software Foundation, Inc.
2467 Copying and distribution of this file, with or without modification,
2468 are permitted in any medium without royalty provided the copyright
2469 notice and this notice are preserved.