1 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
4 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
5 reject default template arguments in out of class definitions
6 of members of non-template classes.
8 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
10 * tree.c (cp_tree_equal): Use real_equal instead of
13 2015-10-04 Jason Merrill <jason@redhat.com>
15 Implement N4514, C++ Extensions for Transactional Memory.
16 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
17 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
18 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
19 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
20 (make_call_declarator): Take tx_qualifier.
21 (cp_parser_tx_qualifier_opt): New.
22 (cp_parser_lambda_declarator_opt): Use it.
23 (cp_parser_direct_declarator): Likewise.
24 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
25 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
26 (cp_parser_std_attribute): Map optimize_for_synchronized to
28 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
29 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
30 * call.c (enum conversion_kind): Add ck_tsafe.
31 (standard_conversion): Handle transaction-safety conversion.
32 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
33 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
35 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
36 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
37 (can_convert_tx_safety): New.
38 * typeck.c (composite_pointer_type): Handle transaction-safety.
39 * name-lookup.h (enum scope_kind): Add sk_transaction.
40 * name-lookup.c (begin_scope): Handle it.
41 * semantics.c (begin_compound_stmt): Pass it.
42 * decl.c (check_previous_goto_1): Check it.
43 (struct named_label_entry): Add in_transaction_scope.
44 (poplevel_named_label_1): Set it.
45 (check_goto): Check it.
46 (duplicate_decls): A specialization can be transaction_safe
47 independently of its template.
48 (grokdeclarator): Handle tx-qualifier.
49 * rtti.c (ptr_initializer): Handle transaction-safe.
50 * search.c (check_final_overrider): Check transaction_safe_dynamic.
51 Don't check transaction_safe.
52 * mangle.c (write_function_type): Mangle transaction_safe here.
53 (write_CV_qualifiers_for_type): Not here.
54 (write_type): Preserve transaction_safe when stripping attributes.
55 * error.c (dump_type_suffix): Print transaction_safe.
57 2015-10-02 Marek Polacek <polacek@redhat.com>
60 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
61 down to cp_parser_selection_statement.
62 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
63 warn about duplicated if-else-if conditions.
64 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
65 it down to cp_parser_statement.
67 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
70 * name-lookup.c (push_binding): Make non-static.
71 * name-lookup.h (push_binding): Declare it.
72 * parser.c (cp_parser_range_for): Use it, get the range
73 declaration away from the scope until the range expression
74 has been parsed, then restore the declaration.
76 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
78 Fix small typos in the coding rule enforcement warnings.
79 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
82 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
84 * decl.c (xref_basetypes): Check virtual and/or multiple
86 * parser.c (cp_parser_namespace_definition): Check namespaces
88 * pt.c (push_template_decl_real): Check templates warning.
90 2015-09-22 Jason Merrill <jason@redhat.com>
92 * mangle.c (abi_warn_or_compat_version_crosses): New.
93 Use it instead of abi_version_crosses.
94 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
96 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
98 Complete the implementation of N4230, Nested namespace definition.
99 * parser.c (cp_parser_namespace_definition): Support namespace
100 attributes both before and after the namespace identifier.
102 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
104 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
106 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
108 Implement nested namespace definitions.
109 * parser.c (cp_parser_namespace_definition): Grok nested namespace
112 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
114 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
115 make it more similar to the C version.
117 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
118 Jason Merrill <jason@redhat.com>
120 Implement N4295 fold-expressions.
121 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
122 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
123 * cp-objcp-common.c (cp_common_init_ts): Handle them.
124 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
125 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
126 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
127 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
128 or_comma parameter to or_ttype.
129 (cp_parser_fold_operator, cp_parser_fold_expr_p)
130 (cp_parser_fold_expression): New.
131 (cp_parser_primary_expression): Use them.
132 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
133 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
134 (tsubst_binary_left_fold, expand_right_fold)
135 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
136 (tsubst_copy): Use them.
137 (type_dependent_expression_p): Handle fold-expressions.
138 * semantics.c (finish_unary_fold_expr)
139 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
140 (finish_binary_fold_expr): New.
142 2015-09-17 Richard Biener <rguenther@suse.de>
144 * cp-tree.h (note_decl_for_pch): Remove.
145 * class.c (build_clone): Do not call note_decl_for_pch.
146 * semantics.c (finish_member_declaration): Likewise.
147 (note_decl_for_pch): Remove.
148 * decl2.c (c_parse_final_cleanups): Mangle all globals before
151 2015-09-14 Jason Merrill <jason@redhat.com>
154 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
155 mangling with lower -fabi-version.
157 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
160 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
161 per the spirit of DR 1467).
163 2015-09-11 Mark Wielaard <mjw@redhat.com>
166 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
167 VAR_P TREE_READONLY override.
169 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
172 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
173 and set template_parameter_pack_p also when the type is null.
175 2015-09-09 Mark Wielaard <mjw@redhat.com>
177 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
180 2015-09-10 Jakub Jelinek <jakub@redhat.com>
183 * semantics.c (handle_omp_array_sections_1): Only run
184 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
185 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
186 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
187 is not a VAR_DECL/PARM_DECL.
190 * semantics.c (handle_omp_for_class_iterator): Don't wrap
191 error_mark_node into a NOP_EXPR to void_type_node.
193 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
196 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
198 2015-09-09 Jakub Jelinek <jakub@redhat.com>
201 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
202 before INTEGRAL_TYPE_P test.
204 2015-09-08 Jason Merrill <jason@redhat.com>
207 * pt.c (tsubst_copy_and_build): Handle variables like functions.
209 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
212 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
213 if the first argument isn't a template.
215 2015-09-03 Martin Sebor <msebor@redhat.com>
218 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
220 * expr.c (mark_rvalue_use): Use new argument.
221 * call.c (build_addr_func): Call decay_conversion with new
223 * pt.c (convert_template_argument): Call reject_gcc_builtin.
224 * typeck.c (decay_conversion): Use new argument.
225 (c_decl_implicit): Define.
227 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
230 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
232 (cp_gimplify_expr): Added a call to the function
233 cilk_cp_gimplify_call_params_in_spawned_fn.
235 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
238 * decl.c (smallest_type_quals_location): New.
239 (check_special_function_return_type): Use the latter; add int and
240 const location_t* parameters.
241 (grokdeclarator): Adjust check_special_function_return_type call.
243 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
246 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
247 case. Move label to COND_EXPR case. Remove checking of
250 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
253 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
256 2015-08-21 Jason Merrill <jason@redhat.com>
259 * constraint.cc (satisfy_implicit_conversion_constraint): Also
262 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
264 * decl.c (grokvardecl): Simplify the latter.
266 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
268 * decl.c (grokvardecl): Complete check added for c++/67065.
270 2015-08-20 Jason Merrill <jason@redhat.com>
272 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
274 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
277 * decl.c (grokvardecl): Reject 'main' as global variable.
279 2015-08-19 Jason Merrill <jason@redhat.com>
282 * search.c (protected_accessible_p): Remove redundant access_in_type.
283 Add otype parm instead of walking binfo.
284 (friend_accessible_p): Check SCOPE itself. Handle class
285 templates. Pass through otype.
286 (dfs_accessible_post): Handle all accessibility cases.
287 (dfs_accessible_pre): New.
288 (accessible_p): Use it. Don't check protected access here. Pass
289 decl and otype to dfs_walk.
290 (member_declared_in_type, dfs_access_in_type_pre): New.
291 (access_in_type): Use dfs_access_in_type_pre.
292 * friend.c (add_friend): Fix multiple friends with the same name.
294 * lambda.c (current_nonlambda_scope): New.
296 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
298 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
299 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
300 semantics.c, typeck2.c: Remove useless typedefs.
302 2015-08-18 Jason Merrill <jason@redhat.com>
305 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
308 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
311 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
313 2015-08-17 Jason Merrill <jason@redhat.com>
316 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
319 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
320 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
322 * constexpr.c (cxx_eval_store_expression): Don't set
323 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
325 (cxx_eval_array_reference): Check it.
327 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
329 2015-08-14 Jason Merrill <jason@redhat.com>
332 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
334 2015-08-12 Jason Merrill <jason@redhat.com>
337 * constexpr.c (cxx_eval_array_reference): Fix typo.
340 * constexpr.c (cxx_eval_array_reference): Handle sparse
344 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
345 * error.c (dump_template_bindings): Don't tsubst in that case.
348 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
349 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
351 2015-08-08 Jason Merrill <jason@redhat.com>
354 * pt.c (process_partial_specialization): Call
355 associate_classtype_constraints.
358 * constraint.cc (finish_template_introduction):
359 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
362 * pt.c (equal): Make sure tmpl is actually a template.
365 * call.c (joust): Only call more_constrained on decls.
367 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
368 Braden Obrzut <admin@maniacsvault.net>
369 Jason Merrill <jason@redhat.com>
370 Ville Voutilainen <ville.voutilainen@gmail.com>
372 Add C++ Concepts TS support.
373 * constraint.cc, logic.cc: New files.
374 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
375 (c++.tags): Also process .cc files.
376 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
377 (print_z_candidate): Handle it.
378 (constraint_failure): New.
379 (add_function_candidate): Check constraints.
380 (build_new_function_call): Handle evaluating concepts.
381 (joust): Check more_constrained.
382 * class.c (add_method): Check equivalently_constrained.
383 (build_clone): Copy constraints.
384 (currently_open_class): Return tree.
385 (resolve_address_of_overloaded_function): Check constraints.
386 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
387 (potential_constant_expression_1): Likewise.
388 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
389 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
390 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
391 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
392 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
393 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
394 * cp-tree.h (struct tree_constraint_info, check_nonnull)
395 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
396 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
397 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
398 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
399 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
400 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
401 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
402 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
403 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
404 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
405 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
406 (struct local_specialization_stack, enum auto_deduction_context)
407 (variable_concept_p, concept_template_p)
408 (struct deferring_access_check_sentinel): New.
409 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
410 (union lang_tree_node): Add constraint_info field.
411 (struct lang_decl_base): Add concept_p flag.
412 (enum cp_decl_spec): Add ds_concept.
413 (struct cp_declarator): Add requires_clause.
414 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
415 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
416 TRAIT_EXPR, *_CONSTR.
417 (pp_cxx_parameter_declaration_clause): Accept a chain of
419 (cxx_pretty_printer::declarator): Print requires-clause.
420 (pp_cxx_template_declaration): Likewise.
421 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
422 (pp_cxx_requires_clause, pp_cxx_requirement)
423 (pp_cxx_requirement_list, pp_cxx_requirement_body)
424 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
425 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
426 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
427 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
428 (pp_cxx_implicit_conversion_constraint)
429 (pp_cxx_argument_deduction_constraint)
430 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
431 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
432 * cxx-pretty-print.h: Declare them.
433 * decl.c (decls_match): Compare constraints.
434 (duplicate_decls): Likewise. Remove constraints before freeing.
435 (cxx_init_decl_processing): Call init_constraint_processing.
436 (cp_finish_decl): Diagnose concept without initializer.
437 (grokfndecl, grokvardecl): Handle concepts and constraints.
438 (grokdeclarator): Handle concept, requires-clause.
439 (grokparms): No longer static.
440 (xref_tag_1): Check constraints.
441 (finish_function): Call check_function_concept.
442 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
443 (check_concept_refinement, is_concept_var, check_concept_fn): New.
444 * decl2.c (check_classfn): Compare constraints.
445 (mark_used): Don't instantiate concepts.
446 * error.c (dump_template_decl): Print constraints.
447 (dump_function_decl): Likewise.
448 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
449 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
450 * method.c (implicitly_declare_fn): Copy constraints from
452 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
453 prevent_constrained_type_specifiers fields.
454 * parser.c (make_call_declarator): Add requires_clause parm.
455 (cp_parser_new): Clear prevent_constrained_type_specifiers.
456 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
457 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
458 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
459 (cp_parser_declaration): Handle concept introduction.
460 (cp_parser_member_declaration): Likewise.
461 (cp_parser_template_parameter): Handle constrained parameter.
462 (cp_parser_type_parameter): Handle constraints.
463 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
464 (cp_parser_template_id): Handle partial concept id.
465 (cp_parser_type_name): Add overload that takes typename_keyword_p.
466 Handle constrained parameter.
467 (cp_parser_nonclass_name): Handle concept names.
468 (cp_parser_alias_declaration): Handle constraints.
469 (cp_parser_late_return_type_opt): Also handle requires-clause.
470 (cp_parser_type_id_1): Handle deduction constraint.
471 (cp_parser_parameter_declaration): Handle constrained parameters.
472 (cp_parser_class_specifier_1): Handle constraints.
473 (cp_parser_template_declaration_after_parameters): Split out from
474 cp_parser_template_declaration_after_export.
475 (cp_parser_single_declaration): Handle constraints.
476 (synthesize_implicit_template_parm): Handle constraints.
477 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
478 (cp_parser_introduction_list, get_id_declarator)
479 (get_unqualified_id, is_constrained_parameter)
480 (cp_parser_check_constrained_type_parm)
481 (cp_parser_constrained_type_template_parm)
482 (cp_parser_constrained_template_template_parm)
483 (constrained_non_type_template_parm, finish_constrained_parameter)
484 (declares_constrained_type_template_parameter)
485 (declares_constrained_template_template_parameter)
486 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
487 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
488 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
489 (cp_parser_requires_expression)
490 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
491 (cp_parser_requirement_list, cp_parser_requirement)
492 (cp_parser_simple_requirement, cp_parser_type_requirement)
493 (cp_parser_compound_requirement, cp_parser_nested_requirement)
494 (cp_parser_template_introduction)
495 (cp_parser_explicit_template_declaration)
496 (get_concept_from_constraint): New.
497 * pt.c (local_specialization_stack): Implement.
498 (maybe_new_partial_specialization): New.
499 (maybe_process_partial_specialization): Use it.
500 (retrieve_local_specialization, register_local_specialization)
501 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
502 (tsubst_expr): No longer static.
503 (spec_hasher::equal): Compare constraints.
504 (determine_specialization): Handle constraints.
505 (check_explicit_specialization): Handle concepts.
506 (process_template_parm): Handle constraints.
507 (end_template_parm_list): Add overload taking no arguments.
508 (process_partial_specialization): Handle concepts and constraints.
509 Register partial specializations of variable templates.
510 (redeclare_class_template): Handle constraints.
511 (convert_template_argument): Handle WILDCARD_DECL. Check
512 is_compatible_template_arg.
513 (coerce_template_parameter_pack): Handle wildcard packs.
514 (coerce_template_parms): DR 1430 also applies to concepts. Add
515 overloads taking fewer parameters.
516 (lookup_template_class_1): Handle constraints.
517 (lookup_template_variable): Concepts are always bool.
518 (finish_template_variable): Handle concepts and constraints.
519 (tsubst_friend_class): Handle constraints.
520 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
521 (tsubst_pack_expansion): Handle local parameters.
522 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
523 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
524 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
525 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
526 (more_specialized_inst): Split out from most_specialized_instantiation.
527 (most_specialized_partial_spec): Check constraints.
528 (instantiate_decl): Never instantiate a concept.
529 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
531 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
532 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
533 (do_auto_deduction): Add overload taking tsubst flags and context enum.
535 (get_template_for_ordering, most_constrained_function)
536 (is_compatible_template_arg, convert_wildcard_argument)
537 (struct constr_entry, struct constr_hasher, decl_constraints)
538 (valid_constraints_p, get_constraints, set_constraints)
539 (remove_constraints, init_constraint_processing): New.
540 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
541 * search.c (lookup_member): Do lookup in the open partial
543 * semantics.c (finish_template_template_parm): Handle constraints.
544 (fixup_template_type): New.
545 (finish_template_type): Call it.
546 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
547 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
548 (cp_walk_subtrees): Handle REQUIRES_EXPR.
549 * typeck.c (cp_build_function_call_vec): Check constraints.
551 2015-08-06 Jason Merrill <jason@redhat.com>
554 * parser.c (cp_parser_primary_expression): Don't skip to the end
555 of the statement if we're parsing tentatively.
560 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
562 * pt.c (tsubst_copy_and_build): Check for argument substitution
565 2015-08-05 Jason Merrill <jason@redhat.com>
567 * pt.c (determine_specialization): Print candidates after 'no
570 * decl.c (cp_finish_decl): Tidy.
571 * typeck.c (finish_class_member_access_expr): Use
572 type_dependent_expression_p.
573 * semantics.c (finish_id_expression): Use
574 type_dependent_expression_p. Don't build_qualified_name for a
575 decl in non-dependent scope.
576 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
577 identifier is dependent. Remove variable_template_p check.
583 * pt.c (lookup_template_variable): Use NULL_TREE for type.
584 (instantiate_template_1): Also set DECL_TI_ARGS based on
585 the immediate parent.
586 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
587 (finish_template_variable): Add complain parm.
592 * semantics.c (finish_id_expression): Call convert_from_reference
593 for variable template.
595 2015-08-04 Jason Merrill <jason@redhat.com>
597 * pt.c (lookup_template_class_1): Clear elt.spec.
599 * tree.c (build_target_expr): Copy the location from value.
601 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
603 * parser.c (cp_parser_selection_statement): Move handling of
604 semicolon body to ...
605 (cp_parser_implicitly_scoped_statement): .. here. Call
606 warn_for_misleading_indentation even when the body is a
607 semicolon. Extract token_indent_infos corresponding to the
608 guard, body and next tokens. Adjust call to
609 warn_for_misleading_indentation accordingly. Take
610 token_indent_info argument.
611 (cp_parser_already_scoped_statement): Likewise.
612 (cp_parser_selection_statement, cp_parser_iteration_statement):
613 Extract a token_indent_info corresponding to the guard token.
615 2015-08-01 Caroline Tice <cmtice@google.com>
618 * mangle.c : Add vtable-verify.h to include files.
619 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
620 is "<anon>" get the real mangled name for the class instead, and
621 also store the real mangled name in a vector for use later.
623 2015-07-31 Marek Polacek <polacek@redhat.com>
626 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
629 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
631 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
632 in warning_at instead of "%q+D" in warning.
633 (warn_hidden): Likewise but use location_of.
634 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
635 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
636 (check_field_decls): Likewise for permerror.
637 (explain_non_literal_class): Likewise for inform.
638 (check_bases_and_members, layout_class_type): Likewise for warning_at.
639 (note_name_declared_in_class): Use location_of in permerror.
640 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
641 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
642 inform, and warning_at.
643 (check_for_out_of_scope_variable): Likewise for warning_at and
646 2015-07-30 Jason Merrill <jason@redhat.com>
650 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
652 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
654 * call.c (build_op_delete_call, convert_like_real, build_over_call):
655 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
657 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
658 * decl.c (duplicate_decls): Likewise for warning/warning_at.
659 * except.c (maybe_noexcept_warning): Likewise.
660 * friend.c (make_friend_class): Likewise for inform.
661 * mangle.c (mangle_decl): Likewise for warning/warning_at.
662 * method.c (process_subob_fn, walk_field_subobs,
663 maybe_explain_implicit_delete): Likewise for inform.
664 * parser.c (cp_parser_lambda_introducer): Likewise.
665 * pt.c (check_specialization_namespace,
666 maybe_process_partial_specialization): Likewise for permerror.
667 (redeclare_class_template): Likewise for inform_n.
668 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
669 * search.c (check_final_overrider): Likewise.
670 * semantics.c (process_outer_var_ref): Likewise.
672 2015-07-27 Jason Merrill <jason@redhat.com>
674 * constexpr.c (cxx_eval_call_expression): Don't add this call to
675 the hash table if !depth_ok.
677 2015-07-27 Marek Polacek <polacek@redhat.com>
681 * call.c (build_new_op_1): Call warn_tautological_cmp.
682 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
685 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
688 * typeck.c (check_return_expr): Also do the basic return-value
689 validity checking if processing_template_decl and yet types are
690 not dependent. Remove obsolete code.
692 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
694 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
695 in warning_at instead of "%q+D" in warning.
696 (warn_extern_redeclared_static): Likewise for inform.
697 (check_redeclaration_no_default_args): Likewise for permerror.
698 (duplicate_decls): Likewise.
699 (check_previous_goto_1): Likewise for inform.
700 (check_goto, start_decl, check_for_uninitialized_const_var,
701 start_preparsed_function, finish_function§): Likewise.
702 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
703 * init.c (sort_mem_initializers): Likewise.
704 * typeck.c (convert_for_initialization): Likewise for inform.
705 (maybe_warn_about_returning_address_of_local): Likewise.
706 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
707 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
709 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
712 * cvt.c (ocp_convert): Don't call scalar_constant_value when
713 converting to a class type.
715 2015-07-24 Jason Merrill <jason@redhat.com>
718 * pt.c (splice_late_return_type): Correct deduced return type for
719 abbreviated function template.
721 2015-07-24 Richard Biener <rguenther@suse.de>
723 * init.c (build_vec_init): Build iterator bound in the same
724 type as the iterator.
726 2015-07-23 Marek Polacek <polacek@redhat.com>
729 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
731 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
734 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
735 redundant error messages.
737 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
739 * decl.c (grokdeclarator): For an erroneous template parameter
740 propagate error_mark_node as type.
742 2015-07-20 Marek Polacek <polacek@redhat.com>
745 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
747 2015-07-15 Jason Merrill <jason@redhat.com>
750 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
751 template if there is no type x in scope.
753 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
756 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
757 template template parm in the redeclaration.
758 (lookup_template_class_1): Peel off irrelevant template levels
759 from current_template_parms before augmenting the argument
762 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
765 * parser.c (cp_parser_sizeof_pack): Also consider template template
768 2015-07-14 Jason Merrill <jason@redhat.com>
770 * call.c (build_new_method_call_1): Call reshape_init.
772 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
774 * pt.c (check_template_shadow): Emit error + inform instead of
777 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
780 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
781 template parm type under C++11 and later.
783 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
785 * call.c: Fix double word typos.
786 * cp-array-notation.c: Same.
789 * name-lookup.c: Same.
792 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
795 * pt.c (begin_template_parm_list): Add a dummy parameter level
796 to current_template_parms.
797 (end_template_parm_list): Remove the dummy parameter level
798 before adding the real one.
799 (tsubst): Don't attempt to substitute for template parameters
800 corresponding to a dummy argument level.
801 (template_parms_to_args): Remove obsolete hack for
802 giving template template arguments the proper level.
803 (splite_late_return_type): Remove obsolete hack for giving
804 template template arguments the proper level.
805 * error.c (dump_template_decl): Don't print dummy template
808 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
811 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
812 the second step of copy-initialization.
814 2015-07-10 Jason Merrill <jason@redhat.com>
816 * pt.c (find_parameter_packs_r): Handle variable templates.
817 (variable_template_specialization_p): New.
818 * cp-tree.h: Declare it.
820 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
822 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
824 * decl2.c (cpp_check): Revert latest change.
826 2015-07-09 Jason Merrill <jason@redhat.com>
828 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
829 value_dependent_expression_p.
831 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
832 template_parameter_pack_p.
833 * parser.c (declarator_can_be_parameter_pack): False if
834 parameter_pack_p is set.
835 (make_parameter_declarator): Add template_parameter_pack_p parm.
836 (cp_parser_template_parameter): Remove parameter pack parsing.
837 (cp_parser_parameter_declaration): Handle all parameter packs.
838 Tweak default argument permerror.
840 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
842 * parser.c (cp_parser_default_type_template_argument)
843 (cp_parser_default_template_template_argument): Factor out from
844 cp_parser_type_parameter.
846 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
848 * typeck.c (warn_args_num): Rename to error_args_num.
849 (convert_arguments): Adjust calls.
851 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
853 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
855 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
857 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
859 2015-07-08 Jakub Jelinek <jakub@redhat.com>
861 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
862 * pt.c (apply_late_template_attributes): Likewise.
864 2015-07-08 Marek Polacek <polacek@redhat.com>
867 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
868 accessing TYPE_LANG_SPECIFIC node.
870 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
872 * call.c: Adjust includes.
874 * constexpr.c: Likewise.
875 * cp-array-notation.c: Likewise.
876 * cp-gimplify.c: Likewise.
877 * cp-lang.c: Likewise.
878 * cp-objcp-common.c: Likewise.
879 * cp-ubsan.c: Likewise.
885 * except.c: Likewise.
887 * friend.c: Likewise.
889 * lambda.c: Likewise.
891 * mangle.c: Likewise.
892 * method.c: Likewise.
893 * name-lookup.c: Likewise.
894 * optimize.c: Likewise.
895 * parser.c: Likewise.
900 * search.c: Likewise.
901 * semantics.c: Likewise.
903 * typeck.c: Likewise.
904 * typeck2.c: Likewise.
906 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
908 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
910 2015-07-06 Jason Merrill <jason@redhat.com>
912 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
913 for a template template parameter.
914 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
915 by reduce_template_parm_level.
917 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
920 2015-07-02 Jason Merrill <jason@redhat.com>
923 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
924 TYPE_VALUES_RAW rather than TYPE_FIELDS.
926 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
928 * pt.c (type_dependent_expression_p): Handle expressions
929 that refer to variable templates.
931 2015-07-01 Jason Merrill <jason@redhat.com>
933 * lex.c (init_reswords): s/CXX0X/CXX11/.
934 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
936 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
937 Attribute mangling is now -fabi-version=10.
940 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
941 * class.c (layout_nonempty_base_or_field): Warn if that affects
942 the offset of a field.
944 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
947 * parser.c (cp_parser_check_std_attribute): New.
948 (cp_parser_std_attribute_list): Call it.
950 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
953 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
954 return 0 if tsubst returns a dependent type.
956 2015-06-30 Jason Merrill <jason@redhat.com>
959 * decl2.c (is_late_template_attribute): True for tls_model.
962 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
963 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
964 (SET_DECL_GNU_TLS_P): New.
965 * call.c (make_temporary_var_for_ref_to_temp): Use
966 CP_DECL_THREAD_LOCAL_P.
967 (set_up_extended_ref_temp): Likewise.
968 * decl.c (duplicate_decls, expand_static_init): Likewise.
969 (redeclaration_error_message, grokvardecl): Likewise.
970 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
971 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
972 (handle_tls_init): Likewise.
973 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
974 * semantics.c (finish_id_expression): Likewise.
975 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
976 (finish_omp_threadprivate): Likewise.
977 * tree.c (decl_storage_duration): Likewise.
978 * cp-gimplify.c (omp_var_to_track): Likewise.
979 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
980 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
983 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
985 Implement N4197 - Adding u8 character literals
986 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
987 and CPP_UTF8CHAR_USERDEF tokens;
988 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
990 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
993 * decl.c (grokfndecl): Allow constexpr declarations of friend
994 template specializations.
996 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
999 * decl.c (finish_function): Call do_warn_unused_parameter.
1001 2015-06-29 Marek Polacek <polacek@redhat.com>
1004 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1005 (push_switch): Set OUTSIDE_RANGE_P.
1006 (pop_switch): Update c_do_switch_warnings call.
1007 (finish_case_label): Update c_add_case_label call.
1008 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1011 2015-06-27 Marek Polacek <polacek@redhat.com>
1013 * call.c: Use VECTOR_TYPE_P.
1014 * constexpr.c: Likewise.
1017 * decl2.c: Likewise.
1019 * semantics.c: Likewise.
1021 * typeck.c: Likewise.
1022 * typeck2.c: Likewise.
1024 2015-06-27 Marek Polacek <polacek@redhat.com>
1026 * call.c (set_up_extended_ref_temp): Use VAR_P.
1027 * class.c: Use VAR_P throughout.
1028 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1029 * cp-array-notation.c (make_triplet_val_inv): Likewise.
1030 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1032 * decl2.c: Likewise.
1033 * error.c (dump_decl): Use VAR_P.
1034 * mangle.c (decl_implicit_alias_p): Likewise.
1035 * parser.c: Use VAR_P throughout.
1037 * semantics.c: Likewise.
1038 * vtable-class-hierarchy.c: Likewise.
1039 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1041 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
1043 * pt.c (check_unstripped_args): Mark parameter as unused.
1045 2015-06-26 Jason Merrill <jason@redhat.com>
1048 * class.c (finish_struct): Call fixup_attribute_variants.
1051 * typeck2.c (merge_exception_specifiers): Allow different
1052 noexcept-specifiers if we've had errors.
1055 * pt.c (check_unstripped_args): Split out from...
1056 (retrieve_specialization): ...here. Allow typedefs in the type of
1057 a non-type argument.
1060 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
1062 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
1065 * typeck2.c (digest_init_r): Only expect reshaping if the class is
1068 2015-06-26 Marek Polacek <polacek@redhat.com>
1070 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
1071 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
1073 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1075 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
1076 * class.c: Likewise.
1077 * cp-ubsan.c: Likewise.
1079 * decl2.c: Likewise.
1080 * lambda.c: Likewise.
1081 * mangle.c: Likewise.
1082 * method.c: Likewise.
1083 * optimize.c: Likewise.
1084 * parser.c: Likewise.
1085 * semantics.c: Likewise.
1087 * vtable-class-hierarchy.c: Likewise.
1089 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1091 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
1092 rather than ggc_hasher.
1093 (constexpr_call_hasher): Likewise.
1094 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
1095 * decl.c (typename_hasher): Likewise.
1096 * mangle.c (conv_type_hasher): Likewise.
1097 * pt.c (spec_hasher): Likewise.
1098 * tree.c (cplus_array_hasher, list_hasher): Likewise.
1099 * typeck2.c (abstract_type_hasher): Likewise.
1101 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1103 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1104 rather than pointer_hash.
1105 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1106 * semantics.c (nrv_data): Likewise.
1107 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1109 2015-06-24 Jason Merrill <jason@redhat.com>
1112 * pt.c (dependent_type_p_r): Check for dependent alias template
1113 specialization sooner.
1116 * class.c (type_has_nontrivial_assignment): Remove.
1117 * cp-tree.h: Remove declaration.
1118 * init.c (vec_copy_assign_is_trivial): New.
1119 (build_vec_init): Use it.
1121 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
1123 Implement N3928 - Extending static_assert
1124 * parser.c (cp_parser_static_assert): Support static_assert with
1125 no message string. Supply an empty string in this case.
1126 * semantics.c (finish_static_assert): Don't try to print a message if
1127 the message strnig is empty.
1129 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
1132 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1133 implicit template parm if 'auto' is a placeholder for trailing
1136 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
1139 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1142 * parser.c (cp_parser_template_parameter_list): Update
1143 current_template_parms right after processing a paramater.
1144 * pt.c (template_parms_to_args): Remove obsolete hack for
1145 giving template template arguments the proper level.
1146 (check_default_tmpl_args): Account for tested template
1148 (splite_late_return_type): Remove obsolete hack for giving
1149 template template arguments the proper level.
1151 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1154 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
1156 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
1159 * parser.c (cp_parser_template_parameter_list): Update
1160 current_template_parms right after processing a paramater.
1161 * pt.c (template_parms_to_args): Remove obsolete hack for
1162 giving template template arguments the proper level.
1163 (check_default_tmpl_args): Account for tested template
1165 (splite_late_return_type): Remove obsolete hack for giving
1166 template template arguments the proper level.
1168 2015-06-23 Jason Merrill <jason@redhat.com>
1171 * decl.c (grokfndecl): Check the linkage of ctype, not just
1173 * tree.c (no_linkage_check): Skip the 'this' pointer.
1176 * class.c (type_has_nontrivial_assignment): New.
1177 * init.c (build_vec_init): Use it.
1178 * cp-tree.h: Declare it.
1179 * method.c (trivial_fn_p): Templates aren't trivial.
1182 * decl.c (expand_static_init): Make sure the destructor is callable
1183 here even if we have an initializer.
1185 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
1187 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
1188 -fdump-ada-spec is passed.
1190 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
1192 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
1194 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1196 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
1198 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
1200 * decl.c (grokdeclarator): Remove pointless code.
1202 2015-06-22 Jason Merrill <jason@redhat.com>
1205 * call.c (implicit_conversion): Only reshape for classes.
1207 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
1209 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
1211 * semantics.c (finish_omp_atomic): Likewise.
1212 * typeck.c (cp_build_array_ref): Likewise.
1214 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
1217 * call.c (build_new_op_1): Check tf_warning flag in all cases.
1219 2015-06-19 Jason Merrill <jason@redhat.com>
1222 * pt.c (instantiate_class_template_1): Clear
1223 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
1226 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1228 * typeck.c (merge_types): build_ptrmemfunc_type before applying
1229 quals and attributes.
1232 * constexpr.c (build_constexpr_constructor_member_initializers):
1233 Handle an empty STATEMENT_LIST.
1236 * pt.c (tsubst_copy_and_build): Register a capture proxy in
1237 local_specializations.
1239 2015-06-17 Jason Merrill <jason@redhat.com>
1242 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1244 (potential_constant_expression_1): Likewise.
1246 2015-06-17 Jason Merrill <jason@redhat.com>
1249 * call.c (implicit_conversion): Call reshape_init here, early.
1250 (build_aggr_conv): Not here.
1252 2015-06-17 Jakub Jelinek <jakub@redhat.com>
1255 * pt.c (tsubst_omp_clause_decl): New function.
1256 (tsubst_omp_clauses): Use it or tsubst_copy instead of
1257 tsubst_expr on OMP_CLAUSE_DECL.
1259 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1261 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1262 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1263 * decl.c (grokdeclarator, xref_tag_1): Likewise.
1264 * error.c (dump_aggr_type): likewise.
1265 * pt.c (push_template_decl_real): Likewise.
1266 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1268 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1270 * call.c: Do not include input.h, line-map.h or is-a.h.
1271 * class.c: Likewise.
1272 * constexpr.c: Likewise.
1273 * cp-array-notation.c: Likewise.
1274 * cp-gimplify.c: Likewise.
1275 * cp-lang.c: Likewise.
1276 * cp-objcp-common.c: Likewise.
1277 * cp-tree.h: Likewise.
1278 * cp-ubsan.c: Likewise.
1281 * decl2.c: Likewise.
1283 * error.c: Likewise.
1284 * except.c: Likewise.
1286 * friend.c: Likewise.
1288 * lambda.c: Likewise.
1290 * mangle.c: Likewise.
1291 * method.c: Likewise.
1292 * name-lookup.c: Likewise.
1293 * optimize.c: Likewise.
1294 * parser.c: Likewise.
1296 * ptree.c: Likewise.
1299 * search.c: Likewise.
1300 * semantics.c: Likewise.
1302 * typeck.c: Likewise.
1303 * typeck2.c: Likewise.
1304 * vtable-class-hierarchy.c: Likewise.
1306 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
1309 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1311 2015-06-16 Jason Merrill <jason@redhat.com>
1314 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1318 * tree.c (bot_manip): Remap SAVE_EXPR.
1321 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1323 2015-06-15 Nathan Sidwell <nathan@acm.org>
1326 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1327 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1328 protect it from recursive instantiation.
1330 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
1333 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1334 using a local type is pure virtual.
1336 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1338 * call.c: Remove comment documenting the long-deleted
1339 function build_method_call.
1341 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
1344 * typeck.c (cp_build_binary_op): Warn when comparing an address
1345 of a reference against NULL.
1347 2015-06-12 Jason Merrill <jason@redhat.com>
1350 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1351 variables as DECL_NOT_REALLY_EXTERN.
1353 2015-06-11 Jason Merrill <jason@redhat.com>
1356 * constexpr.c (potential_constant_expression_1): Handle a
1357 DECL_EXPR of TYPE_DECL.
1360 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1363 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1365 * decl.c (cxx_init_decl_processing): Register the main
1366 translation unit through the new debug hook.
1368 2015-06-10 Jason Merrill <jason@redhat.com>
1371 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1372 * pt.c (push_template_decl_real): Set it.
1373 (dependent_alias_template_spec_p): Use it.
1374 (dependent_type_p_r): Use dependent_alias_template_spec_p.
1375 (uses_all_template_parms_data, uses_all_template_parms_r)
1376 (complex_alias_template_p): New.
1377 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1379 2015-06-09 Jason Merrill <jason@redhat.com>
1383 * typeck2.c (digest_init_r): Replace previous change with
1387 * semantics.c (process_outer_var_ref): Make sure the value is
1388 actually constant before returning it.
1389 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1392 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1395 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1396 * init.c (expand_default_init): Likewise.
1398 2015-06-09 Jason Merrill <jason@redhat.com>
1401 * tree.c (replace_placeholders_r): Handle placeholders for an
1403 * typeck2.c (store_init_value): Only replace_placeholders for
1404 objects of class type.
1406 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1408 * call.c : Adjust include files.
1409 * class.c : Likewise.
1410 * constexpr.c : Likewise.
1411 * cp-array-notation.c : Likewise.
1412 * cp-cilkplus.c : Likewise.
1413 * cp-gimplify.c : Likewise.
1414 * cp-lang.c : Likewise.
1415 * cp-objcp-common.c : Likewise.
1416 * cp-tree.h : Likewise.
1417 * cp-ubsan.c : Likewise.
1419 * decl.c : Likewise.
1420 * decl2.c : Likewise.
1421 * dump.c : Likewise.
1422 * error.c : Likewise.
1423 * except.c : Likewise.
1424 * expr.c : Likewise.
1425 * friend.c : Likewise.
1426 * init.c : Likewise.
1427 * lambda.c : Likewise.
1429 * mangle.c : Likewise.
1430 * method.c : Likewise.
1431 * name-lookup.c : Likewise.
1432 * optimize.c : Likewise.
1433 * parser.c : Likewise.
1435 * ptree.c : Likewise.
1436 * repo.c : Likewise.
1437 * rtti.c : Likewise.
1438 * search.c : Likewise.
1439 * semantics.c : Likewise.
1440 * tree.c : Likewise.
1441 * typeck.c : Likewise.
1442 * typeck2.c : Likewise.
1443 * vtable-class-hierarchy.c : Likewise.
1445 2015-06-05 Jason Merrill <jason@redhat.com>
1448 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1449 the expansion has extra args.
1450 (use_pack_expansion_extra_args_p): Return true in that case.
1453 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1454 dependent even if it has a type.
1456 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1458 * cp-objcp-common.c: Adjust comment for
1459 cxx_warn_unused_global_decl.
1460 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1461 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1462 * cp-tree.h (note_mangling_alias): Protoize.
1463 (cp_write_global_declarations): Remove.
1464 (cxx_post_compilation_parsing_cleanups): Protoize.
1465 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1467 * decl2.c (mangling_aliases): New global.
1468 (build_java_method_aliases): New. Adapted from
1469 collect_candidates_for_java_method_aliases.
1470 (collect_candidates_for_java_method_aliases): Remove.
1471 (build_java_method_aliases): Remove.
1472 (generate_mangling_aliases): New.
1473 (note_mangling_alias): New. Moved from mangle_decl.
1474 (locus_at_end_of_parsing): New global.
1475 (c_parse_final_cleanups): Rename from
1476 cp_write_global_declarations.
1477 Use locus_at_end_of_parsing.
1478 Call generate_mangling_aliases.
1479 Rename call to collect_candidates_for_java_method_aliases into
1480 build_java_method_aliases.
1481 Remove call to finalize_compilation_unit.
1482 Move vtable handling into cxx_post_compilation_parsing_cleanups.
1483 Do not call check_global_declarations or
1484 emit_debug_global_declarations.
1485 (cxx_post_compilation_parsing_cleanups): New.
1486 * mangle.c (mangle_decl): Move code to note_mangling_alias.
1487 * name-lookup.c (do_namespace_alias): Call early_global_decl.
1489 2015-06-05 Nathan Sidwell <nathan@acm.org>
1492 * parser.c (cp_parser_cache_defarg): Continue looking for
1493 declarators when scanning a potential template argument list of an
1496 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1498 * call.c: Adjust includes for restructured coretypes.h.
1499 * class.c: Likewise.
1500 * constexpr.c: Likewise.
1501 * cp-array-notation.c: Likewise.
1502 * cp-gimplify.c: Likewise.
1503 * cp-lang.c: Likewise.
1504 * cp-objcp-common.c: Likewise.
1505 * cp-tree.h: Likewise.
1506 * cp-ubsan.c: Likewise.
1509 * decl2.c: Likewise.
1511 * error.c: Likewise.
1512 * except.c: Likewise.
1514 * friend.c: Likewise.
1516 * lambda.c: Likewise.
1518 * mangle.c: Likewise.
1519 * method.c: Likewise.
1520 * name-lookup.c: Likewise.
1521 * optimize.c: Likewise.
1522 * parser.c: Likewise.
1524 * ptree.c: Likewise.
1527 * search.c: Likewise.
1528 * semantics.c: Likewise.
1530 * typeck.c: Likewise.
1531 * typeck2.c: Likewise.
1532 * vtable-class-hierarchy.c: Likewise.
1534 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1538 * cp-tree.h (get_guard_cond): Adjust declaration
1539 * decl.c (expand_static_init): Use atomic load acquire
1540 and adjust call to get_guard_cond.
1541 * decl2.c (build_atomic_load_byte): New function.
1542 (get_guard_cond): Handle thread_safety.
1543 (one_static_initialization_or_destruction): Adjust call to
1546 2015-06-03 Jason Merrill <jason@redhat.com>
1549 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1550 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1551 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1552 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1554 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
1555 Paolo Carlini <paolo.carlini@oracle.com>
1558 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1559 use it in the diagnostic.
1560 (decay_conversion): Adjust call.
1561 * semantics.c (finish_decltype_type): Likewise.
1562 * call.c (resolve_args, build_new_op_1,
1563 perform_implicit_conversion_flags): Adjust calls.
1564 * cvt.c (ocp_convert, convert_to_void): Likewise.
1565 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1567 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1569 * decl.c (check_tag_decl): Use declspecs->locations as locations in
1570 error_at and warning_at calls.
1572 2015-06-03 Marek Polacek <polacek@redhat.com>
1575 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1576 (cp_genericize_r): Don't instrument static initializers.
1577 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1579 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1581 * decl.c (start_function): Call plugin before parsing.
1582 (finish_function): Call plugin after parsing.
1584 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
1586 * cp-tree.h (init_error): Remove declaration.
1587 * error.c (scratch_pretty_printer): Rename to ...
1588 (actual_pretty_printer): ... this.
1589 (cxx_pp): Constify and update accordingly.
1590 (init_error): Remove definition.
1591 * lex.c (cxx_init): Do not call init_error.
1593 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1596 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1598 2015-06-01 Jason Merrill <jason@redhat.com>
1601 * decl2.c (mark_used): Don't always instantiate constexpr fns.
1602 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1605 * mangle.c (attr_strcmp): New.
1606 (write_CV_qualifiers_for_type): Also write out attributes that
1607 affect type identity.
1608 (write_type): Strip all attributes after writing qualifiers.
1610 2015-05-31 Jason Merrill <jason@redhat.com>
1612 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1615 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1616 with the wrong type as non-constant.
1618 2015-05-27 Jason Merrill <jason@redhat.com>
1620 * decl.c (check_redeclaration_exception_specification): Depend on
1621 -Wsystem-headers rather than -pedantic.
1623 * decl.c (warn_extern_redeclared_static): Use the location of
1624 newdecl in diagnostics, not input_location.
1625 (validate_constexpr_redeclaration): Likewise.
1626 (check_redeclaration_no_default_args): Likewise.
1627 (duplicate_decls): Likewise.
1628 (check_redeclaration_exception_specification): Likewise.
1629 Change second diagnostic to inform.
1631 2015-05-24 Nathan Sidwell <nathan@acm.org>
1634 * decl.c (build_enumerator): Don't silently convert scoped enums.
1636 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
1639 * mangle.c (mangle_decl): Mangle anonymous namespace types as
1642 2015-05-23 Nathan Sidwell <nathan@acm.org>
1645 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1647 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1649 * Make-lang.in (check_g++_parallelize): Update comment.
1651 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1654 * decl.c (grokdeclarator): Use the correct location in error
1655 messages about 'explicit'.
1657 2015-05-22 Marek Polacek <polacek@redhat.com>
1658 Edward Smith-Rowland <3dw4rd@verizon.net>
1661 * cp-tree.h (build_enumerator): Update declaration.
1662 * decl.c (build_enumerator): Add attributes parameter. Call
1663 cplus_decl_attributes.
1664 * init.c (constant_value_1): Pass tf_none to mark_used.
1665 * parser.c (cp_parser_enumerator_definition): Parse attributes and
1666 pass them down to build_enumerator.
1667 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1668 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1670 2015-05-21 Nathan Sidwell <nathan@acm.org>
1673 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1675 2015-05-21 Marek Polacek <polacek@redhat.com>
1677 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1679 2015-05-20 Jason Merrill <jason@redhat.com>
1681 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1682 before register_specialization.
1684 * decl.c (grok_op_properties): Don't complain about size_t
1685 placement delete here.
1686 * call.c (second_parm_is_size_t): Split out from...
1687 (non_placement_deallocation_fn_p): ...here.
1688 (build_op_delete_call): Warn about size_t placement delete with
1691 2015-05-19 Nathan Sidwell <nathan@acm.org>
1694 * typeck.c (finish_class_member_access_expr): Diagnose failed
1695 lookup of enum class member.
1697 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1700 * parser.c (cp_parser_omp_for_loop): Don't add
1701 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1702 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1703 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1706 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1708 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1711 2015-05-18 Jason Merrill <jason@redhat.com>
1713 * pt.c (retrieve_specialization): Make sure our arguments have
1714 gone through strip_typedefs.
1716 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1717 (determine_specialization): Call coerce_template_parms.
1720 * pt.c (type_unification_real): Check convertibility here.
1721 (unify_one_argument): Not here.
1723 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1724 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1725 [TREE_LIST]: Fix no-change case.
1727 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1729 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1732 * error.c (cp_diagnostic_starter): Use diagnostic_location
1734 (cp_print_error_function): Likewise.
1735 (cp_printer): Replace locus pointer with accessor function.
1737 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1739 * parser.c (cp_parser_selection_statement): Add location and
1740 guard_kind arguments to calls to
1741 cp_parser_implicitly_scoped_statement.
1742 (cp_parser_iteration_statement): Likewise for calls to
1743 cp_parser_already_scoped_statement.
1744 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1745 "guard_kind" params; use them to warn for misleading
1747 (cp_parser_already_scoped_statement): Likewise.
1749 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
1751 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1752 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1753 * semantics.c (finish_member_declaration): Likewise.
1754 * method.c (lazily_declare_fn): Allways add method to main variant list.
1756 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
1759 * decl2.c (note_mangling_alias): Declare arguments as unused.
1761 2015-05-08 Jason Merrill <jason@redhat.com>
1763 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1766 2015-05-08 Jason Merrill <jason@redhat.com>
1768 * decl2.c (mangling_aliases): New variable.
1769 (note_mangling_alias, generate_mangling_aliases): New.
1770 (cp_write_global_declarations): Call generate_mangling_aliases.
1771 (generate_mangling_alias): Split out from...
1772 * mangle.c (mangle_decl): ...here.
1773 * cp-tree.h: Declare note_mangling_alias.
1775 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
1777 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1778 (build_java_method_aliases): Adapt to use create_same_body_alias
1779 instead of assemble_alias. Move variable declarations to
1780 definition and tidy up.
1781 (cp_write_global_declarations): Call build_java_method_aliases
1782 instead of collecting candidates first.
1784 2015-05-07 Jason Merrill <jason@redhat.com>
1787 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1788 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1789 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1790 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1791 (apply_late_template_attributes): Handle attribute pack expansion.
1793 2015-05-07 Marek Polacek <polacek@redhat.com>
1796 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1799 2015-05-07 Jason Merrill <jason@redhat.com>
1803 * typeck2.c (digest_init_r): Fix single element list.
1805 2015-05-05 Jason Merrill <jason@redhat.com>
1807 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1808 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1809 MUST_NOT_THROW_EXPR.
1810 (cp_genericize_data): Add try_block field.
1811 (cp_genericize_tree): Initialize it.
1812 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1815 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1818 * semantics.c (finish_call_expr): Check complain.
1820 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1821 maybe-in-charge constructor.
1823 * decl.c (start_decl): Don't push the plain VAR_DECL for a
1830 * call.c (convert_like_real): Check value-initialization before
1832 * typeck2.c (process_init_constructor_record): Don't set
1833 CONSTRUCTOR_IS_DIRECT_INIT.
1834 (process_init_constructor_array): Likewise.
1835 * init.c (build_vec_init): Likewise.
1837 2015-05-05 David Malcolm <dmalcolm@redhat.com>
1839 * parser.c (cp_parser_asm_definition): Only test for
1840 error_mark_node if "outputs" was just set. Likewise for "inputs".
1842 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1843 Jakub Jelinek <jakub@redhat.com>
1846 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1847 result in an actual error.
1849 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1850 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
1853 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1856 2015-04-30 David Malcolm <dmalcolm@redhat.com>
1858 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1861 2015-04-29 Jason Merrill <jason@redhat.com>
1864 * tree.c (apply_identity_attributes): Fix handling of classes.
1866 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1868 * parser.c (cp_parser_oacc_enter_exit_data): Use
1869 OMP_STANDALONE_CLAUSES.
1871 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
1874 * init.c (perform_member_init): Handle references for -Winit-self.
1876 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1878 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1879 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1881 2015-04-28 Jason Merrill <jason@redhat.com>
1884 * constexpr.c (cxx_eval_store_expression): Don't try to actually
1885 store an empty class.
1888 * constexpr.c (cxx_eval_builtin_function_call): Fix
1889 __builtin_constant_p.
1892 * tree.c (strip_typedefs): Add remove_attributes parm.
1893 (strip_typedefs_expr): Likewise.
1894 (apply_identity_attributes): New subroutine of strip_typedefs.
1895 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1896 (convert_nontype_argument, unify): Likewise.
1897 * cp-tree.h: Adjust.
1900 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1902 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1904 * class.c (layout_class_type): Remove check if
1905 PCC_BITFIELD_TYPE_MATTERS is defined.
1907 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1909 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1911 2015-04-24 Jason Merrill <jason@redhat.com>
1914 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1916 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1917 Remove obsolete code.
1918 [NE_EXPR]: Likewise.
1920 2015-04-23 Jason Merrill <jason@redhat.com>
1923 * pt.c (check_explicit_specialization): Don't
1924 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1926 * decl.c (grokvardecl): Revert earlier fix.
1928 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
1931 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1932 suppresses the diagnostic.
1934 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
1936 Reject trailing return type for an operator auto().
1937 * decl.c (grokdeclarator): Reject trailing return types for
1938 all conversion operators, don't handle conversion operators
1939 in the previous checks that deal with auto.
1941 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1943 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1945 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1947 * class.c (resolve_address_of_overloaded_function, instantiate_type):
1948 Rename tsubst_flags_t parameter flags -> complain.
1950 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1952 * call.c (build_op_delete_call, build_over_call): Check mark_used
1954 * class.c (resolve_address_of_overloaded_function): Likewise.
1955 * decl.c (cxx_maybe_build_cleanup): Likewise.
1956 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1957 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1958 * rtti.c (build_dynamic_cast_1): Likewise.
1959 * semantics.c (process_outer_var_ref): Likewise.
1960 * typeck.c (build_class_member_access_expr,
1961 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1963 2015-04-15 Jason Merrill <jason@redhat.com>
1965 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1966 (build_constexpr_constructor_member_initializers): Loop to find
1968 * decl.c (start_preparsed_function): Clobber the object at the
1969 beginning of a constructor.
1971 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1972 * method.c (implicitly_declare_fn): Likewise.
1973 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1975 * decl2.c (determine_visibility): Use get_template_info.
1977 2015-04-15 Jason Merrill <jason@redhat.com>
1978 Marek Polacek <polacek@redhat.com>
1981 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1982 through the normal loop, just don't capture.
1983 (maybe_resolve_dummy): Handle null return.
1985 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1987 * call.c (enforce_access): Emit error + inform.
1989 2015-04-15 Marek Polacek <polacek@redhat.com>
1991 * constexpr.c (use_new_call): Remove #define.
1992 (lookup_parameter_binding): Remove function.
1993 (cxx_bind_parameters_in_call): Remove unused code.
1994 (cxx_eval_call_expression): Likewise.
1995 (cxx_eval_constant_expression): Likewise.
1997 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1999 * tree.c (replace_placeholders_t): Remove unused type.
2000 (replace_placeholders): Remove unused pset.
2002 2015-04-14 Jason Merrill <jason@redhat.com>
2004 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2007 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2010 * name-lookup.c (do_class_using_decl): Complain about specifying
2011 the current class even if there are dependent bases.
2013 2015-04-14 David Krauss <david_work@me.com>
2016 * decl.c (grokdeclarator): Do not flag friends with deduced return.
2018 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
2019 Jason Merrill <jason@redhat.com>
2022 * parser.c (cp_parser_class_name): Add enum_ok parameter.
2023 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2024 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2027 2015-04-12 Jakub Jelinek <jakub@redhat.com>
2030 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2031 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
2032 the expression to the original type at the end.
2034 2015-04-09 Jakub Jelinek <jakub@redhat.com>
2037 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2041 * tree.c (build_cplus_array_type): Layout type before variants are
2042 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2045 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2048 * lambda.c (add_capture): Use dependent_type_p for capture by
2051 2015-04-02 Marek Polacek <polacek@redhat.com>
2054 * constexpr.c (cxx_eval_pointer_plus_expression): Call
2055 cxx_eval_constant_expression on the first operand.
2057 2015-04-01 Jason Merrill <jason@redhat.com>
2060 * decl.c (make_typename_type): Handle seeing a variable template.
2062 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2065 * pt.c (instantiating_current_function_p): New.
2066 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
2067 * cp-tree.h (instantiating_current_function_p): Declare.
2069 2015-04-01 Jason Merrill <jason@redhat.com>
2072 * decl.c (grokvardecl): Don't call check_explicit_specialization
2073 for non-template members of a class template.
2075 2015-04-01 Marek Polacek <polacek@redhat.com>
2078 * class.c (finish_struct): Require that the second field of a
2079 user-defined initializer_list be of size type.
2081 2015-03-31 Marek Polacek <polacek@redhat.com>
2084 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
2085 checking for constness.
2087 2015-03-30 Marek Polacek <polacek@redhat.com>
2090 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
2091 *(&A[i] p+ j) => A[i + j] transformation here.
2092 (cxx_eval_pointer_plus_expression): New function.
2093 (cxx_eval_constant_expression): Use it here.
2095 2015-03-27 Tobias Burnus <burnus@net-b.de>
2098 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
2099 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
2100 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2103 2015-03-27 Marek Polacek <polacek@redhat.com>
2106 * semantics.c (finish_switch_cond): If the unlowered type is not an
2107 enum, use the type of the condition.
2109 2015-03-27 Jason Merrill <jason@redhat.com>
2112 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2115 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
2118 * init.c (build_vec_init): Fix initializing aggregates
2119 with empty init list.
2121 2015-03-26 Jason Merrill <jason@redhat.com>
2124 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2126 2015-03-25 Marek Polacek <polacek@redhat.com>
2129 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2130 on an anonymous namespace.
2132 2015-03-25 Marek Polacek <polacek@redhat.com>
2135 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2137 2015-03-24 Jason Merrill <jason@redhat.com>
2140 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2141 * parser.c (cp_parser_namespace_definition): Don't set it.
2142 * name-lookup.c (handle_namespace_attrs): Check
2143 DECL_NAMESPACE_ASSOCIATIONS instead.
2146 * pt.c (get_mostly_instantiated_function_type): Just return the
2147 type of the partially instantiated template in DECL_TI_TEMPLATE.
2149 2015-03-20 Marek Polacek <polacek@redhat.com>
2152 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
2155 2015-03-20 Marek Polacek <polacek@redhat.com>
2158 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
2161 2015-03-19 Jason Merrill <jason@redhat.com>
2164 Automatically propagate ABI tags to variables and functions
2165 from their (return) type.
2166 * class.c (check_tag): Handle variables and functions.
2167 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
2168 (mark_or_check_tags): Likewise.
2169 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
2170 (check_abi_tags): Add single argument overload for decls.
2171 Handle inheriting tags for decls.
2172 * mangle.c (write_mangled_name): Call it.
2173 (mangle_return_type_p): Split out from write_encoding.
2174 (unmangled_name_p): Split out from write_mangled_name.
2175 (write_mangled_name): Ignore abi_tag on namespace.
2176 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
2177 * parser.c (cp_parser_namespace_definition): Set it.
2178 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
2179 about abi_tag attribute on non-inline namespace.
2180 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
2181 (handle_abi_tag_attribute): Allow tags on variables.
2183 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2185 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
2186 attribute for DECL_EXTERNAL VAR_DECLs.
2188 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2191 * call.c (build_over_call): Pass the tsubst_flags_t argument to
2193 * decl2.c (mark_used): Inline the require_deduced_type call and
2194 guard the error call.
2196 2015-03-16 Jason Merrill <jason@redhat.com>
2199 * parser.c (cp_parser_template_name): Call strip_using_decl.
2201 2015-03-16 Marek Polacek <polacek@redhat.com>
2205 * decl.c (grokdeclarator): Allow volatile and constexpr together.
2207 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2210 * decl.c (check_default_argument): Don't call
2211 maybe_warn_zero_as_null_pointer_constant.
2213 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
2215 * cp-gimplify.c (simple_empty_class_p): New.
2216 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
2217 the code for empty class copies into simple_empty_class_p, and
2218 adapt it to handle COMPOUND_EXPRs.
2220 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
2223 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
2224 only if the location of newdecl doesn't match the location of olddecl.
2226 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2229 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2232 2015-03-10 Jason Merrill <jason@redhat.com>
2236 * pt.c (dependent_type_p_r): Check both class and alias template args.
2238 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2241 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2242 before preparing arguments to warn_logical_not_parentheses.
2243 Use maybe_constant_value on rhs.
2245 2015-03-09 Jason Merrill <jason@redhat.com>
2248 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2250 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2253 * parser.c (cp_parser_binary_expression): Don't warn for
2254 !!x == y or !b == y where b is bool.
2256 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
2258 * ptree.c (cxx_print_lambda_node): New.
2259 (cxx_print_xnode): Handle LAMBDA_EXPR.
2261 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
2264 * constexpr.c (cxx_eval_constant_expression): Remove assert in
2265 RESULT_DECL handling.
2267 2015-02-26 Marek Polacek <polacek@redhat.com>
2270 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2271 a RETURN_EXPR if its operand is null.
2273 2015-02-25 Jason Merrill <jason@redhat.com>
2276 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2278 (constrain_visibility_for_template): Handle reference arguments.
2281 * decl.c (start_preparsed_function): Use create_artificial_label
2284 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
2285 Jakub Jelinek <jakub@redhat.com>
2288 * constexpr.c (check_constexpr_bind_expr_vars): Allow
2289 implicit typedefs for lambda types.
2291 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2294 * decl.c (lookup_and_check_tag): Use strip_using_decl.
2296 2015-02-13 Jason Merrill <jason@redhat.com>
2299 * pt.c (template_args_equal): Look through conversions here.
2300 * tree.c (cp_tree_equal): Not here.
2302 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2305 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2306 pragma_external context.
2308 2015-02-13 Jason Merrill <jason@redhat.com>
2311 * call.c (reference_binding): Don't look for bad conversion
2312 if TO is incomplete.
2314 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
2317 * decl.c (make_typename_type): Pass tsubst_flags_t argument
2318 to lookup_template_class.
2320 2015-02-13 Jakub Jelinek <jakub@redhat.com>
2323 * decl.c (start_preparsed_function): Use void_type_node instead
2324 of NULL_TREE as LABEL_DECL type.
2326 2015-02-12 Jason Merrill <jason@redhat.com>
2329 * mangle.c (write_mangled_name): Fix test for variable template
2332 * decl.c (begin_destructor_body): Condition clobber on
2335 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2338 * parser.c (lookup_literal_operator): Return all candidates.
2339 (cp_parser_userdef_char_literal): Simplify error handling.
2340 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
2341 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2342 Also give higher priority to standard string UDL operator.
2344 2015-02-12 Jakub Jelinek <jakub@redhat.com>
2347 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2348 * decl.c (poplevel): If functionbody, try not to create an extra
2349 BLOCK for function body and use subblocks as that, if it is non-NULL
2350 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
2351 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2354 * except.c (check_noexcept_r): Return NULL for internal
2357 2015-02-10 Jason Merrill <jason@redhat.com>
2360 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2362 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
2365 * method.c (use_thunk): Do not check for stdarg thunks.
2367 2015-02-06 Jason Merrill <jason@redhat.com>
2370 * init.c (build_vec_init): Handle default-initialized array with
2371 constexpr default constructor.
2373 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2377 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2379 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2382 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2383 for generated expressions.
2385 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2388 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2391 2015-02-02 Jason Merrill <jason@redhat.com>
2393 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2395 2015-01-30 Joseph Myers <joseph@codesourcery.com>
2397 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2398 changed to pass input_location as first argument.
2400 2015-01-29 Jakub Jelinek <jakub@redhat.com>
2403 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2406 2015-01-29 Jason Merrill <jason@redhat.com>
2409 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2410 erroneous return statement.
2413 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2416 2015-01-27 Caroline Tice <cmtice@google.com>
2418 Committing VTV Cywin/Ming patch for Patrick Wollgast
2419 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2420 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2422 2015-01-27 Jason Merrill <jason@redhat.com>
2425 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2426 current_function_decl.
2429 * pt.c (finish_template_variable): Move from semantics.c.
2430 Handle multiple template arg levels. Handle coercion here.
2431 (lookup_template_variable): Not here.
2433 2015-01-23 Jason Merrill <jason@redhat.com>
2437 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2438 that has been completely split out.
2441 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2445 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2448 2015-01-21 Jason Merrill <jason@redhat.com>
2451 * constexpr.c (cxx_eval_constant_expression): Only shortcut
2452 constant CONSTRUCTORs.
2455 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2456 give a hard error in a template instantiation.
2458 2015-01-21 Richard Biener <rguenther@suse.de>
2461 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2462 for builtins the user declared correctly.
2464 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2467 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2468 TREE_TYPE (elt) == error_mark_node.
2470 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
2472 PR tree-optimization/62053
2473 * tree.c (build_cplus_array_type): Layout type after variants are set.
2475 2015-01-15 Jakub Jelinek <jakub@redhat.com>
2477 * cp-gimplify.c (cp_genericize_r): Call
2478 cp_ubsan_maybe_instrument_member_call for member calls.
2479 (cp_ubsan_check_member_access_r): New function.
2480 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2481 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2482 cp_ubsan_instrument_member_accesses,
2483 cp_ubsan_maybe_instrument_downcast,
2484 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2485 * cp-ubsan.c: New file.
2486 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2487 * constexpr.c (cxx_eval_call_expression): Return void_node
2489 (potential_constant_expression_1): Return true for
2490 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2491 * typeck.c (build_class_member_access_expr): Provide locus
2493 (build_static_cast_1): Instrument downcasts.
2494 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2495 add ubsan instrumentation for virtual_access.
2496 * call.c: Include internal-fn.h.
2497 (set_flags_from_callee): Handle internal calls.
2499 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
2502 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2503 and function templates, declared only in the class.
2504 * decl.c (duplicate_decls): Reveal hidden friend functions or
2505 function templates, if they are redeclared outside the class.
2507 2015-01-15 Jason Merrill <jason@redhat.com>
2510 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2513 * constexpr.c (potential_constant_expression_1): Handle reference
2516 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2517 James Norris <jnorris@codesourcery.com>
2518 Cesar Philippidis <cesar@codesourcery.com>
2519 Ilmir Usmanov <i.usmanov@samsung.com>
2520 Jakub Jelinek <jakub@redhat.com>
2522 * parser.c: Include "gomp-constants.h".
2523 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2524 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2525 Use OMP_CLAUSE_SET_MAP_KIND.
2526 (cp_parser_omp_construct, cp_parser_pragma): Handle
2527 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2528 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2529 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2530 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2531 "create", "delete", "deviceptr", "host", "num_gangs",
2532 "num_workers", "present", "present_or_copy", "pcopy",
2533 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2534 "present_or_create", "pcreate", "vector_length", "wait".
2535 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2536 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2537 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2538 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2539 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2540 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2541 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2542 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2543 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2544 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2545 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2546 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2547 (cp_parser_oacc_parallel, cp_parser_oacc_update)
2548 (cp_parser_oacc_wait): New functions.
2549 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2550 (finish_oacc_parallel): New prototypes.
2551 * semantics.c: Include "gomp-constants.h".
2552 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2553 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2554 OMP_CLAUSE_SET_MAP_KIND.
2555 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2556 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2557 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2558 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2561 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
2564 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2565 self-initialization.
2567 2015-01-13 Jason Merrill <jason@redhat.com>
2571 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2572 pointer expressions.
2573 (cxx_eval_increment_expression): Likewise.
2576 * pt.c (coerce_template_parameter_pack): Return NULL for a
2577 zero-length fixed parameter pack with a pack expansion arg.
2580 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2582 2015-01-12 Jason Merrill <jason@redhat.com>
2585 * constexpr.c (cxx_eval_call_expression): A call to a void
2586 function doesn't need to return a value.
2588 2015-01-09 Michael Collison <michael.collison@linaro.org>
2590 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2591 input.h, alias.h, symtab.h, options.h, fold-const.h,
2592 wide-int.h, and inchash.h due to flattening of tree.h.
2594 * constexpr.c: Ditto.
2595 * cp-array-notation.c: Ditto.
2596 * cp-gimplify.c: Ditto.
2598 * cp-objcp-common.c: Ditto.
2611 * name-lookup.c: Ditto.
2612 * optimize.c: Ditto.
2619 * semantics.c: Ditto.
2624 2015-01-08 Jason Merrill <jason@redhat.com>
2626 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2627 * decl.c (compute_array_index_type): Likewise.
2628 * init.c (build_vec_init): Likewise.
2629 * typeck.c (cp_build_binary_op): Likewise.
2631 2015-01-08 Jason Merrill <jason@redhat.com>
2633 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2634 whether an initializer-list is too big for a VLA.
2635 (throw_bad_array_length): Remove.
2636 * cp-tree.h: Remove prototype.
2638 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2641 * decl.c (grokfndecl): Add bool parameter.
2642 (grokdeclarator): Adjust calls.
2643 (start_decl): Don't set DECL_DELETED_FN here.
2645 2015-01-06 Jason Merrill <jason@redhat.com>
2647 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2651 * pt.c (type_dependent_expression_p): Handle variable templates.
2652 * constexpr.c (potential_constant_expression_1): Use it.
2655 * semantics.c (finish_offsetof): Handle templates here.
2656 * parser.c (cp_parser_builtin_offsetof): Not here.
2659 * semantics.c (process_outer_var_ref): Diagnose lambda in local
2662 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2665 * class.c (check_field_decls): Make copy assignment operators
2666 complex only in c++98 mode.
2668 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2671 * class.c (check_for_override): Warn when a virtual function is an
2672 override not marked override.
2674 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
2676 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2678 (get_basefndecls): Adjust.
2680 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2682 Update copyright years.
2684 2015-01-05 Marek Polacek <polacek@redhat.com>
2687 * typeck.c (cp_build_array_ref): Pass loc down to
2688 warn_array_subscript_with_type_char.
2691 Copyright (C) 2015 Free Software Foundation, Inc.
2693 Copying and distribution of this file, with or without modification,
2694 are permitted in any medium without royalty provided the copyright
2695 notice and this notice are preserved.