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