PR c++/66571
[official-gcc.git] / gcc / cp / ChangeLog
blob153b3c4cd74ab2a1e784049b205e0ec9406b2af5
1 2015-06-17  Jason Merrill  <jason@redhat.com>
3         PR c++/66515
4         * call.c (implicit_conversion): Call reshape_init here, early.
5         (build_aggr_conv): Not here.
7 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
9         PR c++/66571
10         * pt.c (tsubst_omp_clause_decl): New function.
11         (tsubst_omp_clauses): Use it or tsubst_copy instead of
12         tsubst_expr on OMP_CLAUSE_DECL.
14 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
16         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
17         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
18         * decl.c (grokdeclarator, xref_tag_1): Likewise.
19         * error.c (dump_aggr_type): likewise.
20         * pt.c (push_template_decl_real): Likewise.
21         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
23 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
25         * call.c: Do not include input.h, line-map.h or is-a.h.
26         * class.c: Likewise.
27         * constexpr.c: Likewise.
28         * cp-array-notation.c: Likewise.
29         * cp-gimplify.c: Likewise.
30         * cp-lang.c: Likewise.
31         * cp-objcp-common.c: Likewise.
32         * cp-tree.h: Likewise.
33         * cp-ubsan.c: Likewise.
34         * cvt.c: Likewise.
35         * decl.c: Likewise.
36         * decl2.c: Likewise.
37         * dump.c: Likewise.
38         * error.c: Likewise.
39         * except.c: Likewise.
40         * expr.c: Likewise.
41         * friend.c: Likewise.
42         * init.c: Likewise.
43         * lambda.c: Likewise.
44         * lex.c: Likewise.
45         * mangle.c: Likewise.
46         * method.c: Likewise.
47         * name-lookup.c: Likewise.
48         * optimize.c: Likewise.
49         * parser.c: Likewise.
50         * pt.c: Likewise.
51         * ptree.c: Likewise.
52         * repo.c: Likewise.
53         * rtti.c: Likewise.
54         * search.c: Likewise.
55         * semantics.c: Likewise.
56         * tree.c: Likewise.
57         * typeck.c: Likewise.
58         * typeck2.c: Likewise.
59         * vtable-class-hierarchy.c: Likewise.
61 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
63         PR c++/59682
64         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
66 2015-06-16  Jason Merrill  <jason@redhat.com>
68         PR c++/66536
69         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
70         mismatch.
72         PR c++/58063
73         * tree.c (bot_manip): Remap SAVE_EXPR.
75         PR c++/66387
76         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
78 2015-06-15  Nathan Sidwell  <nathan@acm.org>
80         PR c++/58583
81         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
82         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
83         protect it from recursive instantiation.
85 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
87         PR c++/51048
88         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
89         using a local type is pure virtual.
91 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
93         * call.c: Remove comment documenting the long-deleted
94         function build_method_call.
96 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
98         PR c++/65168
99         * typeck.c (cp_build_binary_op): Warn when comparing an address
100         of a reference against NULL.
102 2015-06-12  Jason Merrill  <jason@redhat.com>
104         PR c++/65719
105         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
106         variables as DECL_NOT_REALLY_EXTERN.
108 2015-06-11  Jason Merrill  <jason@redhat.com>
110         PR c++/66445
111         * constexpr.c (potential_constant_expression_1): Handle a
112         DECL_EXPR of TYPE_DECL.
114         PR c++/66450
115         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
116         ctx->ctor.
118 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
120         * decl.c (cxx_init_decl_processing): Register the main
121         translation unit through the new debug hook.
123 2015-06-10  Jason Merrill  <jason@redhat.com>
125         PR c++/66289
126         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
127         * pt.c (push_template_decl_real): Set it.
128         (dependent_alias_template_spec_p): Use it.
129         (dependent_type_p_r): Use dependent_alias_template_spec_p.
130         (uses_all_template_parms_data, uses_all_template_parms_r)
131         (complex_alias_template_p): New.
132         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
134 2015-06-09  Jason Merrill  <jason@redhat.com>
136         DR 1467
137         PR c++/51747
138         * typeck2.c (digest_init_r): Replace previous change with
139         gcc_unreachable.
141         PR c++/66387
142         * semantics.c (process_outer_var_ref): Make sure the value is
143         actually constant before returning it.
144         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
145         array.
147 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
149         PR c++/65815
150         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
151         * init.c (expand_default_init): Likewise.
153 2015-06-09  Jason Merrill  <jason@redhat.com>
155         PR c++/66383
156         * tree.c (replace_placeholders_r): Handle placeholders for an
157         outer object.
158         * typeck2.c (store_init_value): Only replace_placeholders for
159         objects of class type.
161 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
163         * call.c : Adjust include files.
164         * class.c : Likewise.
165         * constexpr.c : Likewise.
166         * cp-array-notation.c : Likewise.
167         * cp-cilkplus.c : Likewise.
168         * cp-gimplify.c : Likewise.
169         * cp-lang.c : Likewise.
170         * cp-objcp-common.c : Likewise.
171         * cp-tree.h : Likewise.
172         * cp-ubsan.c : Likewise.
173         * cvt.c : Likewise.
174         * decl.c : Likewise.
175         * decl2.c : Likewise.
176         * dump.c : Likewise.
177         * error.c : Likewise.
178         * except.c : Likewise.
179         * expr.c : Likewise.
180         * friend.c : Likewise.
181         * init.c : Likewise.
182         * lambda.c : Likewise.
183         * lex.c : Likewise.
184         * mangle.c : Likewise.
185         * method.c : Likewise.
186         * name-lookup.c : Likewise.
187         * optimize.c : Likewise.
188         * parser.c : Likewise.
189         * pt.c : Likewise.
190         * ptree.c : Likewise.
191         * repo.c : Likewise.
192         * rtti.c : Likewise.
193         * search.c : Likewise.
194         * semantics.c : Likewise.
195         * tree.c : Likewise.
196         * typeck.c : Likewise.
197         * typeck2.c : Likewise.
198         * vtable-class-hierarchy.c : Likewise.
200 2015-06-05  Jason Merrill  <jason@redhat.com>
202         PR c++/66405
203         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
204         the expansion has extra args.
205         (use_pack_expansion_extra_args_p): Return true in that case.
207         PR c++/66405
208         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
209         dependent even if it has a type.
211 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
213         * cp-objcp-common.c: Adjust comment for
214         cxx_warn_unused_global_decl.
215         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
216         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
217         * cp-tree.h (note_mangling_alias): Protoize.
218         (cp_write_global_declarations): Remove.
219         (cxx_post_compilation_parsing_cleanups): Protoize.
220         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
221         argument.
222         * decl2.c (mangling_aliases): New global.
223         (build_java_method_aliases): New.  Adapted from
224         collect_candidates_for_java_method_aliases.
225         (collect_candidates_for_java_method_aliases): Remove.
226         (build_java_method_aliases): Remove.
227         (generate_mangling_aliases): New.
228         (note_mangling_alias): New.  Moved from mangle_decl.
229         (locus_at_end_of_parsing): New global.
230         (c_parse_final_cleanups): Rename from
231         cp_write_global_declarations.
232         Use locus_at_end_of_parsing.
233         Call generate_mangling_aliases.
234         Rename call to collect_candidates_for_java_method_aliases into
235         build_java_method_aliases.
236         Remove call to finalize_compilation_unit.
237         Move vtable handling into cxx_post_compilation_parsing_cleanups.
238         Do not call check_global_declarations or
239         emit_debug_global_declarations.
240         (cxx_post_compilation_parsing_cleanups): New.
241         * mangle.c (mangle_decl): Move code to note_mangling_alias.
242         * name-lookup.c (do_namespace_alias): Call early_global_decl.
244 2015-06-05  Nathan Sidwell  <nathan@acm.org>
246         PR c++/52595
247         * parser.c (cp_parser_cache_defarg): Continue looking for
248         declarators when scanning a potential template argument list of an
249         NSDMI.
251 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
253         * call.c: Adjust includes for restructured coretypes.h.
254         * class.c: Likewise.
255         * constexpr.c: Likewise.
256         * cp-array-notation.c: Likewise.
257         * cp-gimplify.c: Likewise.
258         * cp-lang.c: Likewise.
259         * cp-objcp-common.c: Likewise.
260         * cp-tree.h: Likewise.
261         * cp-ubsan.c: Likewise.
262         * cvt.c: Likewise.
263         * decl.c: Likewise.
264         * decl2.c: Likewise.
265         * dump.c: Likewise.
266         * error.c: Likewise.
267         * except.c: Likewise.
268         * expr.c: Likewise.
269         * friend.c: Likewise.
270         * init.c: Likewise.
271         * lambda.c: Likewise.
272         * lex.c: Likewise.
273         * mangle.c: Likewise.
274         * method.c: Likewise.
275         * name-lookup.c: Likewise.
276         * optimize.c: Likewise.
277         * parser.c: Likewise.
278         * pt.c: Likewise.
279         * ptree.c: Likewise.
280         * repo.c: Likewise.
281         * rtti.c: Likewise.
282         * search.c: Likewise.
283         * semantics.c: Likewise.
284         * tree.c: Likewise.
285         * typeck.c: Likewise.
286         * typeck2.c: Likewise.
287         * vtable-class-hierarchy.c: Likewise.
289 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
291         PR c++/66192
292         PR target/66200
293         * cp-tree.h (get_guard_cond): Adjust declaration
294         * decl.c (expand_static_init): Use atomic load acquire
295         and adjust call to get_guard_cond.
296         * decl2.c (build_atomic_load_byte): New function.
297         (get_guard_cond): Handle thread_safety.
298         (one_static_initialization_or_destruction): Adjust call to
299         get_guard_cond.
301 2015-06-03  Jason Merrill  <jason@redhat.com>
303         PR c++/44282
304         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
305         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
306         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
307         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
309 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
310             Paolo Carlini  <paolo.carlini@oracle.com>
312         PR c++/66130
313         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
314         use it in the diagnostic.
315         (decay_conversion): Adjust call.
316         * semantics.c (finish_decltype_type): Likewise.
317         * call.c (resolve_args, build_new_op_1,
318         perform_implicit_conversion_flags): Adjust calls.
319         * cvt.c (ocp_convert, convert_to_void): Likewise.
320         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
322 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
324         * decl.c (check_tag_decl): Use declspecs->locations as locations in
325         error_at and warning_at calls.
327 2015-06-03  Marek Polacek  <polacek@redhat.com>
329         PR sanitizer/66190
330         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
331         (cp_genericize_r): Don't instrument static initializers.
332         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
334 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
336         * decl.c (start_function): Call plugin before parsing.
337         (finish_function): Call plugin after parsing.
339 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
341         * cp-tree.h (init_error): Remove declaration.
342         * error.c (scratch_pretty_printer): Rename to ...
343         (actual_pretty_printer): ... this.
344         (cxx_pp): Constify and update accordingly.
345         (init_error): Remove definition.
346         * lex.c (cxx_init): Do not call init_error.
348 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
350         PR c++/61683
351         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
353 2015-06-01  Jason Merrill  <jason@redhat.com>
355         PR c++/65942
356         * decl2.c (mark_used): Don't always instantiate constexpr fns.
357         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
359         PR c++/44282
360         * mangle.c (attr_strcmp): New.
361         (write_CV_qualifiers_for_type): Also write out attributes that
362         affect type identity.
363         (write_type): Strip all attributes after writing qualifiers.
365 2015-05-31  Jason Merrill  <jason@redhat.com>
367         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
369         PR c++/66320
370         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
371         with the wrong type as non-constant.
373 2015-05-27  Jason Merrill  <jason@redhat.com>
375         * decl.c (check_redeclaration_exception_specification): Depend on
376         -Wsystem-headers rather than -pedantic.
378         * decl.c (warn_extern_redeclared_static): Use the location of
379         newdecl in diagnostics, not input_location.
380         (validate_constexpr_redeclaration): Likewise.
381         (check_redeclaration_no_default_args): Likewise.
382         (duplicate_decls): Likewise.
383         (check_redeclaration_exception_specification): Likewise.
384         Change second diagnostic to inform.
386 2015-05-24  Nathan Sidwell  <nathan@acm.org>
388         PR c++/66243
389         * decl.c (build_enumerator): Don't silently convert scoped enums.
391 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
393         PR lto/66180
394         * mangle.c (mangle_decl): Mangle anonymous namespace types as
395         "<anon>".
397 2015-05-23  Nathan Sidwell  <nathan@acm.org>
399         PR c++/65936
400         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
402 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
404         * Make-lang.in (check_g++_parallelize): Update comment.
406 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
408         PR c++/65598
409         * decl.c (grokdeclarator): Use the correct location in error
410         messages about 'explicit'.
412 2015-05-22  Marek Polacek  <polacek@redhat.com>
413             Edward Smith-Rowland  <3dw4rd@verizon.net>
415         PR c/47043
416         * cp-tree.h (build_enumerator): Update declaration.
417         * decl.c (build_enumerator): Add attributes parameter.  Call
418         cplus_decl_attributes.
419         * init.c (constant_value_1): Pass tf_none to mark_used.
420         * parser.c (cp_parser_enumerator_definition): Parse attributes and
421         pass them down to build_enumerator.
422         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
423         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
425 2015-05-21  Nathan Sidwell  <nathan@acm.org>
427         PR c++/60943
428         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
430 2015-05-21  Marek Polacek  <polacek@redhat.com>
432         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
434 2015-05-20  Jason Merrill  <jason@redhat.com>
436         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
437         before register_specialization.
439         * decl.c (grok_op_properties): Don't complain about size_t
440         placement delete here.
441         * call.c (second_parm_is_size_t): Split out from...
442         (non_placement_deallocation_fn_p): ...here.
443         (build_op_delete_call): Warn about size_t placement delete with
444         -Wc++14-compat.
446 2015-05-19  Nathan Sidwell  <nathan@acm.org>
448         PR c++/65954
449         * typeck.c (finish_class_member_access_expr): Diagnose failed
450         lookup of enum class member.
452 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
454         PR middle-end/66199
455         * parser.c (cp_parser_omp_for_loop): Don't add
456         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
457         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
458         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
459         constructs.
461 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
463         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
464         swaps.
466 2015-05-18  Jason Merrill  <jason@redhat.com>
468         * pt.c (retrieve_specialization): Make sure our arguments have
469         gone through strip_typedefs.
471         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
472         (determine_specialization): Call coerce_template_parms.
474         DR 1391
475         * pt.c (type_unification_real): Check convertibility here.
476         (unify_one_argument): Not here.
478         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
479         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
480         [TREE_LIST]: Fix no-change case.
482         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
484 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
486         PR fortran/44054
487         * error.c (cp_diagnostic_starter): Use diagnostic_location
488         function.
489         (cp_print_error_function): Likewise.
490         (cp_printer): Replace locus pointer with accessor function.
492 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
494         * parser.c (cp_parser_selection_statement): Add location and
495         guard_kind arguments to calls to
496         cp_parser_implicitly_scoped_statement.
497         (cp_parser_iteration_statement): Likewise for calls to
498         cp_parser_already_scoped_statement.
499         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
500         "guard_kind" params; use them to warn for misleading
501         indentation.
502         (cp_parser_already_scoped_statement): Likewise.
504 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
506         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
507         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
508         * semantics.c (finish_member_declaration): Likewise.
509         * method.c (lazily_declare_fn): Allways add method to main variant list.
511 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
513         PR bootstrap/66085
514         * decl2.c (note_mangling_alias): Declare arguments as unused.
516 2015-05-08  Jason Merrill  <jason@redhat.com>
518         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
519         -Wc++0x-compat.
521 2015-05-08  Jason Merrill  <jason@redhat.com>
523         * decl2.c (mangling_aliases): New variable.
524         (note_mangling_alias, generate_mangling_aliases): New.
525         (cp_write_global_declarations): Call generate_mangling_aliases.
526         (generate_mangling_alias): Split out from...
527         * mangle.c (mangle_decl): ...here.
528         * cp-tree.h: Declare note_mangling_alias.
530 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
532         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
533         (build_java_method_aliases): Adapt to use create_same_body_alias
534         instead of assemble_alias.  Move variable declarations to
535         definition and tidy up.
536         (cp_write_global_declarations): Call build_java_method_aliases
537         instead of collecting candidates first.
539 2015-05-07  Jason Merrill  <jason@redhat.com>
541         PR c++/59012
542         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
543         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
544         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
545         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
546         (apply_late_template_attributes): Handle attribute pack expansion.
548 2015-05-07  Marek Polacek  <polacek@redhat.com>
550         PR c/65179
551         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
552         value.
554 2015-05-07  Jason Merrill  <jason@redhat.com>
556         DR 1467
557         PR c++/51747
558         * typeck2.c (digest_init_r): Fix single element list.
560 2015-05-05  Jason Merrill  <jason@redhat.com>
562         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
563         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
564         MUST_NOT_THROW_EXPR.
565         (cp_genericize_data): Add try_block field.
566         (cp_genericize_tree): Initialize it.
567         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
568         implicit rethrow.
570         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
571         Return false.
573         * semantics.c (finish_call_expr): Check complain.
575         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
576         maybe-in-charge constructor.
578         * decl.c (start_decl): Don't push the plain VAR_DECL for a
579         variable template.
581         DR 1518
582         DR 1630
583         PR c++/54835
584         PR c++/60417
585         * call.c (convert_like_real): Check value-initialization before
586         explicit.
587         * typeck2.c (process_init_constructor_record): Don't set
588         CONSTRUCTOR_IS_DIRECT_INIT.
589         (process_init_constructor_array): Likewise.
590         * init.c (build_vec_init): Likewise.
592 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
594         * parser.c (cp_parser_asm_definition): Only test for
595         error_mark_node if "outputs" was just set.  Likewise for "inputs".
597 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
598             Jakub Jelinek  <jakub@redhat.com>
600         PR c++/66007
601         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
602         result in an actual error.
604 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
605             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
607         PR c++/65858
608         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
609         false.
611 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
613         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
614         trailing semicolon.
616 2015-04-29  Jason Merrill  <jason@redhat.com>
618         PR c++/50800
619         * tree.c (apply_identity_attributes): Fix handling of classes.
621 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
623         * parser.c (cp_parser_oacc_enter_exit_data): Use
624         OMP_STANDALONE_CLAUSES.
626 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
628         PR c++/64667
629         * init.c (perform_member_init): Handle references for -Winit-self.
631 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
633         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
634         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
636 2015-04-28  Jason Merrill  <jason@redhat.com>
638         PR c++/65896
639         * constexpr.c (cxx_eval_store_expression): Don't try to actually
640         store an empty class.
642         PR c++/65656
643         * constexpr.c (cxx_eval_builtin_function_call): Fix
644         __builtin_constant_p.
646         PR c++/50800
647         * tree.c (strip_typedefs): Add remove_attributes parm.
648         (strip_typedefs_expr): Likewise.
649         (apply_identity_attributes): New subroutine of strip_typedefs.
650         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
651         (convert_nontype_argument, unify): Likewise.
652         * cp-tree.h: Adjust.
654         PR c++/65734
655         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
657 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
659         * class.c (layout_class_type): Remove check if
660         PCC_BITFIELD_TYPE_MATTERS is defined.
662 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
664         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
666 2015-04-24  Jason Merrill  <jason@redhat.com>
668         PR c++/50800
669         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
671         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
672         Remove obsolete code.
673         [NE_EXPR]: Likewise.
675 2015-04-23  Jason Merrill  <jason@redhat.com>
677         PR c++/65646
678         * pt.c (check_explicit_specialization): Don't
679         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
680         headers.
681         * decl.c (grokvardecl): Revert earlier fix.
683 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
685         PR c++/65801
686         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
687         suppresses the diagnostic.
689 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
691         Reject trailing return type for an operator auto().
692         * decl.c (grokdeclarator): Reject trailing return types for
693         all conversion operators, don't handle conversion operators
694         in the previous checks that deal with auto.
696 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
698         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
700 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
702         * class.c (resolve_address_of_overloaded_function, instantiate_type):
703         Rename tsubst_flags_t parameter flags -> complain.
705 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
707         * call.c (build_op_delete_call, build_over_call): Check mark_used
708         return value.
709         * class.c (resolve_address_of_overloaded_function): Likewise.
710         * decl.c (cxx_maybe_build_cleanup): Likewise.
711         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
712         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
713         * rtti.c (build_dynamic_cast_1): Likewise.
714         * semantics.c (process_outer_var_ref): Likewise.
715         * typeck.c (build_class_member_access_expr,
716         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
718 2015-04-15  Jason Merrill  <jason@redhat.com>
720         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
721         (build_constexpr_constructor_member_initializers): Loop to find
722         the BIND_EXPR.
723         * decl.c (start_preparsed_function): Clobber the object at the
724         beginning of a constructor.
726         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
727         * method.c (implicitly_declare_fn): Likewise.
728         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
730         * decl2.c (determine_visibility): Use get_template_info.
732 2015-04-15  Jason Merrill  <jason@redhat.com>
733             Marek Polacek  <polacek@redhat.com>
735         PR c++/65727
736         * lambda.c (lambda_expr_this_capture): In unevaluated context go
737         through the normal loop, just don't capture.
738         (maybe_resolve_dummy): Handle null return.
740 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
742         * call.c (enforce_access): Emit error + inform.
744 2015-04-15  Marek Polacek  <polacek@redhat.com>
746         * constexpr.c (use_new_call): Remove #define.
747         (lookup_parameter_binding): Remove function.
748         (cxx_bind_parameters_in_call): Remove unused code.
749         (cxx_eval_call_expression): Likewise.
750         (cxx_eval_constant_expression): Likewise.
752 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
754         * tree.c (replace_placeholders_t): Remove unused type.
755         (replace_placeholders): Remove unused pset.
757 2015-04-14  Jason Merrill  <jason@redhat.com>
759         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
761         PR c++/65695
762         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
764         PR c++/65721
765         * name-lookup.c (do_class_using_decl): Complain about specifying
766         the current class even if there are dependent bases.
768 2015-04-14  David Krauss  <david_work@me.com>
770         PR c++/59766
771         * decl.c (grokdeclarator): Do not flag friends with deduced return.
773 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
774             Jason Merrill  <jason@redhat.com>
776         PR c++/60994
777         * parser.c (cp_parser_class_name): Add enum_ok parameter.
778         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
779         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
780         a class template.
782 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
784         PR c++/65736
785         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
786         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
787         the expression to the original type at the end.
789 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
791         PR c++/65690
792         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
793         TYPE_USER_ALIGN.
795         PR c++/65690
796         * tree.c (build_cplus_array_type): Layout type before variants are
797         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
798         variant.
800 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
802         PR c++/64085
803         * lambda.c (add_capture): Use dependent_type_p for capture by
804         reference too.
806 2015-04-02  Marek Polacek  <polacek@redhat.com>
808         PR c++/65642
809         * constexpr.c (cxx_eval_pointer_plus_expression): Call
810         cxx_eval_constant_expression on the first operand.
812 2015-04-01  Jason Merrill  <jason@redhat.com>
814         PR c++/65625
815         * decl.c (make_typename_type): Handle seeing a variable template.
817 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
819         PR c++/56100
820         * pt.c (instantiating_current_function_p): New.
821         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
822         * cp-tree.h (instantiating_current_function_p): Declare.
824 2015-04-01  Jason Merrill  <jason@redhat.com>
826         PR c++/65646
827         * decl.c (grokvardecl): Don't call check_explicit_specialization
828         for non-template members of a class template.
830 2015-04-01  Marek Polacek  <polacek@redhat.com>
832         PR c++/65554
833         * class.c (finish_struct): Require that the second field of a
834         user-defined initializer_list be of size type.
836 2015-03-31  Marek Polacek  <polacek@redhat.com>
838         PR c++/65390
839         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
840         checking for constness.
842 2015-03-30  Marek Polacek  <polacek@redhat.com>
844         PR c++/65398
845         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
846          *(&A[i] p+ j) => A[i + j] transformation here.
847         (cxx_eval_pointer_plus_expression): New function.
848         (cxx_eval_constant_expression): Use it here.
850 2015-03-27  Tobias Burnus  <burnus@net-b.de>
852         PR c/65586
853         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
854         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
855         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
856         -fopenmp-simd.
858 2015-03-27  Marek Polacek  <polacek@redhat.com>
860         PR c++/65556
861         * semantics.c (finish_switch_cond): If the unlowered type is not an
862         enum, use the type of the condition.
864 2015-03-27  Jason Merrill  <jason@redhat.com>
866         PR c++/65509
867         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
868         constants.
870 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
872         PR c++/65154
873         * init.c (build_vec_init): Fix initializing aggregates
874         with empty init list.
876 2015-03-26  Jason Merrill  <jason@redhat.com>
878         PR c++/65525
879         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
881 2015-03-25  Marek Polacek  <polacek@redhat.com>
883         PR c++/65558
884         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
885         on an anonymous namespace.
887 2015-03-25  Marek Polacek  <polacek@redhat.com>
889         PR c++/61670
890         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
892 2015-03-24  Jason Merrill  <jason@redhat.com>
894         PR c++/65046
895         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
896         * parser.c (cp_parser_namespace_definition): Don't set it.
897         * name-lookup.c (handle_namespace_attrs): Check
898         DECL_NAMESPACE_ASSOCIATIONS instead.
900         PR c++/65498
901         * pt.c (get_mostly_instantiated_function_type): Just return the
902         type of the partially instantiated template in DECL_TI_TEMPLATE.
904 2015-03-20  Marek Polacek  <polacek@redhat.com>
906         PR c++/65398
907         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
908         A[i + j].
910 2015-03-20  Marek Polacek  <polacek@redhat.com>
912         PR c++/65072
913         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
914         variant.
916 2015-03-19  Jason Merrill  <jason@redhat.com>
918         PR c++/65046
919         Automatically propagate ABI tags to variables and functions
920         from their (return) type.
921         * class.c (check_tag): Handle variables and functions.
922         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
923         (mark_or_check_tags): Likewise.
924         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
925         (check_abi_tags): Add single argument overload for decls.
926         Handle inheriting tags for decls.
927         * mangle.c (write_mangled_name): Call it.
928         (mangle_return_type_p): Split out from write_encoding.
929         (unmangled_name_p): Split out from write_mangled_name.
930         (write_mangled_name): Ignore abi_tag on namespace.
931         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
932         * parser.c (cp_parser_namespace_definition): Set it.
933         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
934         about abi_tag attribute on non-inline namespace.
935         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
936         (handle_abi_tag_attribute): Allow tags on variables.
938 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
940         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
941         attribute for DECL_EXTERNAL VAR_DECLs.
943 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
945         PR c++/65340
946         * call.c (build_over_call): Pass the tsubst_flags_t argument to
947         mark_used.
948         * decl2.c (mark_used): Inline the require_deduced_type call and
949         guard the error call.
951 2015-03-16  Jason Merrill  <jason@redhat.com>
953         PR c++/65061
954         * parser.c (cp_parser_template_name): Call strip_using_decl.
956 2015-03-16  Marek Polacek  <polacek@redhat.com>
958         DR 1688
959         PR c++/65327
960         * decl.c (grokdeclarator): Allow volatile and constexpr together.
962 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
964         PR c++/65323
965         * decl.c (check_default_argument): Don't call
966         maybe_warn_zero_as_null_pointer_constant.
968 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
970         * cp-gimplify.c (simple_empty_class_p): New.
971         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
972         the code for empty class copies into simple_empty_class_p, and
973         adapt it to handle COMPOUND_EXPRs.
975 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
977         PR c++/65370
978         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
979         only if the location of newdecl doesn't match the location of olddecl.
981 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
983         PR c++/65127
984         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
985         is not a PARM_DECL.
987 2015-03-10  Jason Merrill  <jason@redhat.com>
989         PR c++/65333
990         DR 1558
991         * pt.c (dependent_type_p_r): Check both class and alias template args.
993 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
995         PR c/65120
996         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
997         before preparing arguments to warn_logical_not_parentheses.
998         Use maybe_constant_value on rhs.
1000 2015-03-09  Jason Merrill  <jason@redhat.com>
1002         PR c++/65339
1003         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1005 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1007         PR c/65120
1008         * parser.c (cp_parser_binary_expression): Don't warn for
1009         !!x == y or !b == y where b is bool.
1011 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
1013         * ptree.c (cxx_print_lambda_node): New.
1014         (cxx_print_xnode): Handle LAMBDA_EXPR.
1016 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
1018         PR c++/65295
1019         * constexpr.c (cxx_eval_constant_expression): Remove assert in
1020         RESULT_DECL handling.
1022 2015-02-26  Marek Polacek  <polacek@redhat.com>
1024         PR c++/65202
1025         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1026         a RETURN_EXPR if its operand is null.
1028 2015-02-25  Jason Merrill  <jason@redhat.com>
1030         PR c++/65209
1031         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1032         DECL_COMDAT.
1033         (constrain_visibility_for_template): Handle reference arguments.
1035         PR debug/58315
1036         * decl.c (start_preparsed_function): Use create_artificial_label
1037         for cdtor_label.
1039 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
1040             Jakub Jelinek  <jakub@redhat.com>
1042         PR c++/65075
1043         * constexpr.c (check_constexpr_bind_expr_vars): Allow
1044         implicit typedefs for lambda types.
1046 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1048         PR c++/60894
1049         * decl.c (lookup_and_check_tag): Use strip_using_decl.
1051 2015-02-13  Jason Merrill  <jason@redhat.com>
1053         PR c++/65054
1054         * pt.c (template_args_equal): Look through conversions here.
1055         * tree.c (cp_tree_equal): Not here.
1057 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1059         PR c++/60211
1060         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1061         pragma_external context.
1063 2015-02-13  Jason Merrill  <jason@redhat.com>
1065         PR c++/65051
1066         * call.c (reference_binding): Don't look for bad conversion
1067         if TO is incomplete.
1069 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1071         PR c++/64970
1072         * decl.c (make_typename_type): Pass tsubst_flags_t argument
1073         to lookup_template_class.
1075 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
1077         PR ipa/65034
1078         * decl.c (start_preparsed_function): Use void_type_node instead
1079         of NULL_TREE as LABEL_DECL type.
1081 2015-02-12  Jason Merrill  <jason@redhat.com>
1083         PR c++/64898
1084         * mangle.c (write_mangled_name): Fix test for variable template
1085         instantiation.
1087         * decl.c (begin_destructor_body): Condition clobber on
1088         -flifetime-dse.
1090 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1092         PR c++/64959
1093         * parser.c (lookup_literal_operator): Return all candidates.
1094         (cp_parser_userdef_char_literal): Simplify error handling.
1095         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
1096         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1097         Also give higher priority to standard string UDL operator.
1099 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
1101         PR debug/55541
1102         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1103         * decl.c (poplevel): If functionbody, try not to create an extra
1104         BLOCK for function body and use subblocks as that, if it is non-NULL
1105         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
1106         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1108         PR sanitizer/64984
1109         * except.c (check_noexcept_r): Return NULL for internal
1110         calls.
1112 2015-02-10  Jason Merrill  <jason@redhat.com>
1114         PR c++/64994
1115         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1117 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
1119         PR ipa/64982
1120         * method.c (use_thunk): Do not check for stdarg thunks.
1122 2015-02-06  Jason Merrill  <jason@redhat.com>
1124         PR c++/64899
1125         * init.c (build_vec_init): Handle default-initialized array with
1126         constexpr default constructor.
1128 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1130         PR c/64824
1131         PR c/64868
1132         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1134 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1136         PR c++/64877
1137         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1138         for generated expressions.
1140 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1142         PR c++/64901
1143         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1144         DECL_OVERRIDE_P.
1146 2015-02-02  Jason Merrill  <jason@redhat.com>
1148         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1150 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
1152         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1153         changed to pass input_location as first argument.
1155 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
1157         PR c++/64717
1158         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1159         into SAVE_EXPR.
1161 2015-01-29  Jason Merrill  <jason@redhat.com>
1163         PR c++/49508
1164         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1165         erroneous return statement.
1167         PR c++/64521
1168         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1169         point.
1171 2015-01-27  Caroline Tice  <cmtice@google.com>
1173         Committing VTV Cywin/Ming patch for Patrick Wollgast
1174         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1175         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1177 2015-01-27  Jason Merrill  <jason@redhat.com>
1179         PR c++/58597
1180         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1181         current_function_decl.
1183         PR c++/63889
1184         * pt.c (finish_template_variable): Move from semantics.c.
1185         Handle multiple template arg levels.  Handle coercion here.
1186         (lookup_template_variable): Not here.
1188 2015-01-23  Jason Merrill  <jason@redhat.com>
1190         PR c++/64314
1191         PR c++/57510
1192         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1193         that has been completely split out.
1195         PR c++/64701
1196         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1197         statement codes.
1199         PR c++/64727
1200         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1201         of CONST_DECL.
1203 2015-01-21  Jason Merrill  <jason@redhat.com>
1205         PR c++/64603
1206         * constexpr.c (cxx_eval_constant_expression): Only shortcut
1207         constant CONSTRUCTORs.
1209         PR c++/64647
1210         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1211         give a hard error in a template instantiation.
1213 2015-01-21  Richard Biener  <rguenther@suse.de>
1215         PR middle-end/64313
1216         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1217         for builtins the user declared correctly.
1219 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1221         PR c++/58614
1222         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1223         TREE_TYPE (elt) == error_mark_node.
1225 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
1227         PR tree-optimization/62053
1228         * tree.c (build_cplus_array_type): Layout type after variants are set.
1230 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
1232         * cp-gimplify.c (cp_genericize_r): Call
1233         cp_ubsan_maybe_instrument_member_call for member calls.
1234         (cp_ubsan_check_member_access_r): New function.
1235         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1236         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1237         cp_ubsan_instrument_member_accesses,
1238         cp_ubsan_maybe_instrument_downcast,
1239         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1240         * cp-ubsan.c: New file.
1241         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1242         * constexpr.c (cxx_eval_call_expression): Return void_node
1243         for IFN_UBSAN_VPTR.
1244         (potential_constant_expression_1): Return true for
1245         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1246         * typeck.c (build_class_member_access_expr): Provide locus
1247         for COMPONENT_REFs.
1248         (build_static_cast_1): Instrument downcasts.
1249         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1250         add ubsan instrumentation for virtual_access.
1251         * call.c: Include internal-fn.h.
1252         (set_flags_from_callee): Handle internal calls.
1254 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
1256         PR c++/59366
1257         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1258         and function templates, declared only in the class.
1259         * decl.c (duplicate_decls): Reveal hidden friend functions or
1260         function templates, if they are redeclared outside the class.
1262 2015-01-15  Jason Merrill  <jason@redhat.com>
1264         PR c++/64356
1265         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1267         PR c++/63283
1268         * constexpr.c (potential_constant_expression_1): Handle reference
1269         args in templates.
1271 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1272             James Norris  <jnorris@codesourcery.com>
1273             Cesar Philippidis  <cesar@codesourcery.com>
1274             Ilmir Usmanov  <i.usmanov@samsung.com>
1275             Jakub Jelinek  <jakub@redhat.com>
1277         * parser.c: Include "gomp-constants.h".
1278         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1279         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1280         Use OMP_CLAUSE_SET_MAP_KIND.
1281         (cp_parser_omp_construct, cp_parser_pragma): Handle
1282         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1283         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1284         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1285         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1286         "create", "delete", "deviceptr", "host", "num_gangs",
1287         "num_workers", "present", "present_or_copy", "pcopy",
1288         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1289         "present_or_create", "pcreate", "vector_length", "wait".
1290         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1291         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1292         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1293         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1294         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1295         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1296         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1297         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1298         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1299         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1300         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1301         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1302         (cp_parser_oacc_parallel, cp_parser_oacc_update)
1303         (cp_parser_oacc_wait): New functions.
1304         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1305         (finish_oacc_parallel): New prototypes.
1306         * semantics.c: Include "gomp-constants.h".
1307         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1308         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1309         OMP_CLAUSE_SET_MAP_KIND.
1310         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1311         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1312         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1313         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1314         functions.
1316 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
1318         PR c++/58671
1319         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1320         self-initialization.
1322 2015-01-13  Jason Merrill  <jason@redhat.com>
1324         PR c++/64356
1325         PR libstdc++/58777
1326         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1327         pointer expressions.
1328         (cxx_eval_increment_expression): Likewise.
1330         PR c++/64514
1331         * pt.c (coerce_template_parameter_pack): Return NULL for a
1332         zero-length fixed parameter pack with a pack expansion arg.
1334         PR c++/64520
1335         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1337 2015-01-12  Jason Merrill  <jason@redhat.com>
1339         PR c++/64547
1340         * constexpr.c (cxx_eval_call_expression): A call to a void
1341         function doesn't need to return a value.
1343 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1345         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1346         input.h, alias.h, symtab.h, options.h, fold-const.h,
1347         wide-int.h, and inchash.h due to flattening of tree.h.
1348         * class.c: Ditto.
1349         * constexpr.c: Ditto.
1350         * cp-array-notation.c: Ditto.
1351         * cp-gimplify.c: Ditto.
1352         * cp-lang.c: Ditto.
1353         * cp-objcp-common.c: Ditto.
1354         * cvt.c: Ditto.
1355         * decl2.c: Ditto.
1356         * decl.c: Ditto.
1357         * dump.c: Ditto.
1358         * error.c: Ditto.
1359         * except.c: Ditto.
1360         * expr.c: Ditto.
1361         * friend.c: Ditto.
1362         * init.c: Ditto.
1363         * lambda.c: Ditto.
1364         * lex.c: Ditto.
1365         * mangle.c: Ditto.
1366         * name-lookup.c: Ditto.
1367         * optimize.c: Ditto.
1368         * parser.c: Ditto.
1369         * pt.c: Ditto.
1370         * ptree.c: Ditto.
1371         * repo.c: Ditto.
1372         * rtti.c: Ditto.
1373         * search.c: Ditto.
1374         * semantics.c: Ditto.
1375         * tree.c: Ditto.
1376         * typeck2.c: Ditto.
1377         * typeck.c: Ditto.
1379 2015-01-08  Jason Merrill  <jason@redhat.com>
1381         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1382         * decl.c (compute_array_index_type): Likewise.
1383         * init.c (build_vec_init): Likewise.
1384         * typeck.c (cp_build_binary_op): Likewise.
1386 2015-01-08  Jason Merrill  <jason@redhat.com>
1388         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1389         whether an initializer-list is too big for a VLA.
1390         (throw_bad_array_length): Remove.
1391         * cp-tree.h: Remove prototype.
1393 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
1395         PR c++/60753
1396         * decl.c (grokfndecl): Add bool parameter.
1397         (grokdeclarator): Adjust calls.
1398         (start_decl): Don't set DECL_DELETED_FN here.
1400 2015-01-06  Jason Merrill  <jason@redhat.com>
1402         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1403         template-ids.
1405         PR c++/64455
1406         * pt.c (type_dependent_expression_p): Handle variable templates.
1407         * constexpr.c (potential_constant_expression_1): Use it.
1409         PR c++/64487
1410         * semantics.c (finish_offsetof): Handle templates here.
1411         * parser.c (cp_parser_builtin_offsetof): Not here.
1413         PR c++/64496
1414         * semantics.c (process_outer_var_ref): Diagnose lambda in local
1415         class NSDMI.
1417 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1419         PR c++/64489
1420         * class.c (check_field_decls): Make copy assignment operators
1421         complex only in c++98 mode.
1423 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1425         PR c++/31397
1426         * class.c (check_for_override): Warn when a virtual function is an
1427         override not marked override.
1429 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1431         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1432         hold base_fndecls.
1433         (get_basefndecls): Adjust.
1435 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1437         Update copyright years.
1439 2015-01-05  Marek Polacek  <polacek@redhat.com>
1441         PR c/64423
1442         * typeck.c (cp_build_array_ref): Pass loc down to
1443         warn_array_subscript_with_type_char.
1446 Copyright (C) 2015 Free Software Foundation, Inc.
1448 Copying and distribution of this file, with or without modification,
1449 are permitted in any medium without royalty provided the copyright
1450 notice and this notice are preserved.