1 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
4 rather than ggc_hasher.
5 (constexpr_call_hasher): Likewise.
6 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
7 * decl.c (typename_hasher): Likewise.
8 * mangle.c (conv_type_hasher): Likewise.
9 * pt.c (spec_hasher): Likewise.
10 * tree.c (cplus_array_hasher, list_hasher): Likewise.
11 * typeck2.c (abstract_type_hasher): Likewise.
13 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
15 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
16 rather than pointer_hash.
17 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
18 * semantics.c (nrv_data): Likewise.
19 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
21 2015-06-24 Jason Merrill <jason@redhat.com>
24 * pt.c (dependent_type_p_r): Check for dependent alias template
25 specialization sooner.
28 * class.c (type_has_nontrivial_assignment): Remove.
29 * cp-tree.h: Remove declaration.
30 * init.c (vec_copy_assign_is_trivial): New.
31 (build_vec_init): Use it.
33 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
35 Implement N3928 - Extending static_assert
36 * parser.c (cp_parser_static_assert): Support static_assert with
37 no message string. Supply an empty string in this case.
38 * semantics.c (finish_static_assert): Don't try to print a message if
39 the message strnig is empty.
41 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
44 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
45 implicit template parm if 'auto' is a placeholder for trailing
48 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
51 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
54 * parser.c (cp_parser_template_parameter_list): Update
55 current_template_parms right after processing a paramater.
56 * pt.c (template_parms_to_args): Remove obsolete hack for
57 giving template template arguments the proper level.
58 (check_default_tmpl_args): Account for tested template
60 (splite_late_return_type): Remove obsolete hack for giving
61 template template arguments the proper level.
63 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
66 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
68 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
71 * parser.c (cp_parser_template_parameter_list): Update
72 current_template_parms right after processing a paramater.
73 * pt.c (template_parms_to_args): Remove obsolete hack for
74 giving template template arguments the proper level.
75 (check_default_tmpl_args): Account for tested template
77 (splite_late_return_type): Remove obsolete hack for giving
78 template template arguments the proper level.
80 2015-06-23 Jason Merrill <jason@redhat.com>
83 * decl.c (grokfndecl): Check the linkage of ctype, not just
85 * tree.c (no_linkage_check): Skip the 'this' pointer.
88 * class.c (type_has_nontrivial_assignment): New.
89 * init.c (build_vec_init): Use it.
90 * cp-tree.h: Declare it.
91 * method.c (trivial_fn_p): Templates aren't trivial.
94 * decl.c (expand_static_init): Make sure the destructor is callable
95 here even if we have an initializer.
97 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
99 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
100 -fdump-ada-spec is passed.
102 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
104 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
106 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
108 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
110 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
112 * decl.c (grokdeclarator): Remove pointless code.
114 2015-06-22 Jason Merrill <jason@redhat.com>
117 * call.c (implicit_conversion): Only reshape for classes.
119 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
121 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
123 * semantics.c (finish_omp_atomic): Likewise.
124 * typeck.c (cp_build_array_ref): Likewise.
126 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
129 * call.c (build_new_op_1): Check tf_warning flag in all cases.
131 2015-06-19 Jason Merrill <jason@redhat.com>
134 * pt.c (instantiate_class_template_1): Clear
135 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
138 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
140 * typeck.c (merge_types): build_ptrmemfunc_type before applying
141 quals and attributes.
144 * constexpr.c (build_constexpr_constructor_member_initializers):
145 Handle an empty STATEMENT_LIST.
148 * pt.c (tsubst_copy_and_build): Register a capture proxy in
149 local_specializations.
151 2015-06-17 Jason Merrill <jason@redhat.com>
154 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
156 (potential_constant_expression_1): Likewise.
158 2015-06-17 Jason Merrill <jason@redhat.com>
161 * call.c (implicit_conversion): Call reshape_init here, early.
162 (build_aggr_conv): Not here.
164 2015-06-17 Jakub Jelinek <jakub@redhat.com>
167 * pt.c (tsubst_omp_clause_decl): New function.
168 (tsubst_omp_clauses): Use it or tsubst_copy instead of
169 tsubst_expr on OMP_CLAUSE_DECL.
171 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
173 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
174 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
175 * decl.c (grokdeclarator, xref_tag_1): Likewise.
176 * error.c (dump_aggr_type): likewise.
177 * pt.c (push_template_decl_real): Likewise.
178 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
180 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
182 * call.c: Do not include input.h, line-map.h or is-a.h.
184 * constexpr.c: Likewise.
185 * cp-array-notation.c: Likewise.
186 * cp-gimplify.c: Likewise.
187 * cp-lang.c: Likewise.
188 * cp-objcp-common.c: Likewise.
189 * cp-tree.h: Likewise.
190 * cp-ubsan.c: Likewise.
196 * except.c: Likewise.
198 * friend.c: Likewise.
200 * lambda.c: Likewise.
202 * mangle.c: Likewise.
203 * method.c: Likewise.
204 * name-lookup.c: Likewise.
205 * optimize.c: Likewise.
206 * parser.c: Likewise.
211 * search.c: Likewise.
212 * semantics.c: Likewise.
214 * typeck.c: Likewise.
215 * typeck2.c: Likewise.
216 * vtable-class-hierarchy.c: Likewise.
218 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
221 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
223 2015-06-16 Jason Merrill <jason@redhat.com>
226 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
230 * tree.c (bot_manip): Remap SAVE_EXPR.
233 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
235 2015-06-15 Nathan Sidwell <nathan@acm.org>
238 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
239 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
240 protect it from recursive instantiation.
242 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
245 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
246 using a local type is pure virtual.
248 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
250 * call.c: Remove comment documenting the long-deleted
251 function build_method_call.
253 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
256 * typeck.c (cp_build_binary_op): Warn when comparing an address
257 of a reference against NULL.
259 2015-06-12 Jason Merrill <jason@redhat.com>
262 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
263 variables as DECL_NOT_REALLY_EXTERN.
265 2015-06-11 Jason Merrill <jason@redhat.com>
268 * constexpr.c (potential_constant_expression_1): Handle a
269 DECL_EXPR of TYPE_DECL.
272 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
275 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
277 * decl.c (cxx_init_decl_processing): Register the main
278 translation unit through the new debug hook.
280 2015-06-10 Jason Merrill <jason@redhat.com>
283 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
284 * pt.c (push_template_decl_real): Set it.
285 (dependent_alias_template_spec_p): Use it.
286 (dependent_type_p_r): Use dependent_alias_template_spec_p.
287 (uses_all_template_parms_data, uses_all_template_parms_r)
288 (complex_alias_template_p): New.
289 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
291 2015-06-09 Jason Merrill <jason@redhat.com>
295 * typeck2.c (digest_init_r): Replace previous change with
299 * semantics.c (process_outer_var_ref): Make sure the value is
300 actually constant before returning it.
301 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
304 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
307 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
308 * init.c (expand_default_init): Likewise.
310 2015-06-09 Jason Merrill <jason@redhat.com>
313 * tree.c (replace_placeholders_r): Handle placeholders for an
315 * typeck2.c (store_init_value): Only replace_placeholders for
316 objects of class type.
318 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
320 * call.c : Adjust include files.
321 * class.c : Likewise.
322 * constexpr.c : Likewise.
323 * cp-array-notation.c : Likewise.
324 * cp-cilkplus.c : Likewise.
325 * cp-gimplify.c : Likewise.
326 * cp-lang.c : Likewise.
327 * cp-objcp-common.c : Likewise.
328 * cp-tree.h : Likewise.
329 * cp-ubsan.c : Likewise.
332 * decl2.c : Likewise.
334 * error.c : Likewise.
335 * except.c : Likewise.
337 * friend.c : Likewise.
339 * lambda.c : Likewise.
341 * mangle.c : Likewise.
342 * method.c : Likewise.
343 * name-lookup.c : Likewise.
344 * optimize.c : Likewise.
345 * parser.c : Likewise.
347 * ptree.c : Likewise.
350 * search.c : Likewise.
351 * semantics.c : Likewise.
353 * typeck.c : Likewise.
354 * typeck2.c : Likewise.
355 * vtable-class-hierarchy.c : Likewise.
357 2015-06-05 Jason Merrill <jason@redhat.com>
360 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
361 the expansion has extra args.
362 (use_pack_expansion_extra_args_p): Return true in that case.
365 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
366 dependent even if it has a type.
368 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
370 * cp-objcp-common.c: Adjust comment for
371 cxx_warn_unused_global_decl.
372 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
373 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
374 * cp-tree.h (note_mangling_alias): Protoize.
375 (cp_write_global_declarations): Remove.
376 (cxx_post_compilation_parsing_cleanups): Protoize.
377 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
379 * decl2.c (mangling_aliases): New global.
380 (build_java_method_aliases): New. Adapted from
381 collect_candidates_for_java_method_aliases.
382 (collect_candidates_for_java_method_aliases): Remove.
383 (build_java_method_aliases): Remove.
384 (generate_mangling_aliases): New.
385 (note_mangling_alias): New. Moved from mangle_decl.
386 (locus_at_end_of_parsing): New global.
387 (c_parse_final_cleanups): Rename from
388 cp_write_global_declarations.
389 Use locus_at_end_of_parsing.
390 Call generate_mangling_aliases.
391 Rename call to collect_candidates_for_java_method_aliases into
392 build_java_method_aliases.
393 Remove call to finalize_compilation_unit.
394 Move vtable handling into cxx_post_compilation_parsing_cleanups.
395 Do not call check_global_declarations or
396 emit_debug_global_declarations.
397 (cxx_post_compilation_parsing_cleanups): New.
398 * mangle.c (mangle_decl): Move code to note_mangling_alias.
399 * name-lookup.c (do_namespace_alias): Call early_global_decl.
401 2015-06-05 Nathan Sidwell <nathan@acm.org>
404 * parser.c (cp_parser_cache_defarg): Continue looking for
405 declarators when scanning a potential template argument list of an
408 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
410 * call.c: Adjust includes for restructured coretypes.h.
412 * constexpr.c: Likewise.
413 * cp-array-notation.c: Likewise.
414 * cp-gimplify.c: Likewise.
415 * cp-lang.c: Likewise.
416 * cp-objcp-common.c: Likewise.
417 * cp-tree.h: Likewise.
418 * cp-ubsan.c: Likewise.
424 * except.c: Likewise.
426 * friend.c: Likewise.
428 * lambda.c: Likewise.
430 * mangle.c: Likewise.
431 * method.c: Likewise.
432 * name-lookup.c: Likewise.
433 * optimize.c: Likewise.
434 * parser.c: Likewise.
439 * search.c: Likewise.
440 * semantics.c: Likewise.
442 * typeck.c: Likewise.
443 * typeck2.c: Likewise.
444 * vtable-class-hierarchy.c: Likewise.
446 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
450 * cp-tree.h (get_guard_cond): Adjust declaration
451 * decl.c (expand_static_init): Use atomic load acquire
452 and adjust call to get_guard_cond.
453 * decl2.c (build_atomic_load_byte): New function.
454 (get_guard_cond): Handle thread_safety.
455 (one_static_initialization_or_destruction): Adjust call to
458 2015-06-03 Jason Merrill <jason@redhat.com>
461 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
462 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
463 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
464 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
466 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
467 Paolo Carlini <paolo.carlini@oracle.com>
470 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
471 use it in the diagnostic.
472 (decay_conversion): Adjust call.
473 * semantics.c (finish_decltype_type): Likewise.
474 * call.c (resolve_args, build_new_op_1,
475 perform_implicit_conversion_flags): Adjust calls.
476 * cvt.c (ocp_convert, convert_to_void): Likewise.
477 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
479 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
481 * decl.c (check_tag_decl): Use declspecs->locations as locations in
482 error_at and warning_at calls.
484 2015-06-03 Marek Polacek <polacek@redhat.com>
487 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
488 (cp_genericize_r): Don't instrument static initializers.
489 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
491 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
493 * decl.c (start_function): Call plugin before parsing.
494 (finish_function): Call plugin after parsing.
496 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
498 * cp-tree.h (init_error): Remove declaration.
499 * error.c (scratch_pretty_printer): Rename to ...
500 (actual_pretty_printer): ... this.
501 (cxx_pp): Constify and update accordingly.
502 (init_error): Remove definition.
503 * lex.c (cxx_init): Do not call init_error.
505 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
508 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
510 2015-06-01 Jason Merrill <jason@redhat.com>
513 * decl2.c (mark_used): Don't always instantiate constexpr fns.
514 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
517 * mangle.c (attr_strcmp): New.
518 (write_CV_qualifiers_for_type): Also write out attributes that
519 affect type identity.
520 (write_type): Strip all attributes after writing qualifiers.
522 2015-05-31 Jason Merrill <jason@redhat.com>
524 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
527 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
528 with the wrong type as non-constant.
530 2015-05-27 Jason Merrill <jason@redhat.com>
532 * decl.c (check_redeclaration_exception_specification): Depend on
533 -Wsystem-headers rather than -pedantic.
535 * decl.c (warn_extern_redeclared_static): Use the location of
536 newdecl in diagnostics, not input_location.
537 (validate_constexpr_redeclaration): Likewise.
538 (check_redeclaration_no_default_args): Likewise.
539 (duplicate_decls): Likewise.
540 (check_redeclaration_exception_specification): Likewise.
541 Change second diagnostic to inform.
543 2015-05-24 Nathan Sidwell <nathan@acm.org>
546 * decl.c (build_enumerator): Don't silently convert scoped enums.
548 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
551 * mangle.c (mangle_decl): Mangle anonymous namespace types as
554 2015-05-23 Nathan Sidwell <nathan@acm.org>
557 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
559 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
561 * Make-lang.in (check_g++_parallelize): Update comment.
563 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
566 * decl.c (grokdeclarator): Use the correct location in error
567 messages about 'explicit'.
569 2015-05-22 Marek Polacek <polacek@redhat.com>
570 Edward Smith-Rowland <3dw4rd@verizon.net>
573 * cp-tree.h (build_enumerator): Update declaration.
574 * decl.c (build_enumerator): Add attributes parameter. Call
575 cplus_decl_attributes.
576 * init.c (constant_value_1): Pass tf_none to mark_used.
577 * parser.c (cp_parser_enumerator_definition): Parse attributes and
578 pass them down to build_enumerator.
579 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
580 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
582 2015-05-21 Nathan Sidwell <nathan@acm.org>
585 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
587 2015-05-21 Marek Polacek <polacek@redhat.com>
589 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
591 2015-05-20 Jason Merrill <jason@redhat.com>
593 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
594 before register_specialization.
596 * decl.c (grok_op_properties): Don't complain about size_t
597 placement delete here.
598 * call.c (second_parm_is_size_t): Split out from...
599 (non_placement_deallocation_fn_p): ...here.
600 (build_op_delete_call): Warn about size_t placement delete with
603 2015-05-19 Nathan Sidwell <nathan@acm.org>
606 * typeck.c (finish_class_member_access_expr): Diagnose failed
607 lookup of enum class member.
609 2015-05-19 Jakub Jelinek <jakub@redhat.com>
612 * parser.c (cp_parser_omp_for_loop): Don't add
613 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
614 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
615 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
618 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
620 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
623 2015-05-18 Jason Merrill <jason@redhat.com>
625 * pt.c (retrieve_specialization): Make sure our arguments have
626 gone through strip_typedefs.
628 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
629 (determine_specialization): Call coerce_template_parms.
632 * pt.c (type_unification_real): Check convertibility here.
633 (unify_one_argument): Not here.
635 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
636 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
637 [TREE_LIST]: Fix no-change case.
639 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
641 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
644 * error.c (cp_diagnostic_starter): Use diagnostic_location
646 (cp_print_error_function): Likewise.
647 (cp_printer): Replace locus pointer with accessor function.
649 2015-05-12 David Malcolm <dmalcolm@redhat.com>
651 * parser.c (cp_parser_selection_statement): Add location and
652 guard_kind arguments to calls to
653 cp_parser_implicitly_scoped_statement.
654 (cp_parser_iteration_statement): Likewise for calls to
655 cp_parser_already_scoped_statement.
656 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
657 "guard_kind" params; use them to warn for misleading
659 (cp_parser_already_scoped_statement): Likewise.
661 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
663 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
664 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
665 * semantics.c (finish_member_declaration): Likewise.
666 * method.c (lazily_declare_fn): Allways add method to main variant list.
668 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
671 * decl2.c (note_mangling_alias): Declare arguments as unused.
673 2015-05-08 Jason Merrill <jason@redhat.com>
675 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
678 2015-05-08 Jason Merrill <jason@redhat.com>
680 * decl2.c (mangling_aliases): New variable.
681 (note_mangling_alias, generate_mangling_aliases): New.
682 (cp_write_global_declarations): Call generate_mangling_aliases.
683 (generate_mangling_alias): Split out from...
684 * mangle.c (mangle_decl): ...here.
685 * cp-tree.h: Declare note_mangling_alias.
687 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
689 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
690 (build_java_method_aliases): Adapt to use create_same_body_alias
691 instead of assemble_alias. Move variable declarations to
692 definition and tidy up.
693 (cp_write_global_declarations): Call build_java_method_aliases
694 instead of collecting candidates first.
696 2015-05-07 Jason Merrill <jason@redhat.com>
699 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
700 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
701 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
702 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
703 (apply_late_template_attributes): Handle attribute pack expansion.
705 2015-05-07 Marek Polacek <polacek@redhat.com>
708 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
711 2015-05-07 Jason Merrill <jason@redhat.com>
715 * typeck2.c (digest_init_r): Fix single element list.
717 2015-05-05 Jason Merrill <jason@redhat.com>
719 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
720 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
722 (cp_genericize_data): Add try_block field.
723 (cp_genericize_tree): Initialize it.
724 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
727 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
730 * semantics.c (finish_call_expr): Check complain.
732 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
733 maybe-in-charge constructor.
735 * decl.c (start_decl): Don't push the plain VAR_DECL for a
742 * call.c (convert_like_real): Check value-initialization before
744 * typeck2.c (process_init_constructor_record): Don't set
745 CONSTRUCTOR_IS_DIRECT_INIT.
746 (process_init_constructor_array): Likewise.
747 * init.c (build_vec_init): Likewise.
749 2015-05-05 David Malcolm <dmalcolm@redhat.com>
751 * parser.c (cp_parser_asm_definition): Only test for
752 error_mark_node if "outputs" was just set. Likewise for "inputs".
754 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
755 Jakub Jelinek <jakub@redhat.com>
758 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
759 result in an actual error.
761 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
762 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
765 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
768 2015-04-30 David Malcolm <dmalcolm@redhat.com>
770 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
773 2015-04-29 Jason Merrill <jason@redhat.com>
776 * tree.c (apply_identity_attributes): Fix handling of classes.
778 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
780 * parser.c (cp_parser_oacc_enter_exit_data): Use
781 OMP_STANDALONE_CLAUSES.
783 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
786 * init.c (perform_member_init): Handle references for -Winit-self.
788 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
790 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
791 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
793 2015-04-28 Jason Merrill <jason@redhat.com>
796 * constexpr.c (cxx_eval_store_expression): Don't try to actually
797 store an empty class.
800 * constexpr.c (cxx_eval_builtin_function_call): Fix
801 __builtin_constant_p.
804 * tree.c (strip_typedefs): Add remove_attributes parm.
805 (strip_typedefs_expr): Likewise.
806 (apply_identity_attributes): New subroutine of strip_typedefs.
807 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
808 (convert_nontype_argument, unify): Likewise.
812 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
814 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
816 * class.c (layout_class_type): Remove check if
817 PCC_BITFIELD_TYPE_MATTERS is defined.
819 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
821 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
823 2015-04-24 Jason Merrill <jason@redhat.com>
826 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
828 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
829 Remove obsolete code.
832 2015-04-23 Jason Merrill <jason@redhat.com>
835 * pt.c (check_explicit_specialization): Don't
836 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
838 * decl.c (grokvardecl): Revert earlier fix.
840 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
843 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
844 suppresses the diagnostic.
846 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
848 Reject trailing return type for an operator auto().
849 * decl.c (grokdeclarator): Reject trailing return types for
850 all conversion operators, don't handle conversion operators
851 in the previous checks that deal with auto.
853 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
855 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
857 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
859 * class.c (resolve_address_of_overloaded_function, instantiate_type):
860 Rename tsubst_flags_t parameter flags -> complain.
862 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
864 * call.c (build_op_delete_call, build_over_call): Check mark_used
866 * class.c (resolve_address_of_overloaded_function): Likewise.
867 * decl.c (cxx_maybe_build_cleanup): Likewise.
868 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
869 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
870 * rtti.c (build_dynamic_cast_1): Likewise.
871 * semantics.c (process_outer_var_ref): Likewise.
872 * typeck.c (build_class_member_access_expr,
873 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
875 2015-04-15 Jason Merrill <jason@redhat.com>
877 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
878 (build_constexpr_constructor_member_initializers): Loop to find
880 * decl.c (start_preparsed_function): Clobber the object at the
881 beginning of a constructor.
883 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
884 * method.c (implicitly_declare_fn): Likewise.
885 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
887 * decl2.c (determine_visibility): Use get_template_info.
889 2015-04-15 Jason Merrill <jason@redhat.com>
890 Marek Polacek <polacek@redhat.com>
893 * lambda.c (lambda_expr_this_capture): In unevaluated context go
894 through the normal loop, just don't capture.
895 (maybe_resolve_dummy): Handle null return.
897 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
899 * call.c (enforce_access): Emit error + inform.
901 2015-04-15 Marek Polacek <polacek@redhat.com>
903 * constexpr.c (use_new_call): Remove #define.
904 (lookup_parameter_binding): Remove function.
905 (cxx_bind_parameters_in_call): Remove unused code.
906 (cxx_eval_call_expression): Likewise.
907 (cxx_eval_constant_expression): Likewise.
909 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
911 * tree.c (replace_placeholders_t): Remove unused type.
912 (replace_placeholders): Remove unused pset.
914 2015-04-14 Jason Merrill <jason@redhat.com>
916 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
919 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
922 * name-lookup.c (do_class_using_decl): Complain about specifying
923 the current class even if there are dependent bases.
925 2015-04-14 David Krauss <david_work@me.com>
928 * decl.c (grokdeclarator): Do not flag friends with deduced return.
930 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
931 Jason Merrill <jason@redhat.com>
934 * parser.c (cp_parser_class_name): Add enum_ok parameter.
935 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
936 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
939 2015-04-12 Jakub Jelinek <jakub@redhat.com>
942 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
943 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
944 the expression to the original type at the end.
946 2015-04-09 Jakub Jelinek <jakub@redhat.com>
949 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
953 * tree.c (build_cplus_array_type): Layout type before variants are
954 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
957 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
960 * lambda.c (add_capture): Use dependent_type_p for capture by
963 2015-04-02 Marek Polacek <polacek@redhat.com>
966 * constexpr.c (cxx_eval_pointer_plus_expression): Call
967 cxx_eval_constant_expression on the first operand.
969 2015-04-01 Jason Merrill <jason@redhat.com>
972 * decl.c (make_typename_type): Handle seeing a variable template.
974 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
977 * pt.c (instantiating_current_function_p): New.
978 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
979 * cp-tree.h (instantiating_current_function_p): Declare.
981 2015-04-01 Jason Merrill <jason@redhat.com>
984 * decl.c (grokvardecl): Don't call check_explicit_specialization
985 for non-template members of a class template.
987 2015-04-01 Marek Polacek <polacek@redhat.com>
990 * class.c (finish_struct): Require that the second field of a
991 user-defined initializer_list be of size type.
993 2015-03-31 Marek Polacek <polacek@redhat.com>
996 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
997 checking for constness.
999 2015-03-30 Marek Polacek <polacek@redhat.com>
1002 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1003 *(&A[i] p+ j) => A[i + j] transformation here.
1004 (cxx_eval_pointer_plus_expression): New function.
1005 (cxx_eval_constant_expression): Use it here.
1007 2015-03-27 Tobias Burnus <burnus@net-b.de>
1010 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1011 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1012 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1015 2015-03-27 Marek Polacek <polacek@redhat.com>
1018 * semantics.c (finish_switch_cond): If the unlowered type is not an
1019 enum, use the type of the condition.
1021 2015-03-27 Jason Merrill <jason@redhat.com>
1024 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1027 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1030 * init.c (build_vec_init): Fix initializing aggregates
1031 with empty init list.
1033 2015-03-26 Jason Merrill <jason@redhat.com>
1036 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1038 2015-03-25 Marek Polacek <polacek@redhat.com>
1041 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1042 on an anonymous namespace.
1044 2015-03-25 Marek Polacek <polacek@redhat.com>
1047 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1049 2015-03-24 Jason Merrill <jason@redhat.com>
1052 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1053 * parser.c (cp_parser_namespace_definition): Don't set it.
1054 * name-lookup.c (handle_namespace_attrs): Check
1055 DECL_NAMESPACE_ASSOCIATIONS instead.
1058 * pt.c (get_mostly_instantiated_function_type): Just return the
1059 type of the partially instantiated template in DECL_TI_TEMPLATE.
1061 2015-03-20 Marek Polacek <polacek@redhat.com>
1064 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1067 2015-03-20 Marek Polacek <polacek@redhat.com>
1070 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1073 2015-03-19 Jason Merrill <jason@redhat.com>
1076 Automatically propagate ABI tags to variables and functions
1077 from their (return) type.
1078 * class.c (check_tag): Handle variables and functions.
1079 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1080 (mark_or_check_tags): Likewise.
1081 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1082 (check_abi_tags): Add single argument overload for decls.
1083 Handle inheriting tags for decls.
1084 * mangle.c (write_mangled_name): Call it.
1085 (mangle_return_type_p): Split out from write_encoding.
1086 (unmangled_name_p): Split out from write_mangled_name.
1087 (write_mangled_name): Ignore abi_tag on namespace.
1088 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1089 * parser.c (cp_parser_namespace_definition): Set it.
1090 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1091 about abi_tag attribute on non-inline namespace.
1092 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1093 (handle_abi_tag_attribute): Allow tags on variables.
1095 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1097 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1098 attribute for DECL_EXTERNAL VAR_DECLs.
1100 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1103 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1105 * decl2.c (mark_used): Inline the require_deduced_type call and
1106 guard the error call.
1108 2015-03-16 Jason Merrill <jason@redhat.com>
1111 * parser.c (cp_parser_template_name): Call strip_using_decl.
1113 2015-03-16 Marek Polacek <polacek@redhat.com>
1117 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1119 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1122 * decl.c (check_default_argument): Don't call
1123 maybe_warn_zero_as_null_pointer_constant.
1125 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1127 * cp-gimplify.c (simple_empty_class_p): New.
1128 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1129 the code for empty class copies into simple_empty_class_p, and
1130 adapt it to handle COMPOUND_EXPRs.
1132 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1135 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1136 only if the location of newdecl doesn't match the location of olddecl.
1138 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1141 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1144 2015-03-10 Jason Merrill <jason@redhat.com>
1148 * pt.c (dependent_type_p_r): Check both class and alias template args.
1150 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1153 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1154 before preparing arguments to warn_logical_not_parentheses.
1155 Use maybe_constant_value on rhs.
1157 2015-03-09 Jason Merrill <jason@redhat.com>
1160 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1162 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1165 * parser.c (cp_parser_binary_expression): Don't warn for
1166 !!x == y or !b == y where b is bool.
1168 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1170 * ptree.c (cxx_print_lambda_node): New.
1171 (cxx_print_xnode): Handle LAMBDA_EXPR.
1173 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1176 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1177 RESULT_DECL handling.
1179 2015-02-26 Marek Polacek <polacek@redhat.com>
1182 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1183 a RETURN_EXPR if its operand is null.
1185 2015-02-25 Jason Merrill <jason@redhat.com>
1188 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1190 (constrain_visibility_for_template): Handle reference arguments.
1193 * decl.c (start_preparsed_function): Use create_artificial_label
1196 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1197 Jakub Jelinek <jakub@redhat.com>
1200 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1201 implicit typedefs for lambda types.
1203 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1206 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1208 2015-02-13 Jason Merrill <jason@redhat.com>
1211 * pt.c (template_args_equal): Look through conversions here.
1212 * tree.c (cp_tree_equal): Not here.
1214 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1217 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1218 pragma_external context.
1220 2015-02-13 Jason Merrill <jason@redhat.com>
1223 * call.c (reference_binding): Don't look for bad conversion
1224 if TO is incomplete.
1226 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1229 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1230 to lookup_template_class.
1232 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1235 * decl.c (start_preparsed_function): Use void_type_node instead
1236 of NULL_TREE as LABEL_DECL type.
1238 2015-02-12 Jason Merrill <jason@redhat.com>
1241 * mangle.c (write_mangled_name): Fix test for variable template
1244 * decl.c (begin_destructor_body): Condition clobber on
1247 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1250 * parser.c (lookup_literal_operator): Return all candidates.
1251 (cp_parser_userdef_char_literal): Simplify error handling.
1252 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1253 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1254 Also give higher priority to standard string UDL operator.
1256 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1259 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1260 * decl.c (poplevel): If functionbody, try not to create an extra
1261 BLOCK for function body and use subblocks as that, if it is non-NULL
1262 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1263 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1266 * except.c (check_noexcept_r): Return NULL for internal
1269 2015-02-10 Jason Merrill <jason@redhat.com>
1272 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1274 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1277 * method.c (use_thunk): Do not check for stdarg thunks.
1279 2015-02-06 Jason Merrill <jason@redhat.com>
1282 * init.c (build_vec_init): Handle default-initialized array with
1283 constexpr default constructor.
1285 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1289 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1291 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1294 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1295 for generated expressions.
1297 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1300 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1303 2015-02-02 Jason Merrill <jason@redhat.com>
1305 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1307 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1309 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1310 changed to pass input_location as first argument.
1312 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1315 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1318 2015-01-29 Jason Merrill <jason@redhat.com>
1321 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1322 erroneous return statement.
1325 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1328 2015-01-27 Caroline Tice <cmtice@google.com>
1330 Committing VTV Cywin/Ming patch for Patrick Wollgast
1331 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1332 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1334 2015-01-27 Jason Merrill <jason@redhat.com>
1337 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1338 current_function_decl.
1341 * pt.c (finish_template_variable): Move from semantics.c.
1342 Handle multiple template arg levels. Handle coercion here.
1343 (lookup_template_variable): Not here.
1345 2015-01-23 Jason Merrill <jason@redhat.com>
1349 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1350 that has been completely split out.
1353 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1357 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1360 2015-01-21 Jason Merrill <jason@redhat.com>
1363 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1364 constant CONSTRUCTORs.
1367 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1368 give a hard error in a template instantiation.
1370 2015-01-21 Richard Biener <rguenther@suse.de>
1373 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1374 for builtins the user declared correctly.
1376 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1379 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1380 TREE_TYPE (elt) == error_mark_node.
1382 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1384 PR tree-optimization/62053
1385 * tree.c (build_cplus_array_type): Layout type after variants are set.
1387 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1389 * cp-gimplify.c (cp_genericize_r): Call
1390 cp_ubsan_maybe_instrument_member_call for member calls.
1391 (cp_ubsan_check_member_access_r): New function.
1392 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1393 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1394 cp_ubsan_instrument_member_accesses,
1395 cp_ubsan_maybe_instrument_downcast,
1396 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1397 * cp-ubsan.c: New file.
1398 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1399 * constexpr.c (cxx_eval_call_expression): Return void_node
1401 (potential_constant_expression_1): Return true for
1402 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1403 * typeck.c (build_class_member_access_expr): Provide locus
1405 (build_static_cast_1): Instrument downcasts.
1406 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1407 add ubsan instrumentation for virtual_access.
1408 * call.c: Include internal-fn.h.
1409 (set_flags_from_callee): Handle internal calls.
1411 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1414 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1415 and function templates, declared only in the class.
1416 * decl.c (duplicate_decls): Reveal hidden friend functions or
1417 function templates, if they are redeclared outside the class.
1419 2015-01-15 Jason Merrill <jason@redhat.com>
1422 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1425 * constexpr.c (potential_constant_expression_1): Handle reference
1428 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1429 James Norris <jnorris@codesourcery.com>
1430 Cesar Philippidis <cesar@codesourcery.com>
1431 Ilmir Usmanov <i.usmanov@samsung.com>
1432 Jakub Jelinek <jakub@redhat.com>
1434 * parser.c: Include "gomp-constants.h".
1435 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1436 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1437 Use OMP_CLAUSE_SET_MAP_KIND.
1438 (cp_parser_omp_construct, cp_parser_pragma): Handle
1439 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1440 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1441 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1442 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1443 "create", "delete", "deviceptr", "host", "num_gangs",
1444 "num_workers", "present", "present_or_copy", "pcopy",
1445 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1446 "present_or_create", "pcreate", "vector_length", "wait".
1447 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1448 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1449 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1450 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1451 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1452 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1453 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1454 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1455 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1456 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1457 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1458 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1459 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1460 (cp_parser_oacc_wait): New functions.
1461 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1462 (finish_oacc_parallel): New prototypes.
1463 * semantics.c: Include "gomp-constants.h".
1464 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1465 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1466 OMP_CLAUSE_SET_MAP_KIND.
1467 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1468 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1469 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1470 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1473 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1476 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1477 self-initialization.
1479 2015-01-13 Jason Merrill <jason@redhat.com>
1483 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1484 pointer expressions.
1485 (cxx_eval_increment_expression): Likewise.
1488 * pt.c (coerce_template_parameter_pack): Return NULL for a
1489 zero-length fixed parameter pack with a pack expansion arg.
1492 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1494 2015-01-12 Jason Merrill <jason@redhat.com>
1497 * constexpr.c (cxx_eval_call_expression): A call to a void
1498 function doesn't need to return a value.
1500 2015-01-09 Michael Collison <michael.collison@linaro.org>
1502 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1503 input.h, alias.h, symtab.h, options.h, fold-const.h,
1504 wide-int.h, and inchash.h due to flattening of tree.h.
1506 * constexpr.c: Ditto.
1507 * cp-array-notation.c: Ditto.
1508 * cp-gimplify.c: Ditto.
1510 * cp-objcp-common.c: Ditto.
1523 * name-lookup.c: Ditto.
1524 * optimize.c: Ditto.
1531 * semantics.c: Ditto.
1536 2015-01-08 Jason Merrill <jason@redhat.com>
1538 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1539 * decl.c (compute_array_index_type): Likewise.
1540 * init.c (build_vec_init): Likewise.
1541 * typeck.c (cp_build_binary_op): Likewise.
1543 2015-01-08 Jason Merrill <jason@redhat.com>
1545 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1546 whether an initializer-list is too big for a VLA.
1547 (throw_bad_array_length): Remove.
1548 * cp-tree.h: Remove prototype.
1550 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1553 * decl.c (grokfndecl): Add bool parameter.
1554 (grokdeclarator): Adjust calls.
1555 (start_decl): Don't set DECL_DELETED_FN here.
1557 2015-01-06 Jason Merrill <jason@redhat.com>
1559 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1563 * pt.c (type_dependent_expression_p): Handle variable templates.
1564 * constexpr.c (potential_constant_expression_1): Use it.
1567 * semantics.c (finish_offsetof): Handle templates here.
1568 * parser.c (cp_parser_builtin_offsetof): Not here.
1571 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1574 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1577 * class.c (check_field_decls): Make copy assignment operators
1578 complex only in c++98 mode.
1580 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1583 * class.c (check_for_override): Warn when a virtual function is an
1584 override not marked override.
1586 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1588 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1590 (get_basefndecls): Adjust.
1592 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1594 Update copyright years.
1596 2015-01-05 Marek Polacek <polacek@redhat.com>
1599 * typeck.c (cp_build_array_ref): Pass loc down to
1600 warn_array_subscript_with_type_char.
1603 Copyright (C) 2015 Free Software Foundation, Inc.
1605 Copying and distribution of this file, with or without modification,
1606 are permitted in any medium without royalty provided the copyright
1607 notice and this notice are preserved.