1 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
3 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
5 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
7 Implement nested namespace definitions.
8 * parser.c (cp_parser_namespace_definition): Grok nested namespace
11 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
13 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
14 make it more similar to the C version.
16 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
17 Jason Merrill <jason@redhat.com>
19 Implement N4295 fold-expressions.
20 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
21 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
22 * cp-objcp-common.c (cp_common_init_ts): Handle them.
23 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
24 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
25 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
26 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
27 or_comma parameter to or_ttype.
28 (cp_parser_fold_operator, cp_parser_fold_expr_p)
29 (cp_parser_fold_expression): New.
30 (cp_parser_primary_expression): Use them.
31 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
32 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
33 (tsubst_binary_left_fold, expand_right_fold)
34 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
35 (tsubst_copy): Use them.
36 (type_dependent_expression_p): Handle fold-expressions.
37 * semantics.c (finish_unary_fold_expr)
38 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
39 (finish_binary_fold_expr): New.
41 2015-09-17 Richard Biener <rguenther@suse.de>
43 * cp-tree.h (note_decl_for_pch): Remove.
44 * class.c (build_clone): Do not call note_decl_for_pch.
45 * semantics.c (finish_member_declaration): Likewise.
46 (note_decl_for_pch): Remove.
47 * decl2.c (c_parse_final_cleanups): Mangle all globals before
50 2015-09-14 Jason Merrill <jason@redhat.com>
53 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
54 mangling with lower -fabi-version.
56 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
59 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
60 per the spirit of DR 1467).
62 2015-09-11 Mark Wielaard <mjw@redhat.com>
65 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
66 VAR_P TREE_READONLY override.
68 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
71 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
72 and set template_parameter_pack_p also when the type is null.
74 2015-09-09 Mark Wielaard <mjw@redhat.com>
76 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
79 2015-09-10 Jakub Jelinek <jakub@redhat.com>
82 * semantics.c (handle_omp_array_sections_1): Only run
83 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
84 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
85 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
86 is not a VAR_DECL/PARM_DECL.
89 * semantics.c (handle_omp_for_class_iterator): Don't wrap
90 error_mark_node into a NOP_EXPR to void_type_node.
92 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
95 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
97 2015-09-09 Jakub Jelinek <jakub@redhat.com>
100 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
101 before INTEGRAL_TYPE_P test.
103 2015-09-08 Jason Merrill <jason@redhat.com>
106 * pt.c (tsubst_copy_and_build): Handle variables like functions.
108 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
111 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
112 if the first argument isn't a template.
114 2015-09-03 Martin Sebor <msebor@redhat.com>
117 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
119 * expr.c (mark_rvalue_use): Use new argument.
120 * call.c (build_addr_func): Call decay_conversion with new
122 * pt.c (convert_template_argument): Call reject_gcc_builtin.
123 * typeck.c (decay_conversion): Use new argument.
124 (c_decl_implicit): Define.
126 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
129 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
131 (cp_gimplify_expr): Added a call to the function
132 cilk_cp_gimplify_call_params_in_spawned_fn.
134 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
137 * decl.c (smallest_type_quals_location): New.
138 (check_special_function_return_type): Use the latter; add int and
139 const location_t* parameters.
140 (grokdeclarator): Adjust check_special_function_return_type call.
142 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
145 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
146 case. Move label to COND_EXPR case. Remove checking of
149 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
152 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
155 2015-08-21 Jason Merrill <jason@redhat.com>
158 * constraint.cc (satisfy_implicit_conversion_constraint): Also
161 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
163 * decl.c (grokvardecl): Simplify the latter.
165 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
167 * decl.c (grokvardecl): Complete check added for c++/67065.
169 2015-08-20 Jason Merrill <jason@redhat.com>
171 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
173 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
176 * decl.c (grokvardecl): Reject 'main' as global variable.
178 2015-08-19 Jason Merrill <jason@redhat.com>
181 * search.c (protected_accessible_p): Remove redundant access_in_type.
182 Add otype parm instead of walking binfo.
183 (friend_accessible_p): Check SCOPE itself. Handle class
184 templates. Pass through otype.
185 (dfs_accessible_post): Handle all accessibility cases.
186 (dfs_accessible_pre): New.
187 (accessible_p): Use it. Don't check protected access here. Pass
188 decl and otype to dfs_walk.
189 (member_declared_in_type, dfs_access_in_type_pre): New.
190 (access_in_type): Use dfs_access_in_type_pre.
191 * friend.c (add_friend): Fix multiple friends with the same name.
193 * lambda.c (current_nonlambda_scope): New.
195 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
197 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
198 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
199 semantics.c, typeck2.c: Remove useless typedefs.
201 2015-08-18 Jason Merrill <jason@redhat.com>
204 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
207 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
210 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
212 2015-08-17 Jason Merrill <jason@redhat.com>
215 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
218 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
219 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
221 * constexpr.c (cxx_eval_store_expression): Don't set
222 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
224 (cxx_eval_array_reference): Check it.
226 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
228 2015-08-14 Jason Merrill <jason@redhat.com>
231 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
233 2015-08-12 Jason Merrill <jason@redhat.com>
236 * constexpr.c (cxx_eval_array_reference): Fix typo.
239 * constexpr.c (cxx_eval_array_reference): Handle sparse
243 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
244 * error.c (dump_template_bindings): Don't tsubst in that case.
247 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
248 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
250 2015-08-08 Jason Merrill <jason@redhat.com>
253 * pt.c (process_partial_specialization): Call
254 associate_classtype_constraints.
257 * constraint.cc (finish_template_introduction):
258 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
261 * pt.c (equal): Make sure tmpl is actually a template.
264 * call.c (joust): Only call more_constrained on decls.
266 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
267 Braden Obrzut <admin@maniacsvault.net>
268 Jason Merrill <jason@redhat.com>
269 Ville Voutilainen <ville.voutilainen@gmail.com>
271 Add C++ Concepts TS support.
272 * constraint.cc, logic.cc: New files.
273 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
274 (c++.tags): Also process .cc files.
275 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
276 (print_z_candidate): Handle it.
277 (constraint_failure): New.
278 (add_function_candidate): Check constraints.
279 (build_new_function_call): Handle evaluating concepts.
280 (joust): Check more_constrained.
281 * class.c (add_method): Check equivalently_constrained.
282 (build_clone): Copy constraints.
283 (currently_open_class): Return tree.
284 (resolve_address_of_overloaded_function): Check constraints.
285 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
286 (potential_constant_expression_1): Likewise.
287 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
288 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
289 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
290 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
291 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
292 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
293 * cp-tree.h (struct tree_constraint_info, check_nonnull)
294 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
295 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
296 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
297 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
298 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
299 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
300 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
301 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
302 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
303 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
304 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
305 (struct local_specialization_stack, enum auto_deduction_context)
306 (variable_concept_p, concept_template_p)
307 (struct deferring_access_check_sentinel): New.
308 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
309 (union lang_tree_node): Add constraint_info field.
310 (struct lang_decl_base): Add concept_p flag.
311 (enum cp_decl_spec): Add ds_concept.
312 (struct cp_declarator): Add requires_clause.
313 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
314 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
315 TRAIT_EXPR, *_CONSTR.
316 (pp_cxx_parameter_declaration_clause): Accept a chain of
318 (cxx_pretty_printer::declarator): Print requires-clause.
319 (pp_cxx_template_declaration): Likewise.
320 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
321 (pp_cxx_requires_clause, pp_cxx_requirement)
322 (pp_cxx_requirement_list, pp_cxx_requirement_body)
323 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
324 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
325 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
326 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
327 (pp_cxx_implicit_conversion_constraint)
328 (pp_cxx_argument_deduction_constraint)
329 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
330 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
331 * cxx-pretty-print.h: Declare them.
332 * decl.c (decls_match): Compare constraints.
333 (duplicate_decls): Likewise. Remove constraints before freeing.
334 (cxx_init_decl_processing): Call init_constraint_processing.
335 (cp_finish_decl): Diagnose concept without initializer.
336 (grokfndecl, grokvardecl): Handle concepts and constraints.
337 (grokdeclarator): Handle concept, requires-clause.
338 (grokparms): No longer static.
339 (xref_tag_1): Check constraints.
340 (finish_function): Call check_function_concept.
341 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
342 (check_concept_refinement, is_concept_var, check_concept_fn): New.
343 * decl2.c (check_classfn): Compare constraints.
344 (mark_used): Don't instantiate concepts.
345 * error.c (dump_template_decl): Print constraints.
346 (dump_function_decl): Likewise.
347 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
348 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
349 * method.c (implicitly_declare_fn): Copy constraints from
351 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
352 prevent_constrained_type_specifiers fields.
353 * parser.c (make_call_declarator): Add requires_clause parm.
354 (cp_parser_new): Clear prevent_constrained_type_specifiers.
355 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
356 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
357 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
358 (cp_parser_declaration): Handle concept introduction.
359 (cp_parser_member_declaration): Likewise.
360 (cp_parser_template_parameter): Handle constrained parameter.
361 (cp_parser_type_parameter): Handle constraints.
362 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
363 (cp_parser_template_id): Handle partial concept id.
364 (cp_parser_type_name): Add overload that takes typename_keyword_p.
365 Handle constrained parameter.
366 (cp_parser_nonclass_name): Handle concept names.
367 (cp_parser_alias_declaration): Handle constraints.
368 (cp_parser_late_return_type_opt): Also handle requires-clause.
369 (cp_parser_type_id_1): Handle deduction constraint.
370 (cp_parser_parameter_declaration): Handle constrained parameters.
371 (cp_parser_class_specifier_1): Handle constraints.
372 (cp_parser_template_declaration_after_parameters): Split out from
373 cp_parser_template_declaration_after_export.
374 (cp_parser_single_declaration): Handle constraints.
375 (synthesize_implicit_template_parm): Handle constraints.
376 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
377 (cp_parser_introduction_list, get_id_declarator)
378 (get_unqualified_id, is_constrained_parameter)
379 (cp_parser_check_constrained_type_parm)
380 (cp_parser_constrained_type_template_parm)
381 (cp_parser_constrained_template_template_parm)
382 (constrained_non_type_template_parm, finish_constrained_parameter)
383 (declares_constrained_type_template_parameter)
384 (declares_constrained_template_template_parameter)
385 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
386 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
387 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
388 (cp_parser_requires_expression)
389 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
390 (cp_parser_requirement_list, cp_parser_requirement)
391 (cp_parser_simple_requirement, cp_parser_type_requirement)
392 (cp_parser_compound_requirement, cp_parser_nested_requirement)
393 (cp_parser_template_introduction)
394 (cp_parser_explicit_template_declaration)
395 (get_concept_from_constraint): New.
396 * pt.c (local_specialization_stack): Implement.
397 (maybe_new_partial_specialization): New.
398 (maybe_process_partial_specialization): Use it.
399 (retrieve_local_specialization, register_local_specialization)
400 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
401 (tsubst_expr): No longer static.
402 (spec_hasher::equal): Compare constraints.
403 (determine_specialization): Handle constraints.
404 (check_explicit_specialization): Handle concepts.
405 (process_template_parm): Handle constraints.
406 (end_template_parm_list): Add overload taking no arguments.
407 (process_partial_specialization): Handle concepts and constraints.
408 Register partial specializations of variable templates.
409 (redeclare_class_template): Handle constraints.
410 (convert_template_argument): Handle WILDCARD_DECL. Check
411 is_compatible_template_arg.
412 (coerce_template_parameter_pack): Handle wildcard packs.
413 (coerce_template_parms): DR 1430 also applies to concepts. Add
414 overloads taking fewer parameters.
415 (lookup_template_class_1): Handle constraints.
416 (lookup_template_variable): Concepts are always bool.
417 (finish_template_variable): Handle concepts and constraints.
418 (tsubst_friend_class): Handle constraints.
419 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
420 (tsubst_pack_expansion): Handle local parameters.
421 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
422 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
423 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
424 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
425 (more_specialized_inst): Split out from most_specialized_instantiation.
426 (most_specialized_partial_spec): Check constraints.
427 (instantiate_decl): Never instantiate a concept.
428 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
430 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
431 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
432 (do_auto_deduction): Add overload taking tsubst flags and context enum.
434 (get_template_for_ordering, most_constrained_function)
435 (is_compatible_template_arg, convert_wildcard_argument)
436 (struct constr_entry, struct constr_hasher, decl_constraints)
437 (valid_constraints_p, get_constraints, set_constraints)
438 (remove_constraints, init_constraint_processing): New.
439 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
440 * search.c (lookup_member): Do lookup in the open partial
442 * semantics.c (finish_template_template_parm): Handle constraints.
443 (fixup_template_type): New.
444 (finish_template_type): Call it.
445 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
446 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
447 (cp_walk_subtrees): Handle REQUIRES_EXPR.
448 * typeck.c (cp_build_function_call_vec): Check constraints.
450 2015-08-06 Jason Merrill <jason@redhat.com>
453 * parser.c (cp_parser_primary_expression): Don't skip to the end
454 of the statement if we're parsing tentatively.
459 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
461 * pt.c (tsubst_copy_and_build): Check for argument substitution
464 2015-08-05 Jason Merrill <jason@redhat.com>
466 * pt.c (determine_specialization): Print candidates after 'no
469 * decl.c (cp_finish_decl): Tidy.
470 * typeck.c (finish_class_member_access_expr): Use
471 type_dependent_expression_p.
472 * semantics.c (finish_id_expression): Use
473 type_dependent_expression_p. Don't build_qualified_name for a
474 decl in non-dependent scope.
475 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
476 identifier is dependent. Remove variable_template_p check.
482 * pt.c (lookup_template_variable): Use NULL_TREE for type.
483 (instantiate_template_1): Also set DECL_TI_ARGS based on
484 the immediate parent.
485 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
486 (finish_template_variable): Add complain parm.
491 * semantics.c (finish_id_expression): Call convert_from_reference
492 for variable template.
494 2015-08-04 Jason Merrill <jason@redhat.com>
496 * pt.c (lookup_template_class_1): Clear elt.spec.
498 * tree.c (build_target_expr): Copy the location from value.
500 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
502 * parser.c (cp_parser_selection_statement): Move handling of
503 semicolon body to ...
504 (cp_parser_implicitly_scoped_statement): .. here. Call
505 warn_for_misleading_indentation even when the body is a
506 semicolon. Extract token_indent_infos corresponding to the
507 guard, body and next tokens. Adjust call to
508 warn_for_misleading_indentation accordingly. Take
509 token_indent_info argument.
510 (cp_parser_already_scoped_statement): Likewise.
511 (cp_parser_selection_statement, cp_parser_iteration_statement):
512 Extract a token_indent_info corresponding to the guard token.
514 2015-08-01 Caroline Tice <cmtice@google.com>
517 * mangle.c : Add vtable-verify.h to include files.
518 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
519 is "<anon>" get the real mangled name for the class instead, and
520 also store the real mangled name in a vector for use later.
522 2015-07-31 Marek Polacek <polacek@redhat.com>
525 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
528 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
530 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
531 in warning_at instead of "%q+D" in warning.
532 (warn_hidden): Likewise but use location_of.
533 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
534 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
535 (check_field_decls): Likewise for permerror.
536 (explain_non_literal_class): Likewise for inform.
537 (check_bases_and_members, layout_class_type): Likewise for warning_at.
538 (note_name_declared_in_class): Use location_of in permerror.
539 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
540 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
541 inform, and warning_at.
542 (check_for_out_of_scope_variable): Likewise for warning_at and
545 2015-07-30 Jason Merrill <jason@redhat.com>
549 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
551 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
553 * call.c (build_op_delete_call, convert_like_real, build_over_call):
554 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
556 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
557 * decl.c (duplicate_decls): Likewise for warning/warning_at.
558 * except.c (maybe_noexcept_warning): Likewise.
559 * friend.c (make_friend_class): Likewise for inform.
560 * mangle.c (mangle_decl): Likewise for warning/warning_at.
561 * method.c (process_subob_fn, walk_field_subobs,
562 maybe_explain_implicit_delete): Likewise for inform.
563 * parser.c (cp_parser_lambda_introducer): Likewise.
564 * pt.c (check_specialization_namespace,
565 maybe_process_partial_specialization): Likewise for permerror.
566 (redeclare_class_template): Likewise for inform_n.
567 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
568 * search.c (check_final_overrider): Likewise.
569 * semantics.c (process_outer_var_ref): Likewise.
571 2015-07-27 Jason Merrill <jason@redhat.com>
573 * constexpr.c (cxx_eval_call_expression): Don't add this call to
574 the hash table if !depth_ok.
576 2015-07-27 Marek Polacek <polacek@redhat.com>
580 * call.c (build_new_op_1): Call warn_tautological_cmp.
581 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
584 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
587 * typeck.c (check_return_expr): Also do the basic return-value
588 validity checking if processing_template_decl and yet types are
589 not dependent. Remove obsolete code.
591 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
593 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
594 in warning_at instead of "%q+D" in warning.
595 (warn_extern_redeclared_static): Likewise for inform.
596 (check_redeclaration_no_default_args): Likewise for permerror.
597 (duplicate_decls): Likewise.
598 (check_previous_goto_1): Likewise for inform.
599 (check_goto, start_decl, check_for_uninitialized_const_var,
600 start_preparsed_function, finish_function§): Likewise.
601 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
602 * init.c (sort_mem_initializers): Likewise.
603 * typeck.c (convert_for_initialization): Likewise for inform.
604 (maybe_warn_about_returning_address_of_local): Likewise.
605 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
606 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
608 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
611 * cvt.c (ocp_convert): Don't call scalar_constant_value when
612 converting to a class type.
614 2015-07-24 Jason Merrill <jason@redhat.com>
617 * pt.c (splice_late_return_type): Correct deduced return type for
618 abbreviated function template.
620 2015-07-24 Richard Biener <rguenther@suse.de>
622 * init.c (build_vec_init): Build iterator bound in the same
623 type as the iterator.
625 2015-07-23 Marek Polacek <polacek@redhat.com>
628 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
630 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
633 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
634 redundant error messages.
636 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
638 * decl.c (grokdeclarator): For an erroneous template parameter
639 propagate error_mark_node as type.
641 2015-07-20 Marek Polacek <polacek@redhat.com>
644 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
646 2015-07-15 Jason Merrill <jason@redhat.com>
649 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
650 template if there is no type x in scope.
652 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
655 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
656 template template parm in the redeclaration.
657 (lookup_template_class_1): Peel off irrelevant template levels
658 from current_template_parms before augmenting the argument
661 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
664 * parser.c (cp_parser_sizeof_pack): Also consider template template
667 2015-07-14 Jason Merrill <jason@redhat.com>
669 * call.c (build_new_method_call_1): Call reshape_init.
671 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
673 * pt.c (check_template_shadow): Emit error + inform instead of
676 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
679 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
680 template parm type under C++11 and later.
682 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
684 * call.c: Fix double word typos.
685 * cp-array-notation.c: Same.
688 * name-lookup.c: Same.
691 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
694 * pt.c (begin_template_parm_list): Add a dummy parameter level
695 to current_template_parms.
696 (end_template_parm_list): Remove the dummy parameter level
697 before adding the real one.
698 (tsubst): Don't attempt to substitute for template parameters
699 corresponding to a dummy argument level.
700 (template_parms_to_args): Remove obsolete hack for
701 giving template template arguments the proper level.
702 (splite_late_return_type): Remove obsolete hack for giving
703 template template arguments the proper level.
704 * error.c (dump_template_decl): Don't print dummy template
707 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
710 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
711 the second step of copy-initialization.
713 2015-07-10 Jason Merrill <jason@redhat.com>
715 * pt.c (find_parameter_packs_r): Handle variable templates.
716 (variable_template_specialization_p): New.
717 * cp-tree.h: Declare it.
719 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
721 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
723 * decl2.c (cpp_check): Revert latest change.
725 2015-07-09 Jason Merrill <jason@redhat.com>
727 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
728 value_dependent_expression_p.
730 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
731 template_parameter_pack_p.
732 * parser.c (declarator_can_be_parameter_pack): False if
733 parameter_pack_p is set.
734 (make_parameter_declarator): Add template_parameter_pack_p parm.
735 (cp_parser_template_parameter): Remove parameter pack parsing.
736 (cp_parser_parameter_declaration): Handle all parameter packs.
737 Tweak default argument permerror.
739 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
741 * parser.c (cp_parser_default_type_template_argument)
742 (cp_parser_default_template_template_argument): Factor out from
743 cp_parser_type_parameter.
745 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
747 * typeck.c (warn_args_num): Rename to error_args_num.
748 (convert_arguments): Adjust calls.
750 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
752 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
754 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
756 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
758 2015-07-08 Jakub Jelinek <jakub@redhat.com>
760 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
761 * pt.c (apply_late_template_attributes): Likewise.
763 2015-07-08 Marek Polacek <polacek@redhat.com>
766 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
767 accessing TYPE_LANG_SPECIFIC node.
769 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
771 * call.c: Adjust includes.
773 * constexpr.c: Likewise.
774 * cp-array-notation.c: Likewise.
775 * cp-gimplify.c: Likewise.
776 * cp-lang.c: Likewise.
777 * cp-objcp-common.c: Likewise.
778 * cp-ubsan.c: Likewise.
784 * except.c: Likewise.
786 * friend.c: Likewise.
788 * lambda.c: Likewise.
790 * mangle.c: Likewise.
791 * method.c: Likewise.
792 * name-lookup.c: Likewise.
793 * optimize.c: Likewise.
794 * parser.c: Likewise.
799 * search.c: Likewise.
800 * semantics.c: Likewise.
802 * typeck.c: Likewise.
803 * typeck2.c: Likewise.
805 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
807 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
809 2015-07-06 Jason Merrill <jason@redhat.com>
811 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
812 for a template template parameter.
813 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
814 by reduce_template_parm_level.
816 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
819 2015-07-02 Jason Merrill <jason@redhat.com>
822 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
823 TYPE_VALUES_RAW rather than TYPE_FIELDS.
825 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
827 * pt.c (type_dependent_expression_p): Handle expressions
828 that refer to variable templates.
830 2015-07-01 Jason Merrill <jason@redhat.com>
832 * lex.c (init_reswords): s/CXX0X/CXX11/.
833 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
835 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
836 Attribute mangling is now -fabi-version=10.
839 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
840 * class.c (layout_nonempty_base_or_field): Warn if that affects
841 the offset of a field.
843 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
846 * parser.c (cp_parser_check_std_attribute): New.
847 (cp_parser_std_attribute_list): Call it.
849 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
852 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
853 return 0 if tsubst returns a dependent type.
855 2015-06-30 Jason Merrill <jason@redhat.com>
858 * decl2.c (is_late_template_attribute): True for tls_model.
861 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
862 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
863 (SET_DECL_GNU_TLS_P): New.
864 * call.c (make_temporary_var_for_ref_to_temp): Use
865 CP_DECL_THREAD_LOCAL_P.
866 (set_up_extended_ref_temp): Likewise.
867 * decl.c (duplicate_decls, expand_static_init): Likewise.
868 (redeclaration_error_message, grokvardecl): Likewise.
869 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
870 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
871 (handle_tls_init): Likewise.
872 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
873 * semantics.c (finish_id_expression): Likewise.
874 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
875 (finish_omp_threadprivate): Likewise.
876 * tree.c (decl_storage_duration): Likewise.
877 * cp-gimplify.c (omp_var_to_track): Likewise.
878 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
879 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
882 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
884 Implement N4197 - Adding u8 character literals
885 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
886 and CPP_UTF8CHAR_USERDEF tokens;
887 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
889 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
892 * decl.c (grokfndecl): Allow constexpr declarations of friend
893 template specializations.
895 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
898 * decl.c (finish_function): Call do_warn_unused_parameter.
900 2015-06-29 Marek Polacek <polacek@redhat.com>
903 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
904 (push_switch): Set OUTSIDE_RANGE_P.
905 (pop_switch): Update c_do_switch_warnings call.
906 (finish_case_label): Update c_add_case_label call.
907 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
910 2015-06-27 Marek Polacek <polacek@redhat.com>
912 * call.c: Use VECTOR_TYPE_P.
913 * constexpr.c: Likewise.
918 * semantics.c: Likewise.
920 * typeck.c: Likewise.
921 * typeck2.c: Likewise.
923 2015-06-27 Marek Polacek <polacek@redhat.com>
925 * call.c (set_up_extended_ref_temp): Use VAR_P.
926 * class.c: Use VAR_P throughout.
927 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
928 * cp-array-notation.c (make_triplet_val_inv): Likewise.
929 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
932 * error.c (dump_decl): Use VAR_P.
933 * mangle.c (decl_implicit_alias_p): Likewise.
934 * parser.c: Use VAR_P throughout.
936 * semantics.c: Likewise.
937 * vtable-class-hierarchy.c: Likewise.
938 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
940 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
942 * pt.c (check_unstripped_args): Mark parameter as unused.
944 2015-06-26 Jason Merrill <jason@redhat.com>
947 * class.c (finish_struct): Call fixup_attribute_variants.
950 * typeck2.c (merge_exception_specifiers): Allow different
951 noexcept-specifiers if we've had errors.
954 * pt.c (check_unstripped_args): Split out from...
955 (retrieve_specialization): ...here. Allow typedefs in the type of
959 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
961 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
964 * typeck2.c (digest_init_r): Only expect reshaping if the class is
967 2015-06-26 Marek Polacek <polacek@redhat.com>
969 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
970 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
972 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
974 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
976 * cp-ubsan.c: Likewise.
979 * lambda.c: Likewise.
980 * mangle.c: Likewise.
981 * method.c: Likewise.
982 * optimize.c: Likewise.
983 * parser.c: Likewise.
984 * semantics.c: Likewise.
986 * vtable-class-hierarchy.c: Likewise.
988 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
990 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
991 rather than ggc_hasher.
992 (constexpr_call_hasher): Likewise.
993 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
994 * decl.c (typename_hasher): Likewise.
995 * mangle.c (conv_type_hasher): Likewise.
996 * pt.c (spec_hasher): Likewise.
997 * tree.c (cplus_array_hasher, list_hasher): Likewise.
998 * typeck2.c (abstract_type_hasher): Likewise.
1000 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1002 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1003 rather than pointer_hash.
1004 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1005 * semantics.c (nrv_data): Likewise.
1006 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1008 2015-06-24 Jason Merrill <jason@redhat.com>
1011 * pt.c (dependent_type_p_r): Check for dependent alias template
1012 specialization sooner.
1015 * class.c (type_has_nontrivial_assignment): Remove.
1016 * cp-tree.h: Remove declaration.
1017 * init.c (vec_copy_assign_is_trivial): New.
1018 (build_vec_init): Use it.
1020 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
1022 Implement N3928 - Extending static_assert
1023 * parser.c (cp_parser_static_assert): Support static_assert with
1024 no message string. Supply an empty string in this case.
1025 * semantics.c (finish_static_assert): Don't try to print a message if
1026 the message strnig is empty.
1028 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
1031 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1032 implicit template parm if 'auto' is a placeholder for trailing
1035 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
1038 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1041 * parser.c (cp_parser_template_parameter_list): Update
1042 current_template_parms right after processing a paramater.
1043 * pt.c (template_parms_to_args): Remove obsolete hack for
1044 giving template template arguments the proper level.
1045 (check_default_tmpl_args): Account for tested template
1047 (splite_late_return_type): Remove obsolete hack for giving
1048 template template arguments the proper level.
1050 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1053 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
1055 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1058 * parser.c (cp_parser_template_parameter_list): Update
1059 current_template_parms right after processing a paramater.
1060 * pt.c (template_parms_to_args): Remove obsolete hack for
1061 giving template template arguments the proper level.
1062 (check_default_tmpl_args): Account for tested template
1064 (splite_late_return_type): Remove obsolete hack for giving
1065 template template arguments the proper level.
1067 2015-06-23 Jason Merrill <jason@redhat.com>
1070 * decl.c (grokfndecl): Check the linkage of ctype, not just
1072 * tree.c (no_linkage_check): Skip the 'this' pointer.
1075 * class.c (type_has_nontrivial_assignment): New.
1076 * init.c (build_vec_init): Use it.
1077 * cp-tree.h: Declare it.
1078 * method.c (trivial_fn_p): Templates aren't trivial.
1081 * decl.c (expand_static_init): Make sure the destructor is callable
1082 here even if we have an initializer.
1084 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
1086 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
1087 -fdump-ada-spec is passed.
1089 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
1091 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
1093 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1095 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
1097 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1099 * decl.c (grokdeclarator): Remove pointless code.
1101 2015-06-22 Jason Merrill <jason@redhat.com>
1104 * call.c (implicit_conversion): Only reshape for classes.
1106 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
1108 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
1110 * semantics.c (finish_omp_atomic): Likewise.
1111 * typeck.c (cp_build_array_ref): Likewise.
1113 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
1116 * call.c (build_new_op_1): Check tf_warning flag in all cases.
1118 2015-06-19 Jason Merrill <jason@redhat.com>
1121 * pt.c (instantiate_class_template_1): Clear
1122 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
1125 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1127 * typeck.c (merge_types): build_ptrmemfunc_type before applying
1128 quals and attributes.
1131 * constexpr.c (build_constexpr_constructor_member_initializers):
1132 Handle an empty STATEMENT_LIST.
1135 * pt.c (tsubst_copy_and_build): Register a capture proxy in
1136 local_specializations.
1138 2015-06-17 Jason Merrill <jason@redhat.com>
1141 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1143 (potential_constant_expression_1): Likewise.
1145 2015-06-17 Jason Merrill <jason@redhat.com>
1148 * call.c (implicit_conversion): Call reshape_init here, early.
1149 (build_aggr_conv): Not here.
1151 2015-06-17 Jakub Jelinek <jakub@redhat.com>
1154 * pt.c (tsubst_omp_clause_decl): New function.
1155 (tsubst_omp_clauses): Use it or tsubst_copy instead of
1156 tsubst_expr on OMP_CLAUSE_DECL.
1158 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1160 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1161 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1162 * decl.c (grokdeclarator, xref_tag_1): Likewise.
1163 * error.c (dump_aggr_type): likewise.
1164 * pt.c (push_template_decl_real): Likewise.
1165 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1167 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1169 * call.c: Do not include input.h, line-map.h or is-a.h.
1170 * class.c: Likewise.
1171 * constexpr.c: Likewise.
1172 * cp-array-notation.c: Likewise.
1173 * cp-gimplify.c: Likewise.
1174 * cp-lang.c: Likewise.
1175 * cp-objcp-common.c: Likewise.
1176 * cp-tree.h: Likewise.
1177 * cp-ubsan.c: Likewise.
1180 * decl2.c: Likewise.
1182 * error.c: Likewise.
1183 * except.c: Likewise.
1185 * friend.c: Likewise.
1187 * lambda.c: Likewise.
1189 * mangle.c: Likewise.
1190 * method.c: Likewise.
1191 * name-lookup.c: Likewise.
1192 * optimize.c: Likewise.
1193 * parser.c: Likewise.
1195 * ptree.c: Likewise.
1198 * search.c: Likewise.
1199 * semantics.c: Likewise.
1201 * typeck.c: Likewise.
1202 * typeck2.c: Likewise.
1203 * vtable-class-hierarchy.c: Likewise.
1205 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
1208 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1210 2015-06-16 Jason Merrill <jason@redhat.com>
1213 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1217 * tree.c (bot_manip): Remap SAVE_EXPR.
1220 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1222 2015-06-15 Nathan Sidwell <nathan@acm.org>
1225 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1226 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1227 protect it from recursive instantiation.
1229 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
1232 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1233 using a local type is pure virtual.
1235 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1237 * call.c: Remove comment documenting the long-deleted
1238 function build_method_call.
1240 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1243 * typeck.c (cp_build_binary_op): Warn when comparing an address
1244 of a reference against NULL.
1246 2015-06-12 Jason Merrill <jason@redhat.com>
1249 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1250 variables as DECL_NOT_REALLY_EXTERN.
1252 2015-06-11 Jason Merrill <jason@redhat.com>
1255 * constexpr.c (potential_constant_expression_1): Handle a
1256 DECL_EXPR of TYPE_DECL.
1259 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1262 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1264 * decl.c (cxx_init_decl_processing): Register the main
1265 translation unit through the new debug hook.
1267 2015-06-10 Jason Merrill <jason@redhat.com>
1270 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1271 * pt.c (push_template_decl_real): Set it.
1272 (dependent_alias_template_spec_p): Use it.
1273 (dependent_type_p_r): Use dependent_alias_template_spec_p.
1274 (uses_all_template_parms_data, uses_all_template_parms_r)
1275 (complex_alias_template_p): New.
1276 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1278 2015-06-09 Jason Merrill <jason@redhat.com>
1282 * typeck2.c (digest_init_r): Replace previous change with
1286 * semantics.c (process_outer_var_ref): Make sure the value is
1287 actually constant before returning it.
1288 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1291 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1294 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1295 * init.c (expand_default_init): Likewise.
1297 2015-06-09 Jason Merrill <jason@redhat.com>
1300 * tree.c (replace_placeholders_r): Handle placeholders for an
1302 * typeck2.c (store_init_value): Only replace_placeholders for
1303 objects of class type.
1305 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1307 * call.c : Adjust include files.
1308 * class.c : Likewise.
1309 * constexpr.c : Likewise.
1310 * cp-array-notation.c : Likewise.
1311 * cp-cilkplus.c : Likewise.
1312 * cp-gimplify.c : Likewise.
1313 * cp-lang.c : Likewise.
1314 * cp-objcp-common.c : Likewise.
1315 * cp-tree.h : Likewise.
1316 * cp-ubsan.c : Likewise.
1318 * decl.c : Likewise.
1319 * decl2.c : Likewise.
1320 * dump.c : Likewise.
1321 * error.c : Likewise.
1322 * except.c : Likewise.
1323 * expr.c : Likewise.
1324 * friend.c : Likewise.
1325 * init.c : Likewise.
1326 * lambda.c : Likewise.
1328 * mangle.c : Likewise.
1329 * method.c : Likewise.
1330 * name-lookup.c : Likewise.
1331 * optimize.c : Likewise.
1332 * parser.c : Likewise.
1334 * ptree.c : Likewise.
1335 * repo.c : Likewise.
1336 * rtti.c : Likewise.
1337 * search.c : Likewise.
1338 * semantics.c : Likewise.
1339 * tree.c : Likewise.
1340 * typeck.c : Likewise.
1341 * typeck2.c : Likewise.
1342 * vtable-class-hierarchy.c : Likewise.
1344 2015-06-05 Jason Merrill <jason@redhat.com>
1347 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1348 the expansion has extra args.
1349 (use_pack_expansion_extra_args_p): Return true in that case.
1352 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1353 dependent even if it has a type.
1355 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1357 * cp-objcp-common.c: Adjust comment for
1358 cxx_warn_unused_global_decl.
1359 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1360 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1361 * cp-tree.h (note_mangling_alias): Protoize.
1362 (cp_write_global_declarations): Remove.
1363 (cxx_post_compilation_parsing_cleanups): Protoize.
1364 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1366 * decl2.c (mangling_aliases): New global.
1367 (build_java_method_aliases): New. Adapted from
1368 collect_candidates_for_java_method_aliases.
1369 (collect_candidates_for_java_method_aliases): Remove.
1370 (build_java_method_aliases): Remove.
1371 (generate_mangling_aliases): New.
1372 (note_mangling_alias): New. Moved from mangle_decl.
1373 (locus_at_end_of_parsing): New global.
1374 (c_parse_final_cleanups): Rename from
1375 cp_write_global_declarations.
1376 Use locus_at_end_of_parsing.
1377 Call generate_mangling_aliases.
1378 Rename call to collect_candidates_for_java_method_aliases into
1379 build_java_method_aliases.
1380 Remove call to finalize_compilation_unit.
1381 Move vtable handling into cxx_post_compilation_parsing_cleanups.
1382 Do not call check_global_declarations or
1383 emit_debug_global_declarations.
1384 (cxx_post_compilation_parsing_cleanups): New.
1385 * mangle.c (mangle_decl): Move code to note_mangling_alias.
1386 * name-lookup.c (do_namespace_alias): Call early_global_decl.
1388 2015-06-05 Nathan Sidwell <nathan@acm.org>
1391 * parser.c (cp_parser_cache_defarg): Continue looking for
1392 declarators when scanning a potential template argument list of an
1395 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1397 * call.c: Adjust includes for restructured coretypes.h.
1398 * class.c: Likewise.
1399 * constexpr.c: Likewise.
1400 * cp-array-notation.c: Likewise.
1401 * cp-gimplify.c: Likewise.
1402 * cp-lang.c: Likewise.
1403 * cp-objcp-common.c: Likewise.
1404 * cp-tree.h: Likewise.
1405 * cp-ubsan.c: Likewise.
1408 * decl2.c: Likewise.
1410 * error.c: Likewise.
1411 * except.c: Likewise.
1413 * friend.c: Likewise.
1415 * lambda.c: Likewise.
1417 * mangle.c: Likewise.
1418 * method.c: Likewise.
1419 * name-lookup.c: Likewise.
1420 * optimize.c: Likewise.
1421 * parser.c: Likewise.
1423 * ptree.c: Likewise.
1426 * search.c: Likewise.
1427 * semantics.c: Likewise.
1429 * typeck.c: Likewise.
1430 * typeck2.c: Likewise.
1431 * vtable-class-hierarchy.c: Likewise.
1433 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1437 * cp-tree.h (get_guard_cond): Adjust declaration
1438 * decl.c (expand_static_init): Use atomic load acquire
1439 and adjust call to get_guard_cond.
1440 * decl2.c (build_atomic_load_byte): New function.
1441 (get_guard_cond): Handle thread_safety.
1442 (one_static_initialization_or_destruction): Adjust call to
1445 2015-06-03 Jason Merrill <jason@redhat.com>
1448 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1449 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1450 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1451 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1453 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
1454 Paolo Carlini <paolo.carlini@oracle.com>
1457 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1458 use it in the diagnostic.
1459 (decay_conversion): Adjust call.
1460 * semantics.c (finish_decltype_type): Likewise.
1461 * call.c (resolve_args, build_new_op_1,
1462 perform_implicit_conversion_flags): Adjust calls.
1463 * cvt.c (ocp_convert, convert_to_void): Likewise.
1464 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1466 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1468 * decl.c (check_tag_decl): Use declspecs->locations as locations in
1469 error_at and warning_at calls.
1471 2015-06-03 Marek Polacek <polacek@redhat.com>
1474 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1475 (cp_genericize_r): Don't instrument static initializers.
1476 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1478 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1480 * decl.c (start_function): Call plugin before parsing.
1481 (finish_function): Call plugin after parsing.
1483 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
1485 * cp-tree.h (init_error): Remove declaration.
1486 * error.c (scratch_pretty_printer): Rename to ...
1487 (actual_pretty_printer): ... this.
1488 (cxx_pp): Constify and update accordingly.
1489 (init_error): Remove definition.
1490 * lex.c (cxx_init): Do not call init_error.
1492 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1495 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1497 2015-06-01 Jason Merrill <jason@redhat.com>
1500 * decl2.c (mark_used): Don't always instantiate constexpr fns.
1501 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1504 * mangle.c (attr_strcmp): New.
1505 (write_CV_qualifiers_for_type): Also write out attributes that
1506 affect type identity.
1507 (write_type): Strip all attributes after writing qualifiers.
1509 2015-05-31 Jason Merrill <jason@redhat.com>
1511 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1514 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1515 with the wrong type as non-constant.
1517 2015-05-27 Jason Merrill <jason@redhat.com>
1519 * decl.c (check_redeclaration_exception_specification): Depend on
1520 -Wsystem-headers rather than -pedantic.
1522 * decl.c (warn_extern_redeclared_static): Use the location of
1523 newdecl in diagnostics, not input_location.
1524 (validate_constexpr_redeclaration): Likewise.
1525 (check_redeclaration_no_default_args): Likewise.
1526 (duplicate_decls): Likewise.
1527 (check_redeclaration_exception_specification): Likewise.
1528 Change second diagnostic to inform.
1530 2015-05-24 Nathan Sidwell <nathan@acm.org>
1533 * decl.c (build_enumerator): Don't silently convert scoped enums.
1535 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
1538 * mangle.c (mangle_decl): Mangle anonymous namespace types as
1541 2015-05-23 Nathan Sidwell <nathan@acm.org>
1544 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1546 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1548 * Make-lang.in (check_g++_parallelize): Update comment.
1550 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1553 * decl.c (grokdeclarator): Use the correct location in error
1554 messages about 'explicit'.
1556 2015-05-22 Marek Polacek <polacek@redhat.com>
1557 Edward Smith-Rowland <3dw4rd@verizon.net>
1560 * cp-tree.h (build_enumerator): Update declaration.
1561 * decl.c (build_enumerator): Add attributes parameter. Call
1562 cplus_decl_attributes.
1563 * init.c (constant_value_1): Pass tf_none to mark_used.
1564 * parser.c (cp_parser_enumerator_definition): Parse attributes and
1565 pass them down to build_enumerator.
1566 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1567 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1569 2015-05-21 Nathan Sidwell <nathan@acm.org>
1572 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1574 2015-05-21 Marek Polacek <polacek@redhat.com>
1576 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1578 2015-05-20 Jason Merrill <jason@redhat.com>
1580 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1581 before register_specialization.
1583 * decl.c (grok_op_properties): Don't complain about size_t
1584 placement delete here.
1585 * call.c (second_parm_is_size_t): Split out from...
1586 (non_placement_deallocation_fn_p): ...here.
1587 (build_op_delete_call): Warn about size_t placement delete with
1590 2015-05-19 Nathan Sidwell <nathan@acm.org>
1593 * typeck.c (finish_class_member_access_expr): Diagnose failed
1594 lookup of enum class member.
1596 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1599 * parser.c (cp_parser_omp_for_loop): Don't add
1600 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1601 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1602 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1605 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1607 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1610 2015-05-18 Jason Merrill <jason@redhat.com>
1612 * pt.c (retrieve_specialization): Make sure our arguments have
1613 gone through strip_typedefs.
1615 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1616 (determine_specialization): Call coerce_template_parms.
1619 * pt.c (type_unification_real): Check convertibility here.
1620 (unify_one_argument): Not here.
1622 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1623 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1624 [TREE_LIST]: Fix no-change case.
1626 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1628 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1631 * error.c (cp_diagnostic_starter): Use diagnostic_location
1633 (cp_print_error_function): Likewise.
1634 (cp_printer): Replace locus pointer with accessor function.
1636 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1638 * parser.c (cp_parser_selection_statement): Add location and
1639 guard_kind arguments to calls to
1640 cp_parser_implicitly_scoped_statement.
1641 (cp_parser_iteration_statement): Likewise for calls to
1642 cp_parser_already_scoped_statement.
1643 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1644 "guard_kind" params; use them to warn for misleading
1646 (cp_parser_already_scoped_statement): Likewise.
1648 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
1650 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1651 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1652 * semantics.c (finish_member_declaration): Likewise.
1653 * method.c (lazily_declare_fn): Allways add method to main variant list.
1655 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
1658 * decl2.c (note_mangling_alias): Declare arguments as unused.
1660 2015-05-08 Jason Merrill <jason@redhat.com>
1662 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1665 2015-05-08 Jason Merrill <jason@redhat.com>
1667 * decl2.c (mangling_aliases): New variable.
1668 (note_mangling_alias, generate_mangling_aliases): New.
1669 (cp_write_global_declarations): Call generate_mangling_aliases.
1670 (generate_mangling_alias): Split out from...
1671 * mangle.c (mangle_decl): ...here.
1672 * cp-tree.h: Declare note_mangling_alias.
1674 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
1676 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1677 (build_java_method_aliases): Adapt to use create_same_body_alias
1678 instead of assemble_alias. Move variable declarations to
1679 definition and tidy up.
1680 (cp_write_global_declarations): Call build_java_method_aliases
1681 instead of collecting candidates first.
1683 2015-05-07 Jason Merrill <jason@redhat.com>
1686 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1687 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1688 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1689 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1690 (apply_late_template_attributes): Handle attribute pack expansion.
1692 2015-05-07 Marek Polacek <polacek@redhat.com>
1695 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1698 2015-05-07 Jason Merrill <jason@redhat.com>
1702 * typeck2.c (digest_init_r): Fix single element list.
1704 2015-05-05 Jason Merrill <jason@redhat.com>
1706 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1707 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1708 MUST_NOT_THROW_EXPR.
1709 (cp_genericize_data): Add try_block field.
1710 (cp_genericize_tree): Initialize it.
1711 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1714 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1717 * semantics.c (finish_call_expr): Check complain.
1719 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1720 maybe-in-charge constructor.
1722 * decl.c (start_decl): Don't push the plain VAR_DECL for a
1729 * call.c (convert_like_real): Check value-initialization before
1731 * typeck2.c (process_init_constructor_record): Don't set
1732 CONSTRUCTOR_IS_DIRECT_INIT.
1733 (process_init_constructor_array): Likewise.
1734 * init.c (build_vec_init): Likewise.
1736 2015-05-05 David Malcolm <dmalcolm@redhat.com>
1738 * parser.c (cp_parser_asm_definition): Only test for
1739 error_mark_node if "outputs" was just set. Likewise for "inputs".
1741 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1742 Jakub Jelinek <jakub@redhat.com>
1745 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1746 result in an actual error.
1748 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1749 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
1752 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1755 2015-04-30 David Malcolm <dmalcolm@redhat.com>
1757 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1760 2015-04-29 Jason Merrill <jason@redhat.com>
1763 * tree.c (apply_identity_attributes): Fix handling of classes.
1765 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1767 * parser.c (cp_parser_oacc_enter_exit_data): Use
1768 OMP_STANDALONE_CLAUSES.
1770 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
1773 * init.c (perform_member_init): Handle references for -Winit-self.
1775 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1777 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1778 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1780 2015-04-28 Jason Merrill <jason@redhat.com>
1783 * constexpr.c (cxx_eval_store_expression): Don't try to actually
1784 store an empty class.
1787 * constexpr.c (cxx_eval_builtin_function_call): Fix
1788 __builtin_constant_p.
1791 * tree.c (strip_typedefs): Add remove_attributes parm.
1792 (strip_typedefs_expr): Likewise.
1793 (apply_identity_attributes): New subroutine of strip_typedefs.
1794 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1795 (convert_nontype_argument, unify): Likewise.
1796 * cp-tree.h: Adjust.
1799 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1801 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1803 * class.c (layout_class_type): Remove check if
1804 PCC_BITFIELD_TYPE_MATTERS is defined.
1806 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1808 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1810 2015-04-24 Jason Merrill <jason@redhat.com>
1813 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1815 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1816 Remove obsolete code.
1817 [NE_EXPR]: Likewise.
1819 2015-04-23 Jason Merrill <jason@redhat.com>
1822 * pt.c (check_explicit_specialization): Don't
1823 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1825 * decl.c (grokvardecl): Revert earlier fix.
1827 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
1830 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1831 suppresses the diagnostic.
1833 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
1835 Reject trailing return type for an operator auto().
1836 * decl.c (grokdeclarator): Reject trailing return types for
1837 all conversion operators, don't handle conversion operators
1838 in the previous checks that deal with auto.
1840 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1842 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1844 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1846 * class.c (resolve_address_of_overloaded_function, instantiate_type):
1847 Rename tsubst_flags_t parameter flags -> complain.
1849 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1851 * call.c (build_op_delete_call, build_over_call): Check mark_used
1853 * class.c (resolve_address_of_overloaded_function): Likewise.
1854 * decl.c (cxx_maybe_build_cleanup): Likewise.
1855 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1856 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1857 * rtti.c (build_dynamic_cast_1): Likewise.
1858 * semantics.c (process_outer_var_ref): Likewise.
1859 * typeck.c (build_class_member_access_expr,
1860 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1862 2015-04-15 Jason Merrill <jason@redhat.com>
1864 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1865 (build_constexpr_constructor_member_initializers): Loop to find
1867 * decl.c (start_preparsed_function): Clobber the object at the
1868 beginning of a constructor.
1870 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1871 * method.c (implicitly_declare_fn): Likewise.
1872 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1874 * decl2.c (determine_visibility): Use get_template_info.
1876 2015-04-15 Jason Merrill <jason@redhat.com>
1877 Marek Polacek <polacek@redhat.com>
1880 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1881 through the normal loop, just don't capture.
1882 (maybe_resolve_dummy): Handle null return.
1884 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1886 * call.c (enforce_access): Emit error + inform.
1888 2015-04-15 Marek Polacek <polacek@redhat.com>
1890 * constexpr.c (use_new_call): Remove #define.
1891 (lookup_parameter_binding): Remove function.
1892 (cxx_bind_parameters_in_call): Remove unused code.
1893 (cxx_eval_call_expression): Likewise.
1894 (cxx_eval_constant_expression): Likewise.
1896 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1898 * tree.c (replace_placeholders_t): Remove unused type.
1899 (replace_placeholders): Remove unused pset.
1901 2015-04-14 Jason Merrill <jason@redhat.com>
1903 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1906 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1909 * name-lookup.c (do_class_using_decl): Complain about specifying
1910 the current class even if there are dependent bases.
1912 2015-04-14 David Krauss <david_work@me.com>
1915 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1917 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1918 Jason Merrill <jason@redhat.com>
1921 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1922 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1923 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1926 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1929 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1930 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1931 the expression to the original type at the end.
1933 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1936 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1940 * tree.c (build_cplus_array_type): Layout type before variants are
1941 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1944 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1947 * lambda.c (add_capture): Use dependent_type_p for capture by
1950 2015-04-02 Marek Polacek <polacek@redhat.com>
1953 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1954 cxx_eval_constant_expression on the first operand.
1956 2015-04-01 Jason Merrill <jason@redhat.com>
1959 * decl.c (make_typename_type): Handle seeing a variable template.
1961 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1964 * pt.c (instantiating_current_function_p): New.
1965 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1966 * cp-tree.h (instantiating_current_function_p): Declare.
1968 2015-04-01 Jason Merrill <jason@redhat.com>
1971 * decl.c (grokvardecl): Don't call check_explicit_specialization
1972 for non-template members of a class template.
1974 2015-04-01 Marek Polacek <polacek@redhat.com>
1977 * class.c (finish_struct): Require that the second field of a
1978 user-defined initializer_list be of size type.
1980 2015-03-31 Marek Polacek <polacek@redhat.com>
1983 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1984 checking for constness.
1986 2015-03-30 Marek Polacek <polacek@redhat.com>
1989 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1990 *(&A[i] p+ j) => A[i + j] transformation here.
1991 (cxx_eval_pointer_plus_expression): New function.
1992 (cxx_eval_constant_expression): Use it here.
1994 2015-03-27 Tobias Burnus <burnus@net-b.de>
1997 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1998 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1999 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2002 2015-03-27 Marek Polacek <polacek@redhat.com>
2005 * semantics.c (finish_switch_cond): If the unlowered type is not an
2006 enum, use the type of the condition.
2008 2015-03-27 Jason Merrill <jason@redhat.com>
2011 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2014 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
2017 * init.c (build_vec_init): Fix initializing aggregates
2018 with empty init list.
2020 2015-03-26 Jason Merrill <jason@redhat.com>
2023 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2025 2015-03-25 Marek Polacek <polacek@redhat.com>
2028 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2029 on an anonymous namespace.
2031 2015-03-25 Marek Polacek <polacek@redhat.com>
2034 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2036 2015-03-24 Jason Merrill <jason@redhat.com>
2039 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2040 * parser.c (cp_parser_namespace_definition): Don't set it.
2041 * name-lookup.c (handle_namespace_attrs): Check
2042 DECL_NAMESPACE_ASSOCIATIONS instead.
2045 * pt.c (get_mostly_instantiated_function_type): Just return the
2046 type of the partially instantiated template in DECL_TI_TEMPLATE.
2048 2015-03-20 Marek Polacek <polacek@redhat.com>
2051 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
2054 2015-03-20 Marek Polacek <polacek@redhat.com>
2057 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
2060 2015-03-19 Jason Merrill <jason@redhat.com>
2063 Automatically propagate ABI tags to variables and functions
2064 from their (return) type.
2065 * class.c (check_tag): Handle variables and functions.
2066 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
2067 (mark_or_check_tags): Likewise.
2068 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
2069 (check_abi_tags): Add single argument overload for decls.
2070 Handle inheriting tags for decls.
2071 * mangle.c (write_mangled_name): Call it.
2072 (mangle_return_type_p): Split out from write_encoding.
2073 (unmangled_name_p): Split out from write_mangled_name.
2074 (write_mangled_name): Ignore abi_tag on namespace.
2075 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
2076 * parser.c (cp_parser_namespace_definition): Set it.
2077 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
2078 about abi_tag attribute on non-inline namespace.
2079 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
2080 (handle_abi_tag_attribute): Allow tags on variables.
2082 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2084 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
2085 attribute for DECL_EXTERNAL VAR_DECLs.
2087 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2090 * call.c (build_over_call): Pass the tsubst_flags_t argument to
2092 * decl2.c (mark_used): Inline the require_deduced_type call and
2093 guard the error call.
2095 2015-03-16 Jason Merrill <jason@redhat.com>
2098 * parser.c (cp_parser_template_name): Call strip_using_decl.
2100 2015-03-16 Marek Polacek <polacek@redhat.com>
2104 * decl.c (grokdeclarator): Allow volatile and constexpr together.
2106 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2109 * decl.c (check_default_argument): Don't call
2110 maybe_warn_zero_as_null_pointer_constant.
2112 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
2114 * cp-gimplify.c (simple_empty_class_p): New.
2115 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
2116 the code for empty class copies into simple_empty_class_p, and
2117 adapt it to handle COMPOUND_EXPRs.
2119 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
2122 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
2123 only if the location of newdecl doesn't match the location of olddecl.
2125 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2128 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2131 2015-03-10 Jason Merrill <jason@redhat.com>
2135 * pt.c (dependent_type_p_r): Check both class and alias template args.
2137 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2140 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2141 before preparing arguments to warn_logical_not_parentheses.
2142 Use maybe_constant_value on rhs.
2144 2015-03-09 Jason Merrill <jason@redhat.com>
2147 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2149 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2152 * parser.c (cp_parser_binary_expression): Don't warn for
2153 !!x == y or !b == y where b is bool.
2155 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
2157 * ptree.c (cxx_print_lambda_node): New.
2158 (cxx_print_xnode): Handle LAMBDA_EXPR.
2160 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
2163 * constexpr.c (cxx_eval_constant_expression): Remove assert in
2164 RESULT_DECL handling.
2166 2015-02-26 Marek Polacek <polacek@redhat.com>
2169 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2170 a RETURN_EXPR if its operand is null.
2172 2015-02-25 Jason Merrill <jason@redhat.com>
2175 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2177 (constrain_visibility_for_template): Handle reference arguments.
2180 * decl.c (start_preparsed_function): Use create_artificial_label
2183 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
2184 Jakub Jelinek <jakub@redhat.com>
2187 * constexpr.c (check_constexpr_bind_expr_vars): Allow
2188 implicit typedefs for lambda types.
2190 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2193 * decl.c (lookup_and_check_tag): Use strip_using_decl.
2195 2015-02-13 Jason Merrill <jason@redhat.com>
2198 * pt.c (template_args_equal): Look through conversions here.
2199 * tree.c (cp_tree_equal): Not here.
2201 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2204 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2205 pragma_external context.
2207 2015-02-13 Jason Merrill <jason@redhat.com>
2210 * call.c (reference_binding): Don't look for bad conversion
2211 if TO is incomplete.
2213 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2216 * decl.c (make_typename_type): Pass tsubst_flags_t argument
2217 to lookup_template_class.
2219 2015-02-13 Jakub Jelinek <jakub@redhat.com>
2222 * decl.c (start_preparsed_function): Use void_type_node instead
2223 of NULL_TREE as LABEL_DECL type.
2225 2015-02-12 Jason Merrill <jason@redhat.com>
2228 * mangle.c (write_mangled_name): Fix test for variable template
2231 * decl.c (begin_destructor_body): Condition clobber on
2234 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2237 * parser.c (lookup_literal_operator): Return all candidates.
2238 (cp_parser_userdef_char_literal): Simplify error handling.
2239 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
2240 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2241 Also give higher priority to standard string UDL operator.
2243 2015-02-12 Jakub Jelinek <jakub@redhat.com>
2246 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2247 * decl.c (poplevel): If functionbody, try not to create an extra
2248 BLOCK for function body and use subblocks as that, if it is non-NULL
2249 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
2250 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2253 * except.c (check_noexcept_r): Return NULL for internal
2256 2015-02-10 Jason Merrill <jason@redhat.com>
2259 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2261 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
2264 * method.c (use_thunk): Do not check for stdarg thunks.
2266 2015-02-06 Jason Merrill <jason@redhat.com>
2269 * init.c (build_vec_init): Handle default-initialized array with
2270 constexpr default constructor.
2272 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2276 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2278 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2281 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2282 for generated expressions.
2284 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2287 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2290 2015-02-02 Jason Merrill <jason@redhat.com>
2292 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2294 2015-01-30 Joseph Myers <joseph@codesourcery.com>
2296 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2297 changed to pass input_location as first argument.
2299 2015-01-29 Jakub Jelinek <jakub@redhat.com>
2302 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2305 2015-01-29 Jason Merrill <jason@redhat.com>
2308 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2309 erroneous return statement.
2312 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2315 2015-01-27 Caroline Tice <cmtice@google.com>
2317 Committing VTV Cywin/Ming patch for Patrick Wollgast
2318 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2319 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2321 2015-01-27 Jason Merrill <jason@redhat.com>
2324 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2325 current_function_decl.
2328 * pt.c (finish_template_variable): Move from semantics.c.
2329 Handle multiple template arg levels. Handle coercion here.
2330 (lookup_template_variable): Not here.
2332 2015-01-23 Jason Merrill <jason@redhat.com>
2336 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2337 that has been completely split out.
2340 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2344 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2347 2015-01-21 Jason Merrill <jason@redhat.com>
2350 * constexpr.c (cxx_eval_constant_expression): Only shortcut
2351 constant CONSTRUCTORs.
2354 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2355 give a hard error in a template instantiation.
2357 2015-01-21 Richard Biener <rguenther@suse.de>
2360 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2361 for builtins the user declared correctly.
2363 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2366 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2367 TREE_TYPE (elt) == error_mark_node.
2369 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
2371 PR tree-optimization/62053
2372 * tree.c (build_cplus_array_type): Layout type after variants are set.
2374 2015-01-15 Jakub Jelinek <jakub@redhat.com>
2376 * cp-gimplify.c (cp_genericize_r): Call
2377 cp_ubsan_maybe_instrument_member_call for member calls.
2378 (cp_ubsan_check_member_access_r): New function.
2379 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2380 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2381 cp_ubsan_instrument_member_accesses,
2382 cp_ubsan_maybe_instrument_downcast,
2383 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2384 * cp-ubsan.c: New file.
2385 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2386 * constexpr.c (cxx_eval_call_expression): Return void_node
2388 (potential_constant_expression_1): Return true for
2389 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2390 * typeck.c (build_class_member_access_expr): Provide locus
2392 (build_static_cast_1): Instrument downcasts.
2393 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2394 add ubsan instrumentation for virtual_access.
2395 * call.c: Include internal-fn.h.
2396 (set_flags_from_callee): Handle internal calls.
2398 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
2401 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2402 and function templates, declared only in the class.
2403 * decl.c (duplicate_decls): Reveal hidden friend functions or
2404 function templates, if they are redeclared outside the class.
2406 2015-01-15 Jason Merrill <jason@redhat.com>
2409 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2412 * constexpr.c (potential_constant_expression_1): Handle reference
2415 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2416 James Norris <jnorris@codesourcery.com>
2417 Cesar Philippidis <cesar@codesourcery.com>
2418 Ilmir Usmanov <i.usmanov@samsung.com>
2419 Jakub Jelinek <jakub@redhat.com>
2421 * parser.c: Include "gomp-constants.h".
2422 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2423 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2424 Use OMP_CLAUSE_SET_MAP_KIND.
2425 (cp_parser_omp_construct, cp_parser_pragma): Handle
2426 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2427 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2428 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2429 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2430 "create", "delete", "deviceptr", "host", "num_gangs",
2431 "num_workers", "present", "present_or_copy", "pcopy",
2432 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2433 "present_or_create", "pcreate", "vector_length", "wait".
2434 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2435 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2436 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2437 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2438 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2439 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2440 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2441 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2442 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2443 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2444 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2445 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2446 (cp_parser_oacc_parallel, cp_parser_oacc_update)
2447 (cp_parser_oacc_wait): New functions.
2448 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2449 (finish_oacc_parallel): New prototypes.
2450 * semantics.c: Include "gomp-constants.h".
2451 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2452 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2453 OMP_CLAUSE_SET_MAP_KIND.
2454 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2455 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2456 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2457 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2460 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
2463 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2464 self-initialization.
2466 2015-01-13 Jason Merrill <jason@redhat.com>
2470 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2471 pointer expressions.
2472 (cxx_eval_increment_expression): Likewise.
2475 * pt.c (coerce_template_parameter_pack): Return NULL for a
2476 zero-length fixed parameter pack with a pack expansion arg.
2479 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2481 2015-01-12 Jason Merrill <jason@redhat.com>
2484 * constexpr.c (cxx_eval_call_expression): A call to a void
2485 function doesn't need to return a value.
2487 2015-01-09 Michael Collison <michael.collison@linaro.org>
2489 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2490 input.h, alias.h, symtab.h, options.h, fold-const.h,
2491 wide-int.h, and inchash.h due to flattening of tree.h.
2493 * constexpr.c: Ditto.
2494 * cp-array-notation.c: Ditto.
2495 * cp-gimplify.c: Ditto.
2497 * cp-objcp-common.c: Ditto.
2510 * name-lookup.c: Ditto.
2511 * optimize.c: Ditto.
2518 * semantics.c: Ditto.
2523 2015-01-08 Jason Merrill <jason@redhat.com>
2525 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2526 * decl.c (compute_array_index_type): Likewise.
2527 * init.c (build_vec_init): Likewise.
2528 * typeck.c (cp_build_binary_op): Likewise.
2530 2015-01-08 Jason Merrill <jason@redhat.com>
2532 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2533 whether an initializer-list is too big for a VLA.
2534 (throw_bad_array_length): Remove.
2535 * cp-tree.h: Remove prototype.
2537 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2540 * decl.c (grokfndecl): Add bool parameter.
2541 (grokdeclarator): Adjust calls.
2542 (start_decl): Don't set DECL_DELETED_FN here.
2544 2015-01-06 Jason Merrill <jason@redhat.com>
2546 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2550 * pt.c (type_dependent_expression_p): Handle variable templates.
2551 * constexpr.c (potential_constant_expression_1): Use it.
2554 * semantics.c (finish_offsetof): Handle templates here.
2555 * parser.c (cp_parser_builtin_offsetof): Not here.
2558 * semantics.c (process_outer_var_ref): Diagnose lambda in local
2561 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2564 * class.c (check_field_decls): Make copy assignment operators
2565 complex only in c++98 mode.
2567 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2570 * class.c (check_for_override): Warn when a virtual function is an
2571 override not marked override.
2573 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2575 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2577 (get_basefndecls): Adjust.
2579 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2581 Update copyright years.
2583 2015-01-05 Marek Polacek <polacek@redhat.com>
2586 * typeck.c (cp_build_array_ref): Pass loc down to
2587 warn_array_subscript_with_type_char.
2590 Copyright (C) 2015 Free Software Foundation, Inc.
2592 Copying and distribution of this file, with or without modification,
2593 are permitted in any medium without royalty provided the copyright
2594 notice and this notice are preserved.