1 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3 * Make-lang.in (check_g++_parallelize): Update comment.
5 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
8 * decl.c (grokdeclarator): Use the correct location in error
9 messages about 'explicit'.
11 2015-05-22 Marek Polacek <polacek@redhat.com>
12 Edward Smith-Rowland <3dw4rd@verizon.net>
15 * cp-tree.h (build_enumerator): Update declaration.
16 * decl.c (build_enumerator): Add attributes parameter. Call
17 cplus_decl_attributes.
18 * init.c (constant_value_1): Pass tf_none to mark_used.
19 * parser.c (cp_parser_enumerator_definition): Parse attributes and
20 pass them down to build_enumerator.
21 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
22 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
24 2015-05-21 Nathan Sidwell <nathan@acm.org>
27 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
29 2015-05-21 Marek Polacek <polacek@redhat.com>
31 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
33 2015-05-20 Jason Merrill <jason@redhat.com>
35 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
36 before register_specialization.
38 * decl.c (grok_op_properties): Don't complain about size_t
39 placement delete here.
40 * call.c (second_parm_is_size_t): Split out from...
41 (non_placement_deallocation_fn_p): ...here.
42 (build_op_delete_call): Warn about size_t placement delete with
45 2015-05-19 Nathan Sidwell <nathan@acm.org>
48 * typeck.c (finish_class_member_access_expr): Diagnose failed
49 lookup of enum class member.
51 2015-05-19 Jakub Jelinek <jakub@redhat.com>
54 * parser.c (cp_parser_omp_for_loop): Don't add
55 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
56 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
57 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
60 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
62 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
65 2015-05-18 Jason Merrill <jason@redhat.com>
67 * pt.c (retrieve_specialization): Make sure our arguments have
68 gone through strip_typedefs.
70 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
71 (determine_specialization): Call coerce_template_parms.
74 * pt.c (type_unification_real): Check convertibility here.
75 (unify_one_argument): Not here.
77 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
78 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
79 [TREE_LIST]: Fix no-change case.
81 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
83 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
86 * error.c (cp_diagnostic_starter): Use diagnostic_location
88 (cp_print_error_function): Likewise.
89 (cp_printer): Replace locus pointer with accessor function.
91 2015-05-12 David Malcolm <dmalcolm@redhat.com>
93 * parser.c (cp_parser_selection_statement): Add location and
94 guard_kind arguments to calls to
95 cp_parser_implicitly_scoped_statement.
96 (cp_parser_iteration_statement): Likewise for calls to
97 cp_parser_already_scoped_statement.
98 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
99 "guard_kind" params; use them to warn for misleading
101 (cp_parser_already_scoped_statement): Likewise.
103 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
105 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
106 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
107 * semantics.c (finish_member_declaration): Likewise.
108 * method.c (lazily_declare_fn): Allways add method to main variant list.
110 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
113 * decl2.c (note_mangling_alias): Declare arguments as unused.
115 2015-05-08 Jason Merrill <jason@redhat.com>
117 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
120 2015-05-08 Jason Merrill <jason@redhat.com>
122 * decl2.c (mangling_aliases): New variable.
123 (note_mangling_alias, generate_mangling_aliases): New.
124 (cp_write_global_declarations): Call generate_mangling_aliases.
125 (generate_mangling_alias): Split out from...
126 * mangle.c (mangle_decl): ...here.
127 * cp-tree.h: Declare note_mangling_alias.
129 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
131 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
132 (build_java_method_aliases): Adapt to use create_same_body_alias
133 instead of assemble_alias. Move variable declarations to
134 definition and tidy up.
135 (cp_write_global_declarations): Call build_java_method_aliases
136 instead of collecting candidates first.
138 2015-05-07 Jason Merrill <jason@redhat.com>
141 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
142 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
143 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
144 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
145 (apply_late_template_attributes): Handle attribute pack expansion.
147 2015-05-07 Marek Polacek <polacek@redhat.com>
150 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
153 2015-05-07 Jason Merrill <jason@redhat.com>
157 * typeck2.c (digest_init_r): Fix single element list.
159 2015-05-05 Jason Merrill <jason@redhat.com>
161 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
162 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
164 (cp_genericize_data): Add try_block field.
165 (cp_genericize_tree): Initialize it.
166 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
169 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
172 * semantics.c (finish_call_expr): Check complain.
174 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
175 maybe-in-charge constructor.
177 * decl.c (start_decl): Don't push the plain VAR_DECL for a
184 * call.c (convert_like_real): Check value-initialization before
186 * typeck2.c (process_init_constructor_record): Don't set
187 CONSTRUCTOR_IS_DIRECT_INIT.
188 (process_init_constructor_array): Likewise.
189 * init.c (build_vec_init): Likewise.
191 2015-05-05 David Malcolm <dmalcolm@redhat.com>
193 * parser.c (cp_parser_asm_definition): Only test for
194 error_mark_node if "outputs" was just set. Likewise for "inputs".
196 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
197 Jakub Jelinek <jakub@redhat.com>
200 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
201 result in an actual error.
203 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
204 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
207 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
210 2015-04-30 David Malcolm <dmalcolm@redhat.com>
212 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
215 2015-04-29 Jason Merrill <jason@redhat.com>
218 * tree.c (apply_identity_attributes): Fix handling of classes.
220 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
222 * parser.c (cp_parser_oacc_enter_exit_data): Use
223 OMP_STANDALONE_CLAUSES.
225 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
228 * init.c (perform_member_init): Handle references for -Winit-self.
230 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
232 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
233 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
235 2015-04-28 Jason Merrill <jason@redhat.com>
238 * constexpr.c (cxx_eval_store_expression): Don't try to actually
239 store an empty class.
242 * constexpr.c (cxx_eval_builtin_function_call): Fix
243 __builtin_constant_p.
246 * tree.c (strip_typedefs): Add remove_attributes parm.
247 (strip_typedefs_expr): Likewise.
248 (apply_identity_attributes): New subroutine of strip_typedefs.
249 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
250 (convert_nontype_argument, unify): Likewise.
254 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
256 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
258 * class.c (layout_class_type): Remove check if
259 PCC_BITFIELD_TYPE_MATTERS is defined.
261 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
263 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
265 2015-04-24 Jason Merrill <jason@redhat.com>
268 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
270 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
271 Remove obsolete code.
274 2015-04-23 Jason Merrill <jason@redhat.com>
277 * pt.c (check_explicit_specialization): Don't
278 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
280 * decl.c (grokvardecl): Revert earlier fix.
282 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
285 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
286 suppresses the diagnostic.
288 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
290 Reject trailing return type for an operator auto().
291 * decl.c (grokdeclarator): Reject trailing return types for
292 all conversion operators, don't handle conversion operators
293 in the previous checks that deal with auto.
295 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
297 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
299 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
301 * class.c (resolve_address_of_overloaded_function, instantiate_type):
302 Rename tsubst_flags_t parameter flags -> complain.
304 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
306 * call.c (build_op_delete_call, build_over_call): Check mark_used
308 * class.c (resolve_address_of_overloaded_function): Likewise.
309 * decl.c (cxx_maybe_build_cleanup): Likewise.
310 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
311 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
312 * rtti.c (build_dynamic_cast_1): Likewise.
313 * semantics.c (process_outer_var_ref): Likewise.
314 * typeck.c (build_class_member_access_expr,
315 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
317 2015-04-15 Jason Merrill <jason@redhat.com>
319 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
320 (build_constexpr_constructor_member_initializers): Loop to find
322 * decl.c (start_preparsed_function): Clobber the object at the
323 beginning of a constructor.
325 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
326 * method.c (implicitly_declare_fn): Likewise.
327 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
329 * decl2.c (determine_visibility): Use get_template_info.
331 2015-04-15 Jason Merrill <jason@redhat.com>
332 Marek Polacek <polacek@redhat.com>
335 * lambda.c (lambda_expr_this_capture): In unevaluated context go
336 through the normal loop, just don't capture.
337 (maybe_resolve_dummy): Handle null return.
339 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
341 * call.c (enforce_access): Emit error + inform.
343 2015-04-15 Marek Polacek <polacek@redhat.com>
345 * constexpr.c (use_new_call): Remove #define.
346 (lookup_parameter_binding): Remove function.
347 (cxx_bind_parameters_in_call): Remove unused code.
348 (cxx_eval_call_expression): Likewise.
349 (cxx_eval_constant_expression): Likewise.
351 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
353 * tree.c (replace_placeholders_t): Remove unused type.
354 (replace_placeholders): Remove unused pset.
356 2015-04-14 Jason Merrill <jason@redhat.com>
358 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
361 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
364 * name-lookup.c (do_class_using_decl): Complain about specifying
365 the current class even if there are dependent bases.
367 2015-04-14 David Krauss <david_work@me.com>
370 * decl.c (grokdeclarator): Do not flag friends with deduced return.
372 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
373 Jason Merrill <jason@redhat.com>
376 * parser.c (cp_parser_class_name): Add enum_ok parameter.
377 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
378 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
381 2015-04-12 Jakub Jelinek <jakub@redhat.com>
384 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
385 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
386 the expression to the original type at the end.
388 2015-04-09 Jakub Jelinek <jakub@redhat.com>
391 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
395 * tree.c (build_cplus_array_type): Layout type before variants are
396 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
399 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
402 * lambda.c (add_capture): Use dependent_type_p for capture by
405 2015-04-02 Marek Polacek <polacek@redhat.com>
408 * constexpr.c (cxx_eval_pointer_plus_expression): Call
409 cxx_eval_constant_expression on the first operand.
411 2015-04-01 Jason Merrill <jason@redhat.com>
414 * decl.c (make_typename_type): Handle seeing a variable template.
416 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
419 * pt.c (instantiating_current_function_p): New.
420 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
421 * cp-tree.h (instantiating_current_function_p): Declare.
423 2015-04-01 Jason Merrill <jason@redhat.com>
426 * decl.c (grokvardecl): Don't call check_explicit_specialization
427 for non-template members of a class template.
429 2015-04-01 Marek Polacek <polacek@redhat.com>
432 * class.c (finish_struct): Require that the second field of a
433 user-defined initializer_list be of size type.
435 2015-03-31 Marek Polacek <polacek@redhat.com>
438 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
439 checking for constness.
441 2015-03-30 Marek Polacek <polacek@redhat.com>
444 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
445 *(&A[i] p+ j) => A[i + j] transformation here.
446 (cxx_eval_pointer_plus_expression): New function.
447 (cxx_eval_constant_expression): Use it here.
449 2015-03-27 Tobias Burnus <burnus@net-b.de>
452 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
453 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
454 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
457 2015-03-27 Marek Polacek <polacek@redhat.com>
460 * semantics.c (finish_switch_cond): If the unlowered type is not an
461 enum, use the type of the condition.
463 2015-03-27 Jason Merrill <jason@redhat.com>
466 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
469 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
472 * init.c (build_vec_init): Fix initializing aggregates
473 with empty init list.
475 2015-03-26 Jason Merrill <jason@redhat.com>
478 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
480 2015-03-25 Marek Polacek <polacek@redhat.com>
483 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
484 on an anonymous namespace.
486 2015-03-25 Marek Polacek <polacek@redhat.com>
489 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
491 2015-03-24 Jason Merrill <jason@redhat.com>
494 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
495 * parser.c (cp_parser_namespace_definition): Don't set it.
496 * name-lookup.c (handle_namespace_attrs): Check
497 DECL_NAMESPACE_ASSOCIATIONS instead.
500 * pt.c (get_mostly_instantiated_function_type): Just return the
501 type of the partially instantiated template in DECL_TI_TEMPLATE.
503 2015-03-20 Marek Polacek <polacek@redhat.com>
506 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
509 2015-03-20 Marek Polacek <polacek@redhat.com>
512 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
515 2015-03-19 Jason Merrill <jason@redhat.com>
518 Automatically propagate ABI tags to variables and functions
519 from their (return) type.
520 * class.c (check_tag): Handle variables and functions.
521 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
522 (mark_or_check_tags): Likewise.
523 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
524 (check_abi_tags): Add single argument overload for decls.
525 Handle inheriting tags for decls.
526 * mangle.c (write_mangled_name): Call it.
527 (mangle_return_type_p): Split out from write_encoding.
528 (unmangled_name_p): Split out from write_mangled_name.
529 (write_mangled_name): Ignore abi_tag on namespace.
530 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
531 * parser.c (cp_parser_namespace_definition): Set it.
532 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
533 about abi_tag attribute on non-inline namespace.
534 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
535 (handle_abi_tag_attribute): Allow tags on variables.
537 2015-03-19 Jakub Jelinek <jakub@redhat.com>
539 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
540 attribute for DECL_EXTERNAL VAR_DECLs.
542 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
545 * call.c (build_over_call): Pass the tsubst_flags_t argument to
547 * decl2.c (mark_used): Inline the require_deduced_type call and
548 guard the error call.
550 2015-03-16 Jason Merrill <jason@redhat.com>
553 * parser.c (cp_parser_template_name): Call strip_using_decl.
555 2015-03-16 Marek Polacek <polacek@redhat.com>
559 * decl.c (grokdeclarator): Allow volatile and constexpr together.
561 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
564 * decl.c (check_default_argument): Don't call
565 maybe_warn_zero_as_null_pointer_constant.
567 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
569 * cp-gimplify.c (simple_empty_class_p): New.
570 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
571 the code for empty class copies into simple_empty_class_p, and
572 adapt it to handle COMPOUND_EXPRs.
574 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
577 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
578 only if the location of newdecl doesn't match the location of olddecl.
580 2015-03-10 Jakub Jelinek <jakub@redhat.com>
583 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
586 2015-03-10 Jason Merrill <jason@redhat.com>
590 * pt.c (dependent_type_p_r): Check both class and alias template args.
592 2015-03-10 Jakub Jelinek <jakub@redhat.com>
595 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
596 before preparing arguments to warn_logical_not_parentheses.
597 Use maybe_constant_value on rhs.
599 2015-03-09 Jason Merrill <jason@redhat.com>
602 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
604 2015-03-09 Jakub Jelinek <jakub@redhat.com>
607 * parser.c (cp_parser_binary_expression): Don't warn for
608 !!x == y or !b == y where b is bool.
610 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
612 * ptree.c (cxx_print_lambda_node): New.
613 (cxx_print_xnode): Handle LAMBDA_EXPR.
615 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
618 * constexpr.c (cxx_eval_constant_expression): Remove assert in
619 RESULT_DECL handling.
621 2015-02-26 Marek Polacek <polacek@redhat.com>
624 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
625 a RETURN_EXPR if its operand is null.
627 2015-02-25 Jason Merrill <jason@redhat.com>
630 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
632 (constrain_visibility_for_template): Handle reference arguments.
635 * decl.c (start_preparsed_function): Use create_artificial_label
638 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
639 Jakub Jelinek <jakub@redhat.com>
642 * constexpr.c (check_constexpr_bind_expr_vars): Allow
643 implicit typedefs for lambda types.
645 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
648 * decl.c (lookup_and_check_tag): Use strip_using_decl.
650 2015-02-13 Jason Merrill <jason@redhat.com>
653 * pt.c (template_args_equal): Look through conversions here.
654 * tree.c (cp_tree_equal): Not here.
656 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
659 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
660 pragma_external context.
662 2015-02-13 Jason Merrill <jason@redhat.com>
665 * call.c (reference_binding): Don't look for bad conversion
668 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
671 * decl.c (make_typename_type): Pass tsubst_flags_t argument
672 to lookup_template_class.
674 2015-02-13 Jakub Jelinek <jakub@redhat.com>
677 * decl.c (start_preparsed_function): Use void_type_node instead
678 of NULL_TREE as LABEL_DECL type.
680 2015-02-12 Jason Merrill <jason@redhat.com>
683 * mangle.c (write_mangled_name): Fix test for variable template
686 * decl.c (begin_destructor_body): Condition clobber on
689 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
692 * parser.c (lookup_literal_operator): Return all candidates.
693 (cp_parser_userdef_char_literal): Simplify error handling.
694 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
695 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
696 Also give higher priority to standard string UDL operator.
698 2015-02-12 Jakub Jelinek <jakub@redhat.com>
701 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
702 * decl.c (poplevel): If functionbody, try not to create an extra
703 BLOCK for function body and use subblocks as that, if it is non-NULL
704 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
705 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
708 * except.c (check_noexcept_r): Return NULL for internal
711 2015-02-10 Jason Merrill <jason@redhat.com>
714 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
716 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
719 * method.c (use_thunk): Do not check for stdarg thunks.
721 2015-02-06 Jason Merrill <jason@redhat.com>
724 * init.c (build_vec_init): Handle default-initialized array with
725 constexpr default constructor.
727 2015-02-04 Jakub Jelinek <jakub@redhat.com>
731 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
733 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
736 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
737 for generated expressions.
739 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
742 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
745 2015-02-02 Jason Merrill <jason@redhat.com>
747 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
749 2015-01-30 Joseph Myers <joseph@codesourcery.com>
751 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
752 changed to pass input_location as first argument.
754 2015-01-29 Jakub Jelinek <jakub@redhat.com>
757 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
760 2015-01-29 Jason Merrill <jason@redhat.com>
763 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
764 erroneous return statement.
767 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
770 2015-01-27 Caroline Tice <cmtice@google.com>
772 Committing VTV Cywin/Ming patch for Patrick Wollgast
773 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
774 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
776 2015-01-27 Jason Merrill <jason@redhat.com>
779 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
780 current_function_decl.
783 * pt.c (finish_template_variable): Move from semantics.c.
784 Handle multiple template arg levels. Handle coercion here.
785 (lookup_template_variable): Not here.
787 2015-01-23 Jason Merrill <jason@redhat.com>
791 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
792 that has been completely split out.
795 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
799 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
802 2015-01-21 Jason Merrill <jason@redhat.com>
805 * constexpr.c (cxx_eval_constant_expression): Only shortcut
806 constant CONSTRUCTORs.
809 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
810 give a hard error in a template instantiation.
812 2015-01-21 Richard Biener <rguenther@suse.de>
815 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
816 for builtins the user declared correctly.
818 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
821 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
822 TREE_TYPE (elt) == error_mark_node.
824 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
826 PR tree-optimization/62053
827 * tree.c (build_cplus_array_type): Layout type after variants are set.
829 2015-01-15 Jakub Jelinek <jakub@redhat.com>
831 * cp-gimplify.c (cp_genericize_r): Call
832 cp_ubsan_maybe_instrument_member_call for member calls.
833 (cp_ubsan_check_member_access_r): New function.
834 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
835 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
836 cp_ubsan_instrument_member_accesses,
837 cp_ubsan_maybe_instrument_downcast,
838 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
839 * cp-ubsan.c: New file.
840 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
841 * constexpr.c (cxx_eval_call_expression): Return void_node
843 (potential_constant_expression_1): Return true for
844 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
845 * typeck.c (build_class_member_access_expr): Provide locus
847 (build_static_cast_1): Instrument downcasts.
848 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
849 add ubsan instrumentation for virtual_access.
850 * call.c: Include internal-fn.h.
851 (set_flags_from_callee): Handle internal calls.
853 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
856 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
857 and function templates, declared only in the class.
858 * decl.c (duplicate_decls): Reveal hidden friend functions or
859 function templates, if they are redeclared outside the class.
861 2015-01-15 Jason Merrill <jason@redhat.com>
864 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
867 * constexpr.c (potential_constant_expression_1): Handle reference
870 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
871 James Norris <jnorris@codesourcery.com>
872 Cesar Philippidis <cesar@codesourcery.com>
873 Ilmir Usmanov <i.usmanov@samsung.com>
874 Jakub Jelinek <jakub@redhat.com>
876 * parser.c: Include "gomp-constants.h".
877 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
878 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
879 Use OMP_CLAUSE_SET_MAP_KIND.
880 (cp_parser_omp_construct, cp_parser_pragma): Handle
881 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
882 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
883 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
884 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
885 "create", "delete", "deviceptr", "host", "num_gangs",
886 "num_workers", "present", "present_or_copy", "pcopy",
887 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
888 "present_or_create", "pcreate", "vector_length", "wait".
889 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
890 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
891 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
892 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
893 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
894 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
895 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
896 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
897 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
898 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
899 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
900 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
901 (cp_parser_oacc_parallel, cp_parser_oacc_update)
902 (cp_parser_oacc_wait): New functions.
903 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
904 (finish_oacc_parallel): New prototypes.
905 * semantics.c: Include "gomp-constants.h".
906 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
907 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
908 OMP_CLAUSE_SET_MAP_KIND.
909 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
910 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
911 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
912 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
915 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
918 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
921 2015-01-13 Jason Merrill <jason@redhat.com>
925 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
927 (cxx_eval_increment_expression): Likewise.
930 * pt.c (coerce_template_parameter_pack): Return NULL for a
931 zero-length fixed parameter pack with a pack expansion arg.
934 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
936 2015-01-12 Jason Merrill <jason@redhat.com>
939 * constexpr.c (cxx_eval_call_expression): A call to a void
940 function doesn't need to return a value.
942 2015-01-09 Michael Collison <michael.collison@linaro.org>
944 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
945 input.h, alias.h, symtab.h, options.h, fold-const.h,
946 wide-int.h, and inchash.h due to flattening of tree.h.
948 * constexpr.c: Ditto.
949 * cp-array-notation.c: Ditto.
950 * cp-gimplify.c: Ditto.
952 * cp-objcp-common.c: Ditto.
965 * name-lookup.c: Ditto.
973 * semantics.c: Ditto.
978 2015-01-08 Jason Merrill <jason@redhat.com>
980 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
981 * decl.c (compute_array_index_type): Likewise.
982 * init.c (build_vec_init): Likewise.
983 * typeck.c (cp_build_binary_op): Likewise.
985 2015-01-08 Jason Merrill <jason@redhat.com>
987 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
988 whether an initializer-list is too big for a VLA.
989 (throw_bad_array_length): Remove.
990 * cp-tree.h: Remove prototype.
992 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
995 * decl.c (grokfndecl): Add bool parameter.
996 (grokdeclarator): Adjust calls.
997 (start_decl): Don't set DECL_DELETED_FN here.
999 2015-01-06 Jason Merrill <jason@redhat.com>
1001 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1005 * pt.c (type_dependent_expression_p): Handle variable templates.
1006 * constexpr.c (potential_constant_expression_1): Use it.
1009 * semantics.c (finish_offsetof): Handle templates here.
1010 * parser.c (cp_parser_builtin_offsetof): Not here.
1013 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1016 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1019 * class.c (check_field_decls): Make copy assignment operators
1020 complex only in c++98 mode.
1022 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1025 * class.c (check_for_override): Warn when a virtual function is an
1026 override not marked override.
1028 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1030 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1032 (get_basefndecls): Adjust.
1034 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1036 Update copyright years.
1038 2015-01-05 Marek Polacek <polacek@redhat.com>
1041 * typeck.c (cp_build_array_ref): Pass loc down to
1042 warn_array_subscript_with_type_char.
1045 Copyright (C) 2015 Free Software Foundation, Inc.
1047 Copying and distribution of this file, with or without modification,
1048 are permitted in any medium without royalty provided the copyright
1049 notice and this notice are preserved.