1 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
3 Implement N4197 - Adding u8 character literals
4 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
5 and CPP_UTF8CHAR_USERDEF tokens;
6 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
8 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
11 * decl.c (grokfndecl): Allow constexpr declarations of friend
12 template specializations.
14 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
17 * decl.c (finish_function): Call do_warn_unused_parameter.
19 2015-06-29 Marek Polacek <polacek@redhat.com>
22 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
23 (push_switch): Set OUTSIDE_RANGE_P.
24 (pop_switch): Update c_do_switch_warnings call.
25 (finish_case_label): Update c_add_case_label call.
26 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
29 2015-06-27 Marek Polacek <polacek@redhat.com>
31 * call.c: Use VECTOR_TYPE_P.
32 * constexpr.c: Likewise.
37 * semantics.c: Likewise.
40 * typeck2.c: Likewise.
42 2015-06-27 Marek Polacek <polacek@redhat.com>
44 * call.c (set_up_extended_ref_temp): Use VAR_P.
45 * class.c: Use VAR_P throughout.
46 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
47 * cp-array-notation.c (make_triplet_val_inv): Likewise.
48 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
51 * error.c (dump_decl): Use VAR_P.
52 * mangle.c (decl_implicit_alias_p): Likewise.
53 * parser.c: Use VAR_P throughout.
55 * semantics.c: Likewise.
56 * vtable-class-hierarchy.c: Likewise.
57 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
59 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
61 * pt.c (check_unstripped_args): Mark parameter as unused.
63 2015-06-26 Jason Merrill <jason@redhat.com>
66 * class.c (finish_struct): Call fixup_attribute_variants.
69 * typeck2.c (merge_exception_specifiers): Allow different
70 noexcept-specifiers if we've had errors.
73 * pt.c (check_unstripped_args): Split out from...
74 (retrieve_specialization): ...here. Allow typedefs in the type of
78 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
80 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
83 * typeck2.c (digest_init_r): Only expect reshaping if the class is
86 2015-06-26 Marek Polacek <polacek@redhat.com>
88 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
89 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
91 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
93 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
95 * cp-ubsan.c: Likewise.
100 * method.c: Likewise.
101 * optimize.c: Likewise.
102 * parser.c: Likewise.
103 * semantics.c: Likewise.
105 * vtable-class-hierarchy.c: Likewise.
107 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
109 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
110 rather than ggc_hasher.
111 (constexpr_call_hasher): Likewise.
112 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
113 * decl.c (typename_hasher): Likewise.
114 * mangle.c (conv_type_hasher): Likewise.
115 * pt.c (spec_hasher): Likewise.
116 * tree.c (cplus_array_hasher, list_hasher): Likewise.
117 * typeck2.c (abstract_type_hasher): Likewise.
119 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
121 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
122 rather than pointer_hash.
123 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
124 * semantics.c (nrv_data): Likewise.
125 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
127 2015-06-24 Jason Merrill <jason@redhat.com>
130 * pt.c (dependent_type_p_r): Check for dependent alias template
131 specialization sooner.
134 * class.c (type_has_nontrivial_assignment): Remove.
135 * cp-tree.h: Remove declaration.
136 * init.c (vec_copy_assign_is_trivial): New.
137 (build_vec_init): Use it.
139 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
141 Implement N3928 - Extending static_assert
142 * parser.c (cp_parser_static_assert): Support static_assert with
143 no message string. Supply an empty string in this case.
144 * semantics.c (finish_static_assert): Don't try to print a message if
145 the message strnig is empty.
147 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
150 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
151 implicit template parm if 'auto' is a placeholder for trailing
154 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
157 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
160 * parser.c (cp_parser_template_parameter_list): Update
161 current_template_parms right after processing a paramater.
162 * pt.c (template_parms_to_args): Remove obsolete hack for
163 giving template template arguments the proper level.
164 (check_default_tmpl_args): Account for tested template
166 (splite_late_return_type): Remove obsolete hack for giving
167 template template arguments the proper level.
169 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
172 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
174 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
177 * parser.c (cp_parser_template_parameter_list): Update
178 current_template_parms right after processing a paramater.
179 * pt.c (template_parms_to_args): Remove obsolete hack for
180 giving template template arguments the proper level.
181 (check_default_tmpl_args): Account for tested template
183 (splite_late_return_type): Remove obsolete hack for giving
184 template template arguments the proper level.
186 2015-06-23 Jason Merrill <jason@redhat.com>
189 * decl.c (grokfndecl): Check the linkage of ctype, not just
191 * tree.c (no_linkage_check): Skip the 'this' pointer.
194 * class.c (type_has_nontrivial_assignment): New.
195 * init.c (build_vec_init): Use it.
196 * cp-tree.h: Declare it.
197 * method.c (trivial_fn_p): Templates aren't trivial.
200 * decl.c (expand_static_init): Make sure the destructor is callable
201 here even if we have an initializer.
203 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
205 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
206 -fdump-ada-spec is passed.
208 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
210 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
212 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
214 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
216 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
218 * decl.c (grokdeclarator): Remove pointless code.
220 2015-06-22 Jason Merrill <jason@redhat.com>
223 * call.c (implicit_conversion): Only reshape for classes.
225 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
227 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
229 * semantics.c (finish_omp_atomic): Likewise.
230 * typeck.c (cp_build_array_ref): Likewise.
232 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
235 * call.c (build_new_op_1): Check tf_warning flag in all cases.
237 2015-06-19 Jason Merrill <jason@redhat.com>
240 * pt.c (instantiate_class_template_1): Clear
241 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
244 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
246 * typeck.c (merge_types): build_ptrmemfunc_type before applying
247 quals and attributes.
250 * constexpr.c (build_constexpr_constructor_member_initializers):
251 Handle an empty STATEMENT_LIST.
254 * pt.c (tsubst_copy_and_build): Register a capture proxy in
255 local_specializations.
257 2015-06-17 Jason Merrill <jason@redhat.com>
260 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
262 (potential_constant_expression_1): Likewise.
264 2015-06-17 Jason Merrill <jason@redhat.com>
267 * call.c (implicit_conversion): Call reshape_init here, early.
268 (build_aggr_conv): Not here.
270 2015-06-17 Jakub Jelinek <jakub@redhat.com>
273 * pt.c (tsubst_omp_clause_decl): New function.
274 (tsubst_omp_clauses): Use it or tsubst_copy instead of
275 tsubst_expr on OMP_CLAUSE_DECL.
277 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
279 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
280 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
281 * decl.c (grokdeclarator, xref_tag_1): Likewise.
282 * error.c (dump_aggr_type): likewise.
283 * pt.c (push_template_decl_real): Likewise.
284 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
286 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
288 * call.c: Do not include input.h, line-map.h or is-a.h.
290 * constexpr.c: Likewise.
291 * cp-array-notation.c: Likewise.
292 * cp-gimplify.c: Likewise.
293 * cp-lang.c: Likewise.
294 * cp-objcp-common.c: Likewise.
295 * cp-tree.h: Likewise.
296 * cp-ubsan.c: Likewise.
302 * except.c: Likewise.
304 * friend.c: Likewise.
306 * lambda.c: Likewise.
308 * mangle.c: Likewise.
309 * method.c: Likewise.
310 * name-lookup.c: Likewise.
311 * optimize.c: Likewise.
312 * parser.c: Likewise.
317 * search.c: Likewise.
318 * semantics.c: Likewise.
320 * typeck.c: Likewise.
321 * typeck2.c: Likewise.
322 * vtable-class-hierarchy.c: Likewise.
324 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
327 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
329 2015-06-16 Jason Merrill <jason@redhat.com>
332 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
336 * tree.c (bot_manip): Remap SAVE_EXPR.
339 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
341 2015-06-15 Nathan Sidwell <nathan@acm.org>
344 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
345 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
346 protect it from recursive instantiation.
348 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
351 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
352 using a local type is pure virtual.
354 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
356 * call.c: Remove comment documenting the long-deleted
357 function build_method_call.
359 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
362 * typeck.c (cp_build_binary_op): Warn when comparing an address
363 of a reference against NULL.
365 2015-06-12 Jason Merrill <jason@redhat.com>
368 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
369 variables as DECL_NOT_REALLY_EXTERN.
371 2015-06-11 Jason Merrill <jason@redhat.com>
374 * constexpr.c (potential_constant_expression_1): Handle a
375 DECL_EXPR of TYPE_DECL.
378 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
381 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
383 * decl.c (cxx_init_decl_processing): Register the main
384 translation unit through the new debug hook.
386 2015-06-10 Jason Merrill <jason@redhat.com>
389 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
390 * pt.c (push_template_decl_real): Set it.
391 (dependent_alias_template_spec_p): Use it.
392 (dependent_type_p_r): Use dependent_alias_template_spec_p.
393 (uses_all_template_parms_data, uses_all_template_parms_r)
394 (complex_alias_template_p): New.
395 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
397 2015-06-09 Jason Merrill <jason@redhat.com>
401 * typeck2.c (digest_init_r): Replace previous change with
405 * semantics.c (process_outer_var_ref): Make sure the value is
406 actually constant before returning it.
407 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
410 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
413 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
414 * init.c (expand_default_init): Likewise.
416 2015-06-09 Jason Merrill <jason@redhat.com>
419 * tree.c (replace_placeholders_r): Handle placeholders for an
421 * typeck2.c (store_init_value): Only replace_placeholders for
422 objects of class type.
424 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
426 * call.c : Adjust include files.
427 * class.c : Likewise.
428 * constexpr.c : Likewise.
429 * cp-array-notation.c : Likewise.
430 * cp-cilkplus.c : Likewise.
431 * cp-gimplify.c : Likewise.
432 * cp-lang.c : Likewise.
433 * cp-objcp-common.c : Likewise.
434 * cp-tree.h : Likewise.
435 * cp-ubsan.c : Likewise.
438 * decl2.c : Likewise.
440 * error.c : Likewise.
441 * except.c : Likewise.
443 * friend.c : Likewise.
445 * lambda.c : Likewise.
447 * mangle.c : Likewise.
448 * method.c : Likewise.
449 * name-lookup.c : Likewise.
450 * optimize.c : Likewise.
451 * parser.c : Likewise.
453 * ptree.c : Likewise.
456 * search.c : Likewise.
457 * semantics.c : Likewise.
459 * typeck.c : Likewise.
460 * typeck2.c : Likewise.
461 * vtable-class-hierarchy.c : Likewise.
463 2015-06-05 Jason Merrill <jason@redhat.com>
466 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
467 the expansion has extra args.
468 (use_pack_expansion_extra_args_p): Return true in that case.
471 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
472 dependent even if it has a type.
474 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
476 * cp-objcp-common.c: Adjust comment for
477 cxx_warn_unused_global_decl.
478 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
479 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
480 * cp-tree.h (note_mangling_alias): Protoize.
481 (cp_write_global_declarations): Remove.
482 (cxx_post_compilation_parsing_cleanups): Protoize.
483 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
485 * decl2.c (mangling_aliases): New global.
486 (build_java_method_aliases): New. Adapted from
487 collect_candidates_for_java_method_aliases.
488 (collect_candidates_for_java_method_aliases): Remove.
489 (build_java_method_aliases): Remove.
490 (generate_mangling_aliases): New.
491 (note_mangling_alias): New. Moved from mangle_decl.
492 (locus_at_end_of_parsing): New global.
493 (c_parse_final_cleanups): Rename from
494 cp_write_global_declarations.
495 Use locus_at_end_of_parsing.
496 Call generate_mangling_aliases.
497 Rename call to collect_candidates_for_java_method_aliases into
498 build_java_method_aliases.
499 Remove call to finalize_compilation_unit.
500 Move vtable handling into cxx_post_compilation_parsing_cleanups.
501 Do not call check_global_declarations or
502 emit_debug_global_declarations.
503 (cxx_post_compilation_parsing_cleanups): New.
504 * mangle.c (mangle_decl): Move code to note_mangling_alias.
505 * name-lookup.c (do_namespace_alias): Call early_global_decl.
507 2015-06-05 Nathan Sidwell <nathan@acm.org>
510 * parser.c (cp_parser_cache_defarg): Continue looking for
511 declarators when scanning a potential template argument list of an
514 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
516 * call.c: Adjust includes for restructured coretypes.h.
518 * constexpr.c: Likewise.
519 * cp-array-notation.c: Likewise.
520 * cp-gimplify.c: Likewise.
521 * cp-lang.c: Likewise.
522 * cp-objcp-common.c: Likewise.
523 * cp-tree.h: Likewise.
524 * cp-ubsan.c: Likewise.
530 * except.c: Likewise.
532 * friend.c: Likewise.
534 * lambda.c: Likewise.
536 * mangle.c: Likewise.
537 * method.c: Likewise.
538 * name-lookup.c: Likewise.
539 * optimize.c: Likewise.
540 * parser.c: Likewise.
545 * search.c: Likewise.
546 * semantics.c: Likewise.
548 * typeck.c: Likewise.
549 * typeck2.c: Likewise.
550 * vtable-class-hierarchy.c: Likewise.
552 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
556 * cp-tree.h (get_guard_cond): Adjust declaration
557 * decl.c (expand_static_init): Use atomic load acquire
558 and adjust call to get_guard_cond.
559 * decl2.c (build_atomic_load_byte): New function.
560 (get_guard_cond): Handle thread_safety.
561 (one_static_initialization_or_destruction): Adjust call to
564 2015-06-03 Jason Merrill <jason@redhat.com>
567 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
568 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
569 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
570 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
572 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
573 Paolo Carlini <paolo.carlini@oracle.com>
576 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
577 use it in the diagnostic.
578 (decay_conversion): Adjust call.
579 * semantics.c (finish_decltype_type): Likewise.
580 * call.c (resolve_args, build_new_op_1,
581 perform_implicit_conversion_flags): Adjust calls.
582 * cvt.c (ocp_convert, convert_to_void): Likewise.
583 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
585 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
587 * decl.c (check_tag_decl): Use declspecs->locations as locations in
588 error_at and warning_at calls.
590 2015-06-03 Marek Polacek <polacek@redhat.com>
593 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
594 (cp_genericize_r): Don't instrument static initializers.
595 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
597 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
599 * decl.c (start_function): Call plugin before parsing.
600 (finish_function): Call plugin after parsing.
602 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
604 * cp-tree.h (init_error): Remove declaration.
605 * error.c (scratch_pretty_printer): Rename to ...
606 (actual_pretty_printer): ... this.
607 (cxx_pp): Constify and update accordingly.
608 (init_error): Remove definition.
609 * lex.c (cxx_init): Do not call init_error.
611 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
614 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
616 2015-06-01 Jason Merrill <jason@redhat.com>
619 * decl2.c (mark_used): Don't always instantiate constexpr fns.
620 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
623 * mangle.c (attr_strcmp): New.
624 (write_CV_qualifiers_for_type): Also write out attributes that
625 affect type identity.
626 (write_type): Strip all attributes after writing qualifiers.
628 2015-05-31 Jason Merrill <jason@redhat.com>
630 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
633 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
634 with the wrong type as non-constant.
636 2015-05-27 Jason Merrill <jason@redhat.com>
638 * decl.c (check_redeclaration_exception_specification): Depend on
639 -Wsystem-headers rather than -pedantic.
641 * decl.c (warn_extern_redeclared_static): Use the location of
642 newdecl in diagnostics, not input_location.
643 (validate_constexpr_redeclaration): Likewise.
644 (check_redeclaration_no_default_args): Likewise.
645 (duplicate_decls): Likewise.
646 (check_redeclaration_exception_specification): Likewise.
647 Change second diagnostic to inform.
649 2015-05-24 Nathan Sidwell <nathan@acm.org>
652 * decl.c (build_enumerator): Don't silently convert scoped enums.
654 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
657 * mangle.c (mangle_decl): Mangle anonymous namespace types as
660 2015-05-23 Nathan Sidwell <nathan@acm.org>
663 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
665 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
667 * Make-lang.in (check_g++_parallelize): Update comment.
669 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
672 * decl.c (grokdeclarator): Use the correct location in error
673 messages about 'explicit'.
675 2015-05-22 Marek Polacek <polacek@redhat.com>
676 Edward Smith-Rowland <3dw4rd@verizon.net>
679 * cp-tree.h (build_enumerator): Update declaration.
680 * decl.c (build_enumerator): Add attributes parameter. Call
681 cplus_decl_attributes.
682 * init.c (constant_value_1): Pass tf_none to mark_used.
683 * parser.c (cp_parser_enumerator_definition): Parse attributes and
684 pass them down to build_enumerator.
685 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
686 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
688 2015-05-21 Nathan Sidwell <nathan@acm.org>
691 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
693 2015-05-21 Marek Polacek <polacek@redhat.com>
695 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
697 2015-05-20 Jason Merrill <jason@redhat.com>
699 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
700 before register_specialization.
702 * decl.c (grok_op_properties): Don't complain about size_t
703 placement delete here.
704 * call.c (second_parm_is_size_t): Split out from...
705 (non_placement_deallocation_fn_p): ...here.
706 (build_op_delete_call): Warn about size_t placement delete with
709 2015-05-19 Nathan Sidwell <nathan@acm.org>
712 * typeck.c (finish_class_member_access_expr): Diagnose failed
713 lookup of enum class member.
715 2015-05-19 Jakub Jelinek <jakub@redhat.com>
718 * parser.c (cp_parser_omp_for_loop): Don't add
719 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
720 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
721 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
724 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
726 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
729 2015-05-18 Jason Merrill <jason@redhat.com>
731 * pt.c (retrieve_specialization): Make sure our arguments have
732 gone through strip_typedefs.
734 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
735 (determine_specialization): Call coerce_template_parms.
738 * pt.c (type_unification_real): Check convertibility here.
739 (unify_one_argument): Not here.
741 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
742 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
743 [TREE_LIST]: Fix no-change case.
745 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
747 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
750 * error.c (cp_diagnostic_starter): Use diagnostic_location
752 (cp_print_error_function): Likewise.
753 (cp_printer): Replace locus pointer with accessor function.
755 2015-05-12 David Malcolm <dmalcolm@redhat.com>
757 * parser.c (cp_parser_selection_statement): Add location and
758 guard_kind arguments to calls to
759 cp_parser_implicitly_scoped_statement.
760 (cp_parser_iteration_statement): Likewise for calls to
761 cp_parser_already_scoped_statement.
762 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
763 "guard_kind" params; use them to warn for misleading
765 (cp_parser_already_scoped_statement): Likewise.
767 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
769 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
770 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
771 * semantics.c (finish_member_declaration): Likewise.
772 * method.c (lazily_declare_fn): Allways add method to main variant list.
774 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
777 * decl2.c (note_mangling_alias): Declare arguments as unused.
779 2015-05-08 Jason Merrill <jason@redhat.com>
781 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
784 2015-05-08 Jason Merrill <jason@redhat.com>
786 * decl2.c (mangling_aliases): New variable.
787 (note_mangling_alias, generate_mangling_aliases): New.
788 (cp_write_global_declarations): Call generate_mangling_aliases.
789 (generate_mangling_alias): Split out from...
790 * mangle.c (mangle_decl): ...here.
791 * cp-tree.h: Declare note_mangling_alias.
793 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
795 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
796 (build_java_method_aliases): Adapt to use create_same_body_alias
797 instead of assemble_alias. Move variable declarations to
798 definition and tidy up.
799 (cp_write_global_declarations): Call build_java_method_aliases
800 instead of collecting candidates first.
802 2015-05-07 Jason Merrill <jason@redhat.com>
805 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
806 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
807 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
808 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
809 (apply_late_template_attributes): Handle attribute pack expansion.
811 2015-05-07 Marek Polacek <polacek@redhat.com>
814 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
817 2015-05-07 Jason Merrill <jason@redhat.com>
821 * typeck2.c (digest_init_r): Fix single element list.
823 2015-05-05 Jason Merrill <jason@redhat.com>
825 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
826 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
828 (cp_genericize_data): Add try_block field.
829 (cp_genericize_tree): Initialize it.
830 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
833 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
836 * semantics.c (finish_call_expr): Check complain.
838 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
839 maybe-in-charge constructor.
841 * decl.c (start_decl): Don't push the plain VAR_DECL for a
848 * call.c (convert_like_real): Check value-initialization before
850 * typeck2.c (process_init_constructor_record): Don't set
851 CONSTRUCTOR_IS_DIRECT_INIT.
852 (process_init_constructor_array): Likewise.
853 * init.c (build_vec_init): Likewise.
855 2015-05-05 David Malcolm <dmalcolm@redhat.com>
857 * parser.c (cp_parser_asm_definition): Only test for
858 error_mark_node if "outputs" was just set. Likewise for "inputs".
860 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
861 Jakub Jelinek <jakub@redhat.com>
864 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
865 result in an actual error.
867 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
868 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
871 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
874 2015-04-30 David Malcolm <dmalcolm@redhat.com>
876 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
879 2015-04-29 Jason Merrill <jason@redhat.com>
882 * tree.c (apply_identity_attributes): Fix handling of classes.
884 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
886 * parser.c (cp_parser_oacc_enter_exit_data): Use
887 OMP_STANDALONE_CLAUSES.
889 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
892 * init.c (perform_member_init): Handle references for -Winit-self.
894 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
896 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
897 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
899 2015-04-28 Jason Merrill <jason@redhat.com>
902 * constexpr.c (cxx_eval_store_expression): Don't try to actually
903 store an empty class.
906 * constexpr.c (cxx_eval_builtin_function_call): Fix
907 __builtin_constant_p.
910 * tree.c (strip_typedefs): Add remove_attributes parm.
911 (strip_typedefs_expr): Likewise.
912 (apply_identity_attributes): New subroutine of strip_typedefs.
913 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
914 (convert_nontype_argument, unify): Likewise.
918 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
920 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
922 * class.c (layout_class_type): Remove check if
923 PCC_BITFIELD_TYPE_MATTERS is defined.
925 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
927 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
929 2015-04-24 Jason Merrill <jason@redhat.com>
932 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
934 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
935 Remove obsolete code.
938 2015-04-23 Jason Merrill <jason@redhat.com>
941 * pt.c (check_explicit_specialization): Don't
942 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
944 * decl.c (grokvardecl): Revert earlier fix.
946 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
949 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
950 suppresses the diagnostic.
952 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
954 Reject trailing return type for an operator auto().
955 * decl.c (grokdeclarator): Reject trailing return types for
956 all conversion operators, don't handle conversion operators
957 in the previous checks that deal with auto.
959 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
961 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
963 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
965 * class.c (resolve_address_of_overloaded_function, instantiate_type):
966 Rename tsubst_flags_t parameter flags -> complain.
968 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
970 * call.c (build_op_delete_call, build_over_call): Check mark_used
972 * class.c (resolve_address_of_overloaded_function): Likewise.
973 * decl.c (cxx_maybe_build_cleanup): Likewise.
974 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
975 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
976 * rtti.c (build_dynamic_cast_1): Likewise.
977 * semantics.c (process_outer_var_ref): Likewise.
978 * typeck.c (build_class_member_access_expr,
979 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
981 2015-04-15 Jason Merrill <jason@redhat.com>
983 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
984 (build_constexpr_constructor_member_initializers): Loop to find
986 * decl.c (start_preparsed_function): Clobber the object at the
987 beginning of a constructor.
989 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
990 * method.c (implicitly_declare_fn): Likewise.
991 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
993 * decl2.c (determine_visibility): Use get_template_info.
995 2015-04-15 Jason Merrill <jason@redhat.com>
996 Marek Polacek <polacek@redhat.com>
999 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1000 through the normal loop, just don't capture.
1001 (maybe_resolve_dummy): Handle null return.
1003 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1005 * call.c (enforce_access): Emit error + inform.
1007 2015-04-15 Marek Polacek <polacek@redhat.com>
1009 * constexpr.c (use_new_call): Remove #define.
1010 (lookup_parameter_binding): Remove function.
1011 (cxx_bind_parameters_in_call): Remove unused code.
1012 (cxx_eval_call_expression): Likewise.
1013 (cxx_eval_constant_expression): Likewise.
1015 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1017 * tree.c (replace_placeholders_t): Remove unused type.
1018 (replace_placeholders): Remove unused pset.
1020 2015-04-14 Jason Merrill <jason@redhat.com>
1022 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1025 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1028 * name-lookup.c (do_class_using_decl): Complain about specifying
1029 the current class even if there are dependent bases.
1031 2015-04-14 David Krauss <david_work@me.com>
1034 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1036 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1037 Jason Merrill <jason@redhat.com>
1040 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1041 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1042 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1045 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1048 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1049 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1050 the expression to the original type at the end.
1052 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1055 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1059 * tree.c (build_cplus_array_type): Layout type before variants are
1060 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1063 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1066 * lambda.c (add_capture): Use dependent_type_p for capture by
1069 2015-04-02 Marek Polacek <polacek@redhat.com>
1072 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1073 cxx_eval_constant_expression on the first operand.
1075 2015-04-01 Jason Merrill <jason@redhat.com>
1078 * decl.c (make_typename_type): Handle seeing a variable template.
1080 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1083 * pt.c (instantiating_current_function_p): New.
1084 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1085 * cp-tree.h (instantiating_current_function_p): Declare.
1087 2015-04-01 Jason Merrill <jason@redhat.com>
1090 * decl.c (grokvardecl): Don't call check_explicit_specialization
1091 for non-template members of a class template.
1093 2015-04-01 Marek Polacek <polacek@redhat.com>
1096 * class.c (finish_struct): Require that the second field of a
1097 user-defined initializer_list be of size type.
1099 2015-03-31 Marek Polacek <polacek@redhat.com>
1102 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1103 checking for constness.
1105 2015-03-30 Marek Polacek <polacek@redhat.com>
1108 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1109 *(&A[i] p+ j) => A[i + j] transformation here.
1110 (cxx_eval_pointer_plus_expression): New function.
1111 (cxx_eval_constant_expression): Use it here.
1113 2015-03-27 Tobias Burnus <burnus@net-b.de>
1116 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1117 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1118 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1121 2015-03-27 Marek Polacek <polacek@redhat.com>
1124 * semantics.c (finish_switch_cond): If the unlowered type is not an
1125 enum, use the type of the condition.
1127 2015-03-27 Jason Merrill <jason@redhat.com>
1130 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1133 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1136 * init.c (build_vec_init): Fix initializing aggregates
1137 with empty init list.
1139 2015-03-26 Jason Merrill <jason@redhat.com>
1142 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1144 2015-03-25 Marek Polacek <polacek@redhat.com>
1147 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1148 on an anonymous namespace.
1150 2015-03-25 Marek Polacek <polacek@redhat.com>
1153 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1155 2015-03-24 Jason Merrill <jason@redhat.com>
1158 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1159 * parser.c (cp_parser_namespace_definition): Don't set it.
1160 * name-lookup.c (handle_namespace_attrs): Check
1161 DECL_NAMESPACE_ASSOCIATIONS instead.
1164 * pt.c (get_mostly_instantiated_function_type): Just return the
1165 type of the partially instantiated template in DECL_TI_TEMPLATE.
1167 2015-03-20 Marek Polacek <polacek@redhat.com>
1170 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1173 2015-03-20 Marek Polacek <polacek@redhat.com>
1176 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1179 2015-03-19 Jason Merrill <jason@redhat.com>
1182 Automatically propagate ABI tags to variables and functions
1183 from their (return) type.
1184 * class.c (check_tag): Handle variables and functions.
1185 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1186 (mark_or_check_tags): Likewise.
1187 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1188 (check_abi_tags): Add single argument overload for decls.
1189 Handle inheriting tags for decls.
1190 * mangle.c (write_mangled_name): Call it.
1191 (mangle_return_type_p): Split out from write_encoding.
1192 (unmangled_name_p): Split out from write_mangled_name.
1193 (write_mangled_name): Ignore abi_tag on namespace.
1194 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1195 * parser.c (cp_parser_namespace_definition): Set it.
1196 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1197 about abi_tag attribute on non-inline namespace.
1198 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1199 (handle_abi_tag_attribute): Allow tags on variables.
1201 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1203 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1204 attribute for DECL_EXTERNAL VAR_DECLs.
1206 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1209 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1211 * decl2.c (mark_used): Inline the require_deduced_type call and
1212 guard the error call.
1214 2015-03-16 Jason Merrill <jason@redhat.com>
1217 * parser.c (cp_parser_template_name): Call strip_using_decl.
1219 2015-03-16 Marek Polacek <polacek@redhat.com>
1223 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1225 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1228 * decl.c (check_default_argument): Don't call
1229 maybe_warn_zero_as_null_pointer_constant.
1231 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1233 * cp-gimplify.c (simple_empty_class_p): New.
1234 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1235 the code for empty class copies into simple_empty_class_p, and
1236 adapt it to handle COMPOUND_EXPRs.
1238 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1241 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1242 only if the location of newdecl doesn't match the location of olddecl.
1244 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1247 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1250 2015-03-10 Jason Merrill <jason@redhat.com>
1254 * pt.c (dependent_type_p_r): Check both class and alias template args.
1256 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1259 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1260 before preparing arguments to warn_logical_not_parentheses.
1261 Use maybe_constant_value on rhs.
1263 2015-03-09 Jason Merrill <jason@redhat.com>
1266 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1268 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1271 * parser.c (cp_parser_binary_expression): Don't warn for
1272 !!x == y or !b == y where b is bool.
1274 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1276 * ptree.c (cxx_print_lambda_node): New.
1277 (cxx_print_xnode): Handle LAMBDA_EXPR.
1279 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1282 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1283 RESULT_DECL handling.
1285 2015-02-26 Marek Polacek <polacek@redhat.com>
1288 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1289 a RETURN_EXPR if its operand is null.
1291 2015-02-25 Jason Merrill <jason@redhat.com>
1294 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1296 (constrain_visibility_for_template): Handle reference arguments.
1299 * decl.c (start_preparsed_function): Use create_artificial_label
1302 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1303 Jakub Jelinek <jakub@redhat.com>
1306 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1307 implicit typedefs for lambda types.
1309 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1312 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1314 2015-02-13 Jason Merrill <jason@redhat.com>
1317 * pt.c (template_args_equal): Look through conversions here.
1318 * tree.c (cp_tree_equal): Not here.
1320 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1323 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1324 pragma_external context.
1326 2015-02-13 Jason Merrill <jason@redhat.com>
1329 * call.c (reference_binding): Don't look for bad conversion
1330 if TO is incomplete.
1332 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1335 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1336 to lookup_template_class.
1338 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1341 * decl.c (start_preparsed_function): Use void_type_node instead
1342 of NULL_TREE as LABEL_DECL type.
1344 2015-02-12 Jason Merrill <jason@redhat.com>
1347 * mangle.c (write_mangled_name): Fix test for variable template
1350 * decl.c (begin_destructor_body): Condition clobber on
1353 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1356 * parser.c (lookup_literal_operator): Return all candidates.
1357 (cp_parser_userdef_char_literal): Simplify error handling.
1358 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1359 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1360 Also give higher priority to standard string UDL operator.
1362 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1365 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1366 * decl.c (poplevel): If functionbody, try not to create an extra
1367 BLOCK for function body and use subblocks as that, if it is non-NULL
1368 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1369 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1372 * except.c (check_noexcept_r): Return NULL for internal
1375 2015-02-10 Jason Merrill <jason@redhat.com>
1378 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1380 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1383 * method.c (use_thunk): Do not check for stdarg thunks.
1385 2015-02-06 Jason Merrill <jason@redhat.com>
1388 * init.c (build_vec_init): Handle default-initialized array with
1389 constexpr default constructor.
1391 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1395 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1397 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1400 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1401 for generated expressions.
1403 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1406 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1409 2015-02-02 Jason Merrill <jason@redhat.com>
1411 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1413 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1415 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1416 changed to pass input_location as first argument.
1418 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1421 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1424 2015-01-29 Jason Merrill <jason@redhat.com>
1427 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1428 erroneous return statement.
1431 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1434 2015-01-27 Caroline Tice <cmtice@google.com>
1436 Committing VTV Cywin/Ming patch for Patrick Wollgast
1437 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1438 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1440 2015-01-27 Jason Merrill <jason@redhat.com>
1443 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1444 current_function_decl.
1447 * pt.c (finish_template_variable): Move from semantics.c.
1448 Handle multiple template arg levels. Handle coercion here.
1449 (lookup_template_variable): Not here.
1451 2015-01-23 Jason Merrill <jason@redhat.com>
1455 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1456 that has been completely split out.
1459 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1463 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1466 2015-01-21 Jason Merrill <jason@redhat.com>
1469 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1470 constant CONSTRUCTORs.
1473 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1474 give a hard error in a template instantiation.
1476 2015-01-21 Richard Biener <rguenther@suse.de>
1479 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1480 for builtins the user declared correctly.
1482 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1485 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1486 TREE_TYPE (elt) == error_mark_node.
1488 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1490 PR tree-optimization/62053
1491 * tree.c (build_cplus_array_type): Layout type after variants are set.
1493 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1495 * cp-gimplify.c (cp_genericize_r): Call
1496 cp_ubsan_maybe_instrument_member_call for member calls.
1497 (cp_ubsan_check_member_access_r): New function.
1498 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1499 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1500 cp_ubsan_instrument_member_accesses,
1501 cp_ubsan_maybe_instrument_downcast,
1502 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1503 * cp-ubsan.c: New file.
1504 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1505 * constexpr.c (cxx_eval_call_expression): Return void_node
1507 (potential_constant_expression_1): Return true for
1508 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1509 * typeck.c (build_class_member_access_expr): Provide locus
1511 (build_static_cast_1): Instrument downcasts.
1512 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1513 add ubsan instrumentation for virtual_access.
1514 * call.c: Include internal-fn.h.
1515 (set_flags_from_callee): Handle internal calls.
1517 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1520 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1521 and function templates, declared only in the class.
1522 * decl.c (duplicate_decls): Reveal hidden friend functions or
1523 function templates, if they are redeclared outside the class.
1525 2015-01-15 Jason Merrill <jason@redhat.com>
1528 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1531 * constexpr.c (potential_constant_expression_1): Handle reference
1534 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1535 James Norris <jnorris@codesourcery.com>
1536 Cesar Philippidis <cesar@codesourcery.com>
1537 Ilmir Usmanov <i.usmanov@samsung.com>
1538 Jakub Jelinek <jakub@redhat.com>
1540 * parser.c: Include "gomp-constants.h".
1541 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1542 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1543 Use OMP_CLAUSE_SET_MAP_KIND.
1544 (cp_parser_omp_construct, cp_parser_pragma): Handle
1545 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1546 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1547 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1548 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1549 "create", "delete", "deviceptr", "host", "num_gangs",
1550 "num_workers", "present", "present_or_copy", "pcopy",
1551 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1552 "present_or_create", "pcreate", "vector_length", "wait".
1553 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1554 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1555 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1556 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1557 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1558 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1559 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1560 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1561 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1562 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1563 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1564 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1565 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1566 (cp_parser_oacc_wait): New functions.
1567 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1568 (finish_oacc_parallel): New prototypes.
1569 * semantics.c: Include "gomp-constants.h".
1570 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1571 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1572 OMP_CLAUSE_SET_MAP_KIND.
1573 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1574 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1575 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1576 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1579 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1582 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1583 self-initialization.
1585 2015-01-13 Jason Merrill <jason@redhat.com>
1589 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1590 pointer expressions.
1591 (cxx_eval_increment_expression): Likewise.
1594 * pt.c (coerce_template_parameter_pack): Return NULL for a
1595 zero-length fixed parameter pack with a pack expansion arg.
1598 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1600 2015-01-12 Jason Merrill <jason@redhat.com>
1603 * constexpr.c (cxx_eval_call_expression): A call to a void
1604 function doesn't need to return a value.
1606 2015-01-09 Michael Collison <michael.collison@linaro.org>
1608 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1609 input.h, alias.h, symtab.h, options.h, fold-const.h,
1610 wide-int.h, and inchash.h due to flattening of tree.h.
1612 * constexpr.c: Ditto.
1613 * cp-array-notation.c: Ditto.
1614 * cp-gimplify.c: Ditto.
1616 * cp-objcp-common.c: Ditto.
1629 * name-lookup.c: Ditto.
1630 * optimize.c: Ditto.
1637 * semantics.c: Ditto.
1642 2015-01-08 Jason Merrill <jason@redhat.com>
1644 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1645 * decl.c (compute_array_index_type): Likewise.
1646 * init.c (build_vec_init): Likewise.
1647 * typeck.c (cp_build_binary_op): Likewise.
1649 2015-01-08 Jason Merrill <jason@redhat.com>
1651 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1652 whether an initializer-list is too big for a VLA.
1653 (throw_bad_array_length): Remove.
1654 * cp-tree.h: Remove prototype.
1656 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1659 * decl.c (grokfndecl): Add bool parameter.
1660 (grokdeclarator): Adjust calls.
1661 (start_decl): Don't set DECL_DELETED_FN here.
1663 2015-01-06 Jason Merrill <jason@redhat.com>
1665 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1669 * pt.c (type_dependent_expression_p): Handle variable templates.
1670 * constexpr.c (potential_constant_expression_1): Use it.
1673 * semantics.c (finish_offsetof): Handle templates here.
1674 * parser.c (cp_parser_builtin_offsetof): Not here.
1677 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1680 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1683 * class.c (check_field_decls): Make copy assignment operators
1684 complex only in c++98 mode.
1686 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1689 * class.c (check_for_override): Warn when a virtual function is an
1690 override not marked override.
1692 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1694 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1696 (get_basefndecls): Adjust.
1698 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1700 Update copyright years.
1702 2015-01-05 Marek Polacek <polacek@redhat.com>
1705 * typeck.c (cp_build_array_ref): Pass loc down to
1706 warn_array_subscript_with_type_char.
1709 Copyright (C) 2015 Free Software Foundation, Inc.
1711 Copying and distribution of this file, with or without modification,
1712 are permitted in any medium without royalty provided the copyright
1713 notice and this notice are preserved.