1 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
4 * decl.c (grokdeclarator): Use the correct location in error
5 messages about 'explicit'.
7 2015-05-22 Marek Polacek <polacek@redhat.com>
8 Edward Smith-Rowland <3dw4rd@verizon.net>
11 * cp-tree.h (build_enumerator): Update declaration.
12 * decl.c (build_enumerator): Add attributes parameter. Call
13 cplus_decl_attributes.
14 * init.c (constant_value_1): Pass tf_none to mark_used.
15 * parser.c (cp_parser_enumerator_definition): Parse attributes and
16 pass them down to build_enumerator.
17 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
18 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
20 2015-05-21 Nathan Sidwell <nathan@acm.org>
23 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
25 2015-05-21 Marek Polacek <polacek@redhat.com>
27 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
29 2015-05-20 Jason Merrill <jason@redhat.com>
31 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
32 before register_specialization.
34 * decl.c (grok_op_properties): Don't complain about size_t
35 placement delete here.
36 * call.c (second_parm_is_size_t): Split out from...
37 (non_placement_deallocation_fn_p): ...here.
38 (build_op_delete_call): Warn about size_t placement delete with
41 2015-05-19 Nathan Sidwell <nathan@acm.org>
44 * typeck.c (finish_class_member_access_expr): Diagnose failed
45 lookup of enum class member.
47 2015-05-19 Jakub Jelinek <jakub@redhat.com>
50 * parser.c (cp_parser_omp_for_loop): Don't add
51 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
52 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
53 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
56 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
58 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
61 2015-05-18 Jason Merrill <jason@redhat.com>
63 * pt.c (retrieve_specialization): Make sure our arguments have
64 gone through strip_typedefs.
66 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
67 (determine_specialization): Call coerce_template_parms.
70 * pt.c (type_unification_real): Check convertibility here.
71 (unify_one_argument): Not here.
73 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
74 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
75 [TREE_LIST]: Fix no-change case.
77 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
79 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
82 * error.c (cp_diagnostic_starter): Use diagnostic_location
84 (cp_print_error_function): Likewise.
85 (cp_printer): Replace locus pointer with accessor function.
87 2015-05-12 David Malcolm <dmalcolm@redhat.com>
89 * parser.c (cp_parser_selection_statement): Add location and
90 guard_kind arguments to calls to
91 cp_parser_implicitly_scoped_statement.
92 (cp_parser_iteration_statement): Likewise for calls to
93 cp_parser_already_scoped_statement.
94 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
95 "guard_kind" params; use them to warn for misleading
97 (cp_parser_already_scoped_statement): Likewise.
99 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
101 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
102 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
103 * semantics.c (finish_member_declaration): Likewise.
104 * method.c (lazily_declare_fn): Allways add method to main variant list.
106 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
109 * decl2.c (note_mangling_alias): Declare arguments as unused.
111 2015-05-08 Jason Merrill <jason@redhat.com>
113 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
116 2015-05-08 Jason Merrill <jason@redhat.com>
118 * decl2.c (mangling_aliases): New variable.
119 (note_mangling_alias, generate_mangling_aliases): New.
120 (cp_write_global_declarations): Call generate_mangling_aliases.
121 (generate_mangling_alias): Split out from...
122 * mangle.c (mangle_decl): ...here.
123 * cp-tree.h: Declare note_mangling_alias.
125 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
127 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
128 (build_java_method_aliases): Adapt to use create_same_body_alias
129 instead of assemble_alias. Move variable declarations to
130 definition and tidy up.
131 (cp_write_global_declarations): Call build_java_method_aliases
132 instead of collecting candidates first.
134 2015-05-07 Jason Merrill <jason@redhat.com>
137 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
138 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
139 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
140 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
141 (apply_late_template_attributes): Handle attribute pack expansion.
143 2015-05-07 Marek Polacek <polacek@redhat.com>
146 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
149 2015-05-07 Jason Merrill <jason@redhat.com>
153 * typeck2.c (digest_init_r): Fix single element list.
155 2015-05-05 Jason Merrill <jason@redhat.com>
157 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
158 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
160 (cp_genericize_data): Add try_block field.
161 (cp_genericize_tree): Initialize it.
162 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
165 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
168 * semantics.c (finish_call_expr): Check complain.
170 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
171 maybe-in-charge constructor.
173 * decl.c (start_decl): Don't push the plain VAR_DECL for a
180 * call.c (convert_like_real): Check value-initialization before
182 * typeck2.c (process_init_constructor_record): Don't set
183 CONSTRUCTOR_IS_DIRECT_INIT.
184 (process_init_constructor_array): Likewise.
185 * init.c (build_vec_init): Likewise.
187 2015-05-05 David Malcolm <dmalcolm@redhat.com>
189 * parser.c (cp_parser_asm_definition): Only test for
190 error_mark_node if "outputs" was just set. Likewise for "inputs".
192 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
193 Jakub Jelinek <jakub@redhat.com>
196 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
197 result in an actual error.
199 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
200 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
203 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
206 2015-04-30 David Malcolm <dmalcolm@redhat.com>
208 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
211 2015-04-29 Jason Merrill <jason@redhat.com>
214 * tree.c (apply_identity_attributes): Fix handling of classes.
216 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
218 * parser.c (cp_parser_oacc_enter_exit_data): Use
219 OMP_STANDALONE_CLAUSES.
221 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
224 * init.c (perform_member_init): Handle references for -Winit-self.
226 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
228 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
229 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
231 2015-04-28 Jason Merrill <jason@redhat.com>
234 * constexpr.c (cxx_eval_store_expression): Don't try to actually
235 store an empty class.
238 * constexpr.c (cxx_eval_builtin_function_call): Fix
239 __builtin_constant_p.
242 * tree.c (strip_typedefs): Add remove_attributes parm.
243 (strip_typedefs_expr): Likewise.
244 (apply_identity_attributes): New subroutine of strip_typedefs.
245 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
246 (convert_nontype_argument, unify): Likewise.
250 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
252 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
254 * class.c (layout_class_type): Remove check if
255 PCC_BITFIELD_TYPE_MATTERS is defined.
257 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
259 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
261 2015-04-24 Jason Merrill <jason@redhat.com>
264 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
266 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
267 Remove obsolete code.
270 2015-04-23 Jason Merrill <jason@redhat.com>
273 * pt.c (check_explicit_specialization): Don't
274 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
276 * decl.c (grokvardecl): Revert earlier fix.
278 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
281 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
282 suppresses the diagnostic.
284 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
286 Reject trailing return type for an operator auto().
287 * decl.c (grokdeclarator): Reject trailing return types for
288 all conversion operators, don't handle conversion operators
289 in the previous checks that deal with auto.
291 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
293 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
295 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
297 * class.c (resolve_address_of_overloaded_function, instantiate_type):
298 Rename tsubst_flags_t parameter flags -> complain.
300 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
302 * call.c (build_op_delete_call, build_over_call): Check mark_used
304 * class.c (resolve_address_of_overloaded_function): Likewise.
305 * decl.c (cxx_maybe_build_cleanup): Likewise.
306 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
307 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
308 * rtti.c (build_dynamic_cast_1): Likewise.
309 * semantics.c (process_outer_var_ref): Likewise.
310 * typeck.c (build_class_member_access_expr,
311 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
313 2015-04-15 Jason Merrill <jason@redhat.com>
315 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
316 (build_constexpr_constructor_member_initializers): Loop to find
318 * decl.c (start_preparsed_function): Clobber the object at the
319 beginning of a constructor.
321 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
322 * method.c (implicitly_declare_fn): Likewise.
323 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
325 * decl2.c (determine_visibility): Use get_template_info.
327 2015-04-15 Jason Merrill <jason@redhat.com>
328 Marek Polacek <polacek@redhat.com>
331 * lambda.c (lambda_expr_this_capture): In unevaluated context go
332 through the normal loop, just don't capture.
333 (maybe_resolve_dummy): Handle null return.
335 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
337 * call.c (enforce_access): Emit error + inform.
339 2015-04-15 Marek Polacek <polacek@redhat.com>
341 * constexpr.c (use_new_call): Remove #define.
342 (lookup_parameter_binding): Remove function.
343 (cxx_bind_parameters_in_call): Remove unused code.
344 (cxx_eval_call_expression): Likewise.
345 (cxx_eval_constant_expression): Likewise.
347 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
349 * tree.c (replace_placeholders_t): Remove unused type.
350 (replace_placeholders): Remove unused pset.
352 2015-04-14 Jason Merrill <jason@redhat.com>
354 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
357 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
360 * name-lookup.c (do_class_using_decl): Complain about specifying
361 the current class even if there are dependent bases.
363 2015-04-14 David Krauss <david_work@me.com>
366 * decl.c (grokdeclarator): Do not flag friends with deduced return.
368 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
369 Jason Merrill <jason@redhat.com>
372 * parser.c (cp_parser_class_name): Add enum_ok parameter.
373 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
374 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
377 2015-04-12 Jakub Jelinek <jakub@redhat.com>
380 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
381 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
382 the expression to the original type at the end.
384 2015-04-09 Jakub Jelinek <jakub@redhat.com>
387 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
391 * tree.c (build_cplus_array_type): Layout type before variants are
392 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
395 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
398 * lambda.c (add_capture): Use dependent_type_p for capture by
401 2015-04-02 Marek Polacek <polacek@redhat.com>
404 * constexpr.c (cxx_eval_pointer_plus_expression): Call
405 cxx_eval_constant_expression on the first operand.
407 2015-04-01 Jason Merrill <jason@redhat.com>
410 * decl.c (make_typename_type): Handle seeing a variable template.
412 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
415 * pt.c (instantiating_current_function_p): New.
416 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
417 * cp-tree.h (instantiating_current_function_p): Declare.
419 2015-04-01 Jason Merrill <jason@redhat.com>
422 * decl.c (grokvardecl): Don't call check_explicit_specialization
423 for non-template members of a class template.
425 2015-04-01 Marek Polacek <polacek@redhat.com>
428 * class.c (finish_struct): Require that the second field of a
429 user-defined initializer_list be of size type.
431 2015-03-31 Marek Polacek <polacek@redhat.com>
434 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
435 checking for constness.
437 2015-03-30 Marek Polacek <polacek@redhat.com>
440 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
441 *(&A[i] p+ j) => A[i + j] transformation here.
442 (cxx_eval_pointer_plus_expression): New function.
443 (cxx_eval_constant_expression): Use it here.
445 2015-03-27 Tobias Burnus <burnus@net-b.de>
448 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
449 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
450 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
453 2015-03-27 Marek Polacek <polacek@redhat.com>
456 * semantics.c (finish_switch_cond): If the unlowered type is not an
457 enum, use the type of the condition.
459 2015-03-27 Jason Merrill <jason@redhat.com>
462 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
465 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
468 * init.c (build_vec_init): Fix initializing aggregates
469 with empty init list.
471 2015-03-26 Jason Merrill <jason@redhat.com>
474 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
476 2015-03-25 Marek Polacek <polacek@redhat.com>
479 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
480 on an anonymous namespace.
482 2015-03-25 Marek Polacek <polacek@redhat.com>
485 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
487 2015-03-24 Jason Merrill <jason@redhat.com>
490 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
491 * parser.c (cp_parser_namespace_definition): Don't set it.
492 * name-lookup.c (handle_namespace_attrs): Check
493 DECL_NAMESPACE_ASSOCIATIONS instead.
496 * pt.c (get_mostly_instantiated_function_type): Just return the
497 type of the partially instantiated template in DECL_TI_TEMPLATE.
499 2015-03-20 Marek Polacek <polacek@redhat.com>
502 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
505 2015-03-20 Marek Polacek <polacek@redhat.com>
508 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
511 2015-03-19 Jason Merrill <jason@redhat.com>
514 Automatically propagate ABI tags to variables and functions
515 from their (return) type.
516 * class.c (check_tag): Handle variables and functions.
517 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
518 (mark_or_check_tags): Likewise.
519 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
520 (check_abi_tags): Add single argument overload for decls.
521 Handle inheriting tags for decls.
522 * mangle.c (write_mangled_name): Call it.
523 (mangle_return_type_p): Split out from write_encoding.
524 (unmangled_name_p): Split out from write_mangled_name.
525 (write_mangled_name): Ignore abi_tag on namespace.
526 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
527 * parser.c (cp_parser_namespace_definition): Set it.
528 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
529 about abi_tag attribute on non-inline namespace.
530 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
531 (handle_abi_tag_attribute): Allow tags on variables.
533 2015-03-19 Jakub Jelinek <jakub@redhat.com>
535 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
536 attribute for DECL_EXTERNAL VAR_DECLs.
538 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
541 * call.c (build_over_call): Pass the tsubst_flags_t argument to
543 * decl2.c (mark_used): Inline the require_deduced_type call and
544 guard the error call.
546 2015-03-16 Jason Merrill <jason@redhat.com>
549 * parser.c (cp_parser_template_name): Call strip_using_decl.
551 2015-03-16 Marek Polacek <polacek@redhat.com>
555 * decl.c (grokdeclarator): Allow volatile and constexpr together.
557 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
560 * decl.c (check_default_argument): Don't call
561 maybe_warn_zero_as_null_pointer_constant.
563 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
565 * cp-gimplify.c (simple_empty_class_p): New.
566 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
567 the code for empty class copies into simple_empty_class_p, and
568 adapt it to handle COMPOUND_EXPRs.
570 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
573 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
574 only if the location of newdecl doesn't match the location of olddecl.
576 2015-03-10 Jakub Jelinek <jakub@redhat.com>
579 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
582 2015-03-10 Jason Merrill <jason@redhat.com>
586 * pt.c (dependent_type_p_r): Check both class and alias template args.
588 2015-03-10 Jakub Jelinek <jakub@redhat.com>
591 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
592 before preparing arguments to warn_logical_not_parentheses.
593 Use maybe_constant_value on rhs.
595 2015-03-09 Jason Merrill <jason@redhat.com>
598 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
600 2015-03-09 Jakub Jelinek <jakub@redhat.com>
603 * parser.c (cp_parser_binary_expression): Don't warn for
604 !!x == y or !b == y where b is bool.
606 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
608 * ptree.c (cxx_print_lambda_node): New.
609 (cxx_print_xnode): Handle LAMBDA_EXPR.
611 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
614 * constexpr.c (cxx_eval_constant_expression): Remove assert in
615 RESULT_DECL handling.
617 2015-02-26 Marek Polacek <polacek@redhat.com>
620 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
621 a RETURN_EXPR if its operand is null.
623 2015-02-25 Jason Merrill <jason@redhat.com>
626 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
628 (constrain_visibility_for_template): Handle reference arguments.
631 * decl.c (start_preparsed_function): Use create_artificial_label
634 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
635 Jakub Jelinek <jakub@redhat.com>
638 * constexpr.c (check_constexpr_bind_expr_vars): Allow
639 implicit typedefs for lambda types.
641 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
644 * decl.c (lookup_and_check_tag): Use strip_using_decl.
646 2015-02-13 Jason Merrill <jason@redhat.com>
649 * pt.c (template_args_equal): Look through conversions here.
650 * tree.c (cp_tree_equal): Not here.
652 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
655 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
656 pragma_external context.
658 2015-02-13 Jason Merrill <jason@redhat.com>
661 * call.c (reference_binding): Don't look for bad conversion
664 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
667 * decl.c (make_typename_type): Pass tsubst_flags_t argument
668 to lookup_template_class.
670 2015-02-13 Jakub Jelinek <jakub@redhat.com>
673 * decl.c (start_preparsed_function): Use void_type_node instead
674 of NULL_TREE as LABEL_DECL type.
676 2015-02-12 Jason Merrill <jason@redhat.com>
679 * mangle.c (write_mangled_name): Fix test for variable template
682 * decl.c (begin_destructor_body): Condition clobber on
685 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
688 * parser.c (lookup_literal_operator): Return all candidates.
689 (cp_parser_userdef_char_literal): Simplify error handling.
690 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
691 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
692 Also give higher priority to standard string UDL operator.
694 2015-02-12 Jakub Jelinek <jakub@redhat.com>
697 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
698 * decl.c (poplevel): If functionbody, try not to create an extra
699 BLOCK for function body and use subblocks as that, if it is non-NULL
700 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
701 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
704 * except.c (check_noexcept_r): Return NULL for internal
707 2015-02-10 Jason Merrill <jason@redhat.com>
710 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
712 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
715 * method.c (use_thunk): Do not check for stdarg thunks.
717 2015-02-06 Jason Merrill <jason@redhat.com>
720 * init.c (build_vec_init): Handle default-initialized array with
721 constexpr default constructor.
723 2015-02-04 Jakub Jelinek <jakub@redhat.com>
727 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
729 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
732 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
733 for generated expressions.
735 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
738 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
741 2015-02-02 Jason Merrill <jason@redhat.com>
743 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
745 2015-01-30 Joseph Myers <joseph@codesourcery.com>
747 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
748 changed to pass input_location as first argument.
750 2015-01-29 Jakub Jelinek <jakub@redhat.com>
753 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
756 2015-01-29 Jason Merrill <jason@redhat.com>
759 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
760 erroneous return statement.
763 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
766 2015-01-27 Caroline Tice <cmtice@google.com>
768 Committing VTV Cywin/Ming patch for Patrick Wollgast
769 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
770 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
772 2015-01-27 Jason Merrill <jason@redhat.com>
775 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
776 current_function_decl.
779 * pt.c (finish_template_variable): Move from semantics.c.
780 Handle multiple template arg levels. Handle coercion here.
781 (lookup_template_variable): Not here.
783 2015-01-23 Jason Merrill <jason@redhat.com>
787 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
788 that has been completely split out.
791 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
795 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
798 2015-01-21 Jason Merrill <jason@redhat.com>
801 * constexpr.c (cxx_eval_constant_expression): Only shortcut
802 constant CONSTRUCTORs.
805 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
806 give a hard error in a template instantiation.
808 2015-01-21 Richard Biener <rguenther@suse.de>
811 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
812 for builtins the user declared correctly.
814 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
817 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
818 TREE_TYPE (elt) == error_mark_node.
820 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
822 PR tree-optimization/62053
823 * tree.c (build_cplus_array_type): Layout type after variants are set.
825 2015-01-15 Jakub Jelinek <jakub@redhat.com>
827 * cp-gimplify.c (cp_genericize_r): Call
828 cp_ubsan_maybe_instrument_member_call for member calls.
829 (cp_ubsan_check_member_access_r): New function.
830 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
831 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
832 cp_ubsan_instrument_member_accesses,
833 cp_ubsan_maybe_instrument_downcast,
834 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
835 * cp-ubsan.c: New file.
836 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
837 * constexpr.c (cxx_eval_call_expression): Return void_node
839 (potential_constant_expression_1): Return true for
840 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
841 * typeck.c (build_class_member_access_expr): Provide locus
843 (build_static_cast_1): Instrument downcasts.
844 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
845 add ubsan instrumentation for virtual_access.
846 * call.c: Include internal-fn.h.
847 (set_flags_from_callee): Handle internal calls.
849 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
852 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
853 and function templates, declared only in the class.
854 * decl.c (duplicate_decls): Reveal hidden friend functions or
855 function templates, if they are redeclared outside the class.
857 2015-01-15 Jason Merrill <jason@redhat.com>
860 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
863 * constexpr.c (potential_constant_expression_1): Handle reference
866 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
867 James Norris <jnorris@codesourcery.com>
868 Cesar Philippidis <cesar@codesourcery.com>
869 Ilmir Usmanov <i.usmanov@samsung.com>
870 Jakub Jelinek <jakub@redhat.com>
872 * parser.c: Include "gomp-constants.h".
873 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
874 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
875 Use OMP_CLAUSE_SET_MAP_KIND.
876 (cp_parser_omp_construct, cp_parser_pragma): Handle
877 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
878 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
879 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
880 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
881 "create", "delete", "deviceptr", "host", "num_gangs",
882 "num_workers", "present", "present_or_copy", "pcopy",
883 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
884 "present_or_create", "pcreate", "vector_length", "wait".
885 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
886 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
887 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
888 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
889 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
890 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
891 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
892 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
893 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
894 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
895 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
896 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
897 (cp_parser_oacc_parallel, cp_parser_oacc_update)
898 (cp_parser_oacc_wait): New functions.
899 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
900 (finish_oacc_parallel): New prototypes.
901 * semantics.c: Include "gomp-constants.h".
902 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
903 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
904 OMP_CLAUSE_SET_MAP_KIND.
905 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
906 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
907 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
908 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
911 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
914 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
917 2015-01-13 Jason Merrill <jason@redhat.com>
921 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
923 (cxx_eval_increment_expression): Likewise.
926 * pt.c (coerce_template_parameter_pack): Return NULL for a
927 zero-length fixed parameter pack with a pack expansion arg.
930 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
932 2015-01-12 Jason Merrill <jason@redhat.com>
935 * constexpr.c (cxx_eval_call_expression): A call to a void
936 function doesn't need to return a value.
938 2015-01-09 Michael Collison <michael.collison@linaro.org>
940 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
941 input.h, alias.h, symtab.h, options.h, fold-const.h,
942 wide-int.h, and inchash.h due to flattening of tree.h.
944 * constexpr.c: Ditto.
945 * cp-array-notation.c: Ditto.
946 * cp-gimplify.c: Ditto.
948 * cp-objcp-common.c: Ditto.
961 * name-lookup.c: Ditto.
969 * semantics.c: Ditto.
974 2015-01-08 Jason Merrill <jason@redhat.com>
976 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
977 * decl.c (compute_array_index_type): Likewise.
978 * init.c (build_vec_init): Likewise.
979 * typeck.c (cp_build_binary_op): Likewise.
981 2015-01-08 Jason Merrill <jason@redhat.com>
983 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
984 whether an initializer-list is too big for a VLA.
985 (throw_bad_array_length): Remove.
986 * cp-tree.h: Remove prototype.
988 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
991 * decl.c (grokfndecl): Add bool parameter.
992 (grokdeclarator): Adjust calls.
993 (start_decl): Don't set DECL_DELETED_FN here.
995 2015-01-06 Jason Merrill <jason@redhat.com>
997 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1001 * pt.c (type_dependent_expression_p): Handle variable templates.
1002 * constexpr.c (potential_constant_expression_1): Use it.
1005 * semantics.c (finish_offsetof): Handle templates here.
1006 * parser.c (cp_parser_builtin_offsetof): Not here.
1009 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1012 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1015 * class.c (check_field_decls): Make copy assignment operators
1016 complex only in c++98 mode.
1018 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1021 * class.c (check_for_override): Warn when a virtual function is an
1022 override not marked override.
1024 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1026 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1028 (get_basefndecls): Adjust.
1030 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1032 Update copyright years.
1034 2015-01-05 Marek Polacek <polacek@redhat.com>
1037 * typeck.c (cp_build_array_ref): Pass loc down to
1038 warn_array_subscript_with_type_char.
1041 Copyright (C) 2015 Free Software Foundation, Inc.
1043 Copying and distribution of this file, with or without modification,
1044 are permitted in any medium without royalty provided the copyright
1045 notice and this notice are preserved.