/cp
[official-gcc.git] / gcc / cp / ChangeLog
blob89e43735a05a931ab9db2f492339c0dc61039ca3
1 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
3         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
5 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
7         * decl.c (grokdeclarator): Remove pointless code.
9 2015-06-22  Jason Merrill  <jason@redhat.com>
11         PR c++/66515
12         * call.c (implicit_conversion): Only reshape for classes.
14 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
16         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
17         manually swapping.
18         * semantics.c (finish_omp_atomic): Likewise.
19         * typeck.c (cp_build_array_ref): Likewise.
21 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
23         PR c++/65882
24         * call.c (build_new_op_1): Check tf_warning flag in all cases.
26 2015-06-19  Jason Merrill  <jason@redhat.com>
28         PR c++/66585
29         * pt.c (instantiate_class_template_1): Clear
30         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
32         PR c++/65880
33         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
34         cv-qualifiers.
35         * typeck.c (merge_types): build_ptrmemfunc_type before applying
36         quals and attributes.
38         PR c++/65973
39         * constexpr.c (build_constexpr_constructor_member_initializers):
40         Handle an empty STATEMENT_LIST.
42         PR c++/65843
43         * pt.c (tsubst_copy_and_build): Register a capture proxy in
44         local_specializations.
46 2015-06-17  Jason Merrill  <jason@redhat.com>
48         PR c++/66001
49         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
50         TRY_FINALLY_EXPR.
51         (potential_constant_expression_1): Likewise.
53 2015-06-17  Jason Merrill  <jason@redhat.com>
55         PR c++/66515
56         * call.c (implicit_conversion): Call reshape_init here, early.
57         (build_aggr_conv): Not here.
59 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
61         PR c++/66571
62         * pt.c (tsubst_omp_clause_decl): New function.
63         (tsubst_omp_clauses): Use it or tsubst_copy instead of
64         tsubst_expr on OMP_CLAUSE_DECL.
66 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
68         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
69         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
70         * decl.c (grokdeclarator, xref_tag_1): Likewise.
71         * error.c (dump_aggr_type): likewise.
72         * pt.c (push_template_decl_real): Likewise.
73         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
75 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
77         * call.c: Do not include input.h, line-map.h or is-a.h.
78         * class.c: Likewise.
79         * constexpr.c: Likewise.
80         * cp-array-notation.c: Likewise.
81         * cp-gimplify.c: Likewise.
82         * cp-lang.c: Likewise.
83         * cp-objcp-common.c: Likewise.
84         * cp-tree.h: Likewise.
85         * cp-ubsan.c: Likewise.
86         * cvt.c: Likewise.
87         * decl.c: Likewise.
88         * decl2.c: Likewise.
89         * dump.c: Likewise.
90         * error.c: Likewise.
91         * except.c: Likewise.
92         * expr.c: Likewise.
93         * friend.c: Likewise.
94         * init.c: Likewise.
95         * lambda.c: Likewise.
96         * lex.c: Likewise.
97         * mangle.c: Likewise.
98         * method.c: Likewise.
99         * name-lookup.c: Likewise.
100         * optimize.c: Likewise.
101         * parser.c: Likewise.
102         * pt.c: Likewise.
103         * ptree.c: Likewise.
104         * repo.c: Likewise.
105         * rtti.c: Likewise.
106         * search.c: Likewise.
107         * semantics.c: Likewise.
108         * tree.c: Likewise.
109         * typeck.c: Likewise.
110         * typeck2.c: Likewise.
111         * vtable-class-hierarchy.c: Likewise.
113 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
115         PR c++/59682
116         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
118 2015-06-16  Jason Merrill  <jason@redhat.com>
120         PR c++/66536
121         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
122         mismatch.
124         PR c++/58063
125         * tree.c (bot_manip): Remap SAVE_EXPR.
127         PR c++/66387
128         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
130 2015-06-15  Nathan Sidwell  <nathan@acm.org>
132         PR c++/58583
133         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
134         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
135         protect it from recursive instantiation.
137 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
139         PR c++/51048
140         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
141         using a local type is pure virtual.
143 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
145         * call.c: Remove comment documenting the long-deleted
146         function build_method_call.
148 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
150         PR c++/65168
151         * typeck.c (cp_build_binary_op): Warn when comparing an address
152         of a reference against NULL.
154 2015-06-12  Jason Merrill  <jason@redhat.com>
156         PR c++/65719
157         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
158         variables as DECL_NOT_REALLY_EXTERN.
160 2015-06-11  Jason Merrill  <jason@redhat.com>
162         PR c++/66445
163         * constexpr.c (potential_constant_expression_1): Handle a
164         DECL_EXPR of TYPE_DECL.
166         PR c++/66450
167         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
168         ctx->ctor.
170 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
172         * decl.c (cxx_init_decl_processing): Register the main
173         translation unit through the new debug hook.
175 2015-06-10  Jason Merrill  <jason@redhat.com>
177         PR c++/66289
178         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
179         * pt.c (push_template_decl_real): Set it.
180         (dependent_alias_template_spec_p): Use it.
181         (dependent_type_p_r): Use dependent_alias_template_spec_p.
182         (uses_all_template_parms_data, uses_all_template_parms_r)
183         (complex_alias_template_p): New.
184         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
186 2015-06-09  Jason Merrill  <jason@redhat.com>
188         DR 1467
189         PR c++/51747
190         * typeck2.c (digest_init_r): Replace previous change with
191         gcc_unreachable.
193         PR c++/66387
194         * semantics.c (process_outer_var_ref): Make sure the value is
195         actually constant before returning it.
196         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
197         array.
199 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
201         PR c++/65815
202         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
203         * init.c (expand_default_init): Likewise.
205 2015-06-09  Jason Merrill  <jason@redhat.com>
207         PR c++/66383
208         * tree.c (replace_placeholders_r): Handle placeholders for an
209         outer object.
210         * typeck2.c (store_init_value): Only replace_placeholders for
211         objects of class type.
213 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
215         * call.c : Adjust include files.
216         * class.c : Likewise.
217         * constexpr.c : Likewise.
218         * cp-array-notation.c : Likewise.
219         * cp-cilkplus.c : Likewise.
220         * cp-gimplify.c : Likewise.
221         * cp-lang.c : Likewise.
222         * cp-objcp-common.c : Likewise.
223         * cp-tree.h : Likewise.
224         * cp-ubsan.c : Likewise.
225         * cvt.c : Likewise.
226         * decl.c : Likewise.
227         * decl2.c : Likewise.
228         * dump.c : Likewise.
229         * error.c : Likewise.
230         * except.c : Likewise.
231         * expr.c : Likewise.
232         * friend.c : Likewise.
233         * init.c : Likewise.
234         * lambda.c : Likewise.
235         * lex.c : Likewise.
236         * mangle.c : Likewise.
237         * method.c : Likewise.
238         * name-lookup.c : Likewise.
239         * optimize.c : Likewise.
240         * parser.c : Likewise.
241         * pt.c : Likewise.
242         * ptree.c : Likewise.
243         * repo.c : Likewise.
244         * rtti.c : Likewise.
245         * search.c : Likewise.
246         * semantics.c : Likewise.
247         * tree.c : Likewise.
248         * typeck.c : Likewise.
249         * typeck2.c : Likewise.
250         * vtable-class-hierarchy.c : Likewise.
252 2015-06-05  Jason Merrill  <jason@redhat.com>
254         PR c++/66405
255         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
256         the expansion has extra args.
257         (use_pack_expansion_extra_args_p): Return true in that case.
259         PR c++/66405
260         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
261         dependent even if it has a type.
263 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
265         * cp-objcp-common.c: Adjust comment for
266         cxx_warn_unused_global_decl.
267         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
268         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
269         * cp-tree.h (note_mangling_alias): Protoize.
270         (cp_write_global_declarations): Remove.
271         (cxx_post_compilation_parsing_cleanups): Protoize.
272         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
273         argument.
274         * decl2.c (mangling_aliases): New global.
275         (build_java_method_aliases): New.  Adapted from
276         collect_candidates_for_java_method_aliases.
277         (collect_candidates_for_java_method_aliases): Remove.
278         (build_java_method_aliases): Remove.
279         (generate_mangling_aliases): New.
280         (note_mangling_alias): New.  Moved from mangle_decl.
281         (locus_at_end_of_parsing): New global.
282         (c_parse_final_cleanups): Rename from
283         cp_write_global_declarations.
284         Use locus_at_end_of_parsing.
285         Call generate_mangling_aliases.
286         Rename call to collect_candidates_for_java_method_aliases into
287         build_java_method_aliases.
288         Remove call to finalize_compilation_unit.
289         Move vtable handling into cxx_post_compilation_parsing_cleanups.
290         Do not call check_global_declarations or
291         emit_debug_global_declarations.
292         (cxx_post_compilation_parsing_cleanups): New.
293         * mangle.c (mangle_decl): Move code to note_mangling_alias.
294         * name-lookup.c (do_namespace_alias): Call early_global_decl.
296 2015-06-05  Nathan Sidwell  <nathan@acm.org>
298         PR c++/52595
299         * parser.c (cp_parser_cache_defarg): Continue looking for
300         declarators when scanning a potential template argument list of an
301         NSDMI.
303 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
305         * call.c: Adjust includes for restructured coretypes.h.
306         * class.c: Likewise.
307         * constexpr.c: Likewise.
308         * cp-array-notation.c: Likewise.
309         * cp-gimplify.c: Likewise.
310         * cp-lang.c: Likewise.
311         * cp-objcp-common.c: Likewise.
312         * cp-tree.h: Likewise.
313         * cp-ubsan.c: Likewise.
314         * cvt.c: Likewise.
315         * decl.c: Likewise.
316         * decl2.c: Likewise.
317         * dump.c: Likewise.
318         * error.c: Likewise.
319         * except.c: Likewise.
320         * expr.c: Likewise.
321         * friend.c: Likewise.
322         * init.c: Likewise.
323         * lambda.c: Likewise.
324         * lex.c: Likewise.
325         * mangle.c: Likewise.
326         * method.c: Likewise.
327         * name-lookup.c: Likewise.
328         * optimize.c: Likewise.
329         * parser.c: Likewise.
330         * pt.c: Likewise.
331         * ptree.c: Likewise.
332         * repo.c: Likewise.
333         * rtti.c: Likewise.
334         * search.c: Likewise.
335         * semantics.c: Likewise.
336         * tree.c: Likewise.
337         * typeck.c: Likewise.
338         * typeck2.c: Likewise.
339         * vtable-class-hierarchy.c: Likewise.
341 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
343         PR c++/66192
344         PR target/66200
345         * cp-tree.h (get_guard_cond): Adjust declaration
346         * decl.c (expand_static_init): Use atomic load acquire
347         and adjust call to get_guard_cond.
348         * decl2.c (build_atomic_load_byte): New function.
349         (get_guard_cond): Handle thread_safety.
350         (one_static_initialization_or_destruction): Adjust call to
351         get_guard_cond.
353 2015-06-03  Jason Merrill  <jason@redhat.com>
355         PR c++/44282
356         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
357         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
358         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
359         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
361 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
362             Paolo Carlini  <paolo.carlini@oracle.com>
364         PR c++/66130
365         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
366         use it in the diagnostic.
367         (decay_conversion): Adjust call.
368         * semantics.c (finish_decltype_type): Likewise.
369         * call.c (resolve_args, build_new_op_1,
370         perform_implicit_conversion_flags): Adjust calls.
371         * cvt.c (ocp_convert, convert_to_void): Likewise.
372         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
374 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
376         * decl.c (check_tag_decl): Use declspecs->locations as locations in
377         error_at and warning_at calls.
379 2015-06-03  Marek Polacek  <polacek@redhat.com>
381         PR sanitizer/66190
382         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
383         (cp_genericize_r): Don't instrument static initializers.
384         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
386 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
388         * decl.c (start_function): Call plugin before parsing.
389         (finish_function): Call plugin after parsing.
391 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
393         * cp-tree.h (init_error): Remove declaration.
394         * error.c (scratch_pretty_printer): Rename to ...
395         (actual_pretty_printer): ... this.
396         (cxx_pp): Constify and update accordingly.
397         (init_error): Remove definition.
398         * lex.c (cxx_init): Do not call init_error.
400 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
402         PR c++/61683
403         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
405 2015-06-01  Jason Merrill  <jason@redhat.com>
407         PR c++/65942
408         * decl2.c (mark_used): Don't always instantiate constexpr fns.
409         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
411         PR c++/44282
412         * mangle.c (attr_strcmp): New.
413         (write_CV_qualifiers_for_type): Also write out attributes that
414         affect type identity.
415         (write_type): Strip all attributes after writing qualifiers.
417 2015-05-31  Jason Merrill  <jason@redhat.com>
419         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
421         PR c++/66320
422         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
423         with the wrong type as non-constant.
425 2015-05-27  Jason Merrill  <jason@redhat.com>
427         * decl.c (check_redeclaration_exception_specification): Depend on
428         -Wsystem-headers rather than -pedantic.
430         * decl.c (warn_extern_redeclared_static): Use the location of
431         newdecl in diagnostics, not input_location.
432         (validate_constexpr_redeclaration): Likewise.
433         (check_redeclaration_no_default_args): Likewise.
434         (duplicate_decls): Likewise.
435         (check_redeclaration_exception_specification): Likewise.
436         Change second diagnostic to inform.
438 2015-05-24  Nathan Sidwell  <nathan@acm.org>
440         PR c++/66243
441         * decl.c (build_enumerator): Don't silently convert scoped enums.
443 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
445         PR lto/66180
446         * mangle.c (mangle_decl): Mangle anonymous namespace types as
447         "<anon>".
449 2015-05-23  Nathan Sidwell  <nathan@acm.org>
451         PR c++/65936
452         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
454 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
456         * Make-lang.in (check_g++_parallelize): Update comment.
458 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
460         PR c++/65598
461         * decl.c (grokdeclarator): Use the correct location in error
462         messages about 'explicit'.
464 2015-05-22  Marek Polacek  <polacek@redhat.com>
465             Edward Smith-Rowland  <3dw4rd@verizon.net>
467         PR c/47043
468         * cp-tree.h (build_enumerator): Update declaration.
469         * decl.c (build_enumerator): Add attributes parameter.  Call
470         cplus_decl_attributes.
471         * init.c (constant_value_1): Pass tf_none to mark_used.
472         * parser.c (cp_parser_enumerator_definition): Parse attributes and
473         pass them down to build_enumerator.
474         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
475         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
477 2015-05-21  Nathan Sidwell  <nathan@acm.org>
479         PR c++/60943
480         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
482 2015-05-21  Marek Polacek  <polacek@redhat.com>
484         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
486 2015-05-20  Jason Merrill  <jason@redhat.com>
488         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
489         before register_specialization.
491         * decl.c (grok_op_properties): Don't complain about size_t
492         placement delete here.
493         * call.c (second_parm_is_size_t): Split out from...
494         (non_placement_deallocation_fn_p): ...here.
495         (build_op_delete_call): Warn about size_t placement delete with
496         -Wc++14-compat.
498 2015-05-19  Nathan Sidwell  <nathan@acm.org>
500         PR c++/65954
501         * typeck.c (finish_class_member_access_expr): Diagnose failed
502         lookup of enum class member.
504 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
506         PR middle-end/66199
507         * parser.c (cp_parser_omp_for_loop): Don't add
508         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
509         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
510         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
511         constructs.
513 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
515         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
516         swaps.
518 2015-05-18  Jason Merrill  <jason@redhat.com>
520         * pt.c (retrieve_specialization): Make sure our arguments have
521         gone through strip_typedefs.
523         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
524         (determine_specialization): Call coerce_template_parms.
526         DR 1391
527         * pt.c (type_unification_real): Check convertibility here.
528         (unify_one_argument): Not here.
530         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
531         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
532         [TREE_LIST]: Fix no-change case.
534         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
536 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
538         PR fortran/44054
539         * error.c (cp_diagnostic_starter): Use diagnostic_location
540         function.
541         (cp_print_error_function): Likewise.
542         (cp_printer): Replace locus pointer with accessor function.
544 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
546         * parser.c (cp_parser_selection_statement): Add location and
547         guard_kind arguments to calls to
548         cp_parser_implicitly_scoped_statement.
549         (cp_parser_iteration_statement): Likewise for calls to
550         cp_parser_already_scoped_statement.
551         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
552         "guard_kind" params; use them to warn for misleading
553         indentation.
554         (cp_parser_already_scoped_statement): Likewise.
556 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
558         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
559         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
560         * semantics.c (finish_member_declaration): Likewise.
561         * method.c (lazily_declare_fn): Allways add method to main variant list.
563 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
565         PR bootstrap/66085
566         * decl2.c (note_mangling_alias): Declare arguments as unused.
568 2015-05-08  Jason Merrill  <jason@redhat.com>
570         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
571         -Wc++0x-compat.
573 2015-05-08  Jason Merrill  <jason@redhat.com>
575         * decl2.c (mangling_aliases): New variable.
576         (note_mangling_alias, generate_mangling_aliases): New.
577         (cp_write_global_declarations): Call generate_mangling_aliases.
578         (generate_mangling_alias): Split out from...
579         * mangle.c (mangle_decl): ...here.
580         * cp-tree.h: Declare note_mangling_alias.
582 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
584         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
585         (build_java_method_aliases): Adapt to use create_same_body_alias
586         instead of assemble_alias.  Move variable declarations to
587         definition and tidy up.
588         (cp_write_global_declarations): Call build_java_method_aliases
589         instead of collecting candidates first.
591 2015-05-07  Jason Merrill  <jason@redhat.com>
593         PR c++/59012
594         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
595         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
596         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
597         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
598         (apply_late_template_attributes): Handle attribute pack expansion.
600 2015-05-07  Marek Polacek  <polacek@redhat.com>
602         PR c/65179
603         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
604         value.
606 2015-05-07  Jason Merrill  <jason@redhat.com>
608         DR 1467
609         PR c++/51747
610         * typeck2.c (digest_init_r): Fix single element list.
612 2015-05-05  Jason Merrill  <jason@redhat.com>
614         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
615         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
616         MUST_NOT_THROW_EXPR.
617         (cp_genericize_data): Add try_block field.
618         (cp_genericize_tree): Initialize it.
619         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
620         implicit rethrow.
622         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
623         Return false.
625         * semantics.c (finish_call_expr): Check complain.
627         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
628         maybe-in-charge constructor.
630         * decl.c (start_decl): Don't push the plain VAR_DECL for a
631         variable template.
633         DR 1518
634         DR 1630
635         PR c++/54835
636         PR c++/60417
637         * call.c (convert_like_real): Check value-initialization before
638         explicit.
639         * typeck2.c (process_init_constructor_record): Don't set
640         CONSTRUCTOR_IS_DIRECT_INIT.
641         (process_init_constructor_array): Likewise.
642         * init.c (build_vec_init): Likewise.
644 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
646         * parser.c (cp_parser_asm_definition): Only test for
647         error_mark_node if "outputs" was just set.  Likewise for "inputs".
649 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
650             Jakub Jelinek  <jakub@redhat.com>
652         PR c++/66007
653         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
654         result in an actual error.
656 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
657             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
659         PR c++/65858
660         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
661         false.
663 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
665         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
666         trailing semicolon.
668 2015-04-29  Jason Merrill  <jason@redhat.com>
670         PR c++/50800
671         * tree.c (apply_identity_attributes): Fix handling of classes.
673 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
675         * parser.c (cp_parser_oacc_enter_exit_data): Use
676         OMP_STANDALONE_CLAUSES.
678 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
680         PR c++/64667
681         * init.c (perform_member_init): Handle references for -Winit-self.
683 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
685         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
686         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
688 2015-04-28  Jason Merrill  <jason@redhat.com>
690         PR c++/65896
691         * constexpr.c (cxx_eval_store_expression): Don't try to actually
692         store an empty class.
694         PR c++/65656
695         * constexpr.c (cxx_eval_builtin_function_call): Fix
696         __builtin_constant_p.
698         PR c++/50800
699         * tree.c (strip_typedefs): Add remove_attributes parm.
700         (strip_typedefs_expr): Likewise.
701         (apply_identity_attributes): New subroutine of strip_typedefs.
702         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
703         (convert_nontype_argument, unify): Likewise.
704         * cp-tree.h: Adjust.
706         PR c++/65734
707         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
709 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
711         * class.c (layout_class_type): Remove check if
712         PCC_BITFIELD_TYPE_MATTERS is defined.
714 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
716         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
718 2015-04-24  Jason Merrill  <jason@redhat.com>
720         PR c++/50800
721         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
723         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
724         Remove obsolete code.
725         [NE_EXPR]: Likewise.
727 2015-04-23  Jason Merrill  <jason@redhat.com>
729         PR c++/65646
730         * pt.c (check_explicit_specialization): Don't
731         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
732         headers.
733         * decl.c (grokvardecl): Revert earlier fix.
735 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
737         PR c++/65801
738         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
739         suppresses the diagnostic.
741 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
743         Reject trailing return type for an operator auto().
744         * decl.c (grokdeclarator): Reject trailing return types for
745         all conversion operators, don't handle conversion operators
746         in the previous checks that deal with auto.
748 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
750         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
752 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
754         * class.c (resolve_address_of_overloaded_function, instantiate_type):
755         Rename tsubst_flags_t parameter flags -> complain.
757 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
759         * call.c (build_op_delete_call, build_over_call): Check mark_used
760         return value.
761         * class.c (resolve_address_of_overloaded_function): Likewise.
762         * decl.c (cxx_maybe_build_cleanup): Likewise.
763         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
764         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
765         * rtti.c (build_dynamic_cast_1): Likewise.
766         * semantics.c (process_outer_var_ref): Likewise.
767         * typeck.c (build_class_member_access_expr,
768         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
770 2015-04-15  Jason Merrill  <jason@redhat.com>
772         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
773         (build_constexpr_constructor_member_initializers): Loop to find
774         the BIND_EXPR.
775         * decl.c (start_preparsed_function): Clobber the object at the
776         beginning of a constructor.
778         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
779         * method.c (implicitly_declare_fn): Likewise.
780         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
782         * decl2.c (determine_visibility): Use get_template_info.
784 2015-04-15  Jason Merrill  <jason@redhat.com>
785             Marek Polacek  <polacek@redhat.com>
787         PR c++/65727
788         * lambda.c (lambda_expr_this_capture): In unevaluated context go
789         through the normal loop, just don't capture.
790         (maybe_resolve_dummy): Handle null return.
792 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
794         * call.c (enforce_access): Emit error + inform.
796 2015-04-15  Marek Polacek  <polacek@redhat.com>
798         * constexpr.c (use_new_call): Remove #define.
799         (lookup_parameter_binding): Remove function.
800         (cxx_bind_parameters_in_call): Remove unused code.
801         (cxx_eval_call_expression): Likewise.
802         (cxx_eval_constant_expression): Likewise.
804 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
806         * tree.c (replace_placeholders_t): Remove unused type.
807         (replace_placeholders): Remove unused pset.
809 2015-04-14  Jason Merrill  <jason@redhat.com>
811         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
813         PR c++/65695
814         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
816         PR c++/65721
817         * name-lookup.c (do_class_using_decl): Complain about specifying
818         the current class even if there are dependent bases.
820 2015-04-14  David Krauss  <david_work@me.com>
822         PR c++/59766
823         * decl.c (grokdeclarator): Do not flag friends with deduced return.
825 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
826             Jason Merrill  <jason@redhat.com>
828         PR c++/60994
829         * parser.c (cp_parser_class_name): Add enum_ok parameter.
830         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
831         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
832         a class template.
834 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
836         PR c++/65736
837         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
838         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
839         the expression to the original type at the end.
841 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
843         PR c++/65690
844         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
845         TYPE_USER_ALIGN.
847         PR c++/65690
848         * tree.c (build_cplus_array_type): Layout type before variants are
849         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
850         variant.
852 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
854         PR c++/64085
855         * lambda.c (add_capture): Use dependent_type_p for capture by
856         reference too.
858 2015-04-02  Marek Polacek  <polacek@redhat.com>
860         PR c++/65642
861         * constexpr.c (cxx_eval_pointer_plus_expression): Call
862         cxx_eval_constant_expression on the first operand.
864 2015-04-01  Jason Merrill  <jason@redhat.com>
866         PR c++/65625
867         * decl.c (make_typename_type): Handle seeing a variable template.
869 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
871         PR c++/56100
872         * pt.c (instantiating_current_function_p): New.
873         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
874         * cp-tree.h (instantiating_current_function_p): Declare.
876 2015-04-01  Jason Merrill  <jason@redhat.com>
878         PR c++/65646
879         * decl.c (grokvardecl): Don't call check_explicit_specialization
880         for non-template members of a class template.
882 2015-04-01  Marek Polacek  <polacek@redhat.com>
884         PR c++/65554
885         * class.c (finish_struct): Require that the second field of a
886         user-defined initializer_list be of size type.
888 2015-03-31  Marek Polacek  <polacek@redhat.com>
890         PR c++/65390
891         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
892         checking for constness.
894 2015-03-30  Marek Polacek  <polacek@redhat.com>
896         PR c++/65398
897         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
898          *(&A[i] p+ j) => A[i + j] transformation here.
899         (cxx_eval_pointer_plus_expression): New function.
900         (cxx_eval_constant_expression): Use it here.
902 2015-03-27  Tobias Burnus  <burnus@net-b.de>
904         PR c/65586
905         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
906         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
907         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
908         -fopenmp-simd.
910 2015-03-27  Marek Polacek  <polacek@redhat.com>
912         PR c++/65556
913         * semantics.c (finish_switch_cond): If the unlowered type is not an
914         enum, use the type of the condition.
916 2015-03-27  Jason Merrill  <jason@redhat.com>
918         PR c++/65509
919         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
920         constants.
922 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
924         PR c++/65154
925         * init.c (build_vec_init): Fix initializing aggregates
926         with empty init list.
928 2015-03-26  Jason Merrill  <jason@redhat.com>
930         PR c++/65525
931         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
933 2015-03-25  Marek Polacek  <polacek@redhat.com>
935         PR c++/65558
936         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
937         on an anonymous namespace.
939 2015-03-25  Marek Polacek  <polacek@redhat.com>
941         PR c++/61670
942         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
944 2015-03-24  Jason Merrill  <jason@redhat.com>
946         PR c++/65046
947         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
948         * parser.c (cp_parser_namespace_definition): Don't set it.
949         * name-lookup.c (handle_namespace_attrs): Check
950         DECL_NAMESPACE_ASSOCIATIONS instead.
952         PR c++/65498
953         * pt.c (get_mostly_instantiated_function_type): Just return the
954         type of the partially instantiated template in DECL_TI_TEMPLATE.
956 2015-03-20  Marek Polacek  <polacek@redhat.com>
958         PR c++/65398
959         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
960         A[i + j].
962 2015-03-20  Marek Polacek  <polacek@redhat.com>
964         PR c++/65072
965         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
966         variant.
968 2015-03-19  Jason Merrill  <jason@redhat.com>
970         PR c++/65046
971         Automatically propagate ABI tags to variables and functions
972         from their (return) type.
973         * class.c (check_tag): Handle variables and functions.
974         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
975         (mark_or_check_tags): Likewise.
976         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
977         (check_abi_tags): Add single argument overload for decls.
978         Handle inheriting tags for decls.
979         * mangle.c (write_mangled_name): Call it.
980         (mangle_return_type_p): Split out from write_encoding.
981         (unmangled_name_p): Split out from write_mangled_name.
982         (write_mangled_name): Ignore abi_tag on namespace.
983         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
984         * parser.c (cp_parser_namespace_definition): Set it.
985         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
986         about abi_tag attribute on non-inline namespace.
987         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
988         (handle_abi_tag_attribute): Allow tags on variables.
990 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
992         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
993         attribute for DECL_EXTERNAL VAR_DECLs.
995 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
997         PR c++/65340
998         * call.c (build_over_call): Pass the tsubst_flags_t argument to
999         mark_used.
1000         * decl2.c (mark_used): Inline the require_deduced_type call and
1001         guard the error call.
1003 2015-03-16  Jason Merrill  <jason@redhat.com>
1005         PR c++/65061
1006         * parser.c (cp_parser_template_name): Call strip_using_decl.
1008 2015-03-16  Marek Polacek  <polacek@redhat.com>
1010         DR 1688
1011         PR c++/65327
1012         * decl.c (grokdeclarator): Allow volatile and constexpr together.
1014 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1016         PR c++/65323
1017         * decl.c (check_default_argument): Don't call
1018         maybe_warn_zero_as_null_pointer_constant.
1020 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
1022         * cp-gimplify.c (simple_empty_class_p): New.
1023         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
1024         the code for empty class copies into simple_empty_class_p, and
1025         adapt it to handle COMPOUND_EXPRs.
1027 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
1029         PR c++/65370
1030         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1031         only if the location of newdecl doesn't match the location of olddecl.
1033 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1035         PR c++/65127
1036         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1037         is not a PARM_DECL.
1039 2015-03-10  Jason Merrill  <jason@redhat.com>
1041         PR c++/65333
1042         DR 1558
1043         * pt.c (dependent_type_p_r): Check both class and alias template args.
1045 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1047         PR c/65120
1048         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1049         before preparing arguments to warn_logical_not_parentheses.
1050         Use maybe_constant_value on rhs.
1052 2015-03-09  Jason Merrill  <jason@redhat.com>
1054         PR c++/65339
1055         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1057 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1059         PR c/65120
1060         * parser.c (cp_parser_binary_expression): Don't warn for
1061         !!x == y or !b == y where b is bool.
1063 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
1065         * ptree.c (cxx_print_lambda_node): New.
1066         (cxx_print_xnode): Handle LAMBDA_EXPR.
1068 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
1070         PR c++/65295
1071         * constexpr.c (cxx_eval_constant_expression): Remove assert in
1072         RESULT_DECL handling.
1074 2015-02-26  Marek Polacek  <polacek@redhat.com>
1076         PR c++/65202
1077         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1078         a RETURN_EXPR if its operand is null.
1080 2015-02-25  Jason Merrill  <jason@redhat.com>
1082         PR c++/65209
1083         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1084         DECL_COMDAT.
1085         (constrain_visibility_for_template): Handle reference arguments.
1087         PR debug/58315
1088         * decl.c (start_preparsed_function): Use create_artificial_label
1089         for cdtor_label.
1091 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
1092             Jakub Jelinek  <jakub@redhat.com>
1094         PR c++/65075
1095         * constexpr.c (check_constexpr_bind_expr_vars): Allow
1096         implicit typedefs for lambda types.
1098 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1100         PR c++/60894
1101         * decl.c (lookup_and_check_tag): Use strip_using_decl.
1103 2015-02-13  Jason Merrill  <jason@redhat.com>
1105         PR c++/65054
1106         * pt.c (template_args_equal): Look through conversions here.
1107         * tree.c (cp_tree_equal): Not here.
1109 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1111         PR c++/60211
1112         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1113         pragma_external context.
1115 2015-02-13  Jason Merrill  <jason@redhat.com>
1117         PR c++/65051
1118         * call.c (reference_binding): Don't look for bad conversion
1119         if TO is incomplete.
1121 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1123         PR c++/64970
1124         * decl.c (make_typename_type): Pass tsubst_flags_t argument
1125         to lookup_template_class.
1127 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
1129         PR ipa/65034
1130         * decl.c (start_preparsed_function): Use void_type_node instead
1131         of NULL_TREE as LABEL_DECL type.
1133 2015-02-12  Jason Merrill  <jason@redhat.com>
1135         PR c++/64898
1136         * mangle.c (write_mangled_name): Fix test for variable template
1137         instantiation.
1139         * decl.c (begin_destructor_body): Condition clobber on
1140         -flifetime-dse.
1142 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1144         PR c++/64959
1145         * parser.c (lookup_literal_operator): Return all candidates.
1146         (cp_parser_userdef_char_literal): Simplify error handling.
1147         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
1148         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1149         Also give higher priority to standard string UDL operator.
1151 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
1153         PR debug/55541
1154         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1155         * decl.c (poplevel): If functionbody, try not to create an extra
1156         BLOCK for function body and use subblocks as that, if it is non-NULL
1157         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
1158         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1160         PR sanitizer/64984
1161         * except.c (check_noexcept_r): Return NULL for internal
1162         calls.
1164 2015-02-10  Jason Merrill  <jason@redhat.com>
1166         PR c++/64994
1167         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1169 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
1171         PR ipa/64982
1172         * method.c (use_thunk): Do not check for stdarg thunks.
1174 2015-02-06  Jason Merrill  <jason@redhat.com>
1176         PR c++/64899
1177         * init.c (build_vec_init): Handle default-initialized array with
1178         constexpr default constructor.
1180 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1182         PR c/64824
1183         PR c/64868
1184         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1186 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1188         PR c++/64877
1189         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1190         for generated expressions.
1192 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1194         PR c++/64901
1195         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1196         DECL_OVERRIDE_P.
1198 2015-02-02  Jason Merrill  <jason@redhat.com>
1200         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1202 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
1204         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1205         changed to pass input_location as first argument.
1207 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
1209         PR c++/64717
1210         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1211         into SAVE_EXPR.
1213 2015-01-29  Jason Merrill  <jason@redhat.com>
1215         PR c++/49508
1216         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1217         erroneous return statement.
1219         PR c++/64521
1220         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1221         point.
1223 2015-01-27  Caroline Tice  <cmtice@google.com>
1225         Committing VTV Cywin/Ming patch for Patrick Wollgast
1226         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1227         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1229 2015-01-27  Jason Merrill  <jason@redhat.com>
1231         PR c++/58597
1232         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1233         current_function_decl.
1235         PR c++/63889
1236         * pt.c (finish_template_variable): Move from semantics.c.
1237         Handle multiple template arg levels.  Handle coercion here.
1238         (lookup_template_variable): Not here.
1240 2015-01-23  Jason Merrill  <jason@redhat.com>
1242         PR c++/64314
1243         PR c++/57510
1244         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1245         that has been completely split out.
1247         PR c++/64701
1248         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1249         statement codes.
1251         PR c++/64727
1252         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1253         of CONST_DECL.
1255 2015-01-21  Jason Merrill  <jason@redhat.com>
1257         PR c++/64603
1258         * constexpr.c (cxx_eval_constant_expression): Only shortcut
1259         constant CONSTRUCTORs.
1261         PR c++/64647
1262         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1263         give a hard error in a template instantiation.
1265 2015-01-21  Richard Biener  <rguenther@suse.de>
1267         PR middle-end/64313
1268         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1269         for builtins the user declared correctly.
1271 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1273         PR c++/58614
1274         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1275         TREE_TYPE (elt) == error_mark_node.
1277 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
1279         PR tree-optimization/62053
1280         * tree.c (build_cplus_array_type): Layout type after variants are set.
1282 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
1284         * cp-gimplify.c (cp_genericize_r): Call
1285         cp_ubsan_maybe_instrument_member_call for member calls.
1286         (cp_ubsan_check_member_access_r): New function.
1287         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1288         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1289         cp_ubsan_instrument_member_accesses,
1290         cp_ubsan_maybe_instrument_downcast,
1291         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1292         * cp-ubsan.c: New file.
1293         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1294         * constexpr.c (cxx_eval_call_expression): Return void_node
1295         for IFN_UBSAN_VPTR.
1296         (potential_constant_expression_1): Return true for
1297         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1298         * typeck.c (build_class_member_access_expr): Provide locus
1299         for COMPONENT_REFs.
1300         (build_static_cast_1): Instrument downcasts.
1301         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1302         add ubsan instrumentation for virtual_access.
1303         * call.c: Include internal-fn.h.
1304         (set_flags_from_callee): Handle internal calls.
1306 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
1308         PR c++/59366
1309         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1310         and function templates, declared only in the class.
1311         * decl.c (duplicate_decls): Reveal hidden friend functions or
1312         function templates, if they are redeclared outside the class.
1314 2015-01-15  Jason Merrill  <jason@redhat.com>
1316         PR c++/64356
1317         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1319         PR c++/63283
1320         * constexpr.c (potential_constant_expression_1): Handle reference
1321         args in templates.
1323 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1324             James Norris  <jnorris@codesourcery.com>
1325             Cesar Philippidis  <cesar@codesourcery.com>
1326             Ilmir Usmanov  <i.usmanov@samsung.com>
1327             Jakub Jelinek  <jakub@redhat.com>
1329         * parser.c: Include "gomp-constants.h".
1330         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1331         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1332         Use OMP_CLAUSE_SET_MAP_KIND.
1333         (cp_parser_omp_construct, cp_parser_pragma): Handle
1334         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1335         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1336         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1337         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1338         "create", "delete", "deviceptr", "host", "num_gangs",
1339         "num_workers", "present", "present_or_copy", "pcopy",
1340         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1341         "present_or_create", "pcreate", "vector_length", "wait".
1342         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1343         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1344         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1345         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1346         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1347         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1348         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1349         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1350         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1351         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1352         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1353         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1354         (cp_parser_oacc_parallel, cp_parser_oacc_update)
1355         (cp_parser_oacc_wait): New functions.
1356         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1357         (finish_oacc_parallel): New prototypes.
1358         * semantics.c: Include "gomp-constants.h".
1359         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1360         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1361         OMP_CLAUSE_SET_MAP_KIND.
1362         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1363         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1364         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1365         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1366         functions.
1368 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
1370         PR c++/58671
1371         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1372         self-initialization.
1374 2015-01-13  Jason Merrill  <jason@redhat.com>
1376         PR c++/64356
1377         PR libstdc++/58777
1378         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1379         pointer expressions.
1380         (cxx_eval_increment_expression): Likewise.
1382         PR c++/64514
1383         * pt.c (coerce_template_parameter_pack): Return NULL for a
1384         zero-length fixed parameter pack with a pack expansion arg.
1386         PR c++/64520
1387         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1389 2015-01-12  Jason Merrill  <jason@redhat.com>
1391         PR c++/64547
1392         * constexpr.c (cxx_eval_call_expression): A call to a void
1393         function doesn't need to return a value.
1395 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1397         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1398         input.h, alias.h, symtab.h, options.h, fold-const.h,
1399         wide-int.h, and inchash.h due to flattening of tree.h.
1400         * class.c: Ditto.
1401         * constexpr.c: Ditto.
1402         * cp-array-notation.c: Ditto.
1403         * cp-gimplify.c: Ditto.
1404         * cp-lang.c: Ditto.
1405         * cp-objcp-common.c: Ditto.
1406         * cvt.c: Ditto.
1407         * decl2.c: Ditto.
1408         * decl.c: Ditto.
1409         * dump.c: Ditto.
1410         * error.c: Ditto.
1411         * except.c: Ditto.
1412         * expr.c: Ditto.
1413         * friend.c: Ditto.
1414         * init.c: Ditto.
1415         * lambda.c: Ditto.
1416         * lex.c: Ditto.
1417         * mangle.c: Ditto.
1418         * name-lookup.c: Ditto.
1419         * optimize.c: Ditto.
1420         * parser.c: Ditto.
1421         * pt.c: Ditto.
1422         * ptree.c: Ditto.
1423         * repo.c: Ditto.
1424         * rtti.c: Ditto.
1425         * search.c: Ditto.
1426         * semantics.c: Ditto.
1427         * tree.c: Ditto.
1428         * typeck2.c: Ditto.
1429         * typeck.c: Ditto.
1431 2015-01-08  Jason Merrill  <jason@redhat.com>
1433         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1434         * decl.c (compute_array_index_type): Likewise.
1435         * init.c (build_vec_init): Likewise.
1436         * typeck.c (cp_build_binary_op): Likewise.
1438 2015-01-08  Jason Merrill  <jason@redhat.com>
1440         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1441         whether an initializer-list is too big for a VLA.
1442         (throw_bad_array_length): Remove.
1443         * cp-tree.h: Remove prototype.
1445 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
1447         PR c++/60753
1448         * decl.c (grokfndecl): Add bool parameter.
1449         (grokdeclarator): Adjust calls.
1450         (start_decl): Don't set DECL_DELETED_FN here.
1452 2015-01-06  Jason Merrill  <jason@redhat.com>
1454         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1455         template-ids.
1457         PR c++/64455
1458         * pt.c (type_dependent_expression_p): Handle variable templates.
1459         * constexpr.c (potential_constant_expression_1): Use it.
1461         PR c++/64487
1462         * semantics.c (finish_offsetof): Handle templates here.
1463         * parser.c (cp_parser_builtin_offsetof): Not here.
1465         PR c++/64496
1466         * semantics.c (process_outer_var_ref): Diagnose lambda in local
1467         class NSDMI.
1469 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1471         PR c++/64489
1472         * class.c (check_field_decls): Make copy assignment operators
1473         complex only in c++98 mode.
1475 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1477         PR c++/31397
1478         * class.c (check_for_override): Warn when a virtual function is an
1479         override not marked override.
1481 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1483         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1484         hold base_fndecls.
1485         (get_basefndecls): Adjust.
1487 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1489         Update copyright years.
1491 2015-01-05  Marek Polacek  <polacek@redhat.com>
1493         PR c/64423
1494         * typeck.c (cp_build_array_ref): Pass loc down to
1495         warn_array_subscript_with_type_char.
1498 Copyright (C) 2015 Free Software Foundation, Inc.
1500 Copying and distribution of this file, with or without modification,
1501 are permitted in any medium without royalty provided the copyright
1502 notice and this notice are preserved.