1 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
4 * parser.c (cp_parser_check_std_attribute): New.
5 (cp_parser_std_attribute_list): Call it.
7 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
10 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
11 return 0 if tsubst returns a dependent type.
13 2015-06-30 Jason Merrill <jason@redhat.com>
16 * decl2.c (is_late_template_attribute): True for tls_model.
19 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
20 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
21 (SET_DECL_GNU_TLS_P): New.
22 * call.c (make_temporary_var_for_ref_to_temp): Use
23 CP_DECL_THREAD_LOCAL_P.
24 (set_up_extended_ref_temp): Likewise.
25 * decl.c (duplicate_decls, expand_static_init): Likewise.
26 (redeclaration_error_message, grokvardecl): Likewise.
27 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
28 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
29 (handle_tls_init): Likewise.
30 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
31 * semantics.c (finish_id_expression): Likewise.
32 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
33 (finish_omp_threadprivate): Likewise.
34 * tree.c (decl_storage_duration): Likewise.
35 * cp-gimplify.c (omp_var_to_track): Likewise.
36 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
37 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
40 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
42 Implement N4197 - Adding u8 character literals
43 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
44 and CPP_UTF8CHAR_USERDEF tokens;
45 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
47 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
50 * decl.c (grokfndecl): Allow constexpr declarations of friend
51 template specializations.
53 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
56 * decl.c (finish_function): Call do_warn_unused_parameter.
58 2015-06-29 Marek Polacek <polacek@redhat.com>
61 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
62 (push_switch): Set OUTSIDE_RANGE_P.
63 (pop_switch): Update c_do_switch_warnings call.
64 (finish_case_label): Update c_add_case_label call.
65 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
68 2015-06-27 Marek Polacek <polacek@redhat.com>
70 * call.c: Use VECTOR_TYPE_P.
71 * constexpr.c: Likewise.
76 * semantics.c: Likewise.
79 * typeck2.c: Likewise.
81 2015-06-27 Marek Polacek <polacek@redhat.com>
83 * call.c (set_up_extended_ref_temp): Use VAR_P.
84 * class.c: Use VAR_P throughout.
85 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
86 * cp-array-notation.c (make_triplet_val_inv): Likewise.
87 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
90 * error.c (dump_decl): Use VAR_P.
91 * mangle.c (decl_implicit_alias_p): Likewise.
92 * parser.c: Use VAR_P throughout.
94 * semantics.c: Likewise.
95 * vtable-class-hierarchy.c: Likewise.
96 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
98 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
100 * pt.c (check_unstripped_args): Mark parameter as unused.
102 2015-06-26 Jason Merrill <jason@redhat.com>
105 * class.c (finish_struct): Call fixup_attribute_variants.
108 * typeck2.c (merge_exception_specifiers): Allow different
109 noexcept-specifiers if we've had errors.
112 * pt.c (check_unstripped_args): Split out from...
113 (retrieve_specialization): ...here. Allow typedefs in the type of
117 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
119 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
122 * typeck2.c (digest_init_r): Only expect reshaping if the class is
125 2015-06-26 Marek Polacek <polacek@redhat.com>
127 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
128 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
130 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
132 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
134 * cp-ubsan.c: Likewise.
137 * lambda.c: Likewise.
138 * mangle.c: Likewise.
139 * method.c: Likewise.
140 * optimize.c: Likewise.
141 * parser.c: Likewise.
142 * semantics.c: Likewise.
144 * vtable-class-hierarchy.c: Likewise.
146 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
148 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
149 rather than ggc_hasher.
150 (constexpr_call_hasher): Likewise.
151 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
152 * decl.c (typename_hasher): Likewise.
153 * mangle.c (conv_type_hasher): Likewise.
154 * pt.c (spec_hasher): Likewise.
155 * tree.c (cplus_array_hasher, list_hasher): Likewise.
156 * typeck2.c (abstract_type_hasher): Likewise.
158 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
160 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
161 rather than pointer_hash.
162 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
163 * semantics.c (nrv_data): Likewise.
164 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
166 2015-06-24 Jason Merrill <jason@redhat.com>
169 * pt.c (dependent_type_p_r): Check for dependent alias template
170 specialization sooner.
173 * class.c (type_has_nontrivial_assignment): Remove.
174 * cp-tree.h: Remove declaration.
175 * init.c (vec_copy_assign_is_trivial): New.
176 (build_vec_init): Use it.
178 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
180 Implement N3928 - Extending static_assert
181 * parser.c (cp_parser_static_assert): Support static_assert with
182 no message string. Supply an empty string in this case.
183 * semantics.c (finish_static_assert): Don't try to print a message if
184 the message strnig is empty.
186 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
189 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
190 implicit template parm if 'auto' is a placeholder for trailing
193 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
196 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
199 * parser.c (cp_parser_template_parameter_list): Update
200 current_template_parms right after processing a paramater.
201 * pt.c (template_parms_to_args): Remove obsolete hack for
202 giving template template arguments the proper level.
203 (check_default_tmpl_args): Account for tested template
205 (splite_late_return_type): Remove obsolete hack for giving
206 template template arguments the proper level.
208 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
211 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
213 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
216 * parser.c (cp_parser_template_parameter_list): Update
217 current_template_parms right after processing a paramater.
218 * pt.c (template_parms_to_args): Remove obsolete hack for
219 giving template template arguments the proper level.
220 (check_default_tmpl_args): Account for tested template
222 (splite_late_return_type): Remove obsolete hack for giving
223 template template arguments the proper level.
225 2015-06-23 Jason Merrill <jason@redhat.com>
228 * decl.c (grokfndecl): Check the linkage of ctype, not just
230 * tree.c (no_linkage_check): Skip the 'this' pointer.
233 * class.c (type_has_nontrivial_assignment): New.
234 * init.c (build_vec_init): Use it.
235 * cp-tree.h: Declare it.
236 * method.c (trivial_fn_p): Templates aren't trivial.
239 * decl.c (expand_static_init): Make sure the destructor is callable
240 here even if we have an initializer.
242 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
244 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
245 -fdump-ada-spec is passed.
247 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
249 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
251 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
253 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
255 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
257 * decl.c (grokdeclarator): Remove pointless code.
259 2015-06-22 Jason Merrill <jason@redhat.com>
262 * call.c (implicit_conversion): Only reshape for classes.
264 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
266 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
268 * semantics.c (finish_omp_atomic): Likewise.
269 * typeck.c (cp_build_array_ref): Likewise.
271 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
274 * call.c (build_new_op_1): Check tf_warning flag in all cases.
276 2015-06-19 Jason Merrill <jason@redhat.com>
279 * pt.c (instantiate_class_template_1): Clear
280 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
283 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
285 * typeck.c (merge_types): build_ptrmemfunc_type before applying
286 quals and attributes.
289 * constexpr.c (build_constexpr_constructor_member_initializers):
290 Handle an empty STATEMENT_LIST.
293 * pt.c (tsubst_copy_and_build): Register a capture proxy in
294 local_specializations.
296 2015-06-17 Jason Merrill <jason@redhat.com>
299 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
301 (potential_constant_expression_1): Likewise.
303 2015-06-17 Jason Merrill <jason@redhat.com>
306 * call.c (implicit_conversion): Call reshape_init here, early.
307 (build_aggr_conv): Not here.
309 2015-06-17 Jakub Jelinek <jakub@redhat.com>
312 * pt.c (tsubst_omp_clause_decl): New function.
313 (tsubst_omp_clauses): Use it or tsubst_copy instead of
314 tsubst_expr on OMP_CLAUSE_DECL.
316 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
318 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
319 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
320 * decl.c (grokdeclarator, xref_tag_1): Likewise.
321 * error.c (dump_aggr_type): likewise.
322 * pt.c (push_template_decl_real): Likewise.
323 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
325 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
327 * call.c: Do not include input.h, line-map.h or is-a.h.
329 * constexpr.c: Likewise.
330 * cp-array-notation.c: Likewise.
331 * cp-gimplify.c: Likewise.
332 * cp-lang.c: Likewise.
333 * cp-objcp-common.c: Likewise.
334 * cp-tree.h: Likewise.
335 * cp-ubsan.c: Likewise.
341 * except.c: Likewise.
343 * friend.c: Likewise.
345 * lambda.c: Likewise.
347 * mangle.c: Likewise.
348 * method.c: Likewise.
349 * name-lookup.c: Likewise.
350 * optimize.c: Likewise.
351 * parser.c: Likewise.
356 * search.c: Likewise.
357 * semantics.c: Likewise.
359 * typeck.c: Likewise.
360 * typeck2.c: Likewise.
361 * vtable-class-hierarchy.c: Likewise.
363 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
366 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
368 2015-06-16 Jason Merrill <jason@redhat.com>
371 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
375 * tree.c (bot_manip): Remap SAVE_EXPR.
378 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
380 2015-06-15 Nathan Sidwell <nathan@acm.org>
383 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
384 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
385 protect it from recursive instantiation.
387 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
390 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
391 using a local type is pure virtual.
393 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
395 * call.c: Remove comment documenting the long-deleted
396 function build_method_call.
398 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
401 * typeck.c (cp_build_binary_op): Warn when comparing an address
402 of a reference against NULL.
404 2015-06-12 Jason Merrill <jason@redhat.com>
407 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
408 variables as DECL_NOT_REALLY_EXTERN.
410 2015-06-11 Jason Merrill <jason@redhat.com>
413 * constexpr.c (potential_constant_expression_1): Handle a
414 DECL_EXPR of TYPE_DECL.
417 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
420 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
422 * decl.c (cxx_init_decl_processing): Register the main
423 translation unit through the new debug hook.
425 2015-06-10 Jason Merrill <jason@redhat.com>
428 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
429 * pt.c (push_template_decl_real): Set it.
430 (dependent_alias_template_spec_p): Use it.
431 (dependent_type_p_r): Use dependent_alias_template_spec_p.
432 (uses_all_template_parms_data, uses_all_template_parms_r)
433 (complex_alias_template_p): New.
434 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
436 2015-06-09 Jason Merrill <jason@redhat.com>
440 * typeck2.c (digest_init_r): Replace previous change with
444 * semantics.c (process_outer_var_ref): Make sure the value is
445 actually constant before returning it.
446 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
449 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
452 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
453 * init.c (expand_default_init): Likewise.
455 2015-06-09 Jason Merrill <jason@redhat.com>
458 * tree.c (replace_placeholders_r): Handle placeholders for an
460 * typeck2.c (store_init_value): Only replace_placeholders for
461 objects of class type.
463 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
465 * call.c : Adjust include files.
466 * class.c : Likewise.
467 * constexpr.c : Likewise.
468 * cp-array-notation.c : Likewise.
469 * cp-cilkplus.c : Likewise.
470 * cp-gimplify.c : Likewise.
471 * cp-lang.c : Likewise.
472 * cp-objcp-common.c : Likewise.
473 * cp-tree.h : Likewise.
474 * cp-ubsan.c : Likewise.
477 * decl2.c : Likewise.
479 * error.c : Likewise.
480 * except.c : Likewise.
482 * friend.c : Likewise.
484 * lambda.c : Likewise.
486 * mangle.c : Likewise.
487 * method.c : Likewise.
488 * name-lookup.c : Likewise.
489 * optimize.c : Likewise.
490 * parser.c : Likewise.
492 * ptree.c : Likewise.
495 * search.c : Likewise.
496 * semantics.c : Likewise.
498 * typeck.c : Likewise.
499 * typeck2.c : Likewise.
500 * vtable-class-hierarchy.c : Likewise.
502 2015-06-05 Jason Merrill <jason@redhat.com>
505 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
506 the expansion has extra args.
507 (use_pack_expansion_extra_args_p): Return true in that case.
510 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
511 dependent even if it has a type.
513 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
515 * cp-objcp-common.c: Adjust comment for
516 cxx_warn_unused_global_decl.
517 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
518 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
519 * cp-tree.h (note_mangling_alias): Protoize.
520 (cp_write_global_declarations): Remove.
521 (cxx_post_compilation_parsing_cleanups): Protoize.
522 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
524 * decl2.c (mangling_aliases): New global.
525 (build_java_method_aliases): New. Adapted from
526 collect_candidates_for_java_method_aliases.
527 (collect_candidates_for_java_method_aliases): Remove.
528 (build_java_method_aliases): Remove.
529 (generate_mangling_aliases): New.
530 (note_mangling_alias): New. Moved from mangle_decl.
531 (locus_at_end_of_parsing): New global.
532 (c_parse_final_cleanups): Rename from
533 cp_write_global_declarations.
534 Use locus_at_end_of_parsing.
535 Call generate_mangling_aliases.
536 Rename call to collect_candidates_for_java_method_aliases into
537 build_java_method_aliases.
538 Remove call to finalize_compilation_unit.
539 Move vtable handling into cxx_post_compilation_parsing_cleanups.
540 Do not call check_global_declarations or
541 emit_debug_global_declarations.
542 (cxx_post_compilation_parsing_cleanups): New.
543 * mangle.c (mangle_decl): Move code to note_mangling_alias.
544 * name-lookup.c (do_namespace_alias): Call early_global_decl.
546 2015-06-05 Nathan Sidwell <nathan@acm.org>
549 * parser.c (cp_parser_cache_defarg): Continue looking for
550 declarators when scanning a potential template argument list of an
553 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
555 * call.c: Adjust includes for restructured coretypes.h.
557 * constexpr.c: Likewise.
558 * cp-array-notation.c: Likewise.
559 * cp-gimplify.c: Likewise.
560 * cp-lang.c: Likewise.
561 * cp-objcp-common.c: Likewise.
562 * cp-tree.h: Likewise.
563 * cp-ubsan.c: Likewise.
569 * except.c: Likewise.
571 * friend.c: Likewise.
573 * lambda.c: Likewise.
575 * mangle.c: Likewise.
576 * method.c: Likewise.
577 * name-lookup.c: Likewise.
578 * optimize.c: Likewise.
579 * parser.c: Likewise.
584 * search.c: Likewise.
585 * semantics.c: Likewise.
587 * typeck.c: Likewise.
588 * typeck2.c: Likewise.
589 * vtable-class-hierarchy.c: Likewise.
591 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
595 * cp-tree.h (get_guard_cond): Adjust declaration
596 * decl.c (expand_static_init): Use atomic load acquire
597 and adjust call to get_guard_cond.
598 * decl2.c (build_atomic_load_byte): New function.
599 (get_guard_cond): Handle thread_safety.
600 (one_static_initialization_or_destruction): Adjust call to
603 2015-06-03 Jason Merrill <jason@redhat.com>
606 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
607 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
608 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
609 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
611 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
612 Paolo Carlini <paolo.carlini@oracle.com>
615 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
616 use it in the diagnostic.
617 (decay_conversion): Adjust call.
618 * semantics.c (finish_decltype_type): Likewise.
619 * call.c (resolve_args, build_new_op_1,
620 perform_implicit_conversion_flags): Adjust calls.
621 * cvt.c (ocp_convert, convert_to_void): Likewise.
622 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
624 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
626 * decl.c (check_tag_decl): Use declspecs->locations as locations in
627 error_at and warning_at calls.
629 2015-06-03 Marek Polacek <polacek@redhat.com>
632 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
633 (cp_genericize_r): Don't instrument static initializers.
634 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
636 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
638 * decl.c (start_function): Call plugin before parsing.
639 (finish_function): Call plugin after parsing.
641 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
643 * cp-tree.h (init_error): Remove declaration.
644 * error.c (scratch_pretty_printer): Rename to ...
645 (actual_pretty_printer): ... this.
646 (cxx_pp): Constify and update accordingly.
647 (init_error): Remove definition.
648 * lex.c (cxx_init): Do not call init_error.
650 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
653 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
655 2015-06-01 Jason Merrill <jason@redhat.com>
658 * decl2.c (mark_used): Don't always instantiate constexpr fns.
659 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
662 * mangle.c (attr_strcmp): New.
663 (write_CV_qualifiers_for_type): Also write out attributes that
664 affect type identity.
665 (write_type): Strip all attributes after writing qualifiers.
667 2015-05-31 Jason Merrill <jason@redhat.com>
669 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
672 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
673 with the wrong type as non-constant.
675 2015-05-27 Jason Merrill <jason@redhat.com>
677 * decl.c (check_redeclaration_exception_specification): Depend on
678 -Wsystem-headers rather than -pedantic.
680 * decl.c (warn_extern_redeclared_static): Use the location of
681 newdecl in diagnostics, not input_location.
682 (validate_constexpr_redeclaration): Likewise.
683 (check_redeclaration_no_default_args): Likewise.
684 (duplicate_decls): Likewise.
685 (check_redeclaration_exception_specification): Likewise.
686 Change second diagnostic to inform.
688 2015-05-24 Nathan Sidwell <nathan@acm.org>
691 * decl.c (build_enumerator): Don't silently convert scoped enums.
693 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
696 * mangle.c (mangle_decl): Mangle anonymous namespace types as
699 2015-05-23 Nathan Sidwell <nathan@acm.org>
702 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
704 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
706 * Make-lang.in (check_g++_parallelize): Update comment.
708 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
711 * decl.c (grokdeclarator): Use the correct location in error
712 messages about 'explicit'.
714 2015-05-22 Marek Polacek <polacek@redhat.com>
715 Edward Smith-Rowland <3dw4rd@verizon.net>
718 * cp-tree.h (build_enumerator): Update declaration.
719 * decl.c (build_enumerator): Add attributes parameter. Call
720 cplus_decl_attributes.
721 * init.c (constant_value_1): Pass tf_none to mark_used.
722 * parser.c (cp_parser_enumerator_definition): Parse attributes and
723 pass them down to build_enumerator.
724 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
725 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
727 2015-05-21 Nathan Sidwell <nathan@acm.org>
730 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
732 2015-05-21 Marek Polacek <polacek@redhat.com>
734 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
736 2015-05-20 Jason Merrill <jason@redhat.com>
738 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
739 before register_specialization.
741 * decl.c (grok_op_properties): Don't complain about size_t
742 placement delete here.
743 * call.c (second_parm_is_size_t): Split out from...
744 (non_placement_deallocation_fn_p): ...here.
745 (build_op_delete_call): Warn about size_t placement delete with
748 2015-05-19 Nathan Sidwell <nathan@acm.org>
751 * typeck.c (finish_class_member_access_expr): Diagnose failed
752 lookup of enum class member.
754 2015-05-19 Jakub Jelinek <jakub@redhat.com>
757 * parser.c (cp_parser_omp_for_loop): Don't add
758 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
759 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
760 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
763 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
765 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
768 2015-05-18 Jason Merrill <jason@redhat.com>
770 * pt.c (retrieve_specialization): Make sure our arguments have
771 gone through strip_typedefs.
773 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
774 (determine_specialization): Call coerce_template_parms.
777 * pt.c (type_unification_real): Check convertibility here.
778 (unify_one_argument): Not here.
780 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
781 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
782 [TREE_LIST]: Fix no-change case.
784 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
786 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
789 * error.c (cp_diagnostic_starter): Use diagnostic_location
791 (cp_print_error_function): Likewise.
792 (cp_printer): Replace locus pointer with accessor function.
794 2015-05-12 David Malcolm <dmalcolm@redhat.com>
796 * parser.c (cp_parser_selection_statement): Add location and
797 guard_kind arguments to calls to
798 cp_parser_implicitly_scoped_statement.
799 (cp_parser_iteration_statement): Likewise for calls to
800 cp_parser_already_scoped_statement.
801 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
802 "guard_kind" params; use them to warn for misleading
804 (cp_parser_already_scoped_statement): Likewise.
806 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
808 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
809 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
810 * semantics.c (finish_member_declaration): Likewise.
811 * method.c (lazily_declare_fn): Allways add method to main variant list.
813 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
816 * decl2.c (note_mangling_alias): Declare arguments as unused.
818 2015-05-08 Jason Merrill <jason@redhat.com>
820 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
823 2015-05-08 Jason Merrill <jason@redhat.com>
825 * decl2.c (mangling_aliases): New variable.
826 (note_mangling_alias, generate_mangling_aliases): New.
827 (cp_write_global_declarations): Call generate_mangling_aliases.
828 (generate_mangling_alias): Split out from...
829 * mangle.c (mangle_decl): ...here.
830 * cp-tree.h: Declare note_mangling_alias.
832 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
834 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
835 (build_java_method_aliases): Adapt to use create_same_body_alias
836 instead of assemble_alias. Move variable declarations to
837 definition and tidy up.
838 (cp_write_global_declarations): Call build_java_method_aliases
839 instead of collecting candidates first.
841 2015-05-07 Jason Merrill <jason@redhat.com>
844 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
845 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
846 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
847 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
848 (apply_late_template_attributes): Handle attribute pack expansion.
850 2015-05-07 Marek Polacek <polacek@redhat.com>
853 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
856 2015-05-07 Jason Merrill <jason@redhat.com>
860 * typeck2.c (digest_init_r): Fix single element list.
862 2015-05-05 Jason Merrill <jason@redhat.com>
864 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
865 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
867 (cp_genericize_data): Add try_block field.
868 (cp_genericize_tree): Initialize it.
869 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
872 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
875 * semantics.c (finish_call_expr): Check complain.
877 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
878 maybe-in-charge constructor.
880 * decl.c (start_decl): Don't push the plain VAR_DECL for a
887 * call.c (convert_like_real): Check value-initialization before
889 * typeck2.c (process_init_constructor_record): Don't set
890 CONSTRUCTOR_IS_DIRECT_INIT.
891 (process_init_constructor_array): Likewise.
892 * init.c (build_vec_init): Likewise.
894 2015-05-05 David Malcolm <dmalcolm@redhat.com>
896 * parser.c (cp_parser_asm_definition): Only test for
897 error_mark_node if "outputs" was just set. Likewise for "inputs".
899 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
900 Jakub Jelinek <jakub@redhat.com>
903 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
904 result in an actual error.
906 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
907 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
910 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
913 2015-04-30 David Malcolm <dmalcolm@redhat.com>
915 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
918 2015-04-29 Jason Merrill <jason@redhat.com>
921 * tree.c (apply_identity_attributes): Fix handling of classes.
923 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
925 * parser.c (cp_parser_oacc_enter_exit_data): Use
926 OMP_STANDALONE_CLAUSES.
928 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
931 * init.c (perform_member_init): Handle references for -Winit-self.
933 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
935 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
936 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
938 2015-04-28 Jason Merrill <jason@redhat.com>
941 * constexpr.c (cxx_eval_store_expression): Don't try to actually
942 store an empty class.
945 * constexpr.c (cxx_eval_builtin_function_call): Fix
946 __builtin_constant_p.
949 * tree.c (strip_typedefs): Add remove_attributes parm.
950 (strip_typedefs_expr): Likewise.
951 (apply_identity_attributes): New subroutine of strip_typedefs.
952 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
953 (convert_nontype_argument, unify): Likewise.
957 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
959 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
961 * class.c (layout_class_type): Remove check if
962 PCC_BITFIELD_TYPE_MATTERS is defined.
964 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
966 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
968 2015-04-24 Jason Merrill <jason@redhat.com>
971 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
973 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
974 Remove obsolete code.
977 2015-04-23 Jason Merrill <jason@redhat.com>
980 * pt.c (check_explicit_specialization): Don't
981 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
983 * decl.c (grokvardecl): Revert earlier fix.
985 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
988 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
989 suppresses the diagnostic.
991 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
993 Reject trailing return type for an operator auto().
994 * decl.c (grokdeclarator): Reject trailing return types for
995 all conversion operators, don't handle conversion operators
996 in the previous checks that deal with auto.
998 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1000 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1002 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1004 * class.c (resolve_address_of_overloaded_function, instantiate_type):
1005 Rename tsubst_flags_t parameter flags -> complain.
1007 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1009 * call.c (build_op_delete_call, build_over_call): Check mark_used
1011 * class.c (resolve_address_of_overloaded_function): Likewise.
1012 * decl.c (cxx_maybe_build_cleanup): Likewise.
1013 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1014 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1015 * rtti.c (build_dynamic_cast_1): Likewise.
1016 * semantics.c (process_outer_var_ref): Likewise.
1017 * typeck.c (build_class_member_access_expr,
1018 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1020 2015-04-15 Jason Merrill <jason@redhat.com>
1022 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1023 (build_constexpr_constructor_member_initializers): Loop to find
1025 * decl.c (start_preparsed_function): Clobber the object at the
1026 beginning of a constructor.
1028 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1029 * method.c (implicitly_declare_fn): Likewise.
1030 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1032 * decl2.c (determine_visibility): Use get_template_info.
1034 2015-04-15 Jason Merrill <jason@redhat.com>
1035 Marek Polacek <polacek@redhat.com>
1038 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1039 through the normal loop, just don't capture.
1040 (maybe_resolve_dummy): Handle null return.
1042 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1044 * call.c (enforce_access): Emit error + inform.
1046 2015-04-15 Marek Polacek <polacek@redhat.com>
1048 * constexpr.c (use_new_call): Remove #define.
1049 (lookup_parameter_binding): Remove function.
1050 (cxx_bind_parameters_in_call): Remove unused code.
1051 (cxx_eval_call_expression): Likewise.
1052 (cxx_eval_constant_expression): Likewise.
1054 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1056 * tree.c (replace_placeholders_t): Remove unused type.
1057 (replace_placeholders): Remove unused pset.
1059 2015-04-14 Jason Merrill <jason@redhat.com>
1061 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1064 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1067 * name-lookup.c (do_class_using_decl): Complain about specifying
1068 the current class even if there are dependent bases.
1070 2015-04-14 David Krauss <david_work@me.com>
1073 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1075 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1076 Jason Merrill <jason@redhat.com>
1079 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1080 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1081 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1084 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1087 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1088 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1089 the expression to the original type at the end.
1091 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1094 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1098 * tree.c (build_cplus_array_type): Layout type before variants are
1099 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1102 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1105 * lambda.c (add_capture): Use dependent_type_p for capture by
1108 2015-04-02 Marek Polacek <polacek@redhat.com>
1111 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1112 cxx_eval_constant_expression on the first operand.
1114 2015-04-01 Jason Merrill <jason@redhat.com>
1117 * decl.c (make_typename_type): Handle seeing a variable template.
1119 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1122 * pt.c (instantiating_current_function_p): New.
1123 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1124 * cp-tree.h (instantiating_current_function_p): Declare.
1126 2015-04-01 Jason Merrill <jason@redhat.com>
1129 * decl.c (grokvardecl): Don't call check_explicit_specialization
1130 for non-template members of a class template.
1132 2015-04-01 Marek Polacek <polacek@redhat.com>
1135 * class.c (finish_struct): Require that the second field of a
1136 user-defined initializer_list be of size type.
1138 2015-03-31 Marek Polacek <polacek@redhat.com>
1141 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1142 checking for constness.
1144 2015-03-30 Marek Polacek <polacek@redhat.com>
1147 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1148 *(&A[i] p+ j) => A[i + j] transformation here.
1149 (cxx_eval_pointer_plus_expression): New function.
1150 (cxx_eval_constant_expression): Use it here.
1152 2015-03-27 Tobias Burnus <burnus@net-b.de>
1155 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1156 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1157 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1160 2015-03-27 Marek Polacek <polacek@redhat.com>
1163 * semantics.c (finish_switch_cond): If the unlowered type is not an
1164 enum, use the type of the condition.
1166 2015-03-27 Jason Merrill <jason@redhat.com>
1169 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1172 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1175 * init.c (build_vec_init): Fix initializing aggregates
1176 with empty init list.
1178 2015-03-26 Jason Merrill <jason@redhat.com>
1181 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1183 2015-03-25 Marek Polacek <polacek@redhat.com>
1186 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1187 on an anonymous namespace.
1189 2015-03-25 Marek Polacek <polacek@redhat.com>
1192 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1194 2015-03-24 Jason Merrill <jason@redhat.com>
1197 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1198 * parser.c (cp_parser_namespace_definition): Don't set it.
1199 * name-lookup.c (handle_namespace_attrs): Check
1200 DECL_NAMESPACE_ASSOCIATIONS instead.
1203 * pt.c (get_mostly_instantiated_function_type): Just return the
1204 type of the partially instantiated template in DECL_TI_TEMPLATE.
1206 2015-03-20 Marek Polacek <polacek@redhat.com>
1209 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1212 2015-03-20 Marek Polacek <polacek@redhat.com>
1215 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1218 2015-03-19 Jason Merrill <jason@redhat.com>
1221 Automatically propagate ABI tags to variables and functions
1222 from their (return) type.
1223 * class.c (check_tag): Handle variables and functions.
1224 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1225 (mark_or_check_tags): Likewise.
1226 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1227 (check_abi_tags): Add single argument overload for decls.
1228 Handle inheriting tags for decls.
1229 * mangle.c (write_mangled_name): Call it.
1230 (mangle_return_type_p): Split out from write_encoding.
1231 (unmangled_name_p): Split out from write_mangled_name.
1232 (write_mangled_name): Ignore abi_tag on namespace.
1233 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1234 * parser.c (cp_parser_namespace_definition): Set it.
1235 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1236 about abi_tag attribute on non-inline namespace.
1237 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1238 (handle_abi_tag_attribute): Allow tags on variables.
1240 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1242 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1243 attribute for DECL_EXTERNAL VAR_DECLs.
1245 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1248 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1250 * decl2.c (mark_used): Inline the require_deduced_type call and
1251 guard the error call.
1253 2015-03-16 Jason Merrill <jason@redhat.com>
1256 * parser.c (cp_parser_template_name): Call strip_using_decl.
1258 2015-03-16 Marek Polacek <polacek@redhat.com>
1262 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1264 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1267 * decl.c (check_default_argument): Don't call
1268 maybe_warn_zero_as_null_pointer_constant.
1270 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1272 * cp-gimplify.c (simple_empty_class_p): New.
1273 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1274 the code for empty class copies into simple_empty_class_p, and
1275 adapt it to handle COMPOUND_EXPRs.
1277 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1280 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1281 only if the location of newdecl doesn't match the location of olddecl.
1283 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1286 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1289 2015-03-10 Jason Merrill <jason@redhat.com>
1293 * pt.c (dependent_type_p_r): Check both class and alias template args.
1295 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1298 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1299 before preparing arguments to warn_logical_not_parentheses.
1300 Use maybe_constant_value on rhs.
1302 2015-03-09 Jason Merrill <jason@redhat.com>
1305 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1307 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1310 * parser.c (cp_parser_binary_expression): Don't warn for
1311 !!x == y or !b == y where b is bool.
1313 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1315 * ptree.c (cxx_print_lambda_node): New.
1316 (cxx_print_xnode): Handle LAMBDA_EXPR.
1318 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1321 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1322 RESULT_DECL handling.
1324 2015-02-26 Marek Polacek <polacek@redhat.com>
1327 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1328 a RETURN_EXPR if its operand is null.
1330 2015-02-25 Jason Merrill <jason@redhat.com>
1333 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1335 (constrain_visibility_for_template): Handle reference arguments.
1338 * decl.c (start_preparsed_function): Use create_artificial_label
1341 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1342 Jakub Jelinek <jakub@redhat.com>
1345 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1346 implicit typedefs for lambda types.
1348 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1351 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1353 2015-02-13 Jason Merrill <jason@redhat.com>
1356 * pt.c (template_args_equal): Look through conversions here.
1357 * tree.c (cp_tree_equal): Not here.
1359 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1362 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1363 pragma_external context.
1365 2015-02-13 Jason Merrill <jason@redhat.com>
1368 * call.c (reference_binding): Don't look for bad conversion
1369 if TO is incomplete.
1371 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1374 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1375 to lookup_template_class.
1377 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1380 * decl.c (start_preparsed_function): Use void_type_node instead
1381 of NULL_TREE as LABEL_DECL type.
1383 2015-02-12 Jason Merrill <jason@redhat.com>
1386 * mangle.c (write_mangled_name): Fix test for variable template
1389 * decl.c (begin_destructor_body): Condition clobber on
1392 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1395 * parser.c (lookup_literal_operator): Return all candidates.
1396 (cp_parser_userdef_char_literal): Simplify error handling.
1397 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1398 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1399 Also give higher priority to standard string UDL operator.
1401 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1404 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1405 * decl.c (poplevel): If functionbody, try not to create an extra
1406 BLOCK for function body and use subblocks as that, if it is non-NULL
1407 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1408 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1411 * except.c (check_noexcept_r): Return NULL for internal
1414 2015-02-10 Jason Merrill <jason@redhat.com>
1417 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1419 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1422 * method.c (use_thunk): Do not check for stdarg thunks.
1424 2015-02-06 Jason Merrill <jason@redhat.com>
1427 * init.c (build_vec_init): Handle default-initialized array with
1428 constexpr default constructor.
1430 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1434 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1436 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1439 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1440 for generated expressions.
1442 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1445 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1448 2015-02-02 Jason Merrill <jason@redhat.com>
1450 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1452 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1454 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1455 changed to pass input_location as first argument.
1457 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1460 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1463 2015-01-29 Jason Merrill <jason@redhat.com>
1466 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1467 erroneous return statement.
1470 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1473 2015-01-27 Caroline Tice <cmtice@google.com>
1475 Committing VTV Cywin/Ming patch for Patrick Wollgast
1476 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1477 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1479 2015-01-27 Jason Merrill <jason@redhat.com>
1482 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1483 current_function_decl.
1486 * pt.c (finish_template_variable): Move from semantics.c.
1487 Handle multiple template arg levels. Handle coercion here.
1488 (lookup_template_variable): Not here.
1490 2015-01-23 Jason Merrill <jason@redhat.com>
1494 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1495 that has been completely split out.
1498 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1502 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1505 2015-01-21 Jason Merrill <jason@redhat.com>
1508 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1509 constant CONSTRUCTORs.
1512 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1513 give a hard error in a template instantiation.
1515 2015-01-21 Richard Biener <rguenther@suse.de>
1518 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1519 for builtins the user declared correctly.
1521 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1524 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1525 TREE_TYPE (elt) == error_mark_node.
1527 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1529 PR tree-optimization/62053
1530 * tree.c (build_cplus_array_type): Layout type after variants are set.
1532 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1534 * cp-gimplify.c (cp_genericize_r): Call
1535 cp_ubsan_maybe_instrument_member_call for member calls.
1536 (cp_ubsan_check_member_access_r): New function.
1537 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1538 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1539 cp_ubsan_instrument_member_accesses,
1540 cp_ubsan_maybe_instrument_downcast,
1541 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1542 * cp-ubsan.c: New file.
1543 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1544 * constexpr.c (cxx_eval_call_expression): Return void_node
1546 (potential_constant_expression_1): Return true for
1547 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1548 * typeck.c (build_class_member_access_expr): Provide locus
1550 (build_static_cast_1): Instrument downcasts.
1551 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1552 add ubsan instrumentation for virtual_access.
1553 * call.c: Include internal-fn.h.
1554 (set_flags_from_callee): Handle internal calls.
1556 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1559 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1560 and function templates, declared only in the class.
1561 * decl.c (duplicate_decls): Reveal hidden friend functions or
1562 function templates, if they are redeclared outside the class.
1564 2015-01-15 Jason Merrill <jason@redhat.com>
1567 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1570 * constexpr.c (potential_constant_expression_1): Handle reference
1573 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1574 James Norris <jnorris@codesourcery.com>
1575 Cesar Philippidis <cesar@codesourcery.com>
1576 Ilmir Usmanov <i.usmanov@samsung.com>
1577 Jakub Jelinek <jakub@redhat.com>
1579 * parser.c: Include "gomp-constants.h".
1580 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1581 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1582 Use OMP_CLAUSE_SET_MAP_KIND.
1583 (cp_parser_omp_construct, cp_parser_pragma): Handle
1584 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1585 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1586 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1587 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1588 "create", "delete", "deviceptr", "host", "num_gangs",
1589 "num_workers", "present", "present_or_copy", "pcopy",
1590 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1591 "present_or_create", "pcreate", "vector_length", "wait".
1592 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1593 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1594 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1595 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1596 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1597 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1598 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1599 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1600 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1601 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1602 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1603 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1604 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1605 (cp_parser_oacc_wait): New functions.
1606 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1607 (finish_oacc_parallel): New prototypes.
1608 * semantics.c: Include "gomp-constants.h".
1609 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1610 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1611 OMP_CLAUSE_SET_MAP_KIND.
1612 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1613 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1614 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1615 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1618 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1621 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1622 self-initialization.
1624 2015-01-13 Jason Merrill <jason@redhat.com>
1628 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1629 pointer expressions.
1630 (cxx_eval_increment_expression): Likewise.
1633 * pt.c (coerce_template_parameter_pack): Return NULL for a
1634 zero-length fixed parameter pack with a pack expansion arg.
1637 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1639 2015-01-12 Jason Merrill <jason@redhat.com>
1642 * constexpr.c (cxx_eval_call_expression): A call to a void
1643 function doesn't need to return a value.
1645 2015-01-09 Michael Collison <michael.collison@linaro.org>
1647 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1648 input.h, alias.h, symtab.h, options.h, fold-const.h,
1649 wide-int.h, and inchash.h due to flattening of tree.h.
1651 * constexpr.c: Ditto.
1652 * cp-array-notation.c: Ditto.
1653 * cp-gimplify.c: Ditto.
1655 * cp-objcp-common.c: Ditto.
1668 * name-lookup.c: Ditto.
1669 * optimize.c: Ditto.
1676 * semantics.c: Ditto.
1681 2015-01-08 Jason Merrill <jason@redhat.com>
1683 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1684 * decl.c (compute_array_index_type): Likewise.
1685 * init.c (build_vec_init): Likewise.
1686 * typeck.c (cp_build_binary_op): Likewise.
1688 2015-01-08 Jason Merrill <jason@redhat.com>
1690 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1691 whether an initializer-list is too big for a VLA.
1692 (throw_bad_array_length): Remove.
1693 * cp-tree.h: Remove prototype.
1695 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1698 * decl.c (grokfndecl): Add bool parameter.
1699 (grokdeclarator): Adjust calls.
1700 (start_decl): Don't set DECL_DELETED_FN here.
1702 2015-01-06 Jason Merrill <jason@redhat.com>
1704 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1708 * pt.c (type_dependent_expression_p): Handle variable templates.
1709 * constexpr.c (potential_constant_expression_1): Use it.
1712 * semantics.c (finish_offsetof): Handle templates here.
1713 * parser.c (cp_parser_builtin_offsetof): Not here.
1716 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1719 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1722 * class.c (check_field_decls): Make copy assignment operators
1723 complex only in c++98 mode.
1725 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1728 * class.c (check_for_override): Warn when a virtual function is an
1729 override not marked override.
1731 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1733 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1735 (get_basefndecls): Adjust.
1737 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1739 Update copyright years.
1741 2015-01-05 Marek Polacek <polacek@redhat.com>
1744 * typeck.c (cp_build_array_ref): Pass loc down to
1745 warn_array_subscript_with_type_char.
1748 Copyright (C) 2015 Free Software Foundation, Inc.
1750 Copying and distribution of this file, with or without modification,
1751 are permitted in any medium without royalty provided the copyright
1752 notice and this notice are preserved.