1 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
4 rather than pointer_hash.
5 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
6 * semantics.c (nrv_data): Likewise.
7 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
9 2015-06-24 Jason Merrill <jason@redhat.com>
12 * pt.c (dependent_type_p_r): Check for dependent alias template
13 specialization sooner.
16 * class.c (type_has_nontrivial_assignment): Remove.
17 * cp-tree.h: Remove declaration.
18 * init.c (vec_copy_assign_is_trivial): New.
19 (build_vec_init): Use it.
21 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
23 Implement N3928 - Extending static_assert
24 * parser.c (cp_parser_static_assert): Support static_assert with
25 no message string. Supply an empty string in this case.
26 * semantics.c (finish_static_assert): Don't try to print a message if
27 the message strnig is empty.
29 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
32 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
33 implicit template parm if 'auto' is a placeholder for trailing
36 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
39 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
42 * parser.c (cp_parser_template_parameter_list): Update
43 current_template_parms right after processing a paramater.
44 * pt.c (template_parms_to_args): Remove obsolete hack for
45 giving template template arguments the proper level.
46 (check_default_tmpl_args): Account for tested template
48 (splite_late_return_type): Remove obsolete hack for giving
49 template template arguments the proper level.
51 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
54 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
56 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
59 * parser.c (cp_parser_template_parameter_list): Update
60 current_template_parms right after processing a paramater.
61 * pt.c (template_parms_to_args): Remove obsolete hack for
62 giving template template arguments the proper level.
63 (check_default_tmpl_args): Account for tested template
65 (splite_late_return_type): Remove obsolete hack for giving
66 template template arguments the proper level.
68 2015-06-23 Jason Merrill <jason@redhat.com>
71 * decl.c (grokfndecl): Check the linkage of ctype, not just
73 * tree.c (no_linkage_check): Skip the 'this' pointer.
76 * class.c (type_has_nontrivial_assignment): New.
77 * init.c (build_vec_init): Use it.
78 * cp-tree.h: Declare it.
79 * method.c (trivial_fn_p): Templates aren't trivial.
82 * decl.c (expand_static_init): Make sure the destructor is callable
83 here even if we have an initializer.
85 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
87 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
88 -fdump-ada-spec is passed.
90 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
92 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
94 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
96 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
98 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
100 * decl.c (grokdeclarator): Remove pointless code.
102 2015-06-22 Jason Merrill <jason@redhat.com>
105 * call.c (implicit_conversion): Only reshape for classes.
107 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
109 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
111 * semantics.c (finish_omp_atomic): Likewise.
112 * typeck.c (cp_build_array_ref): Likewise.
114 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
117 * call.c (build_new_op_1): Check tf_warning flag in all cases.
119 2015-06-19 Jason Merrill <jason@redhat.com>
122 * pt.c (instantiate_class_template_1): Clear
123 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
126 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
128 * typeck.c (merge_types): build_ptrmemfunc_type before applying
129 quals and attributes.
132 * constexpr.c (build_constexpr_constructor_member_initializers):
133 Handle an empty STATEMENT_LIST.
136 * pt.c (tsubst_copy_and_build): Register a capture proxy in
137 local_specializations.
139 2015-06-17 Jason Merrill <jason@redhat.com>
142 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
144 (potential_constant_expression_1): Likewise.
146 2015-06-17 Jason Merrill <jason@redhat.com>
149 * call.c (implicit_conversion): Call reshape_init here, early.
150 (build_aggr_conv): Not here.
152 2015-06-17 Jakub Jelinek <jakub@redhat.com>
155 * pt.c (tsubst_omp_clause_decl): New function.
156 (tsubst_omp_clauses): Use it or tsubst_copy instead of
157 tsubst_expr on OMP_CLAUSE_DECL.
159 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
161 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
162 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
163 * decl.c (grokdeclarator, xref_tag_1): Likewise.
164 * error.c (dump_aggr_type): likewise.
165 * pt.c (push_template_decl_real): Likewise.
166 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
168 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
170 * call.c: Do not include input.h, line-map.h or is-a.h.
172 * constexpr.c: Likewise.
173 * cp-array-notation.c: Likewise.
174 * cp-gimplify.c: Likewise.
175 * cp-lang.c: Likewise.
176 * cp-objcp-common.c: Likewise.
177 * cp-tree.h: Likewise.
178 * cp-ubsan.c: Likewise.
184 * except.c: Likewise.
186 * friend.c: Likewise.
188 * lambda.c: Likewise.
190 * mangle.c: Likewise.
191 * method.c: Likewise.
192 * name-lookup.c: Likewise.
193 * optimize.c: Likewise.
194 * parser.c: Likewise.
199 * search.c: Likewise.
200 * semantics.c: Likewise.
202 * typeck.c: Likewise.
203 * typeck2.c: Likewise.
204 * vtable-class-hierarchy.c: Likewise.
206 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
209 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
211 2015-06-16 Jason Merrill <jason@redhat.com>
214 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
218 * tree.c (bot_manip): Remap SAVE_EXPR.
221 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
223 2015-06-15 Nathan Sidwell <nathan@acm.org>
226 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
227 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
228 protect it from recursive instantiation.
230 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
233 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
234 using a local type is pure virtual.
236 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
238 * call.c: Remove comment documenting the long-deleted
239 function build_method_call.
241 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
244 * typeck.c (cp_build_binary_op): Warn when comparing an address
245 of a reference against NULL.
247 2015-06-12 Jason Merrill <jason@redhat.com>
250 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
251 variables as DECL_NOT_REALLY_EXTERN.
253 2015-06-11 Jason Merrill <jason@redhat.com>
256 * constexpr.c (potential_constant_expression_1): Handle a
257 DECL_EXPR of TYPE_DECL.
260 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
263 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
265 * decl.c (cxx_init_decl_processing): Register the main
266 translation unit through the new debug hook.
268 2015-06-10 Jason Merrill <jason@redhat.com>
271 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
272 * pt.c (push_template_decl_real): Set it.
273 (dependent_alias_template_spec_p): Use it.
274 (dependent_type_p_r): Use dependent_alias_template_spec_p.
275 (uses_all_template_parms_data, uses_all_template_parms_r)
276 (complex_alias_template_p): New.
277 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
279 2015-06-09 Jason Merrill <jason@redhat.com>
283 * typeck2.c (digest_init_r): Replace previous change with
287 * semantics.c (process_outer_var_ref): Make sure the value is
288 actually constant before returning it.
289 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
292 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
295 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
296 * init.c (expand_default_init): Likewise.
298 2015-06-09 Jason Merrill <jason@redhat.com>
301 * tree.c (replace_placeholders_r): Handle placeholders for an
303 * typeck2.c (store_init_value): Only replace_placeholders for
304 objects of class type.
306 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
308 * call.c : Adjust include files.
309 * class.c : Likewise.
310 * constexpr.c : Likewise.
311 * cp-array-notation.c : Likewise.
312 * cp-cilkplus.c : Likewise.
313 * cp-gimplify.c : Likewise.
314 * cp-lang.c : Likewise.
315 * cp-objcp-common.c : Likewise.
316 * cp-tree.h : Likewise.
317 * cp-ubsan.c : Likewise.
320 * decl2.c : Likewise.
322 * error.c : Likewise.
323 * except.c : Likewise.
325 * friend.c : Likewise.
327 * lambda.c : Likewise.
329 * mangle.c : Likewise.
330 * method.c : Likewise.
331 * name-lookup.c : Likewise.
332 * optimize.c : Likewise.
333 * parser.c : Likewise.
335 * ptree.c : Likewise.
338 * search.c : Likewise.
339 * semantics.c : Likewise.
341 * typeck.c : Likewise.
342 * typeck2.c : Likewise.
343 * vtable-class-hierarchy.c : Likewise.
345 2015-06-05 Jason Merrill <jason@redhat.com>
348 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
349 the expansion has extra args.
350 (use_pack_expansion_extra_args_p): Return true in that case.
353 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
354 dependent even if it has a type.
356 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
358 * cp-objcp-common.c: Adjust comment for
359 cxx_warn_unused_global_decl.
360 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
361 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
362 * cp-tree.h (note_mangling_alias): Protoize.
363 (cp_write_global_declarations): Remove.
364 (cxx_post_compilation_parsing_cleanups): Protoize.
365 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
367 * decl2.c (mangling_aliases): New global.
368 (build_java_method_aliases): New. Adapted from
369 collect_candidates_for_java_method_aliases.
370 (collect_candidates_for_java_method_aliases): Remove.
371 (build_java_method_aliases): Remove.
372 (generate_mangling_aliases): New.
373 (note_mangling_alias): New. Moved from mangle_decl.
374 (locus_at_end_of_parsing): New global.
375 (c_parse_final_cleanups): Rename from
376 cp_write_global_declarations.
377 Use locus_at_end_of_parsing.
378 Call generate_mangling_aliases.
379 Rename call to collect_candidates_for_java_method_aliases into
380 build_java_method_aliases.
381 Remove call to finalize_compilation_unit.
382 Move vtable handling into cxx_post_compilation_parsing_cleanups.
383 Do not call check_global_declarations or
384 emit_debug_global_declarations.
385 (cxx_post_compilation_parsing_cleanups): New.
386 * mangle.c (mangle_decl): Move code to note_mangling_alias.
387 * name-lookup.c (do_namespace_alias): Call early_global_decl.
389 2015-06-05 Nathan Sidwell <nathan@acm.org>
392 * parser.c (cp_parser_cache_defarg): Continue looking for
393 declarators when scanning a potential template argument list of an
396 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
398 * call.c: Adjust includes for restructured coretypes.h.
400 * constexpr.c: Likewise.
401 * cp-array-notation.c: Likewise.
402 * cp-gimplify.c: Likewise.
403 * cp-lang.c: Likewise.
404 * cp-objcp-common.c: Likewise.
405 * cp-tree.h: Likewise.
406 * cp-ubsan.c: Likewise.
412 * except.c: Likewise.
414 * friend.c: Likewise.
416 * lambda.c: Likewise.
418 * mangle.c: Likewise.
419 * method.c: Likewise.
420 * name-lookup.c: Likewise.
421 * optimize.c: Likewise.
422 * parser.c: Likewise.
427 * search.c: Likewise.
428 * semantics.c: Likewise.
430 * typeck.c: Likewise.
431 * typeck2.c: Likewise.
432 * vtable-class-hierarchy.c: Likewise.
434 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
438 * cp-tree.h (get_guard_cond): Adjust declaration
439 * decl.c (expand_static_init): Use atomic load acquire
440 and adjust call to get_guard_cond.
441 * decl2.c (build_atomic_load_byte): New function.
442 (get_guard_cond): Handle thread_safety.
443 (one_static_initialization_or_destruction): Adjust call to
446 2015-06-03 Jason Merrill <jason@redhat.com>
449 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
450 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
451 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
452 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
454 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
455 Paolo Carlini <paolo.carlini@oracle.com>
458 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
459 use it in the diagnostic.
460 (decay_conversion): Adjust call.
461 * semantics.c (finish_decltype_type): Likewise.
462 * call.c (resolve_args, build_new_op_1,
463 perform_implicit_conversion_flags): Adjust calls.
464 * cvt.c (ocp_convert, convert_to_void): Likewise.
465 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
467 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
469 * decl.c (check_tag_decl): Use declspecs->locations as locations in
470 error_at and warning_at calls.
472 2015-06-03 Marek Polacek <polacek@redhat.com>
475 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
476 (cp_genericize_r): Don't instrument static initializers.
477 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
479 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
481 * decl.c (start_function): Call plugin before parsing.
482 (finish_function): Call plugin after parsing.
484 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
486 * cp-tree.h (init_error): Remove declaration.
487 * error.c (scratch_pretty_printer): Rename to ...
488 (actual_pretty_printer): ... this.
489 (cxx_pp): Constify and update accordingly.
490 (init_error): Remove definition.
491 * lex.c (cxx_init): Do not call init_error.
493 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
496 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
498 2015-06-01 Jason Merrill <jason@redhat.com>
501 * decl2.c (mark_used): Don't always instantiate constexpr fns.
502 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
505 * mangle.c (attr_strcmp): New.
506 (write_CV_qualifiers_for_type): Also write out attributes that
507 affect type identity.
508 (write_type): Strip all attributes after writing qualifiers.
510 2015-05-31 Jason Merrill <jason@redhat.com>
512 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
515 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
516 with the wrong type as non-constant.
518 2015-05-27 Jason Merrill <jason@redhat.com>
520 * decl.c (check_redeclaration_exception_specification): Depend on
521 -Wsystem-headers rather than -pedantic.
523 * decl.c (warn_extern_redeclared_static): Use the location of
524 newdecl in diagnostics, not input_location.
525 (validate_constexpr_redeclaration): Likewise.
526 (check_redeclaration_no_default_args): Likewise.
527 (duplicate_decls): Likewise.
528 (check_redeclaration_exception_specification): Likewise.
529 Change second diagnostic to inform.
531 2015-05-24 Nathan Sidwell <nathan@acm.org>
534 * decl.c (build_enumerator): Don't silently convert scoped enums.
536 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
539 * mangle.c (mangle_decl): Mangle anonymous namespace types as
542 2015-05-23 Nathan Sidwell <nathan@acm.org>
545 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
547 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
549 * Make-lang.in (check_g++_parallelize): Update comment.
551 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
554 * decl.c (grokdeclarator): Use the correct location in error
555 messages about 'explicit'.
557 2015-05-22 Marek Polacek <polacek@redhat.com>
558 Edward Smith-Rowland <3dw4rd@verizon.net>
561 * cp-tree.h (build_enumerator): Update declaration.
562 * decl.c (build_enumerator): Add attributes parameter. Call
563 cplus_decl_attributes.
564 * init.c (constant_value_1): Pass tf_none to mark_used.
565 * parser.c (cp_parser_enumerator_definition): Parse attributes and
566 pass them down to build_enumerator.
567 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
568 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
570 2015-05-21 Nathan Sidwell <nathan@acm.org>
573 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
575 2015-05-21 Marek Polacek <polacek@redhat.com>
577 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
579 2015-05-20 Jason Merrill <jason@redhat.com>
581 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
582 before register_specialization.
584 * decl.c (grok_op_properties): Don't complain about size_t
585 placement delete here.
586 * call.c (second_parm_is_size_t): Split out from...
587 (non_placement_deallocation_fn_p): ...here.
588 (build_op_delete_call): Warn about size_t placement delete with
591 2015-05-19 Nathan Sidwell <nathan@acm.org>
594 * typeck.c (finish_class_member_access_expr): Diagnose failed
595 lookup of enum class member.
597 2015-05-19 Jakub Jelinek <jakub@redhat.com>
600 * parser.c (cp_parser_omp_for_loop): Don't add
601 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
602 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
603 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
606 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
608 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
611 2015-05-18 Jason Merrill <jason@redhat.com>
613 * pt.c (retrieve_specialization): Make sure our arguments have
614 gone through strip_typedefs.
616 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
617 (determine_specialization): Call coerce_template_parms.
620 * pt.c (type_unification_real): Check convertibility here.
621 (unify_one_argument): Not here.
623 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
624 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
625 [TREE_LIST]: Fix no-change case.
627 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
629 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
632 * error.c (cp_diagnostic_starter): Use diagnostic_location
634 (cp_print_error_function): Likewise.
635 (cp_printer): Replace locus pointer with accessor function.
637 2015-05-12 David Malcolm <dmalcolm@redhat.com>
639 * parser.c (cp_parser_selection_statement): Add location and
640 guard_kind arguments to calls to
641 cp_parser_implicitly_scoped_statement.
642 (cp_parser_iteration_statement): Likewise for calls to
643 cp_parser_already_scoped_statement.
644 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
645 "guard_kind" params; use them to warn for misleading
647 (cp_parser_already_scoped_statement): Likewise.
649 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
651 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
652 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
653 * semantics.c (finish_member_declaration): Likewise.
654 * method.c (lazily_declare_fn): Allways add method to main variant list.
656 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
659 * decl2.c (note_mangling_alias): Declare arguments as unused.
661 2015-05-08 Jason Merrill <jason@redhat.com>
663 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
666 2015-05-08 Jason Merrill <jason@redhat.com>
668 * decl2.c (mangling_aliases): New variable.
669 (note_mangling_alias, generate_mangling_aliases): New.
670 (cp_write_global_declarations): Call generate_mangling_aliases.
671 (generate_mangling_alias): Split out from...
672 * mangle.c (mangle_decl): ...here.
673 * cp-tree.h: Declare note_mangling_alias.
675 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
677 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
678 (build_java_method_aliases): Adapt to use create_same_body_alias
679 instead of assemble_alias. Move variable declarations to
680 definition and tidy up.
681 (cp_write_global_declarations): Call build_java_method_aliases
682 instead of collecting candidates first.
684 2015-05-07 Jason Merrill <jason@redhat.com>
687 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
688 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
689 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
690 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
691 (apply_late_template_attributes): Handle attribute pack expansion.
693 2015-05-07 Marek Polacek <polacek@redhat.com>
696 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
699 2015-05-07 Jason Merrill <jason@redhat.com>
703 * typeck2.c (digest_init_r): Fix single element list.
705 2015-05-05 Jason Merrill <jason@redhat.com>
707 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
708 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
710 (cp_genericize_data): Add try_block field.
711 (cp_genericize_tree): Initialize it.
712 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
715 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
718 * semantics.c (finish_call_expr): Check complain.
720 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
721 maybe-in-charge constructor.
723 * decl.c (start_decl): Don't push the plain VAR_DECL for a
730 * call.c (convert_like_real): Check value-initialization before
732 * typeck2.c (process_init_constructor_record): Don't set
733 CONSTRUCTOR_IS_DIRECT_INIT.
734 (process_init_constructor_array): Likewise.
735 * init.c (build_vec_init): Likewise.
737 2015-05-05 David Malcolm <dmalcolm@redhat.com>
739 * parser.c (cp_parser_asm_definition): Only test for
740 error_mark_node if "outputs" was just set. Likewise for "inputs".
742 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
743 Jakub Jelinek <jakub@redhat.com>
746 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
747 result in an actual error.
749 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
750 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
753 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
756 2015-04-30 David Malcolm <dmalcolm@redhat.com>
758 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
761 2015-04-29 Jason Merrill <jason@redhat.com>
764 * tree.c (apply_identity_attributes): Fix handling of classes.
766 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
768 * parser.c (cp_parser_oacc_enter_exit_data): Use
769 OMP_STANDALONE_CLAUSES.
771 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
774 * init.c (perform_member_init): Handle references for -Winit-self.
776 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
778 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
779 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
781 2015-04-28 Jason Merrill <jason@redhat.com>
784 * constexpr.c (cxx_eval_store_expression): Don't try to actually
785 store an empty class.
788 * constexpr.c (cxx_eval_builtin_function_call): Fix
789 __builtin_constant_p.
792 * tree.c (strip_typedefs): Add remove_attributes parm.
793 (strip_typedefs_expr): Likewise.
794 (apply_identity_attributes): New subroutine of strip_typedefs.
795 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
796 (convert_nontype_argument, unify): Likewise.
800 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
802 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
804 * class.c (layout_class_type): Remove check if
805 PCC_BITFIELD_TYPE_MATTERS is defined.
807 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
809 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
811 2015-04-24 Jason Merrill <jason@redhat.com>
814 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
816 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
817 Remove obsolete code.
820 2015-04-23 Jason Merrill <jason@redhat.com>
823 * pt.c (check_explicit_specialization): Don't
824 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
826 * decl.c (grokvardecl): Revert earlier fix.
828 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
831 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
832 suppresses the diagnostic.
834 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
836 Reject trailing return type for an operator auto().
837 * decl.c (grokdeclarator): Reject trailing return types for
838 all conversion operators, don't handle conversion operators
839 in the previous checks that deal with auto.
841 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
843 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
845 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
847 * class.c (resolve_address_of_overloaded_function, instantiate_type):
848 Rename tsubst_flags_t parameter flags -> complain.
850 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
852 * call.c (build_op_delete_call, build_over_call): Check mark_used
854 * class.c (resolve_address_of_overloaded_function): Likewise.
855 * decl.c (cxx_maybe_build_cleanup): Likewise.
856 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
857 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
858 * rtti.c (build_dynamic_cast_1): Likewise.
859 * semantics.c (process_outer_var_ref): Likewise.
860 * typeck.c (build_class_member_access_expr,
861 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
863 2015-04-15 Jason Merrill <jason@redhat.com>
865 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
866 (build_constexpr_constructor_member_initializers): Loop to find
868 * decl.c (start_preparsed_function): Clobber the object at the
869 beginning of a constructor.
871 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
872 * method.c (implicitly_declare_fn): Likewise.
873 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
875 * decl2.c (determine_visibility): Use get_template_info.
877 2015-04-15 Jason Merrill <jason@redhat.com>
878 Marek Polacek <polacek@redhat.com>
881 * lambda.c (lambda_expr_this_capture): In unevaluated context go
882 through the normal loop, just don't capture.
883 (maybe_resolve_dummy): Handle null return.
885 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
887 * call.c (enforce_access): Emit error + inform.
889 2015-04-15 Marek Polacek <polacek@redhat.com>
891 * constexpr.c (use_new_call): Remove #define.
892 (lookup_parameter_binding): Remove function.
893 (cxx_bind_parameters_in_call): Remove unused code.
894 (cxx_eval_call_expression): Likewise.
895 (cxx_eval_constant_expression): Likewise.
897 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
899 * tree.c (replace_placeholders_t): Remove unused type.
900 (replace_placeholders): Remove unused pset.
902 2015-04-14 Jason Merrill <jason@redhat.com>
904 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
907 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
910 * name-lookup.c (do_class_using_decl): Complain about specifying
911 the current class even if there are dependent bases.
913 2015-04-14 David Krauss <david_work@me.com>
916 * decl.c (grokdeclarator): Do not flag friends with deduced return.
918 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
919 Jason Merrill <jason@redhat.com>
922 * parser.c (cp_parser_class_name): Add enum_ok parameter.
923 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
924 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
927 2015-04-12 Jakub Jelinek <jakub@redhat.com>
930 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
931 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
932 the expression to the original type at the end.
934 2015-04-09 Jakub Jelinek <jakub@redhat.com>
937 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
941 * tree.c (build_cplus_array_type): Layout type before variants are
942 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
945 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
948 * lambda.c (add_capture): Use dependent_type_p for capture by
951 2015-04-02 Marek Polacek <polacek@redhat.com>
954 * constexpr.c (cxx_eval_pointer_plus_expression): Call
955 cxx_eval_constant_expression on the first operand.
957 2015-04-01 Jason Merrill <jason@redhat.com>
960 * decl.c (make_typename_type): Handle seeing a variable template.
962 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
965 * pt.c (instantiating_current_function_p): New.
966 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
967 * cp-tree.h (instantiating_current_function_p): Declare.
969 2015-04-01 Jason Merrill <jason@redhat.com>
972 * decl.c (grokvardecl): Don't call check_explicit_specialization
973 for non-template members of a class template.
975 2015-04-01 Marek Polacek <polacek@redhat.com>
978 * class.c (finish_struct): Require that the second field of a
979 user-defined initializer_list be of size type.
981 2015-03-31 Marek Polacek <polacek@redhat.com>
984 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
985 checking for constness.
987 2015-03-30 Marek Polacek <polacek@redhat.com>
990 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
991 *(&A[i] p+ j) => A[i + j] transformation here.
992 (cxx_eval_pointer_plus_expression): New function.
993 (cxx_eval_constant_expression): Use it here.
995 2015-03-27 Tobias Burnus <burnus@net-b.de>
998 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
999 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1000 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1003 2015-03-27 Marek Polacek <polacek@redhat.com>
1006 * semantics.c (finish_switch_cond): If the unlowered type is not an
1007 enum, use the type of the condition.
1009 2015-03-27 Jason Merrill <jason@redhat.com>
1012 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1015 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1018 * init.c (build_vec_init): Fix initializing aggregates
1019 with empty init list.
1021 2015-03-26 Jason Merrill <jason@redhat.com>
1024 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1026 2015-03-25 Marek Polacek <polacek@redhat.com>
1029 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1030 on an anonymous namespace.
1032 2015-03-25 Marek Polacek <polacek@redhat.com>
1035 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1037 2015-03-24 Jason Merrill <jason@redhat.com>
1040 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1041 * parser.c (cp_parser_namespace_definition): Don't set it.
1042 * name-lookup.c (handle_namespace_attrs): Check
1043 DECL_NAMESPACE_ASSOCIATIONS instead.
1046 * pt.c (get_mostly_instantiated_function_type): Just return the
1047 type of the partially instantiated template in DECL_TI_TEMPLATE.
1049 2015-03-20 Marek Polacek <polacek@redhat.com>
1052 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1055 2015-03-20 Marek Polacek <polacek@redhat.com>
1058 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1061 2015-03-19 Jason Merrill <jason@redhat.com>
1064 Automatically propagate ABI tags to variables and functions
1065 from their (return) type.
1066 * class.c (check_tag): Handle variables and functions.
1067 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1068 (mark_or_check_tags): Likewise.
1069 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1070 (check_abi_tags): Add single argument overload for decls.
1071 Handle inheriting tags for decls.
1072 * mangle.c (write_mangled_name): Call it.
1073 (mangle_return_type_p): Split out from write_encoding.
1074 (unmangled_name_p): Split out from write_mangled_name.
1075 (write_mangled_name): Ignore abi_tag on namespace.
1076 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1077 * parser.c (cp_parser_namespace_definition): Set it.
1078 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1079 about abi_tag attribute on non-inline namespace.
1080 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1081 (handle_abi_tag_attribute): Allow tags on variables.
1083 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1085 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1086 attribute for DECL_EXTERNAL VAR_DECLs.
1088 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1091 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1093 * decl2.c (mark_used): Inline the require_deduced_type call and
1094 guard the error call.
1096 2015-03-16 Jason Merrill <jason@redhat.com>
1099 * parser.c (cp_parser_template_name): Call strip_using_decl.
1101 2015-03-16 Marek Polacek <polacek@redhat.com>
1105 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1107 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1110 * decl.c (check_default_argument): Don't call
1111 maybe_warn_zero_as_null_pointer_constant.
1113 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1115 * cp-gimplify.c (simple_empty_class_p): New.
1116 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1117 the code for empty class copies into simple_empty_class_p, and
1118 adapt it to handle COMPOUND_EXPRs.
1120 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1123 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1124 only if the location of newdecl doesn't match the location of olddecl.
1126 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1129 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1132 2015-03-10 Jason Merrill <jason@redhat.com>
1136 * pt.c (dependent_type_p_r): Check both class and alias template args.
1138 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1141 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1142 before preparing arguments to warn_logical_not_parentheses.
1143 Use maybe_constant_value on rhs.
1145 2015-03-09 Jason Merrill <jason@redhat.com>
1148 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1150 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1153 * parser.c (cp_parser_binary_expression): Don't warn for
1154 !!x == y or !b == y where b is bool.
1156 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1158 * ptree.c (cxx_print_lambda_node): New.
1159 (cxx_print_xnode): Handle LAMBDA_EXPR.
1161 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1164 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1165 RESULT_DECL handling.
1167 2015-02-26 Marek Polacek <polacek@redhat.com>
1170 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1171 a RETURN_EXPR if its operand is null.
1173 2015-02-25 Jason Merrill <jason@redhat.com>
1176 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1178 (constrain_visibility_for_template): Handle reference arguments.
1181 * decl.c (start_preparsed_function): Use create_artificial_label
1184 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1185 Jakub Jelinek <jakub@redhat.com>
1188 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1189 implicit typedefs for lambda types.
1191 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1194 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1196 2015-02-13 Jason Merrill <jason@redhat.com>
1199 * pt.c (template_args_equal): Look through conversions here.
1200 * tree.c (cp_tree_equal): Not here.
1202 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1205 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1206 pragma_external context.
1208 2015-02-13 Jason Merrill <jason@redhat.com>
1211 * call.c (reference_binding): Don't look for bad conversion
1212 if TO is incomplete.
1214 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1217 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1218 to lookup_template_class.
1220 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1223 * decl.c (start_preparsed_function): Use void_type_node instead
1224 of NULL_TREE as LABEL_DECL type.
1226 2015-02-12 Jason Merrill <jason@redhat.com>
1229 * mangle.c (write_mangled_name): Fix test for variable template
1232 * decl.c (begin_destructor_body): Condition clobber on
1235 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1238 * parser.c (lookup_literal_operator): Return all candidates.
1239 (cp_parser_userdef_char_literal): Simplify error handling.
1240 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1241 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1242 Also give higher priority to standard string UDL operator.
1244 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1247 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1248 * decl.c (poplevel): If functionbody, try not to create an extra
1249 BLOCK for function body and use subblocks as that, if it is non-NULL
1250 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1251 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1254 * except.c (check_noexcept_r): Return NULL for internal
1257 2015-02-10 Jason Merrill <jason@redhat.com>
1260 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1262 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1265 * method.c (use_thunk): Do not check for stdarg thunks.
1267 2015-02-06 Jason Merrill <jason@redhat.com>
1270 * init.c (build_vec_init): Handle default-initialized array with
1271 constexpr default constructor.
1273 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1277 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1279 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1282 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1283 for generated expressions.
1285 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1288 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1291 2015-02-02 Jason Merrill <jason@redhat.com>
1293 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1295 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1297 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1298 changed to pass input_location as first argument.
1300 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1303 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1306 2015-01-29 Jason Merrill <jason@redhat.com>
1309 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1310 erroneous return statement.
1313 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1316 2015-01-27 Caroline Tice <cmtice@google.com>
1318 Committing VTV Cywin/Ming patch for Patrick Wollgast
1319 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1320 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1322 2015-01-27 Jason Merrill <jason@redhat.com>
1325 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1326 current_function_decl.
1329 * pt.c (finish_template_variable): Move from semantics.c.
1330 Handle multiple template arg levels. Handle coercion here.
1331 (lookup_template_variable): Not here.
1333 2015-01-23 Jason Merrill <jason@redhat.com>
1337 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1338 that has been completely split out.
1341 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1345 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1348 2015-01-21 Jason Merrill <jason@redhat.com>
1351 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1352 constant CONSTRUCTORs.
1355 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1356 give a hard error in a template instantiation.
1358 2015-01-21 Richard Biener <rguenther@suse.de>
1361 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1362 for builtins the user declared correctly.
1364 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1367 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1368 TREE_TYPE (elt) == error_mark_node.
1370 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1372 PR tree-optimization/62053
1373 * tree.c (build_cplus_array_type): Layout type after variants are set.
1375 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1377 * cp-gimplify.c (cp_genericize_r): Call
1378 cp_ubsan_maybe_instrument_member_call for member calls.
1379 (cp_ubsan_check_member_access_r): New function.
1380 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1381 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1382 cp_ubsan_instrument_member_accesses,
1383 cp_ubsan_maybe_instrument_downcast,
1384 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1385 * cp-ubsan.c: New file.
1386 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1387 * constexpr.c (cxx_eval_call_expression): Return void_node
1389 (potential_constant_expression_1): Return true for
1390 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1391 * typeck.c (build_class_member_access_expr): Provide locus
1393 (build_static_cast_1): Instrument downcasts.
1394 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1395 add ubsan instrumentation for virtual_access.
1396 * call.c: Include internal-fn.h.
1397 (set_flags_from_callee): Handle internal calls.
1399 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1402 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1403 and function templates, declared only in the class.
1404 * decl.c (duplicate_decls): Reveal hidden friend functions or
1405 function templates, if they are redeclared outside the class.
1407 2015-01-15 Jason Merrill <jason@redhat.com>
1410 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1413 * constexpr.c (potential_constant_expression_1): Handle reference
1416 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1417 James Norris <jnorris@codesourcery.com>
1418 Cesar Philippidis <cesar@codesourcery.com>
1419 Ilmir Usmanov <i.usmanov@samsung.com>
1420 Jakub Jelinek <jakub@redhat.com>
1422 * parser.c: Include "gomp-constants.h".
1423 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1424 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1425 Use OMP_CLAUSE_SET_MAP_KIND.
1426 (cp_parser_omp_construct, cp_parser_pragma): Handle
1427 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1428 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1429 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1430 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1431 "create", "delete", "deviceptr", "host", "num_gangs",
1432 "num_workers", "present", "present_or_copy", "pcopy",
1433 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1434 "present_or_create", "pcreate", "vector_length", "wait".
1435 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1436 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1437 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1438 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1439 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1440 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1441 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1442 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1443 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1444 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1445 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1446 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1447 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1448 (cp_parser_oacc_wait): New functions.
1449 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1450 (finish_oacc_parallel): New prototypes.
1451 * semantics.c: Include "gomp-constants.h".
1452 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1453 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1454 OMP_CLAUSE_SET_MAP_KIND.
1455 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1456 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1457 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1458 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1461 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1464 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1465 self-initialization.
1467 2015-01-13 Jason Merrill <jason@redhat.com>
1471 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1472 pointer expressions.
1473 (cxx_eval_increment_expression): Likewise.
1476 * pt.c (coerce_template_parameter_pack): Return NULL for a
1477 zero-length fixed parameter pack with a pack expansion arg.
1480 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1482 2015-01-12 Jason Merrill <jason@redhat.com>
1485 * constexpr.c (cxx_eval_call_expression): A call to a void
1486 function doesn't need to return a value.
1488 2015-01-09 Michael Collison <michael.collison@linaro.org>
1490 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1491 input.h, alias.h, symtab.h, options.h, fold-const.h,
1492 wide-int.h, and inchash.h due to flattening of tree.h.
1494 * constexpr.c: Ditto.
1495 * cp-array-notation.c: Ditto.
1496 * cp-gimplify.c: Ditto.
1498 * cp-objcp-common.c: Ditto.
1511 * name-lookup.c: Ditto.
1512 * optimize.c: Ditto.
1519 * semantics.c: Ditto.
1524 2015-01-08 Jason Merrill <jason@redhat.com>
1526 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1527 * decl.c (compute_array_index_type): Likewise.
1528 * init.c (build_vec_init): Likewise.
1529 * typeck.c (cp_build_binary_op): Likewise.
1531 2015-01-08 Jason Merrill <jason@redhat.com>
1533 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1534 whether an initializer-list is too big for a VLA.
1535 (throw_bad_array_length): Remove.
1536 * cp-tree.h: Remove prototype.
1538 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1541 * decl.c (grokfndecl): Add bool parameter.
1542 (grokdeclarator): Adjust calls.
1543 (start_decl): Don't set DECL_DELETED_FN here.
1545 2015-01-06 Jason Merrill <jason@redhat.com>
1547 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1551 * pt.c (type_dependent_expression_p): Handle variable templates.
1552 * constexpr.c (potential_constant_expression_1): Use it.
1555 * semantics.c (finish_offsetof): Handle templates here.
1556 * parser.c (cp_parser_builtin_offsetof): Not here.
1559 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1562 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1565 * class.c (check_field_decls): Make copy assignment operators
1566 complex only in c++98 mode.
1568 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1571 * class.c (check_for_override): Warn when a virtual function is an
1572 override not marked override.
1574 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1576 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1578 (get_basefndecls): Adjust.
1580 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1582 Update copyright years.
1584 2015-01-05 Marek Polacek <polacek@redhat.com>
1587 * typeck.c (cp_build_array_ref): Pass loc down to
1588 warn_array_subscript_with_type_char.
1591 Copyright (C) 2015 Free Software Foundation, Inc.
1593 Copying and distribution of this file, with or without modification,
1594 are permitted in any medium without royalty provided the copyright
1595 notice and this notice are preserved.