1 2015-06-30 Jason Merrill <jason@redhat.com>
4 * decl2.c (is_late_template_attribute): True for tls_model.
7 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
8 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
9 (SET_DECL_GNU_TLS_P): New.
10 * call.c (make_temporary_var_for_ref_to_temp): Use
11 CP_DECL_THREAD_LOCAL_P.
12 (set_up_extended_ref_temp): Likewise.
13 * decl.c (duplicate_decls, expand_static_init): Likewise.
14 (redeclaration_error_message, grokvardecl): Likewise.
15 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
16 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
17 (handle_tls_init): Likewise.
18 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
19 * semantics.c (finish_id_expression): Likewise.
20 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
21 (finish_omp_threadprivate): Likewise.
22 * tree.c (decl_storage_duration): Likewise.
23 * cp-gimplify.c (omp_var_to_track): Likewise.
24 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
25 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
28 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
30 Implement N4197 - Adding u8 character literals
31 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
32 and CPP_UTF8CHAR_USERDEF tokens;
33 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
35 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
38 * decl.c (grokfndecl): Allow constexpr declarations of friend
39 template specializations.
41 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
44 * decl.c (finish_function): Call do_warn_unused_parameter.
46 2015-06-29 Marek Polacek <polacek@redhat.com>
49 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
50 (push_switch): Set OUTSIDE_RANGE_P.
51 (pop_switch): Update c_do_switch_warnings call.
52 (finish_case_label): Update c_add_case_label call.
53 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
56 2015-06-27 Marek Polacek <polacek@redhat.com>
58 * call.c: Use VECTOR_TYPE_P.
59 * constexpr.c: Likewise.
64 * semantics.c: Likewise.
67 * typeck2.c: Likewise.
69 2015-06-27 Marek Polacek <polacek@redhat.com>
71 * call.c (set_up_extended_ref_temp): Use VAR_P.
72 * class.c: Use VAR_P throughout.
73 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
74 * cp-array-notation.c (make_triplet_val_inv): Likewise.
75 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
78 * error.c (dump_decl): Use VAR_P.
79 * mangle.c (decl_implicit_alias_p): Likewise.
80 * parser.c: Use VAR_P throughout.
82 * semantics.c: Likewise.
83 * vtable-class-hierarchy.c: Likewise.
84 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
86 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
88 * pt.c (check_unstripped_args): Mark parameter as unused.
90 2015-06-26 Jason Merrill <jason@redhat.com>
93 * class.c (finish_struct): Call fixup_attribute_variants.
96 * typeck2.c (merge_exception_specifiers): Allow different
97 noexcept-specifiers if we've had errors.
100 * pt.c (check_unstripped_args): Split out from...
101 (retrieve_specialization): ...here. Allow typedefs in the type of
105 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
107 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
110 * typeck2.c (digest_init_r): Only expect reshaping if the class is
113 2015-06-26 Marek Polacek <polacek@redhat.com>
115 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
116 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
118 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
120 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
122 * cp-ubsan.c: Likewise.
125 * lambda.c: Likewise.
126 * mangle.c: Likewise.
127 * method.c: Likewise.
128 * optimize.c: Likewise.
129 * parser.c: Likewise.
130 * semantics.c: Likewise.
132 * vtable-class-hierarchy.c: Likewise.
134 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
136 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
137 rather than ggc_hasher.
138 (constexpr_call_hasher): Likewise.
139 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
140 * decl.c (typename_hasher): Likewise.
141 * mangle.c (conv_type_hasher): Likewise.
142 * pt.c (spec_hasher): Likewise.
143 * tree.c (cplus_array_hasher, list_hasher): Likewise.
144 * typeck2.c (abstract_type_hasher): Likewise.
146 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
148 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
149 rather than pointer_hash.
150 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
151 * semantics.c (nrv_data): Likewise.
152 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
154 2015-06-24 Jason Merrill <jason@redhat.com>
157 * pt.c (dependent_type_p_r): Check for dependent alias template
158 specialization sooner.
161 * class.c (type_has_nontrivial_assignment): Remove.
162 * cp-tree.h: Remove declaration.
163 * init.c (vec_copy_assign_is_trivial): New.
164 (build_vec_init): Use it.
166 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
168 Implement N3928 - Extending static_assert
169 * parser.c (cp_parser_static_assert): Support static_assert with
170 no message string. Supply an empty string in this case.
171 * semantics.c (finish_static_assert): Don't try to print a message if
172 the message strnig is empty.
174 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
177 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
178 implicit template parm if 'auto' is a placeholder for trailing
181 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
184 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
187 * parser.c (cp_parser_template_parameter_list): Update
188 current_template_parms right after processing a paramater.
189 * pt.c (template_parms_to_args): Remove obsolete hack for
190 giving template template arguments the proper level.
191 (check_default_tmpl_args): Account for tested template
193 (splite_late_return_type): Remove obsolete hack for giving
194 template template arguments the proper level.
196 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
199 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
201 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
204 * parser.c (cp_parser_template_parameter_list): Update
205 current_template_parms right after processing a paramater.
206 * pt.c (template_parms_to_args): Remove obsolete hack for
207 giving template template arguments the proper level.
208 (check_default_tmpl_args): Account for tested template
210 (splite_late_return_type): Remove obsolete hack for giving
211 template template arguments the proper level.
213 2015-06-23 Jason Merrill <jason@redhat.com>
216 * decl.c (grokfndecl): Check the linkage of ctype, not just
218 * tree.c (no_linkage_check): Skip the 'this' pointer.
221 * class.c (type_has_nontrivial_assignment): New.
222 * init.c (build_vec_init): Use it.
223 * cp-tree.h: Declare it.
224 * method.c (trivial_fn_p): Templates aren't trivial.
227 * decl.c (expand_static_init): Make sure the destructor is callable
228 here even if we have an initializer.
230 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
232 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
233 -fdump-ada-spec is passed.
235 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
237 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
239 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
241 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
243 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
245 * decl.c (grokdeclarator): Remove pointless code.
247 2015-06-22 Jason Merrill <jason@redhat.com>
250 * call.c (implicit_conversion): Only reshape for classes.
252 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
254 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
256 * semantics.c (finish_omp_atomic): Likewise.
257 * typeck.c (cp_build_array_ref): Likewise.
259 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
262 * call.c (build_new_op_1): Check tf_warning flag in all cases.
264 2015-06-19 Jason Merrill <jason@redhat.com>
267 * pt.c (instantiate_class_template_1): Clear
268 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
271 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
273 * typeck.c (merge_types): build_ptrmemfunc_type before applying
274 quals and attributes.
277 * constexpr.c (build_constexpr_constructor_member_initializers):
278 Handle an empty STATEMENT_LIST.
281 * pt.c (tsubst_copy_and_build): Register a capture proxy in
282 local_specializations.
284 2015-06-17 Jason Merrill <jason@redhat.com>
287 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
289 (potential_constant_expression_1): Likewise.
291 2015-06-17 Jason Merrill <jason@redhat.com>
294 * call.c (implicit_conversion): Call reshape_init here, early.
295 (build_aggr_conv): Not here.
297 2015-06-17 Jakub Jelinek <jakub@redhat.com>
300 * pt.c (tsubst_omp_clause_decl): New function.
301 (tsubst_omp_clauses): Use it or tsubst_copy instead of
302 tsubst_expr on OMP_CLAUSE_DECL.
304 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
306 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
307 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
308 * decl.c (grokdeclarator, xref_tag_1): Likewise.
309 * error.c (dump_aggr_type): likewise.
310 * pt.c (push_template_decl_real): Likewise.
311 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
313 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
315 * call.c: Do not include input.h, line-map.h or is-a.h.
317 * constexpr.c: Likewise.
318 * cp-array-notation.c: Likewise.
319 * cp-gimplify.c: Likewise.
320 * cp-lang.c: Likewise.
321 * cp-objcp-common.c: Likewise.
322 * cp-tree.h: Likewise.
323 * cp-ubsan.c: Likewise.
329 * except.c: Likewise.
331 * friend.c: Likewise.
333 * lambda.c: Likewise.
335 * mangle.c: Likewise.
336 * method.c: Likewise.
337 * name-lookup.c: Likewise.
338 * optimize.c: Likewise.
339 * parser.c: Likewise.
344 * search.c: Likewise.
345 * semantics.c: Likewise.
347 * typeck.c: Likewise.
348 * typeck2.c: Likewise.
349 * vtable-class-hierarchy.c: Likewise.
351 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
354 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
356 2015-06-16 Jason Merrill <jason@redhat.com>
359 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
363 * tree.c (bot_manip): Remap SAVE_EXPR.
366 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
368 2015-06-15 Nathan Sidwell <nathan@acm.org>
371 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
372 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
373 protect it from recursive instantiation.
375 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
378 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
379 using a local type is pure virtual.
381 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
383 * call.c: Remove comment documenting the long-deleted
384 function build_method_call.
386 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
389 * typeck.c (cp_build_binary_op): Warn when comparing an address
390 of a reference against NULL.
392 2015-06-12 Jason Merrill <jason@redhat.com>
395 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
396 variables as DECL_NOT_REALLY_EXTERN.
398 2015-06-11 Jason Merrill <jason@redhat.com>
401 * constexpr.c (potential_constant_expression_1): Handle a
402 DECL_EXPR of TYPE_DECL.
405 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
408 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
410 * decl.c (cxx_init_decl_processing): Register the main
411 translation unit through the new debug hook.
413 2015-06-10 Jason Merrill <jason@redhat.com>
416 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
417 * pt.c (push_template_decl_real): Set it.
418 (dependent_alias_template_spec_p): Use it.
419 (dependent_type_p_r): Use dependent_alias_template_spec_p.
420 (uses_all_template_parms_data, uses_all_template_parms_r)
421 (complex_alias_template_p): New.
422 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
424 2015-06-09 Jason Merrill <jason@redhat.com>
428 * typeck2.c (digest_init_r): Replace previous change with
432 * semantics.c (process_outer_var_ref): Make sure the value is
433 actually constant before returning it.
434 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
437 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
440 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
441 * init.c (expand_default_init): Likewise.
443 2015-06-09 Jason Merrill <jason@redhat.com>
446 * tree.c (replace_placeholders_r): Handle placeholders for an
448 * typeck2.c (store_init_value): Only replace_placeholders for
449 objects of class type.
451 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
453 * call.c : Adjust include files.
454 * class.c : Likewise.
455 * constexpr.c : Likewise.
456 * cp-array-notation.c : Likewise.
457 * cp-cilkplus.c : Likewise.
458 * cp-gimplify.c : Likewise.
459 * cp-lang.c : Likewise.
460 * cp-objcp-common.c : Likewise.
461 * cp-tree.h : Likewise.
462 * cp-ubsan.c : Likewise.
465 * decl2.c : Likewise.
467 * error.c : Likewise.
468 * except.c : Likewise.
470 * friend.c : Likewise.
472 * lambda.c : Likewise.
474 * mangle.c : Likewise.
475 * method.c : Likewise.
476 * name-lookup.c : Likewise.
477 * optimize.c : Likewise.
478 * parser.c : Likewise.
480 * ptree.c : Likewise.
483 * search.c : Likewise.
484 * semantics.c : Likewise.
486 * typeck.c : Likewise.
487 * typeck2.c : Likewise.
488 * vtable-class-hierarchy.c : Likewise.
490 2015-06-05 Jason Merrill <jason@redhat.com>
493 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
494 the expansion has extra args.
495 (use_pack_expansion_extra_args_p): Return true in that case.
498 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
499 dependent even if it has a type.
501 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
503 * cp-objcp-common.c: Adjust comment for
504 cxx_warn_unused_global_decl.
505 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
506 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
507 * cp-tree.h (note_mangling_alias): Protoize.
508 (cp_write_global_declarations): Remove.
509 (cxx_post_compilation_parsing_cleanups): Protoize.
510 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
512 * decl2.c (mangling_aliases): New global.
513 (build_java_method_aliases): New. Adapted from
514 collect_candidates_for_java_method_aliases.
515 (collect_candidates_for_java_method_aliases): Remove.
516 (build_java_method_aliases): Remove.
517 (generate_mangling_aliases): New.
518 (note_mangling_alias): New. Moved from mangle_decl.
519 (locus_at_end_of_parsing): New global.
520 (c_parse_final_cleanups): Rename from
521 cp_write_global_declarations.
522 Use locus_at_end_of_parsing.
523 Call generate_mangling_aliases.
524 Rename call to collect_candidates_for_java_method_aliases into
525 build_java_method_aliases.
526 Remove call to finalize_compilation_unit.
527 Move vtable handling into cxx_post_compilation_parsing_cleanups.
528 Do not call check_global_declarations or
529 emit_debug_global_declarations.
530 (cxx_post_compilation_parsing_cleanups): New.
531 * mangle.c (mangle_decl): Move code to note_mangling_alias.
532 * name-lookup.c (do_namespace_alias): Call early_global_decl.
534 2015-06-05 Nathan Sidwell <nathan@acm.org>
537 * parser.c (cp_parser_cache_defarg): Continue looking for
538 declarators when scanning a potential template argument list of an
541 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
543 * call.c: Adjust includes for restructured coretypes.h.
545 * constexpr.c: Likewise.
546 * cp-array-notation.c: Likewise.
547 * cp-gimplify.c: Likewise.
548 * cp-lang.c: Likewise.
549 * cp-objcp-common.c: Likewise.
550 * cp-tree.h: Likewise.
551 * cp-ubsan.c: Likewise.
557 * except.c: Likewise.
559 * friend.c: Likewise.
561 * lambda.c: Likewise.
563 * mangle.c: Likewise.
564 * method.c: Likewise.
565 * name-lookup.c: Likewise.
566 * optimize.c: Likewise.
567 * parser.c: Likewise.
572 * search.c: Likewise.
573 * semantics.c: Likewise.
575 * typeck.c: Likewise.
576 * typeck2.c: Likewise.
577 * vtable-class-hierarchy.c: Likewise.
579 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
583 * cp-tree.h (get_guard_cond): Adjust declaration
584 * decl.c (expand_static_init): Use atomic load acquire
585 and adjust call to get_guard_cond.
586 * decl2.c (build_atomic_load_byte): New function.
587 (get_guard_cond): Handle thread_safety.
588 (one_static_initialization_or_destruction): Adjust call to
591 2015-06-03 Jason Merrill <jason@redhat.com>
594 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
595 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
596 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
597 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
599 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
600 Paolo Carlini <paolo.carlini@oracle.com>
603 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
604 use it in the diagnostic.
605 (decay_conversion): Adjust call.
606 * semantics.c (finish_decltype_type): Likewise.
607 * call.c (resolve_args, build_new_op_1,
608 perform_implicit_conversion_flags): Adjust calls.
609 * cvt.c (ocp_convert, convert_to_void): Likewise.
610 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
612 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
614 * decl.c (check_tag_decl): Use declspecs->locations as locations in
615 error_at and warning_at calls.
617 2015-06-03 Marek Polacek <polacek@redhat.com>
620 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
621 (cp_genericize_r): Don't instrument static initializers.
622 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
624 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
626 * decl.c (start_function): Call plugin before parsing.
627 (finish_function): Call plugin after parsing.
629 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
631 * cp-tree.h (init_error): Remove declaration.
632 * error.c (scratch_pretty_printer): Rename to ...
633 (actual_pretty_printer): ... this.
634 (cxx_pp): Constify and update accordingly.
635 (init_error): Remove definition.
636 * lex.c (cxx_init): Do not call init_error.
638 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
641 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
643 2015-06-01 Jason Merrill <jason@redhat.com>
646 * decl2.c (mark_used): Don't always instantiate constexpr fns.
647 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
650 * mangle.c (attr_strcmp): New.
651 (write_CV_qualifiers_for_type): Also write out attributes that
652 affect type identity.
653 (write_type): Strip all attributes after writing qualifiers.
655 2015-05-31 Jason Merrill <jason@redhat.com>
657 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
660 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
661 with the wrong type as non-constant.
663 2015-05-27 Jason Merrill <jason@redhat.com>
665 * decl.c (check_redeclaration_exception_specification): Depend on
666 -Wsystem-headers rather than -pedantic.
668 * decl.c (warn_extern_redeclared_static): Use the location of
669 newdecl in diagnostics, not input_location.
670 (validate_constexpr_redeclaration): Likewise.
671 (check_redeclaration_no_default_args): Likewise.
672 (duplicate_decls): Likewise.
673 (check_redeclaration_exception_specification): Likewise.
674 Change second diagnostic to inform.
676 2015-05-24 Nathan Sidwell <nathan@acm.org>
679 * decl.c (build_enumerator): Don't silently convert scoped enums.
681 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
684 * mangle.c (mangle_decl): Mangle anonymous namespace types as
687 2015-05-23 Nathan Sidwell <nathan@acm.org>
690 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
692 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
694 * Make-lang.in (check_g++_parallelize): Update comment.
696 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
699 * decl.c (grokdeclarator): Use the correct location in error
700 messages about 'explicit'.
702 2015-05-22 Marek Polacek <polacek@redhat.com>
703 Edward Smith-Rowland <3dw4rd@verizon.net>
706 * cp-tree.h (build_enumerator): Update declaration.
707 * decl.c (build_enumerator): Add attributes parameter. Call
708 cplus_decl_attributes.
709 * init.c (constant_value_1): Pass tf_none to mark_used.
710 * parser.c (cp_parser_enumerator_definition): Parse attributes and
711 pass them down to build_enumerator.
712 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
713 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
715 2015-05-21 Nathan Sidwell <nathan@acm.org>
718 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
720 2015-05-21 Marek Polacek <polacek@redhat.com>
722 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
724 2015-05-20 Jason Merrill <jason@redhat.com>
726 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
727 before register_specialization.
729 * decl.c (grok_op_properties): Don't complain about size_t
730 placement delete here.
731 * call.c (second_parm_is_size_t): Split out from...
732 (non_placement_deallocation_fn_p): ...here.
733 (build_op_delete_call): Warn about size_t placement delete with
736 2015-05-19 Nathan Sidwell <nathan@acm.org>
739 * typeck.c (finish_class_member_access_expr): Diagnose failed
740 lookup of enum class member.
742 2015-05-19 Jakub Jelinek <jakub@redhat.com>
745 * parser.c (cp_parser_omp_for_loop): Don't add
746 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
747 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
748 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
751 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
753 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
756 2015-05-18 Jason Merrill <jason@redhat.com>
758 * pt.c (retrieve_specialization): Make sure our arguments have
759 gone through strip_typedefs.
761 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
762 (determine_specialization): Call coerce_template_parms.
765 * pt.c (type_unification_real): Check convertibility here.
766 (unify_one_argument): Not here.
768 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
769 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
770 [TREE_LIST]: Fix no-change case.
772 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
774 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
777 * error.c (cp_diagnostic_starter): Use diagnostic_location
779 (cp_print_error_function): Likewise.
780 (cp_printer): Replace locus pointer with accessor function.
782 2015-05-12 David Malcolm <dmalcolm@redhat.com>
784 * parser.c (cp_parser_selection_statement): Add location and
785 guard_kind arguments to calls to
786 cp_parser_implicitly_scoped_statement.
787 (cp_parser_iteration_statement): Likewise for calls to
788 cp_parser_already_scoped_statement.
789 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
790 "guard_kind" params; use them to warn for misleading
792 (cp_parser_already_scoped_statement): Likewise.
794 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
796 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
797 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
798 * semantics.c (finish_member_declaration): Likewise.
799 * method.c (lazily_declare_fn): Allways add method to main variant list.
801 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
804 * decl2.c (note_mangling_alias): Declare arguments as unused.
806 2015-05-08 Jason Merrill <jason@redhat.com>
808 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
811 2015-05-08 Jason Merrill <jason@redhat.com>
813 * decl2.c (mangling_aliases): New variable.
814 (note_mangling_alias, generate_mangling_aliases): New.
815 (cp_write_global_declarations): Call generate_mangling_aliases.
816 (generate_mangling_alias): Split out from...
817 * mangle.c (mangle_decl): ...here.
818 * cp-tree.h: Declare note_mangling_alias.
820 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
822 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
823 (build_java_method_aliases): Adapt to use create_same_body_alias
824 instead of assemble_alias. Move variable declarations to
825 definition and tidy up.
826 (cp_write_global_declarations): Call build_java_method_aliases
827 instead of collecting candidates first.
829 2015-05-07 Jason Merrill <jason@redhat.com>
832 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
833 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
834 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
835 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
836 (apply_late_template_attributes): Handle attribute pack expansion.
838 2015-05-07 Marek Polacek <polacek@redhat.com>
841 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
844 2015-05-07 Jason Merrill <jason@redhat.com>
848 * typeck2.c (digest_init_r): Fix single element list.
850 2015-05-05 Jason Merrill <jason@redhat.com>
852 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
853 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
855 (cp_genericize_data): Add try_block field.
856 (cp_genericize_tree): Initialize it.
857 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
860 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
863 * semantics.c (finish_call_expr): Check complain.
865 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
866 maybe-in-charge constructor.
868 * decl.c (start_decl): Don't push the plain VAR_DECL for a
875 * call.c (convert_like_real): Check value-initialization before
877 * typeck2.c (process_init_constructor_record): Don't set
878 CONSTRUCTOR_IS_DIRECT_INIT.
879 (process_init_constructor_array): Likewise.
880 * init.c (build_vec_init): Likewise.
882 2015-05-05 David Malcolm <dmalcolm@redhat.com>
884 * parser.c (cp_parser_asm_definition): Only test for
885 error_mark_node if "outputs" was just set. Likewise for "inputs".
887 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
888 Jakub Jelinek <jakub@redhat.com>
891 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
892 result in an actual error.
894 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
895 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
898 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
901 2015-04-30 David Malcolm <dmalcolm@redhat.com>
903 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
906 2015-04-29 Jason Merrill <jason@redhat.com>
909 * tree.c (apply_identity_attributes): Fix handling of classes.
911 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
913 * parser.c (cp_parser_oacc_enter_exit_data): Use
914 OMP_STANDALONE_CLAUSES.
916 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
919 * init.c (perform_member_init): Handle references for -Winit-self.
921 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
923 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
924 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
926 2015-04-28 Jason Merrill <jason@redhat.com>
929 * constexpr.c (cxx_eval_store_expression): Don't try to actually
930 store an empty class.
933 * constexpr.c (cxx_eval_builtin_function_call): Fix
934 __builtin_constant_p.
937 * tree.c (strip_typedefs): Add remove_attributes parm.
938 (strip_typedefs_expr): Likewise.
939 (apply_identity_attributes): New subroutine of strip_typedefs.
940 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
941 (convert_nontype_argument, unify): Likewise.
945 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
947 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
949 * class.c (layout_class_type): Remove check if
950 PCC_BITFIELD_TYPE_MATTERS is defined.
952 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
954 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
956 2015-04-24 Jason Merrill <jason@redhat.com>
959 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
961 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
962 Remove obsolete code.
965 2015-04-23 Jason Merrill <jason@redhat.com>
968 * pt.c (check_explicit_specialization): Don't
969 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
971 * decl.c (grokvardecl): Revert earlier fix.
973 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
976 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
977 suppresses the diagnostic.
979 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
981 Reject trailing return type for an operator auto().
982 * decl.c (grokdeclarator): Reject trailing return types for
983 all conversion operators, don't handle conversion operators
984 in the previous checks that deal with auto.
986 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
988 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
990 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
992 * class.c (resolve_address_of_overloaded_function, instantiate_type):
993 Rename tsubst_flags_t parameter flags -> complain.
995 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
997 * call.c (build_op_delete_call, build_over_call): Check mark_used
999 * class.c (resolve_address_of_overloaded_function): Likewise.
1000 * decl.c (cxx_maybe_build_cleanup): Likewise.
1001 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1002 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1003 * rtti.c (build_dynamic_cast_1): Likewise.
1004 * semantics.c (process_outer_var_ref): Likewise.
1005 * typeck.c (build_class_member_access_expr,
1006 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1008 2015-04-15 Jason Merrill <jason@redhat.com>
1010 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1011 (build_constexpr_constructor_member_initializers): Loop to find
1013 * decl.c (start_preparsed_function): Clobber the object at the
1014 beginning of a constructor.
1016 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1017 * method.c (implicitly_declare_fn): Likewise.
1018 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1020 * decl2.c (determine_visibility): Use get_template_info.
1022 2015-04-15 Jason Merrill <jason@redhat.com>
1023 Marek Polacek <polacek@redhat.com>
1026 * lambda.c (lambda_expr_this_capture): In unevaluated context go
1027 through the normal loop, just don't capture.
1028 (maybe_resolve_dummy): Handle null return.
1030 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1032 * call.c (enforce_access): Emit error + inform.
1034 2015-04-15 Marek Polacek <polacek@redhat.com>
1036 * constexpr.c (use_new_call): Remove #define.
1037 (lookup_parameter_binding): Remove function.
1038 (cxx_bind_parameters_in_call): Remove unused code.
1039 (cxx_eval_call_expression): Likewise.
1040 (cxx_eval_constant_expression): Likewise.
1042 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
1044 * tree.c (replace_placeholders_t): Remove unused type.
1045 (replace_placeholders): Remove unused pset.
1047 2015-04-14 Jason Merrill <jason@redhat.com>
1049 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1052 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1055 * name-lookup.c (do_class_using_decl): Complain about specifying
1056 the current class even if there are dependent bases.
1058 2015-04-14 David Krauss <david_work@me.com>
1061 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1063 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
1064 Jason Merrill <jason@redhat.com>
1067 * parser.c (cp_parser_class_name): Add enum_ok parameter.
1068 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1069 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1072 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1075 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1076 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1077 the expression to the original type at the end.
1079 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1082 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1086 * tree.c (build_cplus_array_type): Layout type before variants are
1087 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1090 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1093 * lambda.c (add_capture): Use dependent_type_p for capture by
1096 2015-04-02 Marek Polacek <polacek@redhat.com>
1099 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1100 cxx_eval_constant_expression on the first operand.
1102 2015-04-01 Jason Merrill <jason@redhat.com>
1105 * decl.c (make_typename_type): Handle seeing a variable template.
1107 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1110 * pt.c (instantiating_current_function_p): New.
1111 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1112 * cp-tree.h (instantiating_current_function_p): Declare.
1114 2015-04-01 Jason Merrill <jason@redhat.com>
1117 * decl.c (grokvardecl): Don't call check_explicit_specialization
1118 for non-template members of a class template.
1120 2015-04-01 Marek Polacek <polacek@redhat.com>
1123 * class.c (finish_struct): Require that the second field of a
1124 user-defined initializer_list be of size type.
1126 2015-03-31 Marek Polacek <polacek@redhat.com>
1129 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1130 checking for constness.
1132 2015-03-30 Marek Polacek <polacek@redhat.com>
1135 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1136 *(&A[i] p+ j) => A[i + j] transformation here.
1137 (cxx_eval_pointer_plus_expression): New function.
1138 (cxx_eval_constant_expression): Use it here.
1140 2015-03-27 Tobias Burnus <burnus@net-b.de>
1143 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1144 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1145 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1148 2015-03-27 Marek Polacek <polacek@redhat.com>
1151 * semantics.c (finish_switch_cond): If the unlowered type is not an
1152 enum, use the type of the condition.
1154 2015-03-27 Jason Merrill <jason@redhat.com>
1157 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1160 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1163 * init.c (build_vec_init): Fix initializing aggregates
1164 with empty init list.
1166 2015-03-26 Jason Merrill <jason@redhat.com>
1169 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1171 2015-03-25 Marek Polacek <polacek@redhat.com>
1174 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1175 on an anonymous namespace.
1177 2015-03-25 Marek Polacek <polacek@redhat.com>
1180 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1182 2015-03-24 Jason Merrill <jason@redhat.com>
1185 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1186 * parser.c (cp_parser_namespace_definition): Don't set it.
1187 * name-lookup.c (handle_namespace_attrs): Check
1188 DECL_NAMESPACE_ASSOCIATIONS instead.
1191 * pt.c (get_mostly_instantiated_function_type): Just return the
1192 type of the partially instantiated template in DECL_TI_TEMPLATE.
1194 2015-03-20 Marek Polacek <polacek@redhat.com>
1197 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1200 2015-03-20 Marek Polacek <polacek@redhat.com>
1203 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1206 2015-03-19 Jason Merrill <jason@redhat.com>
1209 Automatically propagate ABI tags to variables and functions
1210 from their (return) type.
1211 * class.c (check_tag): Handle variables and functions.
1212 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1213 (mark_or_check_tags): Likewise.
1214 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1215 (check_abi_tags): Add single argument overload for decls.
1216 Handle inheriting tags for decls.
1217 * mangle.c (write_mangled_name): Call it.
1218 (mangle_return_type_p): Split out from write_encoding.
1219 (unmangled_name_p): Split out from write_mangled_name.
1220 (write_mangled_name): Ignore abi_tag on namespace.
1221 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1222 * parser.c (cp_parser_namespace_definition): Set it.
1223 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1224 about abi_tag attribute on non-inline namespace.
1225 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1226 (handle_abi_tag_attribute): Allow tags on variables.
1228 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1230 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1231 attribute for DECL_EXTERNAL VAR_DECLs.
1233 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1236 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1238 * decl2.c (mark_used): Inline the require_deduced_type call and
1239 guard the error call.
1241 2015-03-16 Jason Merrill <jason@redhat.com>
1244 * parser.c (cp_parser_template_name): Call strip_using_decl.
1246 2015-03-16 Marek Polacek <polacek@redhat.com>
1250 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1252 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1255 * decl.c (check_default_argument): Don't call
1256 maybe_warn_zero_as_null_pointer_constant.
1258 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1260 * cp-gimplify.c (simple_empty_class_p): New.
1261 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1262 the code for empty class copies into simple_empty_class_p, and
1263 adapt it to handle COMPOUND_EXPRs.
1265 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1268 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1269 only if the location of newdecl doesn't match the location of olddecl.
1271 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1274 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1277 2015-03-10 Jason Merrill <jason@redhat.com>
1281 * pt.c (dependent_type_p_r): Check both class and alias template args.
1283 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1286 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1287 before preparing arguments to warn_logical_not_parentheses.
1288 Use maybe_constant_value on rhs.
1290 2015-03-09 Jason Merrill <jason@redhat.com>
1293 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1295 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1298 * parser.c (cp_parser_binary_expression): Don't warn for
1299 !!x == y or !b == y where b is bool.
1301 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1303 * ptree.c (cxx_print_lambda_node): New.
1304 (cxx_print_xnode): Handle LAMBDA_EXPR.
1306 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1309 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1310 RESULT_DECL handling.
1312 2015-02-26 Marek Polacek <polacek@redhat.com>
1315 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1316 a RETURN_EXPR if its operand is null.
1318 2015-02-25 Jason Merrill <jason@redhat.com>
1321 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1323 (constrain_visibility_for_template): Handle reference arguments.
1326 * decl.c (start_preparsed_function): Use create_artificial_label
1329 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1330 Jakub Jelinek <jakub@redhat.com>
1333 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1334 implicit typedefs for lambda types.
1336 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1339 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1341 2015-02-13 Jason Merrill <jason@redhat.com>
1344 * pt.c (template_args_equal): Look through conversions here.
1345 * tree.c (cp_tree_equal): Not here.
1347 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1350 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1351 pragma_external context.
1353 2015-02-13 Jason Merrill <jason@redhat.com>
1356 * call.c (reference_binding): Don't look for bad conversion
1357 if TO is incomplete.
1359 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1362 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1363 to lookup_template_class.
1365 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1368 * decl.c (start_preparsed_function): Use void_type_node instead
1369 of NULL_TREE as LABEL_DECL type.
1371 2015-02-12 Jason Merrill <jason@redhat.com>
1374 * mangle.c (write_mangled_name): Fix test for variable template
1377 * decl.c (begin_destructor_body): Condition clobber on
1380 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1383 * parser.c (lookup_literal_operator): Return all candidates.
1384 (cp_parser_userdef_char_literal): Simplify error handling.
1385 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1386 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1387 Also give higher priority to standard string UDL operator.
1389 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1392 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1393 * decl.c (poplevel): If functionbody, try not to create an extra
1394 BLOCK for function body and use subblocks as that, if it is non-NULL
1395 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1396 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1399 * except.c (check_noexcept_r): Return NULL for internal
1402 2015-02-10 Jason Merrill <jason@redhat.com>
1405 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1407 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1410 * method.c (use_thunk): Do not check for stdarg thunks.
1412 2015-02-06 Jason Merrill <jason@redhat.com>
1415 * init.c (build_vec_init): Handle default-initialized array with
1416 constexpr default constructor.
1418 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1422 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1424 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1427 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1428 for generated expressions.
1430 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1433 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1436 2015-02-02 Jason Merrill <jason@redhat.com>
1438 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1440 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1442 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1443 changed to pass input_location as first argument.
1445 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1448 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1451 2015-01-29 Jason Merrill <jason@redhat.com>
1454 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1455 erroneous return statement.
1458 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1461 2015-01-27 Caroline Tice <cmtice@google.com>
1463 Committing VTV Cywin/Ming patch for Patrick Wollgast
1464 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1465 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1467 2015-01-27 Jason Merrill <jason@redhat.com>
1470 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1471 current_function_decl.
1474 * pt.c (finish_template_variable): Move from semantics.c.
1475 Handle multiple template arg levels. Handle coercion here.
1476 (lookup_template_variable): Not here.
1478 2015-01-23 Jason Merrill <jason@redhat.com>
1482 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1483 that has been completely split out.
1486 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1490 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1493 2015-01-21 Jason Merrill <jason@redhat.com>
1496 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1497 constant CONSTRUCTORs.
1500 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1501 give a hard error in a template instantiation.
1503 2015-01-21 Richard Biener <rguenther@suse.de>
1506 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1507 for builtins the user declared correctly.
1509 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1512 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1513 TREE_TYPE (elt) == error_mark_node.
1515 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1517 PR tree-optimization/62053
1518 * tree.c (build_cplus_array_type): Layout type after variants are set.
1520 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1522 * cp-gimplify.c (cp_genericize_r): Call
1523 cp_ubsan_maybe_instrument_member_call for member calls.
1524 (cp_ubsan_check_member_access_r): New function.
1525 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1526 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1527 cp_ubsan_instrument_member_accesses,
1528 cp_ubsan_maybe_instrument_downcast,
1529 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1530 * cp-ubsan.c: New file.
1531 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1532 * constexpr.c (cxx_eval_call_expression): Return void_node
1534 (potential_constant_expression_1): Return true for
1535 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1536 * typeck.c (build_class_member_access_expr): Provide locus
1538 (build_static_cast_1): Instrument downcasts.
1539 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1540 add ubsan instrumentation for virtual_access.
1541 * call.c: Include internal-fn.h.
1542 (set_flags_from_callee): Handle internal calls.
1544 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1547 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1548 and function templates, declared only in the class.
1549 * decl.c (duplicate_decls): Reveal hidden friend functions or
1550 function templates, if they are redeclared outside the class.
1552 2015-01-15 Jason Merrill <jason@redhat.com>
1555 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1558 * constexpr.c (potential_constant_expression_1): Handle reference
1561 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1562 James Norris <jnorris@codesourcery.com>
1563 Cesar Philippidis <cesar@codesourcery.com>
1564 Ilmir Usmanov <i.usmanov@samsung.com>
1565 Jakub Jelinek <jakub@redhat.com>
1567 * parser.c: Include "gomp-constants.h".
1568 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1569 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1570 Use OMP_CLAUSE_SET_MAP_KIND.
1571 (cp_parser_omp_construct, cp_parser_pragma): Handle
1572 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1573 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1574 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1575 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1576 "create", "delete", "deviceptr", "host", "num_gangs",
1577 "num_workers", "present", "present_or_copy", "pcopy",
1578 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1579 "present_or_create", "pcreate", "vector_length", "wait".
1580 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1581 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1582 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1583 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1584 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1585 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1586 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1587 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1588 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1589 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1590 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1591 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1592 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1593 (cp_parser_oacc_wait): New functions.
1594 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1595 (finish_oacc_parallel): New prototypes.
1596 * semantics.c: Include "gomp-constants.h".
1597 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1598 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1599 OMP_CLAUSE_SET_MAP_KIND.
1600 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1601 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1602 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1603 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1606 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1609 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1610 self-initialization.
1612 2015-01-13 Jason Merrill <jason@redhat.com>
1616 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1617 pointer expressions.
1618 (cxx_eval_increment_expression): Likewise.
1621 * pt.c (coerce_template_parameter_pack): Return NULL for a
1622 zero-length fixed parameter pack with a pack expansion arg.
1625 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1627 2015-01-12 Jason Merrill <jason@redhat.com>
1630 * constexpr.c (cxx_eval_call_expression): A call to a void
1631 function doesn't need to return a value.
1633 2015-01-09 Michael Collison <michael.collison@linaro.org>
1635 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1636 input.h, alias.h, symtab.h, options.h, fold-const.h,
1637 wide-int.h, and inchash.h due to flattening of tree.h.
1639 * constexpr.c: Ditto.
1640 * cp-array-notation.c: Ditto.
1641 * cp-gimplify.c: Ditto.
1643 * cp-objcp-common.c: Ditto.
1656 * name-lookup.c: Ditto.
1657 * optimize.c: Ditto.
1664 * semantics.c: Ditto.
1669 2015-01-08 Jason Merrill <jason@redhat.com>
1671 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1672 * decl.c (compute_array_index_type): Likewise.
1673 * init.c (build_vec_init): Likewise.
1674 * typeck.c (cp_build_binary_op): Likewise.
1676 2015-01-08 Jason Merrill <jason@redhat.com>
1678 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1679 whether an initializer-list is too big for a VLA.
1680 (throw_bad_array_length): Remove.
1681 * cp-tree.h: Remove prototype.
1683 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1686 * decl.c (grokfndecl): Add bool parameter.
1687 (grokdeclarator): Adjust calls.
1688 (start_decl): Don't set DECL_DELETED_FN here.
1690 2015-01-06 Jason Merrill <jason@redhat.com>
1692 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1696 * pt.c (type_dependent_expression_p): Handle variable templates.
1697 * constexpr.c (potential_constant_expression_1): Use it.
1700 * semantics.c (finish_offsetof): Handle templates here.
1701 * parser.c (cp_parser_builtin_offsetof): Not here.
1704 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1707 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1710 * class.c (check_field_decls): Make copy assignment operators
1711 complex only in c++98 mode.
1713 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1716 * class.c (check_for_override): Warn when a virtual function is an
1717 override not marked override.
1719 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1721 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1723 (get_basefndecls): Adjust.
1725 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1727 Update copyright years.
1729 2015-01-05 Marek Polacek <polacek@redhat.com>
1732 * typeck.c (cp_build_array_ref): Pass loc down to
1733 warn_array_subscript_with_type_char.
1736 Copyright (C) 2015 Free Software Foundation, Inc.
1738 Copying and distribution of this file, with or without modification,
1739 are permitted in any medium without royalty provided the copyright
1740 notice and this notice are preserved.