1 2015-05-18 Jason Merrill <jason@redhat.com>
4 * pt.c (type_unification_real): Check convertibility here.
5 (unify_one_argument): Not here.
7 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
8 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
9 [TREE_LIST]: Fix no-change case.
11 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
13 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
16 * error.c (cp_diagnostic_starter): Use diagnostic_location
18 (cp_print_error_function): Likewise.
19 (cp_printer): Replace locus pointer with accessor function.
21 2015-05-12 David Malcolm <dmalcolm@redhat.com>
23 * parser.c (cp_parser_selection_statement): Add location and
24 guard_kind arguments to calls to
25 cp_parser_implicitly_scoped_statement.
26 (cp_parser_iteration_statement): Likewise for calls to
27 cp_parser_already_scoped_statement.
28 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
29 "guard_kind" params; use them to warn for misleading
31 (cp_parser_already_scoped_statement): Likewise.
33 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
35 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
36 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
37 * semantics.c (finish_member_declaration): Likewise.
38 * method.c (lazily_declare_fn): Allways add method to main variant list.
40 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
43 * decl2.c (note_mangling_alias): Declare arguments as unused.
45 2015-05-08 Jason Merrill <jason@redhat.com>
47 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
50 2015-05-08 Jason Merrill <jason@redhat.com>
52 * decl2.c (mangling_aliases): New variable.
53 (note_mangling_alias, generate_mangling_aliases): New.
54 (cp_write_global_declarations): Call generate_mangling_aliases.
55 (generate_mangling_alias): Split out from...
56 * mangle.c (mangle_decl): ...here.
57 * cp-tree.h: Declare note_mangling_alias.
59 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
61 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
62 (build_java_method_aliases): Adapt to use create_same_body_alias
63 instead of assemble_alias. Move variable declarations to
64 definition and tidy up.
65 (cp_write_global_declarations): Call build_java_method_aliases
66 instead of collecting candidates first.
68 2015-05-07 Jason Merrill <jason@redhat.com>
71 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
72 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
73 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
74 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
75 (apply_late_template_attributes): Handle attribute pack expansion.
77 2015-05-07 Marek Polacek <polacek@redhat.com>
80 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
83 2015-05-07 Jason Merrill <jason@redhat.com>
87 * typeck2.c (digest_init_r): Fix single element list.
89 2015-05-05 Jason Merrill <jason@redhat.com>
91 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
92 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
94 (cp_genericize_data): Add try_block field.
95 (cp_genericize_tree): Initialize it.
96 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
99 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
102 * semantics.c (finish_call_expr): Check complain.
104 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
105 maybe-in-charge constructor.
107 * decl.c (start_decl): Don't push the plain VAR_DECL for a
114 * call.c (convert_like_real): Check value-initialization before
116 * typeck2.c (process_init_constructor_record): Don't set
117 CONSTRUCTOR_IS_DIRECT_INIT.
118 (process_init_constructor_array): Likewise.
119 * init.c (build_vec_init): Likewise.
121 2015-05-05 David Malcolm <dmalcolm@redhat.com>
123 * parser.c (cp_parser_asm_definition): Only test for
124 error_mark_node if "outputs" was just set. Likewise for "inputs".
126 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
127 Jakub Jelinek <jakub@redhat.com>
130 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
131 result in an actual error.
133 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
134 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
137 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
140 2015-04-30 David Malcolm <dmalcolm@redhat.com>
142 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
145 2015-04-29 Jason Merrill <jason@redhat.com>
148 * tree.c (apply_identity_attributes): Fix handling of classes.
150 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
152 * parser.c (cp_parser_oacc_enter_exit_data): Use
153 OMP_STANDALONE_CLAUSES.
155 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
158 * init.c (perform_member_init): Handle references for -Winit-self.
160 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
162 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
163 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
165 2015-04-28 Jason Merrill <jason@redhat.com>
168 * constexpr.c (cxx_eval_store_expression): Don't try to actually
169 store an empty class.
172 * constexpr.c (cxx_eval_builtin_function_call): Fix
173 __builtin_constant_p.
176 * tree.c (strip_typedefs): Add remove_attributes parm.
177 (strip_typedefs_expr): Likewise.
178 (apply_identity_attributes): New subroutine of strip_typedefs.
179 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
180 (convert_nontype_argument, unify): Likewise.
184 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
186 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
188 * class.c (layout_class_type): Remove check if
189 PCC_BITFIELD_TYPE_MATTERS is defined.
191 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
193 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
195 2015-04-24 Jason Merrill <jason@redhat.com>
198 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
200 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
201 Remove obsolete code.
204 2015-04-23 Jason Merrill <jason@redhat.com>
207 * pt.c (check_explicit_specialization): Don't
208 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
210 * decl.c (grokvardecl): Revert earlier fix.
212 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
215 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
216 suppresses the diagnostic.
218 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
220 Reject trailing return type for an operator auto().
221 * decl.c (grokdeclarator): Reject trailing return types for
222 all conversion operators, don't handle conversion operators
223 in the previous checks that deal with auto.
225 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
227 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
229 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
231 * class.c (resolve_address_of_overloaded_function, instantiate_type):
232 Rename tsubst_flags_t parameter flags -> complain.
234 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
236 * call.c (build_op_delete_call, build_over_call): Check mark_used
238 * class.c (resolve_address_of_overloaded_function): Likewise.
239 * decl.c (cxx_maybe_build_cleanup): Likewise.
240 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
241 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
242 * rtti.c (build_dynamic_cast_1): Likewise.
243 * semantics.c (process_outer_var_ref): Likewise.
244 * typeck.c (build_class_member_access_expr,
245 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
247 2015-04-15 Jason Merrill <jason@redhat.com>
249 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
250 (build_constexpr_constructor_member_initializers): Loop to find
252 * decl.c (start_preparsed_function): Clobber the object at the
253 beginning of a constructor.
255 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
256 * method.c (implicitly_declare_fn): Likewise.
257 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
259 * decl2.c (determine_visibility): Use get_template_info.
261 2015-04-15 Jason Merrill <jason@redhat.com>
262 Marek Polacek <polacek@redhat.com>
265 * lambda.c (lambda_expr_this_capture): In unevaluated context go
266 through the normal loop, just don't capture.
267 (maybe_resolve_dummy): Handle null return.
269 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
271 * call.c (enforce_access): Emit error + inform.
273 2015-04-15 Marek Polacek <polacek@redhat.com>
275 * constexpr.c (use_new_call): Remove #define.
276 (lookup_parameter_binding): Remove function.
277 (cxx_bind_parameters_in_call): Remove unused code.
278 (cxx_eval_call_expression): Likewise.
279 (cxx_eval_constant_expression): Likewise.
281 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
283 * tree.c (replace_placeholders_t): Remove unused type.
284 (replace_placeholders): Remove unused pset.
286 2015-04-14 Jason Merrill <jason@redhat.com>
288 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
291 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
294 * name-lookup.c (do_class_using_decl): Complain about specifying
295 the current class even if there are dependent bases.
297 2015-04-14 David Krauss <david_work@me.com>
300 * decl.c (grokdeclarator): Do not flag friends with deduced return.
302 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
303 Jason Merrill <jason@redhat.com>
306 * parser.c (cp_parser_class_name): Add enum_ok parameter.
307 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
308 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
311 2015-04-12 Jakub Jelinek <jakub@redhat.com>
314 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
315 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
316 the expression to the original type at the end.
318 2015-04-09 Jakub Jelinek <jakub@redhat.com>
321 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
325 * tree.c (build_cplus_array_type): Layout type before variants are
326 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
329 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
332 * lambda.c (add_capture): Use dependent_type_p for capture by
335 2015-04-02 Marek Polacek <polacek@redhat.com>
338 * constexpr.c (cxx_eval_pointer_plus_expression): Call
339 cxx_eval_constant_expression on the first operand.
341 2015-04-01 Jason Merrill <jason@redhat.com>
344 * decl.c (make_typename_type): Handle seeing a variable template.
346 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
349 * pt.c (instantiating_current_function_p): New.
350 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
351 * cp-tree.h (instantiating_current_function_p): Declare.
353 2015-04-01 Jason Merrill <jason@redhat.com>
356 * decl.c (grokvardecl): Don't call check_explicit_specialization
357 for non-template members of a class template.
359 2015-04-01 Marek Polacek <polacek@redhat.com>
362 * class.c (finish_struct): Require that the second field of a
363 user-defined initializer_list be of size type.
365 2015-03-31 Marek Polacek <polacek@redhat.com>
368 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
369 checking for constness.
371 2015-03-30 Marek Polacek <polacek@redhat.com>
374 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
375 *(&A[i] p+ j) => A[i + j] transformation here.
376 (cxx_eval_pointer_plus_expression): New function.
377 (cxx_eval_constant_expression): Use it here.
379 2015-03-27 Tobias Burnus <burnus@net-b.de>
382 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
383 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
384 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
387 2015-03-27 Marek Polacek <polacek@redhat.com>
390 * semantics.c (finish_switch_cond): If the unlowered type is not an
391 enum, use the type of the condition.
393 2015-03-27 Jason Merrill <jason@redhat.com>
396 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
399 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
402 * init.c (build_vec_init): Fix initializing aggregates
403 with empty init list.
405 2015-03-26 Jason Merrill <jason@redhat.com>
408 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
410 2015-03-25 Marek Polacek <polacek@redhat.com>
413 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
414 on an anonymous namespace.
416 2015-03-25 Marek Polacek <polacek@redhat.com>
419 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
421 2015-03-24 Jason Merrill <jason@redhat.com>
424 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
425 * parser.c (cp_parser_namespace_definition): Don't set it.
426 * name-lookup.c (handle_namespace_attrs): Check
427 DECL_NAMESPACE_ASSOCIATIONS instead.
430 * pt.c (get_mostly_instantiated_function_type): Just return the
431 type of the partially instantiated template in DECL_TI_TEMPLATE.
433 2015-03-20 Marek Polacek <polacek@redhat.com>
436 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
439 2015-03-20 Marek Polacek <polacek@redhat.com>
442 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
445 2015-03-19 Jason Merrill <jason@redhat.com>
448 Automatically propagate ABI tags to variables and functions
449 from their (return) type.
450 * class.c (check_tag): Handle variables and functions.
451 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
452 (mark_or_check_tags): Likewise.
453 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
454 (check_abi_tags): Add single argument overload for decls.
455 Handle inheriting tags for decls.
456 * mangle.c (write_mangled_name): Call it.
457 (mangle_return_type_p): Split out from write_encoding.
458 (unmangled_name_p): Split out from write_mangled_name.
459 (write_mangled_name): Ignore abi_tag on namespace.
460 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
461 * parser.c (cp_parser_namespace_definition): Set it.
462 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
463 about abi_tag attribute on non-inline namespace.
464 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
465 (handle_abi_tag_attribute): Allow tags on variables.
467 2015-03-19 Jakub Jelinek <jakub@redhat.com>
469 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
470 attribute for DECL_EXTERNAL VAR_DECLs.
472 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
475 * call.c (build_over_call): Pass the tsubst_flags_t argument to
477 * decl2.c (mark_used): Inline the require_deduced_type call and
478 guard the error call.
480 2015-03-16 Jason Merrill <jason@redhat.com>
483 * parser.c (cp_parser_template_name): Call strip_using_decl.
485 2015-03-16 Marek Polacek <polacek@redhat.com>
489 * decl.c (grokdeclarator): Allow volatile and constexpr together.
491 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
494 * decl.c (check_default_argument): Don't call
495 maybe_warn_zero_as_null_pointer_constant.
497 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
499 * cp-gimplify.c (simple_empty_class_p): New.
500 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
501 the code for empty class copies into simple_empty_class_p, and
502 adapt it to handle COMPOUND_EXPRs.
504 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
507 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
508 only if the location of newdecl doesn't match the location of olddecl.
510 2015-03-10 Jakub Jelinek <jakub@redhat.com>
513 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
516 2015-03-10 Jason Merrill <jason@redhat.com>
520 * pt.c (dependent_type_p_r): Check both class and alias template args.
522 2015-03-10 Jakub Jelinek <jakub@redhat.com>
525 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
526 before preparing arguments to warn_logical_not_parentheses.
527 Use maybe_constant_value on rhs.
529 2015-03-09 Jason Merrill <jason@redhat.com>
532 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
534 2015-03-09 Jakub Jelinek <jakub@redhat.com>
537 * parser.c (cp_parser_binary_expression): Don't warn for
538 !!x == y or !b == y where b is bool.
540 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
542 * ptree.c (cxx_print_lambda_node): New.
543 (cxx_print_xnode): Handle LAMBDA_EXPR.
545 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
548 * constexpr.c (cxx_eval_constant_expression): Remove assert in
549 RESULT_DECL handling.
551 2015-02-26 Marek Polacek <polacek@redhat.com>
554 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
555 a RETURN_EXPR if its operand is null.
557 2015-02-25 Jason Merrill <jason@redhat.com>
560 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
562 (constrain_visibility_for_template): Handle reference arguments.
565 * decl.c (start_preparsed_function): Use create_artificial_label
568 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
569 Jakub Jelinek <jakub@redhat.com>
572 * constexpr.c (check_constexpr_bind_expr_vars): Allow
573 implicit typedefs for lambda types.
575 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
578 * decl.c (lookup_and_check_tag): Use strip_using_decl.
580 2015-02-13 Jason Merrill <jason@redhat.com>
583 * pt.c (template_args_equal): Look through conversions here.
584 * tree.c (cp_tree_equal): Not here.
586 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
589 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
590 pragma_external context.
592 2015-02-13 Jason Merrill <jason@redhat.com>
595 * call.c (reference_binding): Don't look for bad conversion
598 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
601 * decl.c (make_typename_type): Pass tsubst_flags_t argument
602 to lookup_template_class.
604 2015-02-13 Jakub Jelinek <jakub@redhat.com>
607 * decl.c (start_preparsed_function): Use void_type_node instead
608 of NULL_TREE as LABEL_DECL type.
610 2015-02-12 Jason Merrill <jason@redhat.com>
613 * mangle.c (write_mangled_name): Fix test for variable template
616 * decl.c (begin_destructor_body): Condition clobber on
619 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
622 * parser.c (lookup_literal_operator): Return all candidates.
623 (cp_parser_userdef_char_literal): Simplify error handling.
624 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
625 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
626 Also give higher priority to standard string UDL operator.
628 2015-02-12 Jakub Jelinek <jakub@redhat.com>
631 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
632 * decl.c (poplevel): If functionbody, try not to create an extra
633 BLOCK for function body and use subblocks as that, if it is non-NULL
634 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
635 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
638 * except.c (check_noexcept_r): Return NULL for internal
641 2015-02-10 Jason Merrill <jason@redhat.com>
644 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
646 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
649 * method.c (use_thunk): Do not check for stdarg thunks.
651 2015-02-06 Jason Merrill <jason@redhat.com>
654 * init.c (build_vec_init): Handle default-initialized array with
655 constexpr default constructor.
657 2015-02-04 Jakub Jelinek <jakub@redhat.com>
661 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
663 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
666 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
667 for generated expressions.
669 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
672 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
675 2015-02-02 Jason Merrill <jason@redhat.com>
677 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
679 2015-01-30 Joseph Myers <joseph@codesourcery.com>
681 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
682 changed to pass input_location as first argument.
684 2015-01-29 Jakub Jelinek <jakub@redhat.com>
687 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
690 2015-01-29 Jason Merrill <jason@redhat.com>
693 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
694 erroneous return statement.
697 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
700 2015-01-27 Caroline Tice <cmtice@google.com>
702 Committing VTV Cywin/Ming patch for Patrick Wollgast
703 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
704 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
706 2015-01-27 Jason Merrill <jason@redhat.com>
709 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
710 current_function_decl.
713 * pt.c (finish_template_variable): Move from semantics.c.
714 Handle multiple template arg levels. Handle coercion here.
715 (lookup_template_variable): Not here.
717 2015-01-23 Jason Merrill <jason@redhat.com>
721 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
722 that has been completely split out.
725 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
729 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
732 2015-01-21 Jason Merrill <jason@redhat.com>
735 * constexpr.c (cxx_eval_constant_expression): Only shortcut
736 constant CONSTRUCTORs.
739 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
740 give a hard error in a template instantiation.
742 2015-01-21 Richard Biener <rguenther@suse.de>
745 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
746 for builtins the user declared correctly.
748 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
751 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
752 TREE_TYPE (elt) == error_mark_node.
754 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
756 PR tree-optimization/62053
757 * tree.c (build_cplus_array_type): Layout type after variants are set.
759 2015-01-15 Jakub Jelinek <jakub@redhat.com>
761 * cp-gimplify.c (cp_genericize_r): Call
762 cp_ubsan_maybe_instrument_member_call for member calls.
763 (cp_ubsan_check_member_access_r): New function.
764 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
765 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
766 cp_ubsan_instrument_member_accesses,
767 cp_ubsan_maybe_instrument_downcast,
768 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
769 * cp-ubsan.c: New file.
770 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
771 * constexpr.c (cxx_eval_call_expression): Return void_node
773 (potential_constant_expression_1): Return true for
774 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
775 * typeck.c (build_class_member_access_expr): Provide locus
777 (build_static_cast_1): Instrument downcasts.
778 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
779 add ubsan instrumentation for virtual_access.
780 * call.c: Include internal-fn.h.
781 (set_flags_from_callee): Handle internal calls.
783 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
786 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
787 and function templates, declared only in the class.
788 * decl.c (duplicate_decls): Reveal hidden friend functions or
789 function templates, if they are redeclared outside the class.
791 2015-01-15 Jason Merrill <jason@redhat.com>
794 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
797 * constexpr.c (potential_constant_expression_1): Handle reference
800 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
801 James Norris <jnorris@codesourcery.com>
802 Cesar Philippidis <cesar@codesourcery.com>
803 Ilmir Usmanov <i.usmanov@samsung.com>
804 Jakub Jelinek <jakub@redhat.com>
806 * parser.c: Include "gomp-constants.h".
807 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
808 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
809 Use OMP_CLAUSE_SET_MAP_KIND.
810 (cp_parser_omp_construct, cp_parser_pragma): Handle
811 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
812 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
813 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
814 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
815 "create", "delete", "deviceptr", "host", "num_gangs",
816 "num_workers", "present", "present_or_copy", "pcopy",
817 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
818 "present_or_create", "pcreate", "vector_length", "wait".
819 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
820 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
821 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
822 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
823 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
824 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
825 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
826 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
827 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
828 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
829 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
830 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
831 (cp_parser_oacc_parallel, cp_parser_oacc_update)
832 (cp_parser_oacc_wait): New functions.
833 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
834 (finish_oacc_parallel): New prototypes.
835 * semantics.c: Include "gomp-constants.h".
836 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
837 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
838 OMP_CLAUSE_SET_MAP_KIND.
839 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
840 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
841 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
842 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
845 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
848 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
851 2015-01-13 Jason Merrill <jason@redhat.com>
855 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
857 (cxx_eval_increment_expression): Likewise.
860 * pt.c (coerce_template_parameter_pack): Return NULL for a
861 zero-length fixed parameter pack with a pack expansion arg.
864 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
866 2015-01-12 Jason Merrill <jason@redhat.com>
869 * constexpr.c (cxx_eval_call_expression): A call to a void
870 function doesn't need to return a value.
872 2015-01-09 Michael Collison <michael.collison@linaro.org>
874 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
875 input.h, alias.h, symtab.h, options.h, fold-const.h,
876 wide-int.h, and inchash.h due to flattening of tree.h.
878 * constexpr.c: Ditto.
879 * cp-array-notation.c: Ditto.
880 * cp-gimplify.c: Ditto.
882 * cp-objcp-common.c: Ditto.
895 * name-lookup.c: Ditto.
903 * semantics.c: Ditto.
908 2015-01-08 Jason Merrill <jason@redhat.com>
910 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
911 * decl.c (compute_array_index_type): Likewise.
912 * init.c (build_vec_init): Likewise.
913 * typeck.c (cp_build_binary_op): Likewise.
915 2015-01-08 Jason Merrill <jason@redhat.com>
917 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
918 whether an initializer-list is too big for a VLA.
919 (throw_bad_array_length): Remove.
920 * cp-tree.h: Remove prototype.
922 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
925 * decl.c (grokfndecl): Add bool parameter.
926 (grokdeclarator): Adjust calls.
927 (start_decl): Don't set DECL_DELETED_FN here.
929 2015-01-06 Jason Merrill <jason@redhat.com>
931 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
935 * pt.c (type_dependent_expression_p): Handle variable templates.
936 * constexpr.c (potential_constant_expression_1): Use it.
939 * semantics.c (finish_offsetof): Handle templates here.
940 * parser.c (cp_parser_builtin_offsetof): Not here.
943 * semantics.c (process_outer_var_ref): Diagnose lambda in local
946 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
949 * class.c (check_field_decls): Make copy assignment operators
950 complex only in c++98 mode.
952 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
955 * class.c (check_for_override): Warn when a virtual function is an
956 override not marked override.
958 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
960 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
962 (get_basefndecls): Adjust.
964 2015-01-05 Jakub Jelinek <jakub@redhat.com>
966 Update copyright years.
968 2015-01-05 Marek Polacek <polacek@redhat.com>
971 * typeck.c (cp_build_array_ref): Pass loc down to
972 warn_array_subscript_with_type_char.
975 Copyright (C) 2015 Free Software Foundation, Inc.
977 Copying and distribution of this file, with or without modification,
978 are permitted in any medium without royalty provided the copyright
979 notice and this notice are preserved.