1 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3 * call.c: Adjust includes.
5 * constexpr.c: Likewise.
6 * cp-array-notation.c: Likewise.
7 * cp-gimplify.c: Likewise.
9 * cp-objcp-common.c: Likewise.
10 * cp-ubsan.c: Likewise.
24 * name-lookup.c: Likewise.
25 * optimize.c: Likewise.
32 * semantics.c: Likewise.
35 * typeck2.c: Likewise.
37 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
39 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
41 2015-07-06 Jason Merrill <jason@redhat.com>
43 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
44 for a template template parameter.
45 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
46 by reduce_template_parm_level.
48 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
51 2015-07-02 Jason Merrill <jason@redhat.com>
54 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
55 TYPE_VALUES_RAW rather than TYPE_FIELDS.
57 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
59 * pt.c (type_dependent_expression_p): Handle expressions
60 that refer to variable templates.
62 2015-07-01 Jason Merrill <jason@redhat.com>
64 * lex.c (init_reswords): s/CXX0X/CXX11/.
65 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
67 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
68 Attribute mangling is now -fabi-version=10.
71 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
72 * class.c (layout_nonempty_base_or_field): Warn if that affects
73 the offset of a field.
75 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
78 * parser.c (cp_parser_check_std_attribute): New.
79 (cp_parser_std_attribute_list): Call it.
81 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
84 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
85 return 0 if tsubst returns a dependent type.
87 2015-06-30 Jason Merrill <jason@redhat.com>
90 * decl2.c (is_late_template_attribute): True for tls_model.
93 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
94 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
95 (SET_DECL_GNU_TLS_P): New.
96 * call.c (make_temporary_var_for_ref_to_temp): Use
97 CP_DECL_THREAD_LOCAL_P.
98 (set_up_extended_ref_temp): Likewise.
99 * decl.c (duplicate_decls, expand_static_init): Likewise.
100 (redeclaration_error_message, grokvardecl): Likewise.
101 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
102 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
103 (handle_tls_init): Likewise.
104 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
105 * semantics.c (finish_id_expression): Likewise.
106 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
107 (finish_omp_threadprivate): Likewise.
108 * tree.c (decl_storage_duration): Likewise.
109 * cp-gimplify.c (omp_var_to_track): Likewise.
110 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
111 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
114 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
116 Implement N4197 - Adding u8 character literals
117 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
118 and CPP_UTF8CHAR_USERDEF tokens;
119 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
121 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
124 * decl.c (grokfndecl): Allow constexpr declarations of friend
125 template specializations.
127 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
130 * decl.c (finish_function): Call do_warn_unused_parameter.
132 2015-06-29 Marek Polacek <polacek@redhat.com>
135 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
136 (push_switch): Set OUTSIDE_RANGE_P.
137 (pop_switch): Update c_do_switch_warnings call.
138 (finish_case_label): Update c_add_case_label call.
139 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
142 2015-06-27 Marek Polacek <polacek@redhat.com>
144 * call.c: Use VECTOR_TYPE_P.
145 * constexpr.c: Likewise.
150 * semantics.c: Likewise.
152 * typeck.c: Likewise.
153 * typeck2.c: Likewise.
155 2015-06-27 Marek Polacek <polacek@redhat.com>
157 * call.c (set_up_extended_ref_temp): Use VAR_P.
158 * class.c: Use VAR_P throughout.
159 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
160 * cp-array-notation.c (make_triplet_val_inv): Likewise.
161 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
164 * error.c (dump_decl): Use VAR_P.
165 * mangle.c (decl_implicit_alias_p): Likewise.
166 * parser.c: Use VAR_P throughout.
168 * semantics.c: Likewise.
169 * vtable-class-hierarchy.c: Likewise.
170 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
172 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
174 * pt.c (check_unstripped_args): Mark parameter as unused.
176 2015-06-26 Jason Merrill <jason@redhat.com>
179 * class.c (finish_struct): Call fixup_attribute_variants.
182 * typeck2.c (merge_exception_specifiers): Allow different
183 noexcept-specifiers if we've had errors.
186 * pt.c (check_unstripped_args): Split out from...
187 (retrieve_specialization): ...here. Allow typedefs in the type of
191 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
193 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
196 * typeck2.c (digest_init_r): Only expect reshaping if the class is
199 2015-06-26 Marek Polacek <polacek@redhat.com>
201 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
202 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
204 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
206 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
208 * cp-ubsan.c: Likewise.
211 * lambda.c: Likewise.
212 * mangle.c: Likewise.
213 * method.c: Likewise.
214 * optimize.c: Likewise.
215 * parser.c: Likewise.
216 * semantics.c: Likewise.
218 * vtable-class-hierarchy.c: Likewise.
220 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
222 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
223 rather than ggc_hasher.
224 (constexpr_call_hasher): Likewise.
225 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
226 * decl.c (typename_hasher): Likewise.
227 * mangle.c (conv_type_hasher): Likewise.
228 * pt.c (spec_hasher): Likewise.
229 * tree.c (cplus_array_hasher, list_hasher): Likewise.
230 * typeck2.c (abstract_type_hasher): Likewise.
232 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
234 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
235 rather than pointer_hash.
236 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
237 * semantics.c (nrv_data): Likewise.
238 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
240 2015-06-24 Jason Merrill <jason@redhat.com>
243 * pt.c (dependent_type_p_r): Check for dependent alias template
244 specialization sooner.
247 * class.c (type_has_nontrivial_assignment): Remove.
248 * cp-tree.h: Remove declaration.
249 * init.c (vec_copy_assign_is_trivial): New.
250 (build_vec_init): Use it.
252 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
254 Implement N3928 - Extending static_assert
255 * parser.c (cp_parser_static_assert): Support static_assert with
256 no message string. Supply an empty string in this case.
257 * semantics.c (finish_static_assert): Don't try to print a message if
258 the message strnig is empty.
260 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
263 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
264 implicit template parm if 'auto' is a placeholder for trailing
267 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
270 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
273 * parser.c (cp_parser_template_parameter_list): Update
274 current_template_parms right after processing a paramater.
275 * pt.c (template_parms_to_args): Remove obsolete hack for
276 giving template template arguments the proper level.
277 (check_default_tmpl_args): Account for tested template
279 (splite_late_return_type): Remove obsolete hack for giving
280 template template arguments the proper level.
282 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
285 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
287 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
290 * parser.c (cp_parser_template_parameter_list): Update
291 current_template_parms right after processing a paramater.
292 * pt.c (template_parms_to_args): Remove obsolete hack for
293 giving template template arguments the proper level.
294 (check_default_tmpl_args): Account for tested template
296 (splite_late_return_type): Remove obsolete hack for giving
297 template template arguments the proper level.
299 2015-06-23 Jason Merrill <jason@redhat.com>
302 * decl.c (grokfndecl): Check the linkage of ctype, not just
304 * tree.c (no_linkage_check): Skip the 'this' pointer.
307 * class.c (type_has_nontrivial_assignment): New.
308 * init.c (build_vec_init): Use it.
309 * cp-tree.h: Declare it.
310 * method.c (trivial_fn_p): Templates aren't trivial.
313 * decl.c (expand_static_init): Make sure the destructor is callable
314 here even if we have an initializer.
316 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
318 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
319 -fdump-ada-spec is passed.
321 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
323 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
325 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
327 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
329 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
331 * decl.c (grokdeclarator): Remove pointless code.
333 2015-06-22 Jason Merrill <jason@redhat.com>
336 * call.c (implicit_conversion): Only reshape for classes.
338 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
340 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
342 * semantics.c (finish_omp_atomic): Likewise.
343 * typeck.c (cp_build_array_ref): Likewise.
345 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
348 * call.c (build_new_op_1): Check tf_warning flag in all cases.
350 2015-06-19 Jason Merrill <jason@redhat.com>
353 * pt.c (instantiate_class_template_1): Clear
354 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
357 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
359 * typeck.c (merge_types): build_ptrmemfunc_type before applying
360 quals and attributes.
363 * constexpr.c (build_constexpr_constructor_member_initializers):
364 Handle an empty STATEMENT_LIST.
367 * pt.c (tsubst_copy_and_build): Register a capture proxy in
368 local_specializations.
370 2015-06-17 Jason Merrill <jason@redhat.com>
373 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
375 (potential_constant_expression_1): Likewise.
377 2015-06-17 Jason Merrill <jason@redhat.com>
380 * call.c (implicit_conversion): Call reshape_init here, early.
381 (build_aggr_conv): Not here.
383 2015-06-17 Jakub Jelinek <jakub@redhat.com>
386 * pt.c (tsubst_omp_clause_decl): New function.
387 (tsubst_omp_clauses): Use it or tsubst_copy instead of
388 tsubst_expr on OMP_CLAUSE_DECL.
390 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
392 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
393 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
394 * decl.c (grokdeclarator, xref_tag_1): Likewise.
395 * error.c (dump_aggr_type): likewise.
396 * pt.c (push_template_decl_real): Likewise.
397 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
399 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
401 * call.c: Do not include input.h, line-map.h or is-a.h.
403 * constexpr.c: Likewise.
404 * cp-array-notation.c: Likewise.
405 * cp-gimplify.c: Likewise.
406 * cp-lang.c: Likewise.
407 * cp-objcp-common.c: Likewise.
408 * cp-tree.h: Likewise.
409 * cp-ubsan.c: Likewise.
415 * except.c: Likewise.
417 * friend.c: Likewise.
419 * lambda.c: Likewise.
421 * mangle.c: Likewise.
422 * method.c: Likewise.
423 * name-lookup.c: Likewise.
424 * optimize.c: Likewise.
425 * parser.c: Likewise.
430 * search.c: Likewise.
431 * semantics.c: Likewise.
433 * typeck.c: Likewise.
434 * typeck2.c: Likewise.
435 * vtable-class-hierarchy.c: Likewise.
437 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
440 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
442 2015-06-16 Jason Merrill <jason@redhat.com>
445 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
449 * tree.c (bot_manip): Remap SAVE_EXPR.
452 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
454 2015-06-15 Nathan Sidwell <nathan@acm.org>
457 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
458 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
459 protect it from recursive instantiation.
461 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
464 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
465 using a local type is pure virtual.
467 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
469 * call.c: Remove comment documenting the long-deleted
470 function build_method_call.
472 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
475 * typeck.c (cp_build_binary_op): Warn when comparing an address
476 of a reference against NULL.
478 2015-06-12 Jason Merrill <jason@redhat.com>
481 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
482 variables as DECL_NOT_REALLY_EXTERN.
484 2015-06-11 Jason Merrill <jason@redhat.com>
487 * constexpr.c (potential_constant_expression_1): Handle a
488 DECL_EXPR of TYPE_DECL.
491 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
494 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
496 * decl.c (cxx_init_decl_processing): Register the main
497 translation unit through the new debug hook.
499 2015-06-10 Jason Merrill <jason@redhat.com>
502 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
503 * pt.c (push_template_decl_real): Set it.
504 (dependent_alias_template_spec_p): Use it.
505 (dependent_type_p_r): Use dependent_alias_template_spec_p.
506 (uses_all_template_parms_data, uses_all_template_parms_r)
507 (complex_alias_template_p): New.
508 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
510 2015-06-09 Jason Merrill <jason@redhat.com>
514 * typeck2.c (digest_init_r): Replace previous change with
518 * semantics.c (process_outer_var_ref): Make sure the value is
519 actually constant before returning it.
520 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
523 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
526 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
527 * init.c (expand_default_init): Likewise.
529 2015-06-09 Jason Merrill <jason@redhat.com>
532 * tree.c (replace_placeholders_r): Handle placeholders for an
534 * typeck2.c (store_init_value): Only replace_placeholders for
535 objects of class type.
537 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
539 * call.c : Adjust include files.
540 * class.c : Likewise.
541 * constexpr.c : Likewise.
542 * cp-array-notation.c : Likewise.
543 * cp-cilkplus.c : Likewise.
544 * cp-gimplify.c : Likewise.
545 * cp-lang.c : Likewise.
546 * cp-objcp-common.c : Likewise.
547 * cp-tree.h : Likewise.
548 * cp-ubsan.c : Likewise.
551 * decl2.c : Likewise.
553 * error.c : Likewise.
554 * except.c : Likewise.
556 * friend.c : Likewise.
558 * lambda.c : Likewise.
560 * mangle.c : Likewise.
561 * method.c : Likewise.
562 * name-lookup.c : Likewise.
563 * optimize.c : Likewise.
564 * parser.c : Likewise.
566 * ptree.c : Likewise.
569 * search.c : Likewise.
570 * semantics.c : Likewise.
572 * typeck.c : Likewise.
573 * typeck2.c : Likewise.
574 * vtable-class-hierarchy.c : Likewise.
576 2015-06-05 Jason Merrill <jason@redhat.com>
579 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
580 the expansion has extra args.
581 (use_pack_expansion_extra_args_p): Return true in that case.
584 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
585 dependent even if it has a type.
587 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
589 * cp-objcp-common.c: Adjust comment for
590 cxx_warn_unused_global_decl.
591 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
592 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
593 * cp-tree.h (note_mangling_alias): Protoize.
594 (cp_write_global_declarations): Remove.
595 (cxx_post_compilation_parsing_cleanups): Protoize.
596 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
598 * decl2.c (mangling_aliases): New global.
599 (build_java_method_aliases): New. Adapted from
600 collect_candidates_for_java_method_aliases.
601 (collect_candidates_for_java_method_aliases): Remove.
602 (build_java_method_aliases): Remove.
603 (generate_mangling_aliases): New.
604 (note_mangling_alias): New. Moved from mangle_decl.
605 (locus_at_end_of_parsing): New global.
606 (c_parse_final_cleanups): Rename from
607 cp_write_global_declarations.
608 Use locus_at_end_of_parsing.
609 Call generate_mangling_aliases.
610 Rename call to collect_candidates_for_java_method_aliases into
611 build_java_method_aliases.
612 Remove call to finalize_compilation_unit.
613 Move vtable handling into cxx_post_compilation_parsing_cleanups.
614 Do not call check_global_declarations or
615 emit_debug_global_declarations.
616 (cxx_post_compilation_parsing_cleanups): New.
617 * mangle.c (mangle_decl): Move code to note_mangling_alias.
618 * name-lookup.c (do_namespace_alias): Call early_global_decl.
620 2015-06-05 Nathan Sidwell <nathan@acm.org>
623 * parser.c (cp_parser_cache_defarg): Continue looking for
624 declarators when scanning a potential template argument list of an
627 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
629 * call.c: Adjust includes for restructured coretypes.h.
631 * constexpr.c: Likewise.
632 * cp-array-notation.c: Likewise.
633 * cp-gimplify.c: Likewise.
634 * cp-lang.c: Likewise.
635 * cp-objcp-common.c: Likewise.
636 * cp-tree.h: Likewise.
637 * cp-ubsan.c: Likewise.
643 * except.c: Likewise.
645 * friend.c: Likewise.
647 * lambda.c: Likewise.
649 * mangle.c: Likewise.
650 * method.c: Likewise.
651 * name-lookup.c: Likewise.
652 * optimize.c: Likewise.
653 * parser.c: Likewise.
658 * search.c: Likewise.
659 * semantics.c: Likewise.
661 * typeck.c: Likewise.
662 * typeck2.c: Likewise.
663 * vtable-class-hierarchy.c: Likewise.
665 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
669 * cp-tree.h (get_guard_cond): Adjust declaration
670 * decl.c (expand_static_init): Use atomic load acquire
671 and adjust call to get_guard_cond.
672 * decl2.c (build_atomic_load_byte): New function.
673 (get_guard_cond): Handle thread_safety.
674 (one_static_initialization_or_destruction): Adjust call to
677 2015-06-03 Jason Merrill <jason@redhat.com>
680 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
681 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
682 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
683 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
685 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
686 Paolo Carlini <paolo.carlini@oracle.com>
689 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
690 use it in the diagnostic.
691 (decay_conversion): Adjust call.
692 * semantics.c (finish_decltype_type): Likewise.
693 * call.c (resolve_args, build_new_op_1,
694 perform_implicit_conversion_flags): Adjust calls.
695 * cvt.c (ocp_convert, convert_to_void): Likewise.
696 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
698 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
700 * decl.c (check_tag_decl): Use declspecs->locations as locations in
701 error_at and warning_at calls.
703 2015-06-03 Marek Polacek <polacek@redhat.com>
706 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
707 (cp_genericize_r): Don't instrument static initializers.
708 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
710 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
712 * decl.c (start_function): Call plugin before parsing.
713 (finish_function): Call plugin after parsing.
715 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
717 * cp-tree.h (init_error): Remove declaration.
718 * error.c (scratch_pretty_printer): Rename to ...
719 (actual_pretty_printer): ... this.
720 (cxx_pp): Constify and update accordingly.
721 (init_error): Remove definition.
722 * lex.c (cxx_init): Do not call init_error.
724 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
727 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
729 2015-06-01 Jason Merrill <jason@redhat.com>
732 * decl2.c (mark_used): Don't always instantiate constexpr fns.
733 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
736 * mangle.c (attr_strcmp): New.
737 (write_CV_qualifiers_for_type): Also write out attributes that
738 affect type identity.
739 (write_type): Strip all attributes after writing qualifiers.
741 2015-05-31 Jason Merrill <jason@redhat.com>
743 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
746 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
747 with the wrong type as non-constant.
749 2015-05-27 Jason Merrill <jason@redhat.com>
751 * decl.c (check_redeclaration_exception_specification): Depend on
752 -Wsystem-headers rather than -pedantic.
754 * decl.c (warn_extern_redeclared_static): Use the location of
755 newdecl in diagnostics, not input_location.
756 (validate_constexpr_redeclaration): Likewise.
757 (check_redeclaration_no_default_args): Likewise.
758 (duplicate_decls): Likewise.
759 (check_redeclaration_exception_specification): Likewise.
760 Change second diagnostic to inform.
762 2015-05-24 Nathan Sidwell <nathan@acm.org>
765 * decl.c (build_enumerator): Don't silently convert scoped enums.
767 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
770 * mangle.c (mangle_decl): Mangle anonymous namespace types as
773 2015-05-23 Nathan Sidwell <nathan@acm.org>
776 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
778 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
780 * Make-lang.in (check_g++_parallelize): Update comment.
782 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
785 * decl.c (grokdeclarator): Use the correct location in error
786 messages about 'explicit'.
788 2015-05-22 Marek Polacek <polacek@redhat.com>
789 Edward Smith-Rowland <3dw4rd@verizon.net>
792 * cp-tree.h (build_enumerator): Update declaration.
793 * decl.c (build_enumerator): Add attributes parameter. Call
794 cplus_decl_attributes.
795 * init.c (constant_value_1): Pass tf_none to mark_used.
796 * parser.c (cp_parser_enumerator_definition): Parse attributes and
797 pass them down to build_enumerator.
798 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
799 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
801 2015-05-21 Nathan Sidwell <nathan@acm.org>
804 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
806 2015-05-21 Marek Polacek <polacek@redhat.com>
808 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
810 2015-05-20 Jason Merrill <jason@redhat.com>
812 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
813 before register_specialization.
815 * decl.c (grok_op_properties): Don't complain about size_t
816 placement delete here.
817 * call.c (second_parm_is_size_t): Split out from...
818 (non_placement_deallocation_fn_p): ...here.
819 (build_op_delete_call): Warn about size_t placement delete with
822 2015-05-19 Nathan Sidwell <nathan@acm.org>
825 * typeck.c (finish_class_member_access_expr): Diagnose failed
826 lookup of enum class member.
828 2015-05-19 Jakub Jelinek <jakub@redhat.com>
831 * parser.c (cp_parser_omp_for_loop): Don't add
832 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
833 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
834 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
837 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
839 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
842 2015-05-18 Jason Merrill <jason@redhat.com>
844 * pt.c (retrieve_specialization): Make sure our arguments have
845 gone through strip_typedefs.
847 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
848 (determine_specialization): Call coerce_template_parms.
851 * pt.c (type_unification_real): Check convertibility here.
852 (unify_one_argument): Not here.
854 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
855 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
856 [TREE_LIST]: Fix no-change case.
858 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
860 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
863 * error.c (cp_diagnostic_starter): Use diagnostic_location
865 (cp_print_error_function): Likewise.
866 (cp_printer): Replace locus pointer with accessor function.
868 2015-05-12 David Malcolm <dmalcolm@redhat.com>
870 * parser.c (cp_parser_selection_statement): Add location and
871 guard_kind arguments to calls to
872 cp_parser_implicitly_scoped_statement.
873 (cp_parser_iteration_statement): Likewise for calls to
874 cp_parser_already_scoped_statement.
875 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
876 "guard_kind" params; use them to warn for misleading
878 (cp_parser_already_scoped_statement): Likewise.
880 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
882 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
883 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
884 * semantics.c (finish_member_declaration): Likewise.
885 * method.c (lazily_declare_fn): Allways add method to main variant list.
887 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
890 * decl2.c (note_mangling_alias): Declare arguments as unused.
892 2015-05-08 Jason Merrill <jason@redhat.com>
894 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
897 2015-05-08 Jason Merrill <jason@redhat.com>
899 * decl2.c (mangling_aliases): New variable.
900 (note_mangling_alias, generate_mangling_aliases): New.
901 (cp_write_global_declarations): Call generate_mangling_aliases.
902 (generate_mangling_alias): Split out from...
903 * mangle.c (mangle_decl): ...here.
904 * cp-tree.h: Declare note_mangling_alias.
906 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
908 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
909 (build_java_method_aliases): Adapt to use create_same_body_alias
910 instead of assemble_alias. Move variable declarations to
911 definition and tidy up.
912 (cp_write_global_declarations): Call build_java_method_aliases
913 instead of collecting candidates first.
915 2015-05-07 Jason Merrill <jason@redhat.com>
918 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
919 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
920 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
921 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
922 (apply_late_template_attributes): Handle attribute pack expansion.
924 2015-05-07 Marek Polacek <polacek@redhat.com>
927 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
930 2015-05-07 Jason Merrill <jason@redhat.com>
934 * typeck2.c (digest_init_r): Fix single element list.
936 2015-05-05 Jason Merrill <jason@redhat.com>
938 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
939 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
941 (cp_genericize_data): Add try_block field.
942 (cp_genericize_tree): Initialize it.
943 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
946 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
949 * semantics.c (finish_call_expr): Check complain.
951 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
952 maybe-in-charge constructor.
954 * decl.c (start_decl): Don't push the plain VAR_DECL for a
961 * call.c (convert_like_real): Check value-initialization before
963 * typeck2.c (process_init_constructor_record): Don't set
964 CONSTRUCTOR_IS_DIRECT_INIT.
965 (process_init_constructor_array): Likewise.
966 * init.c (build_vec_init): Likewise.
968 2015-05-05 David Malcolm <dmalcolm@redhat.com>
970 * parser.c (cp_parser_asm_definition): Only test for
971 error_mark_node if "outputs" was just set. Likewise for "inputs".
973 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
974 Jakub Jelinek <jakub@redhat.com>
977 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
978 result in an actual error.
980 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
981 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
984 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
987 2015-04-30 David Malcolm <dmalcolm@redhat.com>
989 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
992 2015-04-29 Jason Merrill <jason@redhat.com>
995 * tree.c (apply_identity_attributes): Fix handling of classes.
997 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
999 * parser.c (cp_parser_oacc_enter_exit_data): Use
1000 OMP_STANDALONE_CLAUSES.
1002 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
1005 * init.c (perform_member_init): Handle references for -Winit-self.
1007 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1009 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1010 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1012 2015-04-28 Jason Merrill <jason@redhat.com>
1015 * constexpr.c (cxx_eval_store_expression): Don't try to actually
1016 store an empty class.
1019 * constexpr.c (cxx_eval_builtin_function_call): Fix
1020 __builtin_constant_p.
1023 * tree.c (strip_typedefs): Add remove_attributes parm.
1024 (strip_typedefs_expr): Likewise.
1025 (apply_identity_attributes): New subroutine of strip_typedefs.
1026 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1027 (convert_nontype_argument, unify): Likewise.
1028 * cp-tree.h: Adjust.
1031 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1033 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1035 * class.c (layout_class_type): Remove check if
1036 PCC_BITFIELD_TYPE_MATTERS is defined.
1038 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1040 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1042 2015-04-24 Jason Merrill <jason@redhat.com>
1045 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1047 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1048 Remove obsolete code.
1049 [NE_EXPR]: Likewise.
1051 2015-04-23 Jason Merrill <jason@redhat.com>
1054 * pt.c (check_explicit_specialization): Don't
1055 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1057 * decl.c (grokvardecl): Revert earlier fix.
1059 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
1062 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1063 suppresses the diagnostic.
1065 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
1067 Reject trailing return type for an operator auto().
1068 * decl.c (grokdeclarator): Reject trailing return types for
1069 all conversion operators, don't handle conversion operators
1070 in the previous checks that deal with auto.
1072 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1074 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1076 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1078 * class.c (resolve_address_of_overloaded_function, instantiate_type):
1079 Rename tsubst_flags_t parameter flags -> complain.
1081 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1083 * call.c (build_op_delete_call, build_over_call): Check mark_used
1085 * class.c (resolve_address_of_overloaded_function): Likewise.
1086 * decl.c (cxx_maybe_build_cleanup): Likewise.
1087 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1088 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1089 * rtti.c (build_dynamic_cast_1): Likewise.
1090 * semantics.c (process_outer_var_ref): Likewise.
1091 * typeck.c (build_class_member_access_expr,
1092 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1094 2015-04-15 Jason Merrill <jason@redhat.com>
1096 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1097 (build_constexpr_constructor_member_initializers): Loop to find
1099 * decl.c (start_preparsed_function): Clobber the object at the
1100 beginning of a constructor.
1102 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1103 * method.c (implicitly_declare_fn): Likewise.
1104 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1106 * decl2.c (determine_visibility): Use get_template_info.
1108 2015-04-15 Jason Merrill <jason@redhat.com>
1109 Marek Polacek <polacek@redhat.com>
1112 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1113 through the normal loop, just don't capture.
1114 (maybe_resolve_dummy): Handle null return.
1116 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1118 * call.c (enforce_access): Emit error + inform.
1120 2015-04-15 Marek Polacek <polacek@redhat.com>
1122 * constexpr.c (use_new_call): Remove #define.
1123 (lookup_parameter_binding): Remove function.
1124 (cxx_bind_parameters_in_call): Remove unused code.
1125 (cxx_eval_call_expression): Likewise.
1126 (cxx_eval_constant_expression): Likewise.
1128 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1130 * tree.c (replace_placeholders_t): Remove unused type.
1131 (replace_placeholders): Remove unused pset.
1133 2015-04-14 Jason Merrill <jason@redhat.com>
1135 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1138 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1141 * name-lookup.c (do_class_using_decl): Complain about specifying
1142 the current class even if there are dependent bases.
1144 2015-04-14 David Krauss <david_work@me.com>
1147 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1149 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1150 Jason Merrill <jason@redhat.com>
1153 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1154 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1155 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1158 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1161 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1162 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1163 the expression to the original type at the end.
1165 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1168 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1172 * tree.c (build_cplus_array_type): Layout type before variants are
1173 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1176 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1179 * lambda.c (add_capture): Use dependent_type_p for capture by
1182 2015-04-02 Marek Polacek <polacek@redhat.com>
1185 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1186 cxx_eval_constant_expression on the first operand.
1188 2015-04-01 Jason Merrill <jason@redhat.com>
1191 * decl.c (make_typename_type): Handle seeing a variable template.
1193 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1196 * pt.c (instantiating_current_function_p): New.
1197 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1198 * cp-tree.h (instantiating_current_function_p): Declare.
1200 2015-04-01 Jason Merrill <jason@redhat.com>
1203 * decl.c (grokvardecl): Don't call check_explicit_specialization
1204 for non-template members of a class template.
1206 2015-04-01 Marek Polacek <polacek@redhat.com>
1209 * class.c (finish_struct): Require that the second field of a
1210 user-defined initializer_list be of size type.
1212 2015-03-31 Marek Polacek <polacek@redhat.com>
1215 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1216 checking for constness.
1218 2015-03-30 Marek Polacek <polacek@redhat.com>
1221 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1222 *(&A[i] p+ j) => A[i + j] transformation here.
1223 (cxx_eval_pointer_plus_expression): New function.
1224 (cxx_eval_constant_expression): Use it here.
1226 2015-03-27 Tobias Burnus <burnus@net-b.de>
1229 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1230 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1231 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1234 2015-03-27 Marek Polacek <polacek@redhat.com>
1237 * semantics.c (finish_switch_cond): If the unlowered type is not an
1238 enum, use the type of the condition.
1240 2015-03-27 Jason Merrill <jason@redhat.com>
1243 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1246 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1249 * init.c (build_vec_init): Fix initializing aggregates
1250 with empty init list.
1252 2015-03-26 Jason Merrill <jason@redhat.com>
1255 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1257 2015-03-25 Marek Polacek <polacek@redhat.com>
1260 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1261 on an anonymous namespace.
1263 2015-03-25 Marek Polacek <polacek@redhat.com>
1266 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1268 2015-03-24 Jason Merrill <jason@redhat.com>
1271 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1272 * parser.c (cp_parser_namespace_definition): Don't set it.
1273 * name-lookup.c (handle_namespace_attrs): Check
1274 DECL_NAMESPACE_ASSOCIATIONS instead.
1277 * pt.c (get_mostly_instantiated_function_type): Just return the
1278 type of the partially instantiated template in DECL_TI_TEMPLATE.
1280 2015-03-20 Marek Polacek <polacek@redhat.com>
1283 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1286 2015-03-20 Marek Polacek <polacek@redhat.com>
1289 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1292 2015-03-19 Jason Merrill <jason@redhat.com>
1295 Automatically propagate ABI tags to variables and functions
1296 from their (return) type.
1297 * class.c (check_tag): Handle variables and functions.
1298 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1299 (mark_or_check_tags): Likewise.
1300 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1301 (check_abi_tags): Add single argument overload for decls.
1302 Handle inheriting tags for decls.
1303 * mangle.c (write_mangled_name): Call it.
1304 (mangle_return_type_p): Split out from write_encoding.
1305 (unmangled_name_p): Split out from write_mangled_name.
1306 (write_mangled_name): Ignore abi_tag on namespace.
1307 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1308 * parser.c (cp_parser_namespace_definition): Set it.
1309 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1310 about abi_tag attribute on non-inline namespace.
1311 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1312 (handle_abi_tag_attribute): Allow tags on variables.
1314 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1316 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1317 attribute for DECL_EXTERNAL VAR_DECLs.
1319 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1322 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1324 * decl2.c (mark_used): Inline the require_deduced_type call and
1325 guard the error call.
1327 2015-03-16 Jason Merrill <jason@redhat.com>
1330 * parser.c (cp_parser_template_name): Call strip_using_decl.
1332 2015-03-16 Marek Polacek <polacek@redhat.com>
1336 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1338 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1341 * decl.c (check_default_argument): Don't call
1342 maybe_warn_zero_as_null_pointer_constant.
1344 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1346 * cp-gimplify.c (simple_empty_class_p): New.
1347 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1348 the code for empty class copies into simple_empty_class_p, and
1349 adapt it to handle COMPOUND_EXPRs.
1351 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1354 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1355 only if the location of newdecl doesn't match the location of olddecl.
1357 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1360 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1363 2015-03-10 Jason Merrill <jason@redhat.com>
1367 * pt.c (dependent_type_p_r): Check both class and alias template args.
1369 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1372 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1373 before preparing arguments to warn_logical_not_parentheses.
1374 Use maybe_constant_value on rhs.
1376 2015-03-09 Jason Merrill <jason@redhat.com>
1379 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1381 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1384 * parser.c (cp_parser_binary_expression): Don't warn for
1385 !!x == y or !b == y where b is bool.
1387 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1389 * ptree.c (cxx_print_lambda_node): New.
1390 (cxx_print_xnode): Handle LAMBDA_EXPR.
1392 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1395 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1396 RESULT_DECL handling.
1398 2015-02-26 Marek Polacek <polacek@redhat.com>
1401 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1402 a RETURN_EXPR if its operand is null.
1404 2015-02-25 Jason Merrill <jason@redhat.com>
1407 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1409 (constrain_visibility_for_template): Handle reference arguments.
1412 * decl.c (start_preparsed_function): Use create_artificial_label
1415 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1416 Jakub Jelinek <jakub@redhat.com>
1419 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1420 implicit typedefs for lambda types.
1422 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1425 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1427 2015-02-13 Jason Merrill <jason@redhat.com>
1430 * pt.c (template_args_equal): Look through conversions here.
1431 * tree.c (cp_tree_equal): Not here.
1433 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1436 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1437 pragma_external context.
1439 2015-02-13 Jason Merrill <jason@redhat.com>
1442 * call.c (reference_binding): Don't look for bad conversion
1443 if TO is incomplete.
1445 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1448 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1449 to lookup_template_class.
1451 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1454 * decl.c (start_preparsed_function): Use void_type_node instead
1455 of NULL_TREE as LABEL_DECL type.
1457 2015-02-12 Jason Merrill <jason@redhat.com>
1460 * mangle.c (write_mangled_name): Fix test for variable template
1463 * decl.c (begin_destructor_body): Condition clobber on
1466 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1469 * parser.c (lookup_literal_operator): Return all candidates.
1470 (cp_parser_userdef_char_literal): Simplify error handling.
1471 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1472 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1473 Also give higher priority to standard string UDL operator.
1475 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1478 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1479 * decl.c (poplevel): If functionbody, try not to create an extra
1480 BLOCK for function body and use subblocks as that, if it is non-NULL
1481 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1482 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1485 * except.c (check_noexcept_r): Return NULL for internal
1488 2015-02-10 Jason Merrill <jason@redhat.com>
1491 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1493 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1496 * method.c (use_thunk): Do not check for stdarg thunks.
1498 2015-02-06 Jason Merrill <jason@redhat.com>
1501 * init.c (build_vec_init): Handle default-initialized array with
1502 constexpr default constructor.
1504 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1508 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1510 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1513 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1514 for generated expressions.
1516 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1519 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1522 2015-02-02 Jason Merrill <jason@redhat.com>
1524 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1526 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1528 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1529 changed to pass input_location as first argument.
1531 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1534 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1537 2015-01-29 Jason Merrill <jason@redhat.com>
1540 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1541 erroneous return statement.
1544 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1547 2015-01-27 Caroline Tice <cmtice@google.com>
1549 Committing VTV Cywin/Ming patch for Patrick Wollgast
1550 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1551 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1553 2015-01-27 Jason Merrill <jason@redhat.com>
1556 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1557 current_function_decl.
1560 * pt.c (finish_template_variable): Move from semantics.c.
1561 Handle multiple template arg levels. Handle coercion here.
1562 (lookup_template_variable): Not here.
1564 2015-01-23 Jason Merrill <jason@redhat.com>
1568 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1569 that has been completely split out.
1572 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1576 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1579 2015-01-21 Jason Merrill <jason@redhat.com>
1582 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1583 constant CONSTRUCTORs.
1586 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1587 give a hard error in a template instantiation.
1589 2015-01-21 Richard Biener <rguenther@suse.de>
1592 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1593 for builtins the user declared correctly.
1595 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1598 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1599 TREE_TYPE (elt) == error_mark_node.
1601 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1603 PR tree-optimization/62053
1604 * tree.c (build_cplus_array_type): Layout type after variants are set.
1606 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1608 * cp-gimplify.c (cp_genericize_r): Call
1609 cp_ubsan_maybe_instrument_member_call for member calls.
1610 (cp_ubsan_check_member_access_r): New function.
1611 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1612 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1613 cp_ubsan_instrument_member_accesses,
1614 cp_ubsan_maybe_instrument_downcast,
1615 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1616 * cp-ubsan.c: New file.
1617 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1618 * constexpr.c (cxx_eval_call_expression): Return void_node
1620 (potential_constant_expression_1): Return true for
1621 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1622 * typeck.c (build_class_member_access_expr): Provide locus
1624 (build_static_cast_1): Instrument downcasts.
1625 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1626 add ubsan instrumentation for virtual_access.
1627 * call.c: Include internal-fn.h.
1628 (set_flags_from_callee): Handle internal calls.
1630 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1633 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1634 and function templates, declared only in the class.
1635 * decl.c (duplicate_decls): Reveal hidden friend functions or
1636 function templates, if they are redeclared outside the class.
1638 2015-01-15 Jason Merrill <jason@redhat.com>
1641 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1644 * constexpr.c (potential_constant_expression_1): Handle reference
1647 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1648 James Norris <jnorris@codesourcery.com>
1649 Cesar Philippidis <cesar@codesourcery.com>
1650 Ilmir Usmanov <i.usmanov@samsung.com>
1651 Jakub Jelinek <jakub@redhat.com>
1653 * parser.c: Include "gomp-constants.h".
1654 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1655 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1656 Use OMP_CLAUSE_SET_MAP_KIND.
1657 (cp_parser_omp_construct, cp_parser_pragma): Handle
1658 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1659 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1660 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1661 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1662 "create", "delete", "deviceptr", "host", "num_gangs",
1663 "num_workers", "present", "present_or_copy", "pcopy",
1664 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1665 "present_or_create", "pcreate", "vector_length", "wait".
1666 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1667 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1668 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1669 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1670 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1671 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1672 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1673 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1674 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1675 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1676 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1677 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1678 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1679 (cp_parser_oacc_wait): New functions.
1680 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1681 (finish_oacc_parallel): New prototypes.
1682 * semantics.c: Include "gomp-constants.h".
1683 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1684 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1685 OMP_CLAUSE_SET_MAP_KIND.
1686 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1687 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1688 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1689 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1692 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1695 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1696 self-initialization.
1698 2015-01-13 Jason Merrill <jason@redhat.com>
1702 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1703 pointer expressions.
1704 (cxx_eval_increment_expression): Likewise.
1707 * pt.c (coerce_template_parameter_pack): Return NULL for a
1708 zero-length fixed parameter pack with a pack expansion arg.
1711 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1713 2015-01-12 Jason Merrill <jason@redhat.com>
1716 * constexpr.c (cxx_eval_call_expression): A call to a void
1717 function doesn't need to return a value.
1719 2015-01-09 Michael Collison <michael.collison@linaro.org>
1721 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1722 input.h, alias.h, symtab.h, options.h, fold-const.h,
1723 wide-int.h, and inchash.h due to flattening of tree.h.
1725 * constexpr.c: Ditto.
1726 * cp-array-notation.c: Ditto.
1727 * cp-gimplify.c: Ditto.
1729 * cp-objcp-common.c: Ditto.
1742 * name-lookup.c: Ditto.
1743 * optimize.c: Ditto.
1750 * semantics.c: Ditto.
1755 2015-01-08 Jason Merrill <jason@redhat.com>
1757 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1758 * decl.c (compute_array_index_type): Likewise.
1759 * init.c (build_vec_init): Likewise.
1760 * typeck.c (cp_build_binary_op): Likewise.
1762 2015-01-08 Jason Merrill <jason@redhat.com>
1764 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1765 whether an initializer-list is too big for a VLA.
1766 (throw_bad_array_length): Remove.
1767 * cp-tree.h: Remove prototype.
1769 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1772 * decl.c (grokfndecl): Add bool parameter.
1773 (grokdeclarator): Adjust calls.
1774 (start_decl): Don't set DECL_DELETED_FN here.
1776 2015-01-06 Jason Merrill <jason@redhat.com>
1778 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1782 * pt.c (type_dependent_expression_p): Handle variable templates.
1783 * constexpr.c (potential_constant_expression_1): Use it.
1786 * semantics.c (finish_offsetof): Handle templates here.
1787 * parser.c (cp_parser_builtin_offsetof): Not here.
1790 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1793 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1796 * class.c (check_field_decls): Make copy assignment operators
1797 complex only in c++98 mode.
1799 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1802 * class.c (check_for_override): Warn when a virtual function is an
1803 override not marked override.
1805 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1807 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1809 (get_basefndecls): Adjust.
1811 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1813 Update copyright years.
1815 2015-01-05 Marek Polacek <polacek@redhat.com>
1818 * typeck.c (cp_build_array_ref): Pass loc down to
1819 warn_array_subscript_with_type_char.
1822 Copyright (C) 2015 Free Software Foundation, Inc.
1824 Copying and distribution of this file, with or without modification,
1825 are permitted in any medium without royalty provided the copyright
1826 notice and this notice are preserved.