* except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
[official-gcc.git] / gcc / cp / ChangeLog
blob595781cdb3ecf5bbb40e760c7793d88ee757ebfa
1 2015-08-17  Jason Merrill  <jason@redhat.com>
3         * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
5 2015-08-14  Jason Merrill  <jason@redhat.com>
7         PR c++/65974
8         * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
10 2015-08-12  Jason Merrill  <jason@redhat.com>
12         PR c++/67104
13         * constexpr.c (cxx_eval_array_reference): Fix typo.
15         PR c++/67104
16         * constexpr.c (cxx_eval_array_reference): Handle sparse
17         CONSTRUCTORs.
19         PR c++/67108
20         * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
21         * error.c (dump_template_bindings): Don't tsubst in that case.
23         PR c++/67161
24         * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
25         TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
27 2015-08-08  Jason Merrill  <jason@redhat.com>
29         PR c++/67152
30         * pt.c (process_partial_specialization): Call
31         associate_classtype_constraints.
33         PR c++/67159
34         * constraint.cc (finish_template_introduction):
35         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
37         PR c++/67142
38         * pt.c (equal): Make sure tmpl is actually a template.
40         PR c++/67144
41         * call.c (joust): Only call more_constrained on decls.
43 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
44             Braden Obrzut  <admin@maniacsvault.net>
45             Jason Merrill  <jason@redhat.com>
46             Ville Voutilainen  <ville.voutilainen@gmail.com>
48         Add C++ Concepts TS support.
49         * constraint.cc, logic.cc: New files.
50         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
51         (c++.tags): Also process .cc files.
52         * call.c (enum rejection_reason_code): Add rr_constraint_failure.
53         (print_z_candidate): Handle it.
54         (constraint_failure): New.
55         (add_function_candidate): Check constraints.
56         (build_new_function_call): Handle evaluating concepts.
57         (joust): Check more_constrained.
58         * class.c (add_method): Check equivalently_constrained.
59         (build_clone): Copy constraints.
60         (currently_open_class): Return tree.
61         (resolve_address_of_overloaded_function): Check constraints.
62         * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
63         (potential_constant_expression_1): Likewise.
64         * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
65         (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
66         * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
67         SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
68         EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
69         EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
70         * cp-tree.h (struct tree_constraint_info, check_nonnull)
71         (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
72         (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
73         (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
74         (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
75         (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
76         (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
77         (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
78         (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
79         (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
80         (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
81         (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
82         (struct local_specialization_stack, enum auto_deduction_context)
83         (variable_concept_p, concept_template_p)
84         (struct deferring_access_check_sentinel): New.
85         (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
86         (union lang_tree_node): Add constraint_info field.
87         (struct lang_decl_base): Add concept_p flag.
88         (enum cp_decl_spec): Add ds_concept.
89         (struct cp_declarator): Add requires_clause.
90         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
91         (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
92         TRAIT_EXPR, *_CONSTR.
93         (pp_cxx_parameter_declaration_clause): Accept a chain of
94         PARM_DECLs.
95         (cxx_pretty_printer::declarator): Print requires-clause.
96         (pp_cxx_template_declaration): Likewise.
97         (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
98         (pp_cxx_requires_clause, pp_cxx_requirement)
99         (pp_cxx_requirement_list, pp_cxx_requirement_body)
100         (pp_cxx_requires_expr, pp_cxx_simple_requirement)
101         (pp_cxx_type_requirement, pp_cxx_compound_requirement)
102         (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
103         (pp_cxx_expression_constraint, pp_cxx_type_constraint)
104         (pp_cxx_implicit_conversion_constraint)
105         (pp_cxx_argument_deduction_constraint)
106         (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
107         (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
108         * cxx-pretty-print.h: Declare them.
109         * decl.c (decls_match): Compare constraints.
110         (duplicate_decls): Likewise.  Remove constraints before freeing.
111         (cxx_init_decl_processing): Call init_constraint_processing.
112         (cp_finish_decl): Diagnose concept without initializer.
113         (grokfndecl, grokvardecl): Handle concepts and constraints.
114         (grokdeclarator): Handle concept, requires-clause.
115         (grokparms): No longer static.
116         (xref_tag_1): Check constraints.
117         (finish_function): Call check_function_concept.
118         (cp_tree_node_structure): Handle CONSTRAINT_INFO.
119         (check_concept_refinement, is_concept_var, check_concept_fn): New.
120         * decl2.c (check_classfn): Compare constraints.
121         (mark_used): Don't instantiate concepts.
122         * error.c (dump_template_decl): Print constraints.
123         (dump_function_decl): Likewise.
124         (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
125         * lex.c (init_reswords): Set D_CXX_CONCEPTS.
126         * method.c (implicitly_declare_fn): Copy constraints from
127         inherited ctor.
128         * parser.h (struct cp_parser): Add in_result_type_constraint_p and
129         prevent_constrained_type_specifiers fields.
130         * parser.c (make_call_declarator): Add requires_clause parm.
131         (cp_parser_new): Clear prevent_constrained_type_specifiers.
132         (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
133         (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
134         (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
135         (cp_parser_declaration): Handle concept introduction.
136         (cp_parser_member_declaration): Likewise.
137         (cp_parser_template_parameter): Handle constrained parameter.
138         (cp_parser_type_parameter): Handle constraints.
139         (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
140         (cp_parser_template_id): Handle partial concept id.
141         (cp_parser_type_name): Add overload that takes typename_keyword_p.
142         Handle constrained parameter.
143         (cp_parser_nonclass_name): Handle concept names.
144         (cp_parser_alias_declaration): Handle constraints.
145         (cp_parser_late_return_type_opt): Also handle requires-clause.
146         (cp_parser_type_id_1): Handle deduction constraint.
147         (cp_parser_parameter_declaration): Handle constrained parameters.
148         (cp_parser_class_specifier_1): Handle constraints.
149         (cp_parser_template_declaration_after_parameters): Split out from
150         cp_parser_template_declaration_after_export.
151         (cp_parser_single_declaration): Handle constraints.
152         (synthesize_implicit_template_parm): Handle constraints.
153         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
154         (cp_parser_introduction_list, get_id_declarator)
155         (get_unqualified_id, is_constrained_parameter)
156         (cp_parser_check_constrained_type_parm)
157         (cp_parser_constrained_type_template_parm)
158         (cp_parser_constrained_template_template_parm)
159         (constrained_non_type_template_parm, finish_constrained_parameter)
160         (declares_constrained_type_template_parameter)
161         (declares_constrained_template_template_parameter)
162         (check_type_concept, cp_parser_maybe_constrained_type_specifier)
163         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
164         (cp_parser_requires_clause, cp_parser_requires_clause_opt)
165         (cp_parser_requires_expression)
166         (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
167         (cp_parser_requirement_list, cp_parser_requirement)
168         (cp_parser_simple_requirement, cp_parser_type_requirement)
169         (cp_parser_compound_requirement, cp_parser_nested_requirement)
170         (cp_parser_template_introduction)
171         (cp_parser_explicit_template_declaration)
172         (get_concept_from_constraint): New.
173         * pt.c (local_specialization_stack): Implement.
174         (maybe_new_partial_specialization): New.
175         (maybe_process_partial_specialization): Use it.
176         (retrieve_local_specialization, register_local_specialization)
177         (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
178         (tsubst_expr): No longer static.
179         (spec_hasher::equal): Compare constraints.
180         (determine_specialization): Handle constraints.
181         (check_explicit_specialization): Handle concepts.
182         (process_template_parm): Handle constraints.
183         (end_template_parm_list): Add overload taking no arguments.
184         (process_partial_specialization): Handle concepts and constraints.
185         Register partial specializations of variable templates.
186         (redeclare_class_template): Handle constraints.
187         (convert_template_argument): Handle WILDCARD_DECL.  Check
188         is_compatible_template_arg.
189         (coerce_template_parameter_pack): Handle wildcard packs.
190         (coerce_template_parms): DR 1430 also applies to concepts.  Add
191         overloads taking fewer parameters.
192         (lookup_template_class_1): Handle constraints.
193         (lookup_template_variable): Concepts are always bool.
194         (finish_template_variable): Handle concepts and constraints.
195         (tsubst_friend_class): Handle constraints.
196         (gen_elem_of_pack_expansion_instantiation): Handle constraints.
197         (tsubst_pack_expansion): Handle local parameters.
198         (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
199         (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
200         (tsubst_copy_and_build): Handle REQUIRES_EXPR.
201         (more_specialized_fn, more_specialized_partial_spec): Check constraints.
202         (more_specialized_inst): Split out from most_specialized_instantiation.
203         (most_specialized_partial_spec): Check constraints.
204         (instantiate_decl): Never instantiate a concept.
205         (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
206         variable concepts.
207         (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
208         (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
209         (do_auto_deduction): Add overload taking tsubst flags and context enum.
210         Handle constraints.
211         (get_template_for_ordering, most_constrained_function)
212         (is_compatible_template_arg, convert_wildcard_argument)
213         (struct constr_entry, struct constr_hasher, decl_constraints)
214         (valid_constraints_p, get_constraints, set_constraints)
215         (remove_constraints, init_constraint_processing): New.
216         * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
217         * search.c (lookup_member): Do lookup in the open partial
218         instantiation.
219         * semantics.c (finish_template_template_parm): Handle constraints.
220         (fixup_template_type): New.
221         (finish_template_type): Call it.
222         (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
223         * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
224         (cp_walk_subtrees): Handle REQUIRES_EXPR.
225         * typeck.c (cp_build_function_call_vec): Check constraints.
227 2015-08-06  Jason Merrill  <jason@redhat.com>
229         PR c++/66533
230         * parser.c (cp_parser_primary_expression): Don't skip to the end
231         of the statement if we're parsing tentatively.
233         PR c++/67130
234         PR c++/67131
235         PR c++/66260
236         * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
237         templates.
238         * pt.c (tsubst_copy_and_build): Check for argument substitution
239         failure.
241 2015-08-05  Jason Merrill  <jason@redhat.com>
243         * pt.c (determine_specialization): Print candidates after 'no
244         match' error.
246         * decl.c (cp_finish_decl): Tidy.
247         * typeck.c (finish_class_member_access_expr): Use
248         type_dependent_expression_p.
249         * semantics.c (finish_id_expression): Use
250         type_dependent_expression_p.  Don't build_qualified_name for a
251         decl in non-dependent scope.
252         * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
253         identifier is dependent.  Remove variable_template_p check.
255         PR c++/66260
256         PR c++/66596
257         PR c++/66649
258         PR c++/66923
259         * pt.c (lookup_template_variable): Use NULL_TREE for type.
260         (instantiate_template_1): Also set DECL_TI_ARGS based on
261         the immediate parent.
262         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
263         (finish_template_variable): Add complain parm.
264         * cp-tree.h: Adjust.
266         PR c++/65195
267         PR c++/66619
268         * semantics.c (finish_id_expression): Call convert_from_reference
269         for variable template.
271 2015-08-04  Jason Merrill  <jason@redhat.com>
273         * pt.c (lookup_template_class_1): Clear elt.spec.
275         * tree.c (build_target_expr): Copy the location from value.
277 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
279         * parser.c (cp_parser_selection_statement): Move handling of
280         semicolon body to ...
281         (cp_parser_implicitly_scoped_statement): .. here.  Call
282         warn_for_misleading_indentation even when the body is a
283         semicolon.  Extract token_indent_infos corresponding to the
284         guard, body and next tokens.  Adjust call to
285         warn_for_misleading_indentation accordingly.  Take
286         token_indent_info argument.
287         (cp_parser_already_scoped_statement): Likewise.
288         (cp_parser_selection_statement, cp_parser_iteration_statement):
289         Extract a token_indent_info corresponding to the guard token.
291 2015-08-01  Caroline Tice  <cmtice@google.com>
293         PR 66521
294         * mangle.c : Add vtable-verify.h to include files.
295         (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
296         is "<anon>" get the real mangled name for the class instead, and
297         also store the real mangled name in a vector for use later.
299 2015-07-31  Marek Polacek  <polacek@redhat.com>
301         PR sanitizer/66977
302         * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
303         RSHIFT_EXPR.
305 2015-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
307         * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
308         in warning_at instead of "%q+D" in warning.
309         (warn_hidden): Likewise but use location_of.
310         (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
311         (check_bitfield_decl, check_field_decls): Likewise in warning_at.
312         (check_field_decls): Likewise for permerror.
313         (explain_non_literal_class): Likewise for inform.
314         (check_bases_and_members, layout_class_type): Likewise for warning_at.
315         (note_name_declared_in_class): Use location_of in permerror.
316         * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
317         (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
318         inform, and warning_at.
319         (check_for_out_of_scope_variable): Likewise for warning_at and
320         permerror.
322 2015-07-30  Jason Merrill  <jason@redhat.com>
324         DR 1558
325         PR c++/67021
326         * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
328 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
330         * call.c (build_op_delete_call, convert_like_real, build_over_call):
331         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
332         of "%q+D".
333         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
334         * decl.c (duplicate_decls): Likewise for warning/warning_at.
335         * except.c (maybe_noexcept_warning): Likewise.
336         * friend.c (make_friend_class): Likewise for inform.
337         * mangle.c (mangle_decl): Likewise for warning/warning_at.
338         * method.c (process_subob_fn, walk_field_subobs,
339         maybe_explain_implicit_delete): Likewise for inform.
340         * parser.c (cp_parser_lambda_introducer): Likewise.
341         * pt.c (check_specialization_namespace,
342         maybe_process_partial_specialization): Likewise for permerror.
343         (redeclare_class_template): Likewise for inform_n.
344         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
345         * search.c (check_final_overrider): Likewise.
346         * semantics.c (process_outer_var_ref): Likewise.
348 2015-07-27  Jason Merrill  <jason@redhat.com>
350         * constexpr.c (cxx_eval_call_expression): Don't add this call to
351         the hash table if !depth_ok.
353 2015-07-27  Marek Polacek  <polacek@redhat.com>
355         PR c++/66555
356         PR c/54979
357         * call.c (build_new_op_1): Call warn_tautological_cmp.
358         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
359         compare warnings.
361 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
363         PR c++/18969
364         * typeck.c (check_return_expr): Also do the basic return-value
365         validity checking if processing_template_decl and yet types are
366         not dependent.  Remove obsolete code.
368 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
370         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
371         in warning_at instead of "%q+D" in warning.
372         (warn_extern_redeclared_static): Likewise for inform.
373         (check_redeclaration_no_default_args): Likewise for permerror.
374         (duplicate_decls): Likewise.
375         (check_previous_goto_1): Likewise for inform.
376         (check_goto, start_decl, check_for_uninitialized_const_var,
377         start_preparsed_function, finish_function§): Likewise.
378         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
379         * init.c (sort_mem_initializers): Likewise.
380         * typeck.c (convert_for_initialization): Likewise for inform.
381         (maybe_warn_about_returning_address_of_local): Likewise.
382         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
383         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
385 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
387         PR c++/66857
388         * cvt.c (ocp_convert): Don't call scalar_constant_value when
389         converting to a class type.
391 2015-07-24  Jason Merrill  <jason@redhat.com>
393         PR c++/64969
394         * pt.c (splice_late_return_type): Correct deduced return type for
395         abbreviated function template.
397 2015-07-24  Richard Biener  <rguenther@suse.de>
399         * init.c (build_vec_init): Build iterator bound in the same
400         type as the iterator.
402 2015-07-23  Marek Polacek  <polacek@redhat.com>
404         PR c++/66572
405         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
407 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
409         PR c++/52987
410         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
411         redundant error messages.
413 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
415         * decl.c (grokdeclarator): For an erroneous template parameter
416         propagate error_mark_node as type.
418 2015-07-20  Marek Polacek  <polacek@redhat.com>
420         PR c++/55095
421         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
423 2015-07-15  Jason Merrill  <jason@redhat.com>
425         PR c++/65091
426         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
427         template if there is no type x in scope.
429 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
431         PR c++/66850
432         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
433         template template parm in the redeclaration.
434         (lookup_template_class_1): Peel off irrelevant template levels
435         from current_template_parms before augmenting the argument
436         list.
438 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
440         PR c++/65071
441         * parser.c (cp_parser_sizeof_pack): Also consider template template
442         parameters.
444 2015-07-14  Jason Merrill  <jason@redhat.com>
446         * call.c (build_new_method_call_1): Call reshape_init.
448 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
450         * pt.c (check_template_shadow): Emit error + inform instead of
451         two errors.
453 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
455         PR c++/65186
456         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
457         template parm type under C++11 and later.
459 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
461         * call.c: Fix double word typos.
462         * cp-array-notation.c: Same.
463         * cp-tree.h: Same.
464         * init.c: Same.
465         * name-lookup.c: Same.
466         * parser.c: Same.
468 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
470         PR c++/30044
471         * pt.c (begin_template_parm_list): Add a dummy parameter level
472         to current_template_parms.
473         (end_template_parm_list): Remove the dummy parameter level
474         before adding the real one.
475         (tsubst): Don't attempt to substitute for template parameters
476         corresponding to a dummy argument level.
477         (template_parms_to_args): Remove obsolete hack for
478         giving template template arguments the proper level.
479         (splite_late_return_type): Remove obsolete hack for giving
480         template template arguments the proper level.
481         * error.c (dump_template_decl): Don't print dummy template
482         levels.
484 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
486         PR c++/54521
487         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
488         the second step of copy-initialization.
490 2015-07-10  Jason Merrill  <jason@redhat.com>
492         * pt.c (find_parameter_packs_r): Handle variable templates.
493         (variable_template_specialization_p): New.
494         * cp-tree.h: Declare it.
496         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
498 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
500         * decl2.c (cpp_check): Revert latest change.
502 2015-07-09  Jason Merrill  <jason@redhat.com>
504         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
505         value_dependent_expression_p.
507         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
508         template_parameter_pack_p.
509         * parser.c (declarator_can_be_parameter_pack): False if
510         parameter_pack_p is set.
511         (make_parameter_declarator): Add template_parameter_pack_p parm.
512         (cp_parser_template_parameter): Remove parameter pack parsing.
513         (cp_parser_parameter_declaration): Handle all parameter packs.
514         Tweak default argument permerror.
516 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
518         * parser.c (cp_parser_default_type_template_argument)
519         (cp_parser_default_template_template_argument): Factor out from
520         cp_parser_type_parameter.
522 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
524         * typeck.c (warn_args_num): Rename to error_args_num.
525         (convert_arguments): Adjust calls.
527 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
529         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
531 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
533         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
535 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
537         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
538         * pt.c (apply_late_template_attributes): Likewise.
540 2015-07-08  Marek Polacek  <polacek@redhat.com>
542         PR c++/66748
543         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
544         accessing TYPE_LANG_SPECIFIC node.
546 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
548         * call.c: Adjust includes.
549         * class.c: Likewise.
550         * constexpr.c: Likewise.
551         * cp-array-notation.c: Likewise.
552         * cp-gimplify.c: Likewise.
553         * cp-lang.c: Likewise.
554         * cp-objcp-common.c: Likewise.
555         * cp-ubsan.c: Likewise.
556         * cvt.c: Likewise.
557         * decl.c: Likewise.
558         * decl2.c: Likewise.
559         * dump.c: Likewise.
560         * error.c: Likewise.
561         * except.c: Likewise.
562         * expr.c: Likewise.
563         * friend.c: Likewise.
564         * init.c: Likewise.
565         * lambda.c: Likewise.
566         * lex.c: Likewise.
567         * mangle.c: Likewise.
568         * method.c: Likewise.
569         * name-lookup.c: Likewise.
570         * optimize.c: Likewise.
571         * parser.c: Likewise.
572         * pt.c: Likewise.
573         * ptree.c: Likewise.
574         * repo.c: Likewise.
575         * rtti.c: Likewise.
576         * search.c: Likewise.
577         * semantics.c: Likewise.
578         * tree.c: Likewise.
579         * typeck.c: Likewise.
580         * typeck2.c: Likewise.
582 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
584         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
586 2015-07-06  Jason Merrill  <jason@redhat.com>
588         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
589         for a template template parameter.
590         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
591         by reduce_template_parm_level.
593         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
594         expansion.
596 2015-07-02  Jason Merrill  <jason@redhat.com>
598         PR c++/66743
599         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
600         TYPE_VALUES_RAW rather than TYPE_FIELDS.
602 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
604         * pt.c (type_dependent_expression_p): Handle expressions
605         that refer to variable templates.
607 2015-07-01  Jason Merrill  <jason@redhat.com>
609         * lex.c (init_reswords): s/CXX0X/CXX11/.
610         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
612         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
613         Attribute mangling is now -fabi-version=10.
615         PR c++/65945
616         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
617         * class.c (layout_nonempty_base_or_field): Warn if that affects
618         the offset of a field.
620 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
622         PR c++/60365
623         * parser.c (cp_parser_check_std_attribute): New.
624         (cp_parser_std_attribute_list): Call it.
626 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
628         PR c++/66686
629         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
630         return 0 if tsubst returns a dependent type.
632 2015-06-30  Jason Merrill  <jason@redhat.com>
634         PR debug/66653
635         * decl2.c (is_late_template_attribute): True for tls_model.
637         PR debug/66653
638         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
639         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
640         (SET_DECL_GNU_TLS_P): New.
641         * call.c (make_temporary_var_for_ref_to_temp): Use
642         CP_DECL_THREAD_LOCAL_P.
643         (set_up_extended_ref_temp): Likewise.
644         * decl.c (duplicate_decls, expand_static_init): Likewise.
645         (redeclaration_error_message, grokvardecl): Likewise.
646         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
647         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
648         (handle_tls_init): Likewise.
649         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
650         * semantics.c (finish_id_expression): Likewise.
651         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
652         (finish_omp_threadprivate): Likewise.
653         * tree.c (decl_storage_duration): Likewise.
654         * cp-gimplify.c (omp_var_to_track): Likewise.
655         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
656         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
657         already set.
659 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
661         Implement N4197 - Adding u8 character literals
662         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
663         and CPP_UTF8CHAR_USERDEF tokens;
664         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
666 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
668         PR c++/65977
669         * decl.c (grokfndecl): Allow constexpr declarations of friend
670         template specializations.
672 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
674         PR fortran/66605
675         * decl.c (finish_function): Call do_warn_unused_parameter.
677 2015-06-29  Marek Polacek  <polacek@redhat.com>
679         PR c/66322
680         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
681         (push_switch): Set OUTSIDE_RANGE_P.
682         (pop_switch): Update c_do_switch_warnings call.
683         (finish_case_label): Update c_add_case_label call.
684         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
685         here.
687 2015-06-27  Marek Polacek  <polacek@redhat.com>
689         * call.c: Use VECTOR_TYPE_P.
690         * constexpr.c: Likewise.
691         * cvt.c: Likewise.
692         * decl.c: Likewise.
693         * decl2.c: Likewise.
694         * init.c: Likewise.
695         * semantics.c: Likewise.
696         * tree.c: Likewise.
697         * typeck.c: Likewise.
698         * typeck2.c: Likewise.
700 2015-06-27  Marek Polacek  <polacek@redhat.com>
702         * call.c (set_up_extended_ref_temp): Use VAR_P.
703         * class.c: Use VAR_P throughout.
704         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
705         * cp-array-notation.c (make_triplet_val_inv): Likewise.
706         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
707         throughout.
708         * decl2.c: Likewise.
709         * error.c (dump_decl): Use VAR_P.
710         * mangle.c (decl_implicit_alias_p): Likewise.
711         * parser.c: Use VAR_P throughout.
712         * pt.c: Likewise.
713         * semantics.c: Likewise.
714         * vtable-class-hierarchy.c: Likewise.
715         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
717 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
719         * pt.c (check_unstripped_args): Mark parameter as unused.
721 2015-06-26  Jason Merrill  <jason@redhat.com>
723         PR c++/66216
724         * class.c (finish_struct): Call fixup_attribute_variants.
726         PR c++/66684
727         * typeck2.c (merge_exception_specifiers): Allow different
728         noexcept-specifiers if we've had errors.
730         PR c++/66255
731         * pt.c (check_unstripped_args): Split out from...
732         (retrieve_specialization): ...here.  Allow typedefs in the type of
733         a non-type argument.
735         PR c++/66067
736         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
737         TYPE_DECLs.
738         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
740         PR c++/66654
741         * typeck2.c (digest_init_r): Only expect reshaping if the class is
742         aggregate.
744 2015-06-26  Marek Polacek  <polacek@redhat.com>
746         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
747         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
749 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
751         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
752         * class.c: Likewise.
753         * cp-ubsan.c: Likewise.
754         * decl.c: Likewise.
755         * decl2.c: Likewise.
756         * lambda.c: Likewise.
757         * mangle.c: Likewise.
758         * method.c: Likewise.
759         * optimize.c: Likewise.
760         * parser.c: Likewise.
761         * semantics.c: Likewise.
762         * tree.c: Likewise.
763         * vtable-class-hierarchy.c: Likewise.
765 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
767         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
768         rather than ggc_hasher.
769         (constexpr_call_hasher): Likewise.
770         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
771         * decl.c (typename_hasher): Likewise.
772         * mangle.c (conv_type_hasher): Likewise.
773         * pt.c (spec_hasher): Likewise.
774         * tree.c (cplus_array_hasher, list_hasher): Likewise.
775         * typeck2.c (abstract_type_hasher): Likewise.
777 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
779         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
780         rather than pointer_hash.
781         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
782         * semantics.c (nrv_data): Likewise.
783         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
785 2015-06-24  Jason Merrill  <jason@redhat.com>
787         PR c++/66647
788         * pt.c (dependent_type_p_r): Check for dependent alias template
789         specialization sooner.
791         PR c++/66501
792         * class.c (type_has_nontrivial_assignment): Remove.
793         * cp-tree.h: Remove declaration.
794         * init.c (vec_copy_assign_is_trivial): New.
795         (build_vec_init): Use it.
797 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
799         Implement N3928 - Extending static_assert
800         * parser.c (cp_parser_static_assert): Support static_assert with
801         no message string.  Supply an empty string in this case.
802         * semantics.c (finish_static_assert): Don't try to print a message if
803         the message strnig is empty.
805 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
807         PR c++/65750
808         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
809         implicit template parm if 'auto' is a placeholder for trailing
810         return type.
812 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
814         Revert:
815         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
817         PR c++/30044
818         * parser.c (cp_parser_template_parameter_list): Update
819         current_template_parms right after processing a paramater.
820         * pt.c (template_parms_to_args): Remove obsolete hack for
821         giving template template arguments the proper level.
822         (check_default_tmpl_args): Account for tested template
823         parameter_lists.
824         (splite_late_return_type): Remove obsolete hack for giving
825         template template arguments the proper level.
827 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
829         PR c++/65811
830         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
832 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
834         PR c++/30044
835         * parser.c (cp_parser_template_parameter_list): Update
836         current_template_parms right after processing a paramater.
837         * pt.c (template_parms_to_args): Remove obsolete hack for
838         giving template template arguments the proper level.
839         (check_default_tmpl_args): Account for tested template
840         parameter_lists.
841         (splite_late_return_type): Remove obsolete hack for giving
842         template template arguments the proper level.
844 2015-06-23  Jason Merrill  <jason@redhat.com>
846         PR c++/65879
847         * decl.c (grokfndecl): Check the linkage of ctype, not just
848         TYPE_ANONYMOUS_P.
849         * tree.c (no_linkage_check): Skip the 'this' pointer.
851         PR c++/66501
852         * class.c (type_has_nontrivial_assignment): New.
853         * init.c (build_vec_init): Use it.
854         * cp-tree.h: Declare it.
855         * method.c (trivial_fn_p): Templates aren't trivial.
857         PR c++/66542
858         * decl.c (expand_static_init): Make sure the destructor is callable
859         here even if we have an initializer.
861 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
863         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
864         -fdump-ada-spec is passed.
866 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
868         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
870 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
872         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
874 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
876         * decl.c (grokdeclarator): Remove pointless code.
878 2015-06-22  Jason Merrill  <jason@redhat.com>
880         PR c++/66515
881         * call.c (implicit_conversion): Only reshape for classes.
883 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
885         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
886         manually swapping.
887         * semantics.c (finish_omp_atomic): Likewise.
888         * typeck.c (cp_build_array_ref): Likewise.
890 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
892         PR c++/65882
893         * call.c (build_new_op_1): Check tf_warning flag in all cases.
895 2015-06-19  Jason Merrill  <jason@redhat.com>
897         PR c++/66585
898         * pt.c (instantiate_class_template_1): Clear
899         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
901         PR c++/65880
902         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
903         cv-qualifiers.
904         * typeck.c (merge_types): build_ptrmemfunc_type before applying
905         quals and attributes.
907         PR c++/65973
908         * constexpr.c (build_constexpr_constructor_member_initializers):
909         Handle an empty STATEMENT_LIST.
911         PR c++/65843
912         * pt.c (tsubst_copy_and_build): Register a capture proxy in
913         local_specializations.
915 2015-06-17  Jason Merrill  <jason@redhat.com>
917         PR c++/66001
918         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
919         TRY_FINALLY_EXPR.
920         (potential_constant_expression_1): Likewise.
922 2015-06-17  Jason Merrill  <jason@redhat.com>
924         PR c++/66515
925         * call.c (implicit_conversion): Call reshape_init here, early.
926         (build_aggr_conv): Not here.
928 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
930         PR c++/66571
931         * pt.c (tsubst_omp_clause_decl): New function.
932         (tsubst_omp_clauses): Use it or tsubst_copy instead of
933         tsubst_expr on OMP_CLAUSE_DECL.
935 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
937         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
938         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
939         * decl.c (grokdeclarator, xref_tag_1): Likewise.
940         * error.c (dump_aggr_type): likewise.
941         * pt.c (push_template_decl_real): Likewise.
942         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
944 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
946         * call.c: Do not include input.h, line-map.h or is-a.h.
947         * class.c: Likewise.
948         * constexpr.c: Likewise.
949         * cp-array-notation.c: Likewise.
950         * cp-gimplify.c: Likewise.
951         * cp-lang.c: Likewise.
952         * cp-objcp-common.c: Likewise.
953         * cp-tree.h: Likewise.
954         * cp-ubsan.c: Likewise.
955         * cvt.c: Likewise.
956         * decl.c: Likewise.
957         * decl2.c: Likewise.
958         * dump.c: Likewise.
959         * error.c: Likewise.
960         * except.c: Likewise.
961         * expr.c: Likewise.
962         * friend.c: Likewise.
963         * init.c: Likewise.
964         * lambda.c: Likewise.
965         * lex.c: Likewise.
966         * mangle.c: Likewise.
967         * method.c: Likewise.
968         * name-lookup.c: Likewise.
969         * optimize.c: Likewise.
970         * parser.c: Likewise.
971         * pt.c: Likewise.
972         * ptree.c: Likewise.
973         * repo.c: Likewise.
974         * rtti.c: Likewise.
975         * search.c: Likewise.
976         * semantics.c: Likewise.
977         * tree.c: Likewise.
978         * typeck.c: Likewise.
979         * typeck2.c: Likewise.
980         * vtable-class-hierarchy.c: Likewise.
982 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
984         PR c++/59682
985         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
987 2015-06-16  Jason Merrill  <jason@redhat.com>
989         PR c++/66536
990         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
991         mismatch.
993         PR c++/58063
994         * tree.c (bot_manip): Remap SAVE_EXPR.
996         PR c++/66387
997         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
999 2015-06-15  Nathan Sidwell  <nathan@acm.org>
1001         PR c++/58583
1002         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1003         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1004         protect it from recursive instantiation.
1006 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
1008         PR c++/51048
1009         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1010         using a local type is pure virtual.
1012 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1014         * call.c: Remove comment documenting the long-deleted
1015         function build_method_call.
1017 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1019         PR c++/65168
1020         * typeck.c (cp_build_binary_op): Warn when comparing an address
1021         of a reference against NULL.
1023 2015-06-12  Jason Merrill  <jason@redhat.com>
1025         PR c++/65719
1026         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1027         variables as DECL_NOT_REALLY_EXTERN.
1029 2015-06-11  Jason Merrill  <jason@redhat.com>
1031         PR c++/66445
1032         * constexpr.c (potential_constant_expression_1): Handle a
1033         DECL_EXPR of TYPE_DECL.
1035         PR c++/66450
1036         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1037         ctx->ctor.
1039 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1041         * decl.c (cxx_init_decl_processing): Register the main
1042         translation unit through the new debug hook.
1044 2015-06-10  Jason Merrill  <jason@redhat.com>
1046         PR c++/66289
1047         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1048         * pt.c (push_template_decl_real): Set it.
1049         (dependent_alias_template_spec_p): Use it.
1050         (dependent_type_p_r): Use dependent_alias_template_spec_p.
1051         (uses_all_template_parms_data, uses_all_template_parms_r)
1052         (complex_alias_template_p): New.
1053         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1055 2015-06-09  Jason Merrill  <jason@redhat.com>
1057         DR 1467
1058         PR c++/51747
1059         * typeck2.c (digest_init_r): Replace previous change with
1060         gcc_unreachable.
1062         PR c++/66387
1063         * semantics.c (process_outer_var_ref): Make sure the value is
1064         actually constant before returning it.
1065         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1066         array.
1068 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1070         PR c++/65815
1071         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1072         * init.c (expand_default_init): Likewise.
1074 2015-06-09  Jason Merrill  <jason@redhat.com>
1076         PR c++/66383
1077         * tree.c (replace_placeholders_r): Handle placeholders for an
1078         outer object.
1079         * typeck2.c (store_init_value): Only replace_placeholders for
1080         objects of class type.
1082 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1084         * call.c : Adjust include files.
1085         * class.c : Likewise.
1086         * constexpr.c : Likewise.
1087         * cp-array-notation.c : Likewise.
1088         * cp-cilkplus.c : Likewise.
1089         * cp-gimplify.c : Likewise.
1090         * cp-lang.c : Likewise.
1091         * cp-objcp-common.c : Likewise.
1092         * cp-tree.h : Likewise.
1093         * cp-ubsan.c : Likewise.
1094         * cvt.c : Likewise.
1095         * decl.c : Likewise.
1096         * decl2.c : Likewise.
1097         * dump.c : Likewise.
1098         * error.c : Likewise.
1099         * except.c : Likewise.
1100         * expr.c : Likewise.
1101         * friend.c : Likewise.
1102         * init.c : Likewise.
1103         * lambda.c : Likewise.
1104         * lex.c : Likewise.
1105         * mangle.c : Likewise.
1106         * method.c : Likewise.
1107         * name-lookup.c : Likewise.
1108         * optimize.c : Likewise.
1109         * parser.c : Likewise.
1110         * pt.c : Likewise.
1111         * ptree.c : Likewise.
1112         * repo.c : Likewise.
1113         * rtti.c : Likewise.
1114         * search.c : Likewise.
1115         * semantics.c : Likewise.
1116         * tree.c : Likewise.
1117         * typeck.c : Likewise.
1118         * typeck2.c : Likewise.
1119         * vtable-class-hierarchy.c : Likewise.
1121 2015-06-05  Jason Merrill  <jason@redhat.com>
1123         PR c++/66405
1124         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1125         the expansion has extra args.
1126         (use_pack_expansion_extra_args_p): Return true in that case.
1128         PR c++/66405
1129         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1130         dependent even if it has a type.
1132 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1134         * cp-objcp-common.c: Adjust comment for
1135         cxx_warn_unused_global_decl.
1136         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1137         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1138         * cp-tree.h (note_mangling_alias): Protoize.
1139         (cp_write_global_declarations): Remove.
1140         (cxx_post_compilation_parsing_cleanups): Protoize.
1141         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1142         argument.
1143         * decl2.c (mangling_aliases): New global.
1144         (build_java_method_aliases): New.  Adapted from
1145         collect_candidates_for_java_method_aliases.
1146         (collect_candidates_for_java_method_aliases): Remove.
1147         (build_java_method_aliases): Remove.
1148         (generate_mangling_aliases): New.
1149         (note_mangling_alias): New.  Moved from mangle_decl.
1150         (locus_at_end_of_parsing): New global.
1151         (c_parse_final_cleanups): Rename from
1152         cp_write_global_declarations.
1153         Use locus_at_end_of_parsing.
1154         Call generate_mangling_aliases.
1155         Rename call to collect_candidates_for_java_method_aliases into
1156         build_java_method_aliases.
1157         Remove call to finalize_compilation_unit.
1158         Move vtable handling into cxx_post_compilation_parsing_cleanups.
1159         Do not call check_global_declarations or
1160         emit_debug_global_declarations.
1161         (cxx_post_compilation_parsing_cleanups): New.
1162         * mangle.c (mangle_decl): Move code to note_mangling_alias.
1163         * name-lookup.c (do_namespace_alias): Call early_global_decl.
1165 2015-06-05  Nathan Sidwell  <nathan@acm.org>
1167         PR c++/52595
1168         * parser.c (cp_parser_cache_defarg): Continue looking for
1169         declarators when scanning a potential template argument list of an
1170         NSDMI.
1172 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1174         * call.c: Adjust includes for restructured coretypes.h.
1175         * class.c: Likewise.
1176         * constexpr.c: Likewise.
1177         * cp-array-notation.c: Likewise.
1178         * cp-gimplify.c: Likewise.
1179         * cp-lang.c: Likewise.
1180         * cp-objcp-common.c: Likewise.
1181         * cp-tree.h: Likewise.
1182         * cp-ubsan.c: Likewise.
1183         * cvt.c: Likewise.
1184         * decl.c: Likewise.
1185         * decl2.c: Likewise.
1186         * dump.c: Likewise.
1187         * error.c: Likewise.
1188         * except.c: Likewise.
1189         * expr.c: Likewise.
1190         * friend.c: Likewise.
1191         * init.c: Likewise.
1192         * lambda.c: Likewise.
1193         * lex.c: Likewise.
1194         * mangle.c: Likewise.
1195         * method.c: Likewise.
1196         * name-lookup.c: Likewise.
1197         * optimize.c: Likewise.
1198         * parser.c: Likewise.
1199         * pt.c: Likewise.
1200         * ptree.c: Likewise.
1201         * repo.c: Likewise.
1202         * rtti.c: Likewise.
1203         * search.c: Likewise.
1204         * semantics.c: Likewise.
1205         * tree.c: Likewise.
1206         * typeck.c: Likewise.
1207         * typeck2.c: Likewise.
1208         * vtable-class-hierarchy.c: Likewise.
1210 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1212         PR c++/66192
1213         PR target/66200
1214         * cp-tree.h (get_guard_cond): Adjust declaration
1215         * decl.c (expand_static_init): Use atomic load acquire
1216         and adjust call to get_guard_cond.
1217         * decl2.c (build_atomic_load_byte): New function.
1218         (get_guard_cond): Handle thread_safety.
1219         (one_static_initialization_or_destruction): Adjust call to
1220         get_guard_cond.
1222 2015-06-03  Jason Merrill  <jason@redhat.com>
1224         PR c++/44282
1225         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1226         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1227         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1228         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1230 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1231             Paolo Carlini  <paolo.carlini@oracle.com>
1233         PR c++/66130
1234         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1235         use it in the diagnostic.
1236         (decay_conversion): Adjust call.
1237         * semantics.c (finish_decltype_type): Likewise.
1238         * call.c (resolve_args, build_new_op_1,
1239         perform_implicit_conversion_flags): Adjust calls.
1240         * cvt.c (ocp_convert, convert_to_void): Likewise.
1241         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1243 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1245         * decl.c (check_tag_decl): Use declspecs->locations as locations in
1246         error_at and warning_at calls.
1248 2015-06-03  Marek Polacek  <polacek@redhat.com>
1250         PR sanitizer/66190
1251         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1252         (cp_genericize_r): Don't instrument static initializers.
1253         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1255 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1257         * decl.c (start_function): Call plugin before parsing.
1258         (finish_function): Call plugin after parsing.
1260 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
1262         * cp-tree.h (init_error): Remove declaration.
1263         * error.c (scratch_pretty_printer): Rename to ...
1264         (actual_pretty_printer): ... this.
1265         (cxx_pp): Constify and update accordingly.
1266         (init_error): Remove definition.
1267         * lex.c (cxx_init): Do not call init_error.
1269 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1271         PR c++/61683
1272         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1274 2015-06-01  Jason Merrill  <jason@redhat.com>
1276         PR c++/65942
1277         * decl2.c (mark_used): Don't always instantiate constexpr fns.
1278         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1280         PR c++/44282
1281         * mangle.c (attr_strcmp): New.
1282         (write_CV_qualifiers_for_type): Also write out attributes that
1283         affect type identity.
1284         (write_type): Strip all attributes after writing qualifiers.
1286 2015-05-31  Jason Merrill  <jason@redhat.com>
1288         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1290         PR c++/66320
1291         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1292         with the wrong type as non-constant.
1294 2015-05-27  Jason Merrill  <jason@redhat.com>
1296         * decl.c (check_redeclaration_exception_specification): Depend on
1297         -Wsystem-headers rather than -pedantic.
1299         * decl.c (warn_extern_redeclared_static): Use the location of
1300         newdecl in diagnostics, not input_location.
1301         (validate_constexpr_redeclaration): Likewise.
1302         (check_redeclaration_no_default_args): Likewise.
1303         (duplicate_decls): Likewise.
1304         (check_redeclaration_exception_specification): Likewise.
1305         Change second diagnostic to inform.
1307 2015-05-24  Nathan Sidwell  <nathan@acm.org>
1309         PR c++/66243
1310         * decl.c (build_enumerator): Don't silently convert scoped enums.
1312 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
1314         PR lto/66180
1315         * mangle.c (mangle_decl): Mangle anonymous namespace types as
1316         "<anon>".
1318 2015-05-23  Nathan Sidwell  <nathan@acm.org>
1320         PR c++/65936
1321         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1323 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1325         * Make-lang.in (check_g++_parallelize): Update comment.
1327 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1329         PR c++/65598
1330         * decl.c (grokdeclarator): Use the correct location in error
1331         messages about 'explicit'.
1333 2015-05-22  Marek Polacek  <polacek@redhat.com>
1334             Edward Smith-Rowland  <3dw4rd@verizon.net>
1336         PR c/47043
1337         * cp-tree.h (build_enumerator): Update declaration.
1338         * decl.c (build_enumerator): Add attributes parameter.  Call
1339         cplus_decl_attributes.
1340         * init.c (constant_value_1): Pass tf_none to mark_used.
1341         * parser.c (cp_parser_enumerator_definition): Parse attributes and
1342         pass them down to build_enumerator.
1343         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1344         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1346 2015-05-21  Nathan Sidwell  <nathan@acm.org>
1348         PR c++/60943
1349         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1351 2015-05-21  Marek Polacek  <polacek@redhat.com>
1353         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1355 2015-05-20  Jason Merrill  <jason@redhat.com>
1357         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1358         before register_specialization.
1360         * decl.c (grok_op_properties): Don't complain about size_t
1361         placement delete here.
1362         * call.c (second_parm_is_size_t): Split out from...
1363         (non_placement_deallocation_fn_p): ...here.
1364         (build_op_delete_call): Warn about size_t placement delete with
1365         -Wc++14-compat.
1367 2015-05-19  Nathan Sidwell  <nathan@acm.org>
1369         PR c++/65954
1370         * typeck.c (finish_class_member_access_expr): Diagnose failed
1371         lookup of enum class member.
1373 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1375         PR middle-end/66199
1376         * parser.c (cp_parser_omp_for_loop): Don't add
1377         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1378         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1379         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1380         constructs.
1382 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1384         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1385         swaps.
1387 2015-05-18  Jason Merrill  <jason@redhat.com>
1389         * pt.c (retrieve_specialization): Make sure our arguments have
1390         gone through strip_typedefs.
1392         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1393         (determine_specialization): Call coerce_template_parms.
1395         DR 1391
1396         * pt.c (type_unification_real): Check convertibility here.
1397         (unify_one_argument): Not here.
1399         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1400         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1401         [TREE_LIST]: Fix no-change case.
1403         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1405 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1407         PR fortran/44054
1408         * error.c (cp_diagnostic_starter): Use diagnostic_location
1409         function.
1410         (cp_print_error_function): Likewise.
1411         (cp_printer): Replace locus pointer with accessor function.
1413 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1415         * parser.c (cp_parser_selection_statement): Add location and
1416         guard_kind arguments to calls to
1417         cp_parser_implicitly_scoped_statement.
1418         (cp_parser_iteration_statement): Likewise for calls to
1419         cp_parser_already_scoped_statement.
1420         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1421         "guard_kind" params; use them to warn for misleading
1422         indentation.
1423         (cp_parser_already_scoped_statement): Likewise.
1425 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
1427         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1428         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1429         * semantics.c (finish_member_declaration): Likewise.
1430         * method.c (lazily_declare_fn): Allways add method to main variant list.
1432 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
1434         PR bootstrap/66085
1435         * decl2.c (note_mangling_alias): Declare arguments as unused.
1437 2015-05-08  Jason Merrill  <jason@redhat.com>
1439         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1440         -Wc++0x-compat.
1442 2015-05-08  Jason Merrill  <jason@redhat.com>
1444         * decl2.c (mangling_aliases): New variable.
1445         (note_mangling_alias, generate_mangling_aliases): New.
1446         (cp_write_global_declarations): Call generate_mangling_aliases.
1447         (generate_mangling_alias): Split out from...
1448         * mangle.c (mangle_decl): ...here.
1449         * cp-tree.h: Declare note_mangling_alias.
1451 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
1453         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1454         (build_java_method_aliases): Adapt to use create_same_body_alias
1455         instead of assemble_alias.  Move variable declarations to
1456         definition and tidy up.
1457         (cp_write_global_declarations): Call build_java_method_aliases
1458         instead of collecting candidates first.
1460 2015-05-07  Jason Merrill  <jason@redhat.com>
1462         PR c++/59012
1463         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1464         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1465         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1466         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1467         (apply_late_template_attributes): Handle attribute pack expansion.
1469 2015-05-07  Marek Polacek  <polacek@redhat.com>
1471         PR c/65179
1472         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1473         value.
1475 2015-05-07  Jason Merrill  <jason@redhat.com>
1477         DR 1467
1478         PR c++/51747
1479         * typeck2.c (digest_init_r): Fix single element list.
1481 2015-05-05  Jason Merrill  <jason@redhat.com>
1483         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1484         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1485         MUST_NOT_THROW_EXPR.
1486         (cp_genericize_data): Add try_block field.
1487         (cp_genericize_tree): Initialize it.
1488         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1489         implicit rethrow.
1491         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1492         Return false.
1494         * semantics.c (finish_call_expr): Check complain.
1496         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1497         maybe-in-charge constructor.
1499         * decl.c (start_decl): Don't push the plain VAR_DECL for a
1500         variable template.
1502         DR 1518
1503         DR 1630
1504         PR c++/54835
1505         PR c++/60417
1506         * call.c (convert_like_real): Check value-initialization before
1507         explicit.
1508         * typeck2.c (process_init_constructor_record): Don't set
1509         CONSTRUCTOR_IS_DIRECT_INIT.
1510         (process_init_constructor_array): Likewise.
1511         * init.c (build_vec_init): Likewise.
1513 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1515         * parser.c (cp_parser_asm_definition): Only test for
1516         error_mark_node if "outputs" was just set.  Likewise for "inputs".
1518 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1519             Jakub Jelinek  <jakub@redhat.com>
1521         PR c++/66007
1522         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1523         result in an actual error.
1525 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1526             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
1528         PR c++/65858
1529         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1530         false.
1532 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
1534         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1535         trailing semicolon.
1537 2015-04-29  Jason Merrill  <jason@redhat.com>
1539         PR c++/50800
1540         * tree.c (apply_identity_attributes): Fix handling of classes.
1542 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1544         * parser.c (cp_parser_oacc_enter_exit_data): Use
1545         OMP_STANDALONE_CLAUSES.
1547 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
1549         PR c++/64667
1550         * init.c (perform_member_init): Handle references for -Winit-self.
1552 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1554         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1555         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1557 2015-04-28  Jason Merrill  <jason@redhat.com>
1559         PR c++/65896
1560         * constexpr.c (cxx_eval_store_expression): Don't try to actually
1561         store an empty class.
1563         PR c++/65656
1564         * constexpr.c (cxx_eval_builtin_function_call): Fix
1565         __builtin_constant_p.
1567         PR c++/50800
1568         * tree.c (strip_typedefs): Add remove_attributes parm.
1569         (strip_typedefs_expr): Likewise.
1570         (apply_identity_attributes): New subroutine of strip_typedefs.
1571         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1572         (convert_nontype_argument, unify): Likewise.
1573         * cp-tree.h: Adjust.
1575         PR c++/65734
1576         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1578 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1580         * class.c (layout_class_type): Remove check if
1581         PCC_BITFIELD_TYPE_MATTERS is defined.
1583 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1585         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1587 2015-04-24  Jason Merrill  <jason@redhat.com>
1589         PR c++/50800
1590         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1592         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1593         Remove obsolete code.
1594         [NE_EXPR]: Likewise.
1596 2015-04-23  Jason Merrill  <jason@redhat.com>
1598         PR c++/65646
1599         * pt.c (check_explicit_specialization): Don't
1600         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1601         headers.
1602         * decl.c (grokvardecl): Revert earlier fix.
1604 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
1606         PR c++/65801
1607         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1608         suppresses the diagnostic.
1610 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
1612         Reject trailing return type for an operator auto().
1613         * decl.c (grokdeclarator): Reject trailing return types for
1614         all conversion operators, don't handle conversion operators
1615         in the previous checks that deal with auto.
1617 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1619         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1621 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1623         * class.c (resolve_address_of_overloaded_function, instantiate_type):
1624         Rename tsubst_flags_t parameter flags -> complain.
1626 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1628         * call.c (build_op_delete_call, build_over_call): Check mark_used
1629         return value.
1630         * class.c (resolve_address_of_overloaded_function): Likewise.
1631         * decl.c (cxx_maybe_build_cleanup): Likewise.
1632         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1633         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1634         * rtti.c (build_dynamic_cast_1): Likewise.
1635         * semantics.c (process_outer_var_ref): Likewise.
1636         * typeck.c (build_class_member_access_expr,
1637         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1639 2015-04-15  Jason Merrill  <jason@redhat.com>
1641         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1642         (build_constexpr_constructor_member_initializers): Loop to find
1643         the BIND_EXPR.
1644         * decl.c (start_preparsed_function): Clobber the object at the
1645         beginning of a constructor.
1647         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1648         * method.c (implicitly_declare_fn): Likewise.
1649         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1651         * decl2.c (determine_visibility): Use get_template_info.
1653 2015-04-15  Jason Merrill  <jason@redhat.com>
1654             Marek Polacek  <polacek@redhat.com>
1656         PR c++/65727
1657         * lambda.c (lambda_expr_this_capture): In unevaluated context go
1658         through the normal loop, just don't capture.
1659         (maybe_resolve_dummy): Handle null return.
1661 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
1663         * call.c (enforce_access): Emit error + inform.
1665 2015-04-15  Marek Polacek  <polacek@redhat.com>
1667         * constexpr.c (use_new_call): Remove #define.
1668         (lookup_parameter_binding): Remove function.
1669         (cxx_bind_parameters_in_call): Remove unused code.
1670         (cxx_eval_call_expression): Likewise.
1671         (cxx_eval_constant_expression): Likewise.
1673 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
1675         * tree.c (replace_placeholders_t): Remove unused type.
1676         (replace_placeholders): Remove unused pset.
1678 2015-04-14  Jason Merrill  <jason@redhat.com>
1680         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1682         PR c++/65695
1683         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1685         PR c++/65721
1686         * name-lookup.c (do_class_using_decl): Complain about specifying
1687         the current class even if there are dependent bases.
1689 2015-04-14  David Krauss  <david_work@me.com>
1691         PR c++/59766
1692         * decl.c (grokdeclarator): Do not flag friends with deduced return.
1694 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
1695             Jason Merrill  <jason@redhat.com>
1697         PR c++/60994
1698         * parser.c (cp_parser_class_name): Add enum_ok parameter.
1699         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1700         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1701         a class template.
1703 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
1705         PR c++/65736
1706         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1707         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
1708         the expression to the original type at the end.
1710 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
1712         PR c++/65690
1713         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1714         TYPE_USER_ALIGN.
1716         PR c++/65690
1717         * tree.c (build_cplus_array_type): Layout type before variants are
1718         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1719         variant.
1721 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1723         PR c++/64085
1724         * lambda.c (add_capture): Use dependent_type_p for capture by
1725         reference too.
1727 2015-04-02  Marek Polacek  <polacek@redhat.com>
1729         PR c++/65642
1730         * constexpr.c (cxx_eval_pointer_plus_expression): Call
1731         cxx_eval_constant_expression on the first operand.
1733 2015-04-01  Jason Merrill  <jason@redhat.com>
1735         PR c++/65625
1736         * decl.c (make_typename_type): Handle seeing a variable template.
1738 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1740         PR c++/56100
1741         * pt.c (instantiating_current_function_p): New.
1742         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1743         * cp-tree.h (instantiating_current_function_p): Declare.
1745 2015-04-01  Jason Merrill  <jason@redhat.com>
1747         PR c++/65646
1748         * decl.c (grokvardecl): Don't call check_explicit_specialization
1749         for non-template members of a class template.
1751 2015-04-01  Marek Polacek  <polacek@redhat.com>
1753         PR c++/65554
1754         * class.c (finish_struct): Require that the second field of a
1755         user-defined initializer_list be of size type.
1757 2015-03-31  Marek Polacek  <polacek@redhat.com>
1759         PR c++/65390
1760         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1761         checking for constness.
1763 2015-03-30  Marek Polacek  <polacek@redhat.com>
1765         PR c++/65398
1766         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1767          *(&A[i] p+ j) => A[i + j] transformation here.
1768         (cxx_eval_pointer_plus_expression): New function.
1769         (cxx_eval_constant_expression): Use it here.
1771 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1773         PR c/65586
1774         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1775         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1776         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1777         -fopenmp-simd.
1779 2015-03-27  Marek Polacek  <polacek@redhat.com>
1781         PR c++/65556
1782         * semantics.c (finish_switch_cond): If the unlowered type is not an
1783         enum, use the type of the condition.
1785 2015-03-27  Jason Merrill  <jason@redhat.com>
1787         PR c++/65509
1788         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1789         constants.
1791 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
1793         PR c++/65154
1794         * init.c (build_vec_init): Fix initializing aggregates
1795         with empty init list.
1797 2015-03-26  Jason Merrill  <jason@redhat.com>
1799         PR c++/65525
1800         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1802 2015-03-25  Marek Polacek  <polacek@redhat.com>
1804         PR c++/65558
1805         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1806         on an anonymous namespace.
1808 2015-03-25  Marek Polacek  <polacek@redhat.com>
1810         PR c++/61670
1811         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1813 2015-03-24  Jason Merrill  <jason@redhat.com>
1815         PR c++/65046
1816         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1817         * parser.c (cp_parser_namespace_definition): Don't set it.
1818         * name-lookup.c (handle_namespace_attrs): Check
1819         DECL_NAMESPACE_ASSOCIATIONS instead.
1821         PR c++/65498
1822         * pt.c (get_mostly_instantiated_function_type): Just return the
1823         type of the partially instantiated template in DECL_TI_TEMPLATE.
1825 2015-03-20  Marek Polacek  <polacek@redhat.com>
1827         PR c++/65398
1828         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1829         A[i + j].
1831 2015-03-20  Marek Polacek  <polacek@redhat.com>
1833         PR c++/65072
1834         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1835         variant.
1837 2015-03-19  Jason Merrill  <jason@redhat.com>
1839         PR c++/65046
1840         Automatically propagate ABI tags to variables and functions
1841         from their (return) type.
1842         * class.c (check_tag): Handle variables and functions.
1843         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1844         (mark_or_check_tags): Likewise.
1845         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
1846         (check_abi_tags): Add single argument overload for decls.
1847         Handle inheriting tags for decls.
1848         * mangle.c (write_mangled_name): Call it.
1849         (mangle_return_type_p): Split out from write_encoding.
1850         (unmangled_name_p): Split out from write_mangled_name.
1851         (write_mangled_name): Ignore abi_tag on namespace.
1852         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1853         * parser.c (cp_parser_namespace_definition): Set it.
1854         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1855         about abi_tag attribute on non-inline namespace.
1856         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1857         (handle_abi_tag_attribute): Allow tags on variables.
1859 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1861         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1862         attribute for DECL_EXTERNAL VAR_DECLs.
1864 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
1866         PR c++/65340
1867         * call.c (build_over_call): Pass the tsubst_flags_t argument to
1868         mark_used.
1869         * decl2.c (mark_used): Inline the require_deduced_type call and
1870         guard the error call.
1872 2015-03-16  Jason Merrill  <jason@redhat.com>
1874         PR c++/65061
1875         * parser.c (cp_parser_template_name): Call strip_using_decl.
1877 2015-03-16  Marek Polacek  <polacek@redhat.com>
1879         DR 1688
1880         PR c++/65327
1881         * decl.c (grokdeclarator): Allow volatile and constexpr together.
1883 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1885         PR c++/65323
1886         * decl.c (check_default_argument): Don't call
1887         maybe_warn_zero_as_null_pointer_constant.
1889 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
1891         * cp-gimplify.c (simple_empty_class_p): New.
1892         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
1893         the code for empty class copies into simple_empty_class_p, and
1894         adapt it to handle COMPOUND_EXPRs.
1896 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
1898         PR c++/65370
1899         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1900         only if the location of newdecl doesn't match the location of olddecl.
1902 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1904         PR c++/65127
1905         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1906         is not a PARM_DECL.
1908 2015-03-10  Jason Merrill  <jason@redhat.com>
1910         PR c++/65333
1911         DR 1558
1912         * pt.c (dependent_type_p_r): Check both class and alias template args.
1914 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1916         PR c/65120
1917         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1918         before preparing arguments to warn_logical_not_parentheses.
1919         Use maybe_constant_value on rhs.
1921 2015-03-09  Jason Merrill  <jason@redhat.com>
1923         PR c++/65339
1924         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1926 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1928         PR c/65120
1929         * parser.c (cp_parser_binary_expression): Don't warn for
1930         !!x == y or !b == y where b is bool.
1932 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
1934         * ptree.c (cxx_print_lambda_node): New.
1935         (cxx_print_xnode): Handle LAMBDA_EXPR.
1937 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
1939         PR c++/65295
1940         * constexpr.c (cxx_eval_constant_expression): Remove assert in
1941         RESULT_DECL handling.
1943 2015-02-26  Marek Polacek  <polacek@redhat.com>
1945         PR c++/65202
1946         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1947         a RETURN_EXPR if its operand is null.
1949 2015-02-25  Jason Merrill  <jason@redhat.com>
1951         PR c++/65209
1952         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1953         DECL_COMDAT.
1954         (constrain_visibility_for_template): Handle reference arguments.
1956         PR debug/58315
1957         * decl.c (start_preparsed_function): Use create_artificial_label
1958         for cdtor_label.
1960 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
1961             Jakub Jelinek  <jakub@redhat.com>
1963         PR c++/65075
1964         * constexpr.c (check_constexpr_bind_expr_vars): Allow
1965         implicit typedefs for lambda types.
1967 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1969         PR c++/60894
1970         * decl.c (lookup_and_check_tag): Use strip_using_decl.
1972 2015-02-13  Jason Merrill  <jason@redhat.com>
1974         PR c++/65054
1975         * pt.c (template_args_equal): Look through conversions here.
1976         * tree.c (cp_tree_equal): Not here.
1978 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1980         PR c++/60211
1981         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1982         pragma_external context.
1984 2015-02-13  Jason Merrill  <jason@redhat.com>
1986         PR c++/65051
1987         * call.c (reference_binding): Don't look for bad conversion
1988         if TO is incomplete.
1990 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1992         PR c++/64970
1993         * decl.c (make_typename_type): Pass tsubst_flags_t argument
1994         to lookup_template_class.
1996 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
1998         PR ipa/65034
1999         * decl.c (start_preparsed_function): Use void_type_node instead
2000         of NULL_TREE as LABEL_DECL type.
2002 2015-02-12  Jason Merrill  <jason@redhat.com>
2004         PR c++/64898
2005         * mangle.c (write_mangled_name): Fix test for variable template
2006         instantiation.
2008         * decl.c (begin_destructor_body): Condition clobber on
2009         -flifetime-dse.
2011 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2013         PR c++/64959
2014         * parser.c (lookup_literal_operator): Return all candidates.
2015         (cp_parser_userdef_char_literal): Simplify error handling.
2016         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
2017         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2018         Also give higher priority to standard string UDL operator.
2020 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
2022         PR debug/55541
2023         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2024         * decl.c (poplevel): If functionbody, try not to create an extra
2025         BLOCK for function body and use subblocks as that, if it is non-NULL
2026         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
2027         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2029         PR sanitizer/64984
2030         * except.c (check_noexcept_r): Return NULL for internal
2031         calls.
2033 2015-02-10  Jason Merrill  <jason@redhat.com>
2035         PR c++/64994
2036         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2038 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
2040         PR ipa/64982
2041         * method.c (use_thunk): Do not check for stdarg thunks.
2043 2015-02-06  Jason Merrill  <jason@redhat.com>
2045         PR c++/64899
2046         * init.c (build_vec_init): Handle default-initialized array with
2047         constexpr default constructor.
2049 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2051         PR c/64824
2052         PR c/64868
2053         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2055 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2057         PR c++/64877
2058         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2059         for generated expressions.
2061 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
2063         PR c++/64901
2064         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2065         DECL_OVERRIDE_P.
2067 2015-02-02  Jason Merrill  <jason@redhat.com>
2069         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2071 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
2073         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2074         changed to pass input_location as first argument.
2076 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
2078         PR c++/64717
2079         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2080         into SAVE_EXPR.
2082 2015-01-29  Jason Merrill  <jason@redhat.com>
2084         PR c++/49508
2085         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2086         erroneous return statement.
2088         PR c++/64521
2089         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2090         point.
2092 2015-01-27  Caroline Tice  <cmtice@google.com>
2094         Committing VTV Cywin/Ming patch for Patrick Wollgast
2095         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2096         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2098 2015-01-27  Jason Merrill  <jason@redhat.com>
2100         PR c++/58597
2101         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2102         current_function_decl.
2104         PR c++/63889
2105         * pt.c (finish_template_variable): Move from semantics.c.
2106         Handle multiple template arg levels.  Handle coercion here.
2107         (lookup_template_variable): Not here.
2109 2015-01-23  Jason Merrill  <jason@redhat.com>
2111         PR c++/64314
2112         PR c++/57510
2113         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2114         that has been completely split out.
2116         PR c++/64701
2117         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2118         statement codes.
2120         PR c++/64727
2121         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2122         of CONST_DECL.
2124 2015-01-21  Jason Merrill  <jason@redhat.com>
2126         PR c++/64603
2127         * constexpr.c (cxx_eval_constant_expression): Only shortcut
2128         constant CONSTRUCTORs.
2130         PR c++/64647
2131         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2132         give a hard error in a template instantiation.
2134 2015-01-21  Richard Biener  <rguenther@suse.de>
2136         PR middle-end/64313
2137         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2138         for builtins the user declared correctly.
2140 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
2142         PR c++/58614
2143         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2144         TREE_TYPE (elt) == error_mark_node.
2146 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
2148         PR tree-optimization/62053
2149         * tree.c (build_cplus_array_type): Layout type after variants are set.
2151 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
2153         * cp-gimplify.c (cp_genericize_r): Call
2154         cp_ubsan_maybe_instrument_member_call for member calls.
2155         (cp_ubsan_check_member_access_r): New function.
2156         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2157         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2158         cp_ubsan_instrument_member_accesses,
2159         cp_ubsan_maybe_instrument_downcast,
2160         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2161         * cp-ubsan.c: New file.
2162         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2163         * constexpr.c (cxx_eval_call_expression): Return void_node
2164         for IFN_UBSAN_VPTR.
2165         (potential_constant_expression_1): Return true for
2166         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2167         * typeck.c (build_class_member_access_expr): Provide locus
2168         for COMPONENT_REFs.
2169         (build_static_cast_1): Instrument downcasts.
2170         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2171         add ubsan instrumentation for virtual_access.
2172         * call.c: Include internal-fn.h.
2173         (set_flags_from_callee): Handle internal calls.
2175 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
2177         PR c++/59366
2178         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2179         and function templates, declared only in the class.
2180         * decl.c (duplicate_decls): Reveal hidden friend functions or
2181         function templates, if they are redeclared outside the class.
2183 2015-01-15  Jason Merrill  <jason@redhat.com>
2185         PR c++/64356
2186         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2188         PR c++/63283
2189         * constexpr.c (potential_constant_expression_1): Handle reference
2190         args in templates.
2192 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2193             James Norris  <jnorris@codesourcery.com>
2194             Cesar Philippidis  <cesar@codesourcery.com>
2195             Ilmir Usmanov  <i.usmanov@samsung.com>
2196             Jakub Jelinek  <jakub@redhat.com>
2198         * parser.c: Include "gomp-constants.h".
2199         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2200         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2201         Use OMP_CLAUSE_SET_MAP_KIND.
2202         (cp_parser_omp_construct, cp_parser_pragma): Handle
2203         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2204         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2205         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2206         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2207         "create", "delete", "deviceptr", "host", "num_gangs",
2208         "num_workers", "present", "present_or_copy", "pcopy",
2209         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2210         "present_or_create", "pcreate", "vector_length", "wait".
2211         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2212         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2213         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2214         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2215         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2216         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2217         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2218         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2219         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2220         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2221         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2222         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2223         (cp_parser_oacc_parallel, cp_parser_oacc_update)
2224         (cp_parser_oacc_wait): New functions.
2225         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2226         (finish_oacc_parallel): New prototypes.
2227         * semantics.c: Include "gomp-constants.h".
2228         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2229         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2230         OMP_CLAUSE_SET_MAP_KIND.
2231         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2232         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2233         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2234         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2235         functions.
2237 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
2239         PR c++/58671
2240         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2241         self-initialization.
2243 2015-01-13  Jason Merrill  <jason@redhat.com>
2245         PR c++/64356
2246         PR libstdc++/58777
2247         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2248         pointer expressions.
2249         (cxx_eval_increment_expression): Likewise.
2251         PR c++/64514
2252         * pt.c (coerce_template_parameter_pack): Return NULL for a
2253         zero-length fixed parameter pack with a pack expansion arg.
2255         PR c++/64520
2256         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2258 2015-01-12  Jason Merrill  <jason@redhat.com>
2260         PR c++/64547
2261         * constexpr.c (cxx_eval_call_expression): A call to a void
2262         function doesn't need to return a value.
2264 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2266         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2267         input.h, alias.h, symtab.h, options.h, fold-const.h,
2268         wide-int.h, and inchash.h due to flattening of tree.h.
2269         * class.c: Ditto.
2270         * constexpr.c: Ditto.
2271         * cp-array-notation.c: Ditto.
2272         * cp-gimplify.c: Ditto.
2273         * cp-lang.c: Ditto.
2274         * cp-objcp-common.c: Ditto.
2275         * cvt.c: Ditto.
2276         * decl2.c: Ditto.
2277         * decl.c: Ditto.
2278         * dump.c: Ditto.
2279         * error.c: Ditto.
2280         * except.c: Ditto.
2281         * expr.c: Ditto.
2282         * friend.c: Ditto.
2283         * init.c: Ditto.
2284         * lambda.c: Ditto.
2285         * lex.c: Ditto.
2286         * mangle.c: Ditto.
2287         * name-lookup.c: Ditto.
2288         * optimize.c: Ditto.
2289         * parser.c: Ditto.
2290         * pt.c: Ditto.
2291         * ptree.c: Ditto.
2292         * repo.c: Ditto.
2293         * rtti.c: Ditto.
2294         * search.c: Ditto.
2295         * semantics.c: Ditto.
2296         * tree.c: Ditto.
2297         * typeck2.c: Ditto.
2298         * typeck.c: Ditto.
2300 2015-01-08  Jason Merrill  <jason@redhat.com>
2302         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2303         * decl.c (compute_array_index_type): Likewise.
2304         * init.c (build_vec_init): Likewise.
2305         * typeck.c (cp_build_binary_op): Likewise.
2307 2015-01-08  Jason Merrill  <jason@redhat.com>
2309         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2310         whether an initializer-list is too big for a VLA.
2311         (throw_bad_array_length): Remove.
2312         * cp-tree.h: Remove prototype.
2314 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
2316         PR c++/60753
2317         * decl.c (grokfndecl): Add bool parameter.
2318         (grokdeclarator): Adjust calls.
2319         (start_decl): Don't set DECL_DELETED_FN here.
2321 2015-01-06  Jason Merrill  <jason@redhat.com>
2323         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2324         template-ids.
2326         PR c++/64455
2327         * pt.c (type_dependent_expression_p): Handle variable templates.
2328         * constexpr.c (potential_constant_expression_1): Use it.
2330         PR c++/64487
2331         * semantics.c (finish_offsetof): Handle templates here.
2332         * parser.c (cp_parser_builtin_offsetof): Not here.
2334         PR c++/64496
2335         * semantics.c (process_outer_var_ref): Diagnose lambda in local
2336         class NSDMI.
2338 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2340         PR c++/64489
2341         * class.c (check_field_decls): Make copy assignment operators
2342         complex only in c++98 mode.
2344 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2346         PR c++/31397
2347         * class.c (check_for_override): Warn when a virtual function is an
2348         override not marked override.
2350 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2352         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2353         hold base_fndecls.
2354         (get_basefndecls): Adjust.
2356 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2358         Update copyright years.
2360 2015-01-05  Marek Polacek  <polacek@redhat.com>
2362         PR c/64423
2363         * typeck.c (cp_build_array_ref): Pass loc down to
2364         warn_array_subscript_with_type_char.
2367 Copyright (C) 2015 Free Software Foundation, Inc.
2369 Copying and distribution of this file, with or without modification,
2370 are permitted in any medium without royalty provided the copyright
2371 notice and this notice are preserved.