PR c++/66216
[official-gcc.git] / gcc / cp / ChangeLog
blob719ba06b346ffb7748c3a804e56f75f946f80ed8
1 2015-06-26  Jason Merrill  <jason@redhat.com>
3         PR c++/66216
4         * class.c (finish_struct): Call fixup_attribute_variants.
6         PR c++/66684
7         * typeck2.c (merge_exception_specifiers): Allow different
8         noexcept-specifiers if we've had errors.
10         PR c++/66255
11         * pt.c (check_unstripped_args): Split out from...
12         (retrieve_specialization): ...here.  Allow typedefs in the type of
13         a non-type argument.
15         PR c++/66067
16         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
17         TYPE_DECLs.
18         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
20         PR c++/66654
21         * typeck2.c (digest_init_r): Only expect reshaping if the class is
22         aggregate.
24 2015-06-26  Marek Polacek  <polacek@redhat.com>
26         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
27         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
29 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
31         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
32         * class.c: Likewise.
33         * cp-ubsan.c: Likewise.
34         * decl.c: Likewise.
35         * decl2.c: Likewise.
36         * lambda.c: Likewise.
37         * mangle.c: Likewise.
38         * method.c: Likewise.
39         * optimize.c: Likewise.
40         * parser.c: Likewise.
41         * semantics.c: Likewise.
42         * tree.c: Likewise.
43         * vtable-class-hierarchy.c: Likewise.
45 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
47         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
48         rather than ggc_hasher.
49         (constexpr_call_hasher): Likewise.
50         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
51         * decl.c (typename_hasher): Likewise.
52         * mangle.c (conv_type_hasher): Likewise.
53         * pt.c (spec_hasher): Likewise.
54         * tree.c (cplus_array_hasher, list_hasher): Likewise.
55         * typeck2.c (abstract_type_hasher): Likewise.
57 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
59         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
60         rather than pointer_hash.
61         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
62         * semantics.c (nrv_data): Likewise.
63         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
65 2015-06-24  Jason Merrill  <jason@redhat.com>
67         PR c++/66647
68         * pt.c (dependent_type_p_r): Check for dependent alias template
69         specialization sooner.
71         PR c++/66501
72         * class.c (type_has_nontrivial_assignment): Remove.
73         * cp-tree.h: Remove declaration.
74         * init.c (vec_copy_assign_is_trivial): New.
75         (build_vec_init): Use it.
77 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
79         Implement N3928 - Extending static_assert
80         * parser.c (cp_parser_static_assert): Support static_assert with
81         no message string.  Supply an empty string in this case.
82         * semantics.c (finish_static_assert): Don't try to print a message if
83         the message strnig is empty.
85 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
87         PR c++/65750
88         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
89         implicit template parm if 'auto' is a placeholder for trailing
90         return type.
92 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
94         Revert:
95         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
97         PR c++/30044
98         * parser.c (cp_parser_template_parameter_list): Update
99         current_template_parms right after processing a paramater.
100         * pt.c (template_parms_to_args): Remove obsolete hack for
101         giving template template arguments the proper level.
102         (check_default_tmpl_args): Account for tested template
103         parameter_lists.
104         (splite_late_return_type): Remove obsolete hack for giving
105         template template arguments the proper level.
107 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
109         PR c++/65811
110         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
112 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
114         PR c++/30044
115         * parser.c (cp_parser_template_parameter_list): Update
116         current_template_parms right after processing a paramater.
117         * pt.c (template_parms_to_args): Remove obsolete hack for
118         giving template template arguments the proper level.
119         (check_default_tmpl_args): Account for tested template
120         parameter_lists.
121         (splite_late_return_type): Remove obsolete hack for giving
122         template template arguments the proper level.
124 2015-06-23  Jason Merrill  <jason@redhat.com>
126         PR c++/65879
127         * decl.c (grokfndecl): Check the linkage of ctype, not just
128         TYPE_ANONYMOUS_P.
129         * tree.c (no_linkage_check): Skip the 'this' pointer.
131         PR c++/66501
132         * class.c (type_has_nontrivial_assignment): New.
133         * init.c (build_vec_init): Use it.
134         * cp-tree.h: Declare it.
135         * method.c (trivial_fn_p): Templates aren't trivial.
137         PR c++/66542
138         * decl.c (expand_static_init): Make sure the destructor is callable
139         here even if we have an initializer.
141 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
143         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
144         -fdump-ada-spec is passed.
146 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
148         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
150 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
152         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
154 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
156         * decl.c (grokdeclarator): Remove pointless code.
158 2015-06-22  Jason Merrill  <jason@redhat.com>
160         PR c++/66515
161         * call.c (implicit_conversion): Only reshape for classes.
163 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
165         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
166         manually swapping.
167         * semantics.c (finish_omp_atomic): Likewise.
168         * typeck.c (cp_build_array_ref): Likewise.
170 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
172         PR c++/65882
173         * call.c (build_new_op_1): Check tf_warning flag in all cases.
175 2015-06-19  Jason Merrill  <jason@redhat.com>
177         PR c++/66585
178         * pt.c (instantiate_class_template_1): Clear
179         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
181         PR c++/65880
182         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
183         cv-qualifiers.
184         * typeck.c (merge_types): build_ptrmemfunc_type before applying
185         quals and attributes.
187         PR c++/65973
188         * constexpr.c (build_constexpr_constructor_member_initializers):
189         Handle an empty STATEMENT_LIST.
191         PR c++/65843
192         * pt.c (tsubst_copy_and_build): Register a capture proxy in
193         local_specializations.
195 2015-06-17  Jason Merrill  <jason@redhat.com>
197         PR c++/66001
198         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
199         TRY_FINALLY_EXPR.
200         (potential_constant_expression_1): Likewise.
202 2015-06-17  Jason Merrill  <jason@redhat.com>
204         PR c++/66515
205         * call.c (implicit_conversion): Call reshape_init here, early.
206         (build_aggr_conv): Not here.
208 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
210         PR c++/66571
211         * pt.c (tsubst_omp_clause_decl): New function.
212         (tsubst_omp_clauses): Use it or tsubst_copy instead of
213         tsubst_expr on OMP_CLAUSE_DECL.
215 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
217         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
218         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
219         * decl.c (grokdeclarator, xref_tag_1): Likewise.
220         * error.c (dump_aggr_type): likewise.
221         * pt.c (push_template_decl_real): Likewise.
222         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
224 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
226         * call.c: Do not include input.h, line-map.h or is-a.h.
227         * class.c: Likewise.
228         * constexpr.c: Likewise.
229         * cp-array-notation.c: Likewise.
230         * cp-gimplify.c: Likewise.
231         * cp-lang.c: Likewise.
232         * cp-objcp-common.c: Likewise.
233         * cp-tree.h: Likewise.
234         * cp-ubsan.c: Likewise.
235         * cvt.c: Likewise.
236         * decl.c: Likewise.
237         * decl2.c: Likewise.
238         * dump.c: Likewise.
239         * error.c: Likewise.
240         * except.c: Likewise.
241         * expr.c: Likewise.
242         * friend.c: Likewise.
243         * init.c: Likewise.
244         * lambda.c: Likewise.
245         * lex.c: Likewise.
246         * mangle.c: Likewise.
247         * method.c: Likewise.
248         * name-lookup.c: Likewise.
249         * optimize.c: Likewise.
250         * parser.c: Likewise.
251         * pt.c: Likewise.
252         * ptree.c: Likewise.
253         * repo.c: Likewise.
254         * rtti.c: Likewise.
255         * search.c: Likewise.
256         * semantics.c: Likewise.
257         * tree.c: Likewise.
258         * typeck.c: Likewise.
259         * typeck2.c: Likewise.
260         * vtable-class-hierarchy.c: Likewise.
262 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
264         PR c++/59682
265         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
267 2015-06-16  Jason Merrill  <jason@redhat.com>
269         PR c++/66536
270         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
271         mismatch.
273         PR c++/58063
274         * tree.c (bot_manip): Remap SAVE_EXPR.
276         PR c++/66387
277         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
279 2015-06-15  Nathan Sidwell  <nathan@acm.org>
281         PR c++/58583
282         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
283         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
284         protect it from recursive instantiation.
286 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
288         PR c++/51048
289         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
290         using a local type is pure virtual.
292 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
294         * call.c: Remove comment documenting the long-deleted
295         function build_method_call.
297 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
299         PR c++/65168
300         * typeck.c (cp_build_binary_op): Warn when comparing an address
301         of a reference against NULL.
303 2015-06-12  Jason Merrill  <jason@redhat.com>
305         PR c++/65719
306         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
307         variables as DECL_NOT_REALLY_EXTERN.
309 2015-06-11  Jason Merrill  <jason@redhat.com>
311         PR c++/66445
312         * constexpr.c (potential_constant_expression_1): Handle a
313         DECL_EXPR of TYPE_DECL.
315         PR c++/66450
316         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
317         ctx->ctor.
319 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
321         * decl.c (cxx_init_decl_processing): Register the main
322         translation unit through the new debug hook.
324 2015-06-10  Jason Merrill  <jason@redhat.com>
326         PR c++/66289
327         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
328         * pt.c (push_template_decl_real): Set it.
329         (dependent_alias_template_spec_p): Use it.
330         (dependent_type_p_r): Use dependent_alias_template_spec_p.
331         (uses_all_template_parms_data, uses_all_template_parms_r)
332         (complex_alias_template_p): New.
333         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
335 2015-06-09  Jason Merrill  <jason@redhat.com>
337         DR 1467
338         PR c++/51747
339         * typeck2.c (digest_init_r): Replace previous change with
340         gcc_unreachable.
342         PR c++/66387
343         * semantics.c (process_outer_var_ref): Make sure the value is
344         actually constant before returning it.
345         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
346         array.
348 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
350         PR c++/65815
351         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
352         * init.c (expand_default_init): Likewise.
354 2015-06-09  Jason Merrill  <jason@redhat.com>
356         PR c++/66383
357         * tree.c (replace_placeholders_r): Handle placeholders for an
358         outer object.
359         * typeck2.c (store_init_value): Only replace_placeholders for
360         objects of class type.
362 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
364         * call.c : Adjust include files.
365         * class.c : Likewise.
366         * constexpr.c : Likewise.
367         * cp-array-notation.c : Likewise.
368         * cp-cilkplus.c : Likewise.
369         * cp-gimplify.c : Likewise.
370         * cp-lang.c : Likewise.
371         * cp-objcp-common.c : Likewise.
372         * cp-tree.h : Likewise.
373         * cp-ubsan.c : Likewise.
374         * cvt.c : Likewise.
375         * decl.c : Likewise.
376         * decl2.c : Likewise.
377         * dump.c : Likewise.
378         * error.c : Likewise.
379         * except.c : Likewise.
380         * expr.c : Likewise.
381         * friend.c : Likewise.
382         * init.c : Likewise.
383         * lambda.c : Likewise.
384         * lex.c : Likewise.
385         * mangle.c : Likewise.
386         * method.c : Likewise.
387         * name-lookup.c : Likewise.
388         * optimize.c : Likewise.
389         * parser.c : Likewise.
390         * pt.c : Likewise.
391         * ptree.c : Likewise.
392         * repo.c : Likewise.
393         * rtti.c : Likewise.
394         * search.c : Likewise.
395         * semantics.c : Likewise.
396         * tree.c : Likewise.
397         * typeck.c : Likewise.
398         * typeck2.c : Likewise.
399         * vtable-class-hierarchy.c : Likewise.
401 2015-06-05  Jason Merrill  <jason@redhat.com>
403         PR c++/66405
404         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
405         the expansion has extra args.
406         (use_pack_expansion_extra_args_p): Return true in that case.
408         PR c++/66405
409         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
410         dependent even if it has a type.
412 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
414         * cp-objcp-common.c: Adjust comment for
415         cxx_warn_unused_global_decl.
416         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
417         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
418         * cp-tree.h (note_mangling_alias): Protoize.
419         (cp_write_global_declarations): Remove.
420         (cxx_post_compilation_parsing_cleanups): Protoize.
421         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
422         argument.
423         * decl2.c (mangling_aliases): New global.
424         (build_java_method_aliases): New.  Adapted from
425         collect_candidates_for_java_method_aliases.
426         (collect_candidates_for_java_method_aliases): Remove.
427         (build_java_method_aliases): Remove.
428         (generate_mangling_aliases): New.
429         (note_mangling_alias): New.  Moved from mangle_decl.
430         (locus_at_end_of_parsing): New global.
431         (c_parse_final_cleanups): Rename from
432         cp_write_global_declarations.
433         Use locus_at_end_of_parsing.
434         Call generate_mangling_aliases.
435         Rename call to collect_candidates_for_java_method_aliases into
436         build_java_method_aliases.
437         Remove call to finalize_compilation_unit.
438         Move vtable handling into cxx_post_compilation_parsing_cleanups.
439         Do not call check_global_declarations or
440         emit_debug_global_declarations.
441         (cxx_post_compilation_parsing_cleanups): New.
442         * mangle.c (mangle_decl): Move code to note_mangling_alias.
443         * name-lookup.c (do_namespace_alias): Call early_global_decl.
445 2015-06-05  Nathan Sidwell  <nathan@acm.org>
447         PR c++/52595
448         * parser.c (cp_parser_cache_defarg): Continue looking for
449         declarators when scanning a potential template argument list of an
450         NSDMI.
452 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
454         * call.c: Adjust includes for restructured coretypes.h.
455         * class.c: Likewise.
456         * constexpr.c: Likewise.
457         * cp-array-notation.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.
463         * cvt.c: Likewise.
464         * decl.c: Likewise.
465         * decl2.c: Likewise.
466         * dump.c: Likewise.
467         * error.c: Likewise.
468         * except.c: Likewise.
469         * expr.c: Likewise.
470         * friend.c: Likewise.
471         * init.c: Likewise.
472         * lambda.c: Likewise.
473         * lex.c: Likewise.
474         * mangle.c: Likewise.
475         * method.c: Likewise.
476         * name-lookup.c: Likewise.
477         * optimize.c: Likewise.
478         * parser.c: Likewise.
479         * pt.c: Likewise.
480         * ptree.c: Likewise.
481         * repo.c: Likewise.
482         * rtti.c: Likewise.
483         * search.c: Likewise.
484         * semantics.c: Likewise.
485         * tree.c: Likewise.
486         * typeck.c: Likewise.
487         * typeck2.c: Likewise.
488         * vtable-class-hierarchy.c: Likewise.
490 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
492         PR c++/66192
493         PR target/66200
494         * cp-tree.h (get_guard_cond): Adjust declaration
495         * decl.c (expand_static_init): Use atomic load acquire
496         and adjust call to get_guard_cond.
497         * decl2.c (build_atomic_load_byte): New function.
498         (get_guard_cond): Handle thread_safety.
499         (one_static_initialization_or_destruction): Adjust call to
500         get_guard_cond.
502 2015-06-03  Jason Merrill  <jason@redhat.com>
504         PR c++/44282
505         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
506         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
507         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
508         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
510 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
511             Paolo Carlini  <paolo.carlini@oracle.com>
513         PR c++/66130
514         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
515         use it in the diagnostic.
516         (decay_conversion): Adjust call.
517         * semantics.c (finish_decltype_type): Likewise.
518         * call.c (resolve_args, build_new_op_1,
519         perform_implicit_conversion_flags): Adjust calls.
520         * cvt.c (ocp_convert, convert_to_void): Likewise.
521         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
523 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
525         * decl.c (check_tag_decl): Use declspecs->locations as locations in
526         error_at and warning_at calls.
528 2015-06-03  Marek Polacek  <polacek@redhat.com>
530         PR sanitizer/66190
531         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
532         (cp_genericize_r): Don't instrument static initializers.
533         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
535 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
537         * decl.c (start_function): Call plugin before parsing.
538         (finish_function): Call plugin after parsing.
540 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
542         * cp-tree.h (init_error): Remove declaration.
543         * error.c (scratch_pretty_printer): Rename to ...
544         (actual_pretty_printer): ... this.
545         (cxx_pp): Constify and update accordingly.
546         (init_error): Remove definition.
547         * lex.c (cxx_init): Do not call init_error.
549 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
551         PR c++/61683
552         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
554 2015-06-01  Jason Merrill  <jason@redhat.com>
556         PR c++/65942
557         * decl2.c (mark_used): Don't always instantiate constexpr fns.
558         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
560         PR c++/44282
561         * mangle.c (attr_strcmp): New.
562         (write_CV_qualifiers_for_type): Also write out attributes that
563         affect type identity.
564         (write_type): Strip all attributes after writing qualifiers.
566 2015-05-31  Jason Merrill  <jason@redhat.com>
568         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
570         PR c++/66320
571         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
572         with the wrong type as non-constant.
574 2015-05-27  Jason Merrill  <jason@redhat.com>
576         * decl.c (check_redeclaration_exception_specification): Depend on
577         -Wsystem-headers rather than -pedantic.
579         * decl.c (warn_extern_redeclared_static): Use the location of
580         newdecl in diagnostics, not input_location.
581         (validate_constexpr_redeclaration): Likewise.
582         (check_redeclaration_no_default_args): Likewise.
583         (duplicate_decls): Likewise.
584         (check_redeclaration_exception_specification): Likewise.
585         Change second diagnostic to inform.
587 2015-05-24  Nathan Sidwell  <nathan@acm.org>
589         PR c++/66243
590         * decl.c (build_enumerator): Don't silently convert scoped enums.
592 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
594         PR lto/66180
595         * mangle.c (mangle_decl): Mangle anonymous namespace types as
596         "<anon>".
598 2015-05-23  Nathan Sidwell  <nathan@acm.org>
600         PR c++/65936
601         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
603 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
605         * Make-lang.in (check_g++_parallelize): Update comment.
607 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
609         PR c++/65598
610         * decl.c (grokdeclarator): Use the correct location in error
611         messages about 'explicit'.
613 2015-05-22  Marek Polacek  <polacek@redhat.com>
614             Edward Smith-Rowland  <3dw4rd@verizon.net>
616         PR c/47043
617         * cp-tree.h (build_enumerator): Update declaration.
618         * decl.c (build_enumerator): Add attributes parameter.  Call
619         cplus_decl_attributes.
620         * init.c (constant_value_1): Pass tf_none to mark_used.
621         * parser.c (cp_parser_enumerator_definition): Parse attributes and
622         pass them down to build_enumerator.
623         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
624         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
626 2015-05-21  Nathan Sidwell  <nathan@acm.org>
628         PR c++/60943
629         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
631 2015-05-21  Marek Polacek  <polacek@redhat.com>
633         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
635 2015-05-20  Jason Merrill  <jason@redhat.com>
637         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
638         before register_specialization.
640         * decl.c (grok_op_properties): Don't complain about size_t
641         placement delete here.
642         * call.c (second_parm_is_size_t): Split out from...
643         (non_placement_deallocation_fn_p): ...here.
644         (build_op_delete_call): Warn about size_t placement delete with
645         -Wc++14-compat.
647 2015-05-19  Nathan Sidwell  <nathan@acm.org>
649         PR c++/65954
650         * typeck.c (finish_class_member_access_expr): Diagnose failed
651         lookup of enum class member.
653 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
655         PR middle-end/66199
656         * parser.c (cp_parser_omp_for_loop): Don't add
657         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
658         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
659         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
660         constructs.
662 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
664         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
665         swaps.
667 2015-05-18  Jason Merrill  <jason@redhat.com>
669         * pt.c (retrieve_specialization): Make sure our arguments have
670         gone through strip_typedefs.
672         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
673         (determine_specialization): Call coerce_template_parms.
675         DR 1391
676         * pt.c (type_unification_real): Check convertibility here.
677         (unify_one_argument): Not here.
679         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
680         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
681         [TREE_LIST]: Fix no-change case.
683         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
685 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
687         PR fortran/44054
688         * error.c (cp_diagnostic_starter): Use diagnostic_location
689         function.
690         (cp_print_error_function): Likewise.
691         (cp_printer): Replace locus pointer with accessor function.
693 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
695         * parser.c (cp_parser_selection_statement): Add location and
696         guard_kind arguments to calls to
697         cp_parser_implicitly_scoped_statement.
698         (cp_parser_iteration_statement): Likewise for calls to
699         cp_parser_already_scoped_statement.
700         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
701         "guard_kind" params; use them to warn for misleading
702         indentation.
703         (cp_parser_already_scoped_statement): Likewise.
705 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
707         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
708         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
709         * semantics.c (finish_member_declaration): Likewise.
710         * method.c (lazily_declare_fn): Allways add method to main variant list.
712 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
714         PR bootstrap/66085
715         * decl2.c (note_mangling_alias): Declare arguments as unused.
717 2015-05-08  Jason Merrill  <jason@redhat.com>
719         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
720         -Wc++0x-compat.
722 2015-05-08  Jason Merrill  <jason@redhat.com>
724         * decl2.c (mangling_aliases): New variable.
725         (note_mangling_alias, generate_mangling_aliases): New.
726         (cp_write_global_declarations): Call generate_mangling_aliases.
727         (generate_mangling_alias): Split out from...
728         * mangle.c (mangle_decl): ...here.
729         * cp-tree.h: Declare note_mangling_alias.
731 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
733         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
734         (build_java_method_aliases): Adapt to use create_same_body_alias
735         instead of assemble_alias.  Move variable declarations to
736         definition and tidy up.
737         (cp_write_global_declarations): Call build_java_method_aliases
738         instead of collecting candidates first.
740 2015-05-07  Jason Merrill  <jason@redhat.com>
742         PR c++/59012
743         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
744         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
745         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
746         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
747         (apply_late_template_attributes): Handle attribute pack expansion.
749 2015-05-07  Marek Polacek  <polacek@redhat.com>
751         PR c/65179
752         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
753         value.
755 2015-05-07  Jason Merrill  <jason@redhat.com>
757         DR 1467
758         PR c++/51747
759         * typeck2.c (digest_init_r): Fix single element list.
761 2015-05-05  Jason Merrill  <jason@redhat.com>
763         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
764         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
765         MUST_NOT_THROW_EXPR.
766         (cp_genericize_data): Add try_block field.
767         (cp_genericize_tree): Initialize it.
768         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
769         implicit rethrow.
771         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
772         Return false.
774         * semantics.c (finish_call_expr): Check complain.
776         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
777         maybe-in-charge constructor.
779         * decl.c (start_decl): Don't push the plain VAR_DECL for a
780         variable template.
782         DR 1518
783         DR 1630
784         PR c++/54835
785         PR c++/60417
786         * call.c (convert_like_real): Check value-initialization before
787         explicit.
788         * typeck2.c (process_init_constructor_record): Don't set
789         CONSTRUCTOR_IS_DIRECT_INIT.
790         (process_init_constructor_array): Likewise.
791         * init.c (build_vec_init): Likewise.
793 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
795         * parser.c (cp_parser_asm_definition): Only test for
796         error_mark_node if "outputs" was just set.  Likewise for "inputs".
798 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
799             Jakub Jelinek  <jakub@redhat.com>
801         PR c++/66007
802         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
803         result in an actual error.
805 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
806             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
808         PR c++/65858
809         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
810         false.
812 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
814         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
815         trailing semicolon.
817 2015-04-29  Jason Merrill  <jason@redhat.com>
819         PR c++/50800
820         * tree.c (apply_identity_attributes): Fix handling of classes.
822 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
824         * parser.c (cp_parser_oacc_enter_exit_data): Use
825         OMP_STANDALONE_CLAUSES.
827 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
829         PR c++/64667
830         * init.c (perform_member_init): Handle references for -Winit-self.
832 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
834         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
835         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
837 2015-04-28  Jason Merrill  <jason@redhat.com>
839         PR c++/65896
840         * constexpr.c (cxx_eval_store_expression): Don't try to actually
841         store an empty class.
843         PR c++/65656
844         * constexpr.c (cxx_eval_builtin_function_call): Fix
845         __builtin_constant_p.
847         PR c++/50800
848         * tree.c (strip_typedefs): Add remove_attributes parm.
849         (strip_typedefs_expr): Likewise.
850         (apply_identity_attributes): New subroutine of strip_typedefs.
851         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
852         (convert_nontype_argument, unify): Likewise.
853         * cp-tree.h: Adjust.
855         PR c++/65734
856         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
858 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
860         * class.c (layout_class_type): Remove check if
861         PCC_BITFIELD_TYPE_MATTERS is defined.
863 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
865         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
867 2015-04-24  Jason Merrill  <jason@redhat.com>
869         PR c++/50800
870         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
872         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
873         Remove obsolete code.
874         [NE_EXPR]: Likewise.
876 2015-04-23  Jason Merrill  <jason@redhat.com>
878         PR c++/65646
879         * pt.c (check_explicit_specialization): Don't
880         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
881         headers.
882         * decl.c (grokvardecl): Revert earlier fix.
884 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
886         PR c++/65801
887         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
888         suppresses the diagnostic.
890 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
892         Reject trailing return type for an operator auto().
893         * decl.c (grokdeclarator): Reject trailing return types for
894         all conversion operators, don't handle conversion operators
895         in the previous checks that deal with auto.
897 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
899         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
901 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
903         * class.c (resolve_address_of_overloaded_function, instantiate_type):
904         Rename tsubst_flags_t parameter flags -> complain.
906 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
908         * call.c (build_op_delete_call, build_over_call): Check mark_used
909         return value.
910         * class.c (resolve_address_of_overloaded_function): Likewise.
911         * decl.c (cxx_maybe_build_cleanup): Likewise.
912         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
913         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
914         * rtti.c (build_dynamic_cast_1): Likewise.
915         * semantics.c (process_outer_var_ref): Likewise.
916         * typeck.c (build_class_member_access_expr,
917         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
919 2015-04-15  Jason Merrill  <jason@redhat.com>
921         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
922         (build_constexpr_constructor_member_initializers): Loop to find
923         the BIND_EXPR.
924         * decl.c (start_preparsed_function): Clobber the object at the
925         beginning of a constructor.
927         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
928         * method.c (implicitly_declare_fn): Likewise.
929         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
931         * decl2.c (determine_visibility): Use get_template_info.
933 2015-04-15  Jason Merrill  <jason@redhat.com>
934             Marek Polacek  <polacek@redhat.com>
936         PR c++/65727
937         * lambda.c (lambda_expr_this_capture): In unevaluated context go
938         through the normal loop, just don't capture.
939         (maybe_resolve_dummy): Handle null return.
941 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
943         * call.c (enforce_access): Emit error + inform.
945 2015-04-15  Marek Polacek  <polacek@redhat.com>
947         * constexpr.c (use_new_call): Remove #define.
948         (lookup_parameter_binding): Remove function.
949         (cxx_bind_parameters_in_call): Remove unused code.
950         (cxx_eval_call_expression): Likewise.
951         (cxx_eval_constant_expression): Likewise.
953 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
955         * tree.c (replace_placeholders_t): Remove unused type.
956         (replace_placeholders): Remove unused pset.
958 2015-04-14  Jason Merrill  <jason@redhat.com>
960         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
962         PR c++/65695
963         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
965         PR c++/65721
966         * name-lookup.c (do_class_using_decl): Complain about specifying
967         the current class even if there are dependent bases.
969 2015-04-14  David Krauss  <david_work@me.com>
971         PR c++/59766
972         * decl.c (grokdeclarator): Do not flag friends with deduced return.
974 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
975             Jason Merrill  <jason@redhat.com>
977         PR c++/60994
978         * parser.c (cp_parser_class_name): Add enum_ok parameter.
979         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
980         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
981         a class template.
983 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
985         PR c++/65736
986         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
987         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
988         the expression to the original type at the end.
990 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
992         PR c++/65690
993         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
994         TYPE_USER_ALIGN.
996         PR c++/65690
997         * tree.c (build_cplus_array_type): Layout type before variants are
998         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
999         variant.
1001 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1003         PR c++/64085
1004         * lambda.c (add_capture): Use dependent_type_p for capture by
1005         reference too.
1007 2015-04-02  Marek Polacek  <polacek@redhat.com>
1009         PR c++/65642
1010         * constexpr.c (cxx_eval_pointer_plus_expression): Call
1011         cxx_eval_constant_expression on the first operand.
1013 2015-04-01  Jason Merrill  <jason@redhat.com>
1015         PR c++/65625
1016         * decl.c (make_typename_type): Handle seeing a variable template.
1018 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1020         PR c++/56100
1021         * pt.c (instantiating_current_function_p): New.
1022         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1023         * cp-tree.h (instantiating_current_function_p): Declare.
1025 2015-04-01  Jason Merrill  <jason@redhat.com>
1027         PR c++/65646
1028         * decl.c (grokvardecl): Don't call check_explicit_specialization
1029         for non-template members of a class template.
1031 2015-04-01  Marek Polacek  <polacek@redhat.com>
1033         PR c++/65554
1034         * class.c (finish_struct): Require that the second field of a
1035         user-defined initializer_list be of size type.
1037 2015-03-31  Marek Polacek  <polacek@redhat.com>
1039         PR c++/65390
1040         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1041         checking for constness.
1043 2015-03-30  Marek Polacek  <polacek@redhat.com>
1045         PR c++/65398
1046         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1047          *(&A[i] p+ j) => A[i + j] transformation here.
1048         (cxx_eval_pointer_plus_expression): New function.
1049         (cxx_eval_constant_expression): Use it here.
1051 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1053         PR c/65586
1054         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1055         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1056         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1057         -fopenmp-simd.
1059 2015-03-27  Marek Polacek  <polacek@redhat.com>
1061         PR c++/65556
1062         * semantics.c (finish_switch_cond): If the unlowered type is not an
1063         enum, use the type of the condition.
1065 2015-03-27  Jason Merrill  <jason@redhat.com>
1067         PR c++/65509
1068         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1069         constants.
1071 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
1073         PR c++/65154
1074         * init.c (build_vec_init): Fix initializing aggregates
1075         with empty init list.
1077 2015-03-26  Jason Merrill  <jason@redhat.com>
1079         PR c++/65525
1080         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1082 2015-03-25  Marek Polacek  <polacek@redhat.com>
1084         PR c++/65558
1085         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1086         on an anonymous namespace.
1088 2015-03-25  Marek Polacek  <polacek@redhat.com>
1090         PR c++/61670
1091         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1093 2015-03-24  Jason Merrill  <jason@redhat.com>
1095         PR c++/65046
1096         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1097         * parser.c (cp_parser_namespace_definition): Don't set it.
1098         * name-lookup.c (handle_namespace_attrs): Check
1099         DECL_NAMESPACE_ASSOCIATIONS instead.
1101         PR c++/65498
1102         * pt.c (get_mostly_instantiated_function_type): Just return the
1103         type of the partially instantiated template in DECL_TI_TEMPLATE.
1105 2015-03-20  Marek Polacek  <polacek@redhat.com>
1107         PR c++/65398
1108         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1109         A[i + j].
1111 2015-03-20  Marek Polacek  <polacek@redhat.com>
1113         PR c++/65072
1114         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1115         variant.
1117 2015-03-19  Jason Merrill  <jason@redhat.com>
1119         PR c++/65046
1120         Automatically propagate ABI tags to variables and functions
1121         from their (return) type.
1122         * class.c (check_tag): Handle variables and functions.
1123         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1124         (mark_or_check_tags): Likewise.
1125         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
1126         (check_abi_tags): Add single argument overload for decls.
1127         Handle inheriting tags for decls.
1128         * mangle.c (write_mangled_name): Call it.
1129         (mangle_return_type_p): Split out from write_encoding.
1130         (unmangled_name_p): Split out from write_mangled_name.
1131         (write_mangled_name): Ignore abi_tag on namespace.
1132         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1133         * parser.c (cp_parser_namespace_definition): Set it.
1134         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1135         about abi_tag attribute on non-inline namespace.
1136         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1137         (handle_abi_tag_attribute): Allow tags on variables.
1139 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1141         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1142         attribute for DECL_EXTERNAL VAR_DECLs.
1144 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
1146         PR c++/65340
1147         * call.c (build_over_call): Pass the tsubst_flags_t argument to
1148         mark_used.
1149         * decl2.c (mark_used): Inline the require_deduced_type call and
1150         guard the error call.
1152 2015-03-16  Jason Merrill  <jason@redhat.com>
1154         PR c++/65061
1155         * parser.c (cp_parser_template_name): Call strip_using_decl.
1157 2015-03-16  Marek Polacek  <polacek@redhat.com>
1159         DR 1688
1160         PR c++/65327
1161         * decl.c (grokdeclarator): Allow volatile and constexpr together.
1163 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1165         PR c++/65323
1166         * decl.c (check_default_argument): Don't call
1167         maybe_warn_zero_as_null_pointer_constant.
1169 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
1171         * cp-gimplify.c (simple_empty_class_p): New.
1172         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
1173         the code for empty class copies into simple_empty_class_p, and
1174         adapt it to handle COMPOUND_EXPRs.
1176 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
1178         PR c++/65370
1179         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1180         only if the location of newdecl doesn't match the location of olddecl.
1182 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1184         PR c++/65127
1185         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1186         is not a PARM_DECL.
1188 2015-03-10  Jason Merrill  <jason@redhat.com>
1190         PR c++/65333
1191         DR 1558
1192         * pt.c (dependent_type_p_r): Check both class and alias template args.
1194 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1196         PR c/65120
1197         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1198         before preparing arguments to warn_logical_not_parentheses.
1199         Use maybe_constant_value on rhs.
1201 2015-03-09  Jason Merrill  <jason@redhat.com>
1203         PR c++/65339
1204         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1206 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1208         PR c/65120
1209         * parser.c (cp_parser_binary_expression): Don't warn for
1210         !!x == y or !b == y where b is bool.
1212 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
1214         * ptree.c (cxx_print_lambda_node): New.
1215         (cxx_print_xnode): Handle LAMBDA_EXPR.
1217 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
1219         PR c++/65295
1220         * constexpr.c (cxx_eval_constant_expression): Remove assert in
1221         RESULT_DECL handling.
1223 2015-02-26  Marek Polacek  <polacek@redhat.com>
1225         PR c++/65202
1226         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1227         a RETURN_EXPR if its operand is null.
1229 2015-02-25  Jason Merrill  <jason@redhat.com>
1231         PR c++/65209
1232         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1233         DECL_COMDAT.
1234         (constrain_visibility_for_template): Handle reference arguments.
1236         PR debug/58315
1237         * decl.c (start_preparsed_function): Use create_artificial_label
1238         for cdtor_label.
1240 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
1241             Jakub Jelinek  <jakub@redhat.com>
1243         PR c++/65075
1244         * constexpr.c (check_constexpr_bind_expr_vars): Allow
1245         implicit typedefs for lambda types.
1247 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1249         PR c++/60894
1250         * decl.c (lookup_and_check_tag): Use strip_using_decl.
1252 2015-02-13  Jason Merrill  <jason@redhat.com>
1254         PR c++/65054
1255         * pt.c (template_args_equal): Look through conversions here.
1256         * tree.c (cp_tree_equal): Not here.
1258 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1260         PR c++/60211
1261         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1262         pragma_external context.
1264 2015-02-13  Jason Merrill  <jason@redhat.com>
1266         PR c++/65051
1267         * call.c (reference_binding): Don't look for bad conversion
1268         if TO is incomplete.
1270 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1272         PR c++/64970
1273         * decl.c (make_typename_type): Pass tsubst_flags_t argument
1274         to lookup_template_class.
1276 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
1278         PR ipa/65034
1279         * decl.c (start_preparsed_function): Use void_type_node instead
1280         of NULL_TREE as LABEL_DECL type.
1282 2015-02-12  Jason Merrill  <jason@redhat.com>
1284         PR c++/64898
1285         * mangle.c (write_mangled_name): Fix test for variable template
1286         instantiation.
1288         * decl.c (begin_destructor_body): Condition clobber on
1289         -flifetime-dse.
1291 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1293         PR c++/64959
1294         * parser.c (lookup_literal_operator): Return all candidates.
1295         (cp_parser_userdef_char_literal): Simplify error handling.
1296         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
1297         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1298         Also give higher priority to standard string UDL operator.
1300 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
1302         PR debug/55541
1303         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1304         * decl.c (poplevel): If functionbody, try not to create an extra
1305         BLOCK for function body and use subblocks as that, if it is non-NULL
1306         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
1307         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1309         PR sanitizer/64984
1310         * except.c (check_noexcept_r): Return NULL for internal
1311         calls.
1313 2015-02-10  Jason Merrill  <jason@redhat.com>
1315         PR c++/64994
1316         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1318 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
1320         PR ipa/64982
1321         * method.c (use_thunk): Do not check for stdarg thunks.
1323 2015-02-06  Jason Merrill  <jason@redhat.com>
1325         PR c++/64899
1326         * init.c (build_vec_init): Handle default-initialized array with
1327         constexpr default constructor.
1329 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1331         PR c/64824
1332         PR c/64868
1333         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1335 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1337         PR c++/64877
1338         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1339         for generated expressions.
1341 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1343         PR c++/64901
1344         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1345         DECL_OVERRIDE_P.
1347 2015-02-02  Jason Merrill  <jason@redhat.com>
1349         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1351 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
1353         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1354         changed to pass input_location as first argument.
1356 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
1358         PR c++/64717
1359         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1360         into SAVE_EXPR.
1362 2015-01-29  Jason Merrill  <jason@redhat.com>
1364         PR c++/49508
1365         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1366         erroneous return statement.
1368         PR c++/64521
1369         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1370         point.
1372 2015-01-27  Caroline Tice  <cmtice@google.com>
1374         Committing VTV Cywin/Ming patch for Patrick Wollgast
1375         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1376         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1378 2015-01-27  Jason Merrill  <jason@redhat.com>
1380         PR c++/58597
1381         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1382         current_function_decl.
1384         PR c++/63889
1385         * pt.c (finish_template_variable): Move from semantics.c.
1386         Handle multiple template arg levels.  Handle coercion here.
1387         (lookup_template_variable): Not here.
1389 2015-01-23  Jason Merrill  <jason@redhat.com>
1391         PR c++/64314
1392         PR c++/57510
1393         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1394         that has been completely split out.
1396         PR c++/64701
1397         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1398         statement codes.
1400         PR c++/64727
1401         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1402         of CONST_DECL.
1404 2015-01-21  Jason Merrill  <jason@redhat.com>
1406         PR c++/64603
1407         * constexpr.c (cxx_eval_constant_expression): Only shortcut
1408         constant CONSTRUCTORs.
1410         PR c++/64647
1411         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1412         give a hard error in a template instantiation.
1414 2015-01-21  Richard Biener  <rguenther@suse.de>
1416         PR middle-end/64313
1417         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1418         for builtins the user declared correctly.
1420 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1422         PR c++/58614
1423         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1424         TREE_TYPE (elt) == error_mark_node.
1426 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
1428         PR tree-optimization/62053
1429         * tree.c (build_cplus_array_type): Layout type after variants are set.
1431 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
1433         * cp-gimplify.c (cp_genericize_r): Call
1434         cp_ubsan_maybe_instrument_member_call for member calls.
1435         (cp_ubsan_check_member_access_r): New function.
1436         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1437         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1438         cp_ubsan_instrument_member_accesses,
1439         cp_ubsan_maybe_instrument_downcast,
1440         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1441         * cp-ubsan.c: New file.
1442         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1443         * constexpr.c (cxx_eval_call_expression): Return void_node
1444         for IFN_UBSAN_VPTR.
1445         (potential_constant_expression_1): Return true for
1446         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1447         * typeck.c (build_class_member_access_expr): Provide locus
1448         for COMPONENT_REFs.
1449         (build_static_cast_1): Instrument downcasts.
1450         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1451         add ubsan instrumentation for virtual_access.
1452         * call.c: Include internal-fn.h.
1453         (set_flags_from_callee): Handle internal calls.
1455 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
1457         PR c++/59366
1458         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1459         and function templates, declared only in the class.
1460         * decl.c (duplicate_decls): Reveal hidden friend functions or
1461         function templates, if they are redeclared outside the class.
1463 2015-01-15  Jason Merrill  <jason@redhat.com>
1465         PR c++/64356
1466         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1468         PR c++/63283
1469         * constexpr.c (potential_constant_expression_1): Handle reference
1470         args in templates.
1472 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1473             James Norris  <jnorris@codesourcery.com>
1474             Cesar Philippidis  <cesar@codesourcery.com>
1475             Ilmir Usmanov  <i.usmanov@samsung.com>
1476             Jakub Jelinek  <jakub@redhat.com>
1478         * parser.c: Include "gomp-constants.h".
1479         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1480         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1481         Use OMP_CLAUSE_SET_MAP_KIND.
1482         (cp_parser_omp_construct, cp_parser_pragma): Handle
1483         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1484         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1485         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1486         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1487         "create", "delete", "deviceptr", "host", "num_gangs",
1488         "num_workers", "present", "present_or_copy", "pcopy",
1489         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1490         "present_or_create", "pcreate", "vector_length", "wait".
1491         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1492         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1493         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1494         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1495         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1496         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1497         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1498         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1499         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1500         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1501         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1502         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1503         (cp_parser_oacc_parallel, cp_parser_oacc_update)
1504         (cp_parser_oacc_wait): New functions.
1505         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1506         (finish_oacc_parallel): New prototypes.
1507         * semantics.c: Include "gomp-constants.h".
1508         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1509         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1510         OMP_CLAUSE_SET_MAP_KIND.
1511         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1512         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1513         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1514         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1515         functions.
1517 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
1519         PR c++/58671
1520         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1521         self-initialization.
1523 2015-01-13  Jason Merrill  <jason@redhat.com>
1525         PR c++/64356
1526         PR libstdc++/58777
1527         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1528         pointer expressions.
1529         (cxx_eval_increment_expression): Likewise.
1531         PR c++/64514
1532         * pt.c (coerce_template_parameter_pack): Return NULL for a
1533         zero-length fixed parameter pack with a pack expansion arg.
1535         PR c++/64520
1536         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1538 2015-01-12  Jason Merrill  <jason@redhat.com>
1540         PR c++/64547
1541         * constexpr.c (cxx_eval_call_expression): A call to a void
1542         function doesn't need to return a value.
1544 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1546         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1547         input.h, alias.h, symtab.h, options.h, fold-const.h,
1548         wide-int.h, and inchash.h due to flattening of tree.h.
1549         * class.c: Ditto.
1550         * constexpr.c: Ditto.
1551         * cp-array-notation.c: Ditto.
1552         * cp-gimplify.c: Ditto.
1553         * cp-lang.c: Ditto.
1554         * cp-objcp-common.c: Ditto.
1555         * cvt.c: Ditto.
1556         * decl2.c: Ditto.
1557         * decl.c: Ditto.
1558         * dump.c: Ditto.
1559         * error.c: Ditto.
1560         * except.c: Ditto.
1561         * expr.c: Ditto.
1562         * friend.c: Ditto.
1563         * init.c: Ditto.
1564         * lambda.c: Ditto.
1565         * lex.c: Ditto.
1566         * mangle.c: Ditto.
1567         * name-lookup.c: Ditto.
1568         * optimize.c: Ditto.
1569         * parser.c: Ditto.
1570         * pt.c: Ditto.
1571         * ptree.c: Ditto.
1572         * repo.c: Ditto.
1573         * rtti.c: Ditto.
1574         * search.c: Ditto.
1575         * semantics.c: Ditto.
1576         * tree.c: Ditto.
1577         * typeck2.c: Ditto.
1578         * typeck.c: Ditto.
1580 2015-01-08  Jason Merrill  <jason@redhat.com>
1582         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1583         * decl.c (compute_array_index_type): Likewise.
1584         * init.c (build_vec_init): Likewise.
1585         * typeck.c (cp_build_binary_op): Likewise.
1587 2015-01-08  Jason Merrill  <jason@redhat.com>
1589         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1590         whether an initializer-list is too big for a VLA.
1591         (throw_bad_array_length): Remove.
1592         * cp-tree.h: Remove prototype.
1594 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
1596         PR c++/60753
1597         * decl.c (grokfndecl): Add bool parameter.
1598         (grokdeclarator): Adjust calls.
1599         (start_decl): Don't set DECL_DELETED_FN here.
1601 2015-01-06  Jason Merrill  <jason@redhat.com>
1603         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1604         template-ids.
1606         PR c++/64455
1607         * pt.c (type_dependent_expression_p): Handle variable templates.
1608         * constexpr.c (potential_constant_expression_1): Use it.
1610         PR c++/64487
1611         * semantics.c (finish_offsetof): Handle templates here.
1612         * parser.c (cp_parser_builtin_offsetof): Not here.
1614         PR c++/64496
1615         * semantics.c (process_outer_var_ref): Diagnose lambda in local
1616         class NSDMI.
1618 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1620         PR c++/64489
1621         * class.c (check_field_decls): Make copy assignment operators
1622         complex only in c++98 mode.
1624 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1626         PR c++/31397
1627         * class.c (check_for_override): Warn when a virtual function is an
1628         override not marked override.
1630 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1632         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1633         hold base_fndecls.
1634         (get_basefndecls): Adjust.
1636 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1638         Update copyright years.
1640 2015-01-05  Marek Polacek  <polacek@redhat.com>
1642         PR c/64423
1643         * typeck.c (cp_build_array_ref): Pass loc down to
1644         warn_array_subscript_with_type_char.
1647 Copyright (C) 2015 Free Software Foundation, Inc.
1649 Copying and distribution of this file, with or without modification,
1650 are permitted in any medium without royalty provided the copyright
1651 notice and this notice are preserved.