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