PR c++/66405
[official-gcc.git] / gcc / cp / ChangeLog
blobe9a78b3ccb6ebfa62e291196a439a9c62adb3371
1 2015-06-05  Jason Merrill  <jason@redhat.com>
3         PR c++/66405
4         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
5         dependent even if it has a type.
7 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
9         * cp-objcp-common.c: Adjust comment for
10         cxx_warn_unused_global_decl.
11         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
12         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
13         * cp-tree.h (note_mangling_alias): Protoize.
14         (cp_write_global_declarations): Remove.
15         (cxx_post_compilation_parsing_cleanups): Protoize.
16         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
17         argument.
18         * decl2.c (mangling_aliases): New global.
19         (build_java_method_aliases): New.  Adapted from
20         collect_candidates_for_java_method_aliases.
21         (collect_candidates_for_java_method_aliases): Remove.
22         (build_java_method_aliases): Remove.
23         (generate_mangling_aliases): New.
24         (note_mangling_alias): New.  Moved from mangle_decl.
25         (locus_at_end_of_parsing): New global.
26         (c_parse_final_cleanups): Rename from
27         cp_write_global_declarations.
28         Use locus_at_end_of_parsing.
29         Call generate_mangling_aliases.
30         Rename call to collect_candidates_for_java_method_aliases into
31         build_java_method_aliases.
32         Remove call to finalize_compilation_unit.
33         Move vtable handling into cxx_post_compilation_parsing_cleanups.
34         Do not call check_global_declarations or
35         emit_debug_global_declarations.
36         (cxx_post_compilation_parsing_cleanups): New.
37         * mangle.c (mangle_decl): Move code to note_mangling_alias.
38         * name-lookup.c (do_namespace_alias): Call early_global_decl.
40 2015-06-05  Nathan Sidwell  <nathan@acm.org>
42         PR c++/52595
43         * parser.c (cp_parser_cache_defarg): Continue looking for
44         declarators when scanning a potential template argument list of an
45         NSDMI.
47 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
49         * call.c: Adjust includes for restructured coretypes.h.
50         * class.c: Likewise.
51         * constexpr.c: Likewise.
52         * cp-array-notation.c: Likewise.
53         * cp-gimplify.c: Likewise.
54         * cp-lang.c: Likewise.
55         * cp-objcp-common.c: Likewise.
56         * cp-tree.h: Likewise.
57         * cp-ubsan.c: Likewise.
58         * cvt.c: Likewise.
59         * decl.c: Likewise.
60         * decl2.c: Likewise.
61         * dump.c: Likewise.
62         * error.c: Likewise.
63         * except.c: Likewise.
64         * expr.c: Likewise.
65         * friend.c: Likewise.
66         * init.c: Likewise.
67         * lambda.c: Likewise.
68         * lex.c: Likewise.
69         * mangle.c: Likewise.
70         * method.c: Likewise.
71         * name-lookup.c: Likewise.
72         * optimize.c: Likewise.
73         * parser.c: Likewise.
74         * pt.c: Likewise.
75         * ptree.c: Likewise.
76         * repo.c: Likewise.
77         * rtti.c: Likewise.
78         * search.c: Likewise.
79         * semantics.c: Likewise.
80         * tree.c: Likewise.
81         * typeck.c: Likewise.
82         * typeck2.c: Likewise.
83         * vtable-class-hierarchy.c: Likewise.
85 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
87         PR c++/66192
88         PR target/66200
89         * cp-tree.h (get_guard_cond): Adjust declaration
90         * decl.c (expand_static_init): Use atomic load acquire
91         and adjust call to get_guard_cond.
92         * decl2.c (build_atomic_load_byte): New function.
93         (get_guard_cond): Handle thread_safety.
94         (one_static_initialization_or_destruction): Adjust call to
95         get_guard_cond.
97 2015-06-03  Jason Merrill  <jason@redhat.com>
99         PR c++/44282
100         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
101         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
102         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
103         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
105 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
106             Paolo Carlini  <paolo.carlini@oracle.com>
108         PR c++/66130
109         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
110         use it in the diagnostic.
111         (decay_conversion): Adjust call.
112         * semantics.c (finish_decltype_type): Likewise.
113         * call.c (resolve_args, build_new_op_1,
114         perform_implicit_conversion_flags): Adjust calls.
115         * cvt.c (ocp_convert, convert_to_void): Likewise.
116         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
118 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
120         * decl.c (check_tag_decl): Use declspecs->locations as locations in
121         error_at and warning_at calls.
123 2015-06-03  Marek Polacek  <polacek@redhat.com>
125         PR sanitizer/66190
126         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
127         (cp_genericize_r): Don't instrument static initializers.
128         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
130 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
132         * decl.c (start_function): Call plugin before parsing.
133         (finish_function): Call plugin after parsing.
135 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
137         * cp-tree.h (init_error): Remove declaration.
138         * error.c (scratch_pretty_printer): Rename to ...
139         (actual_pretty_printer): ... this.
140         (cxx_pp): Constify and update accordingly.
141         (init_error): Remove definition.
142         * lex.c (cxx_init): Do not call init_error.
144 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
146         PR c++/61683
147         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
149 2015-06-01  Jason Merrill  <jason@redhat.com>
151         PR c++/65942
152         * decl2.c (mark_used): Don't always instantiate constexpr fns.
153         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
155         PR c++/44282
156         * mangle.c (attr_strcmp): New.
157         (write_CV_qualifiers_for_type): Also write out attributes that
158         affect type identity.
159         (write_type): Strip all attributes after writing qualifiers.
161 2015-05-31  Jason Merrill  <jason@redhat.com>
163         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
165         PR c++/66320
166         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
167         with the wrong type as non-constant.
169 2015-05-27  Jason Merrill  <jason@redhat.com>
171         * decl.c (check_redeclaration_exception_specification): Depend on
172         -Wsystem-headers rather than -pedantic.
174         * decl.c (warn_extern_redeclared_static): Use the location of
175         newdecl in diagnostics, not input_location.
176         (validate_constexpr_redeclaration): Likewise.
177         (check_redeclaration_no_default_args): Likewise.
178         (duplicate_decls): Likewise.
179         (check_redeclaration_exception_specification): Likewise.
180         Change second diagnostic to inform.
182 2015-05-24  Nathan Sidwell  <nathan@acm.org>
184         PR c++/66243
185         * decl.c (build_enumerator): Don't silently convert scoped enums.
187 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
189         PR lto/66180
190         * mangle.c (mangle_decl): Mangle anonymous namespace types as
191         "<anon>".
193 2015-05-23  Nathan Sidwell  <nathan@acm.org>
195         PR c++/65936
196         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
198 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
200         * Make-lang.in (check_g++_parallelize): Update comment.
202 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
204         PR c++/65598
205         * decl.c (grokdeclarator): Use the correct location in error
206         messages about 'explicit'.
208 2015-05-22  Marek Polacek  <polacek@redhat.com>
209             Edward Smith-Rowland  <3dw4rd@verizon.net>
211         PR c/47043
212         * cp-tree.h (build_enumerator): Update declaration.
213         * decl.c (build_enumerator): Add attributes parameter.  Call
214         cplus_decl_attributes.
215         * init.c (constant_value_1): Pass tf_none to mark_used.
216         * parser.c (cp_parser_enumerator_definition): Parse attributes and
217         pass them down to build_enumerator.
218         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
219         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
221 2015-05-21  Nathan Sidwell  <nathan@acm.org>
223         PR c++/60943
224         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
226 2015-05-21  Marek Polacek  <polacek@redhat.com>
228         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
230 2015-05-20  Jason Merrill  <jason@redhat.com>
232         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
233         before register_specialization.
235         * decl.c (grok_op_properties): Don't complain about size_t
236         placement delete here.
237         * call.c (second_parm_is_size_t): Split out from...
238         (non_placement_deallocation_fn_p): ...here.
239         (build_op_delete_call): Warn about size_t placement delete with
240         -Wc++14-compat.
242 2015-05-19  Nathan Sidwell  <nathan@acm.org>
244         PR c++/65954
245         * typeck.c (finish_class_member_access_expr): Diagnose failed
246         lookup of enum class member.
248 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
250         PR middle-end/66199
251         * parser.c (cp_parser_omp_for_loop): Don't add
252         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
253         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
254         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
255         constructs.
257 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
259         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
260         swaps.
262 2015-05-18  Jason Merrill  <jason@redhat.com>
264         * pt.c (retrieve_specialization): Make sure our arguments have
265         gone through strip_typedefs.
267         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
268         (determine_specialization): Call coerce_template_parms.
270         DR 1391
271         * pt.c (type_unification_real): Check convertibility here.
272         (unify_one_argument): Not here.
274         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
275         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
276         [TREE_LIST]: Fix no-change case.
278         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
280 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
282         PR fortran/44054
283         * error.c (cp_diagnostic_starter): Use diagnostic_location
284         function.
285         (cp_print_error_function): Likewise.
286         (cp_printer): Replace locus pointer with accessor function.
288 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
290         * parser.c (cp_parser_selection_statement): Add location and
291         guard_kind arguments to calls to
292         cp_parser_implicitly_scoped_statement.
293         (cp_parser_iteration_statement): Likewise for calls to
294         cp_parser_already_scoped_statement.
295         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
296         "guard_kind" params; use them to warn for misleading
297         indentation.
298         (cp_parser_already_scoped_statement): Likewise.
300 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
302         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
303         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
304         * semantics.c (finish_member_declaration): Likewise.
305         * method.c (lazily_declare_fn): Allways add method to main variant list.
307 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
309         PR bootstrap/66085
310         * decl2.c (note_mangling_alias): Declare arguments as unused.
312 2015-05-08  Jason Merrill  <jason@redhat.com>
314         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
315         -Wc++0x-compat.
317 2015-05-08  Jason Merrill  <jason@redhat.com>
319         * decl2.c (mangling_aliases): New variable.
320         (note_mangling_alias, generate_mangling_aliases): New.
321         (cp_write_global_declarations): Call generate_mangling_aliases.
322         (generate_mangling_alias): Split out from...
323         * mangle.c (mangle_decl): ...here.
324         * cp-tree.h: Declare note_mangling_alias.
326 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
328         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
329         (build_java_method_aliases): Adapt to use create_same_body_alias
330         instead of assemble_alias.  Move variable declarations to
331         definition and tidy up.
332         (cp_write_global_declarations): Call build_java_method_aliases
333         instead of collecting candidates first.
335 2015-05-07  Jason Merrill  <jason@redhat.com>
337         PR c++/59012
338         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
339         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
340         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
341         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
342         (apply_late_template_attributes): Handle attribute pack expansion.
344 2015-05-07  Marek Polacek  <polacek@redhat.com>
346         PR c/65179
347         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
348         value.
350 2015-05-07  Jason Merrill  <jason@redhat.com>
352         DR 1467
353         PR c++/51747
354         * typeck2.c (digest_init_r): Fix single element list.
356 2015-05-05  Jason Merrill  <jason@redhat.com>
358         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
359         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
360         MUST_NOT_THROW_EXPR.
361         (cp_genericize_data): Add try_block field.
362         (cp_genericize_tree): Initialize it.
363         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
364         implicit rethrow.
366         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
367         Return false.
369         * semantics.c (finish_call_expr): Check complain.
371         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
372         maybe-in-charge constructor.
374         * decl.c (start_decl): Don't push the plain VAR_DECL for a
375         variable template.
377         DR 1518
378         DR 1630
379         PR c++/54835
380         PR c++/60417
381         * call.c (convert_like_real): Check value-initialization before
382         explicit.
383         * typeck2.c (process_init_constructor_record): Don't set
384         CONSTRUCTOR_IS_DIRECT_INIT.
385         (process_init_constructor_array): Likewise.
386         * init.c (build_vec_init): Likewise.
388 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
390         * parser.c (cp_parser_asm_definition): Only test for
391         error_mark_node if "outputs" was just set.  Likewise for "inputs".
393 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
394             Jakub Jelinek  <jakub@redhat.com>
396         PR c++/66007
397         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
398         result in an actual error.
400 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
401             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
403         PR c++/65858
404         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
405         false.
407 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
409         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
410         trailing semicolon.
412 2015-04-29  Jason Merrill  <jason@redhat.com>
414         PR c++/50800
415         * tree.c (apply_identity_attributes): Fix handling of classes.
417 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
419         * parser.c (cp_parser_oacc_enter_exit_data): Use
420         OMP_STANDALONE_CLAUSES.
422 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
424         PR c++/64667
425         * init.c (perform_member_init): Handle references for -Winit-self.
427 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
429         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
430         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
432 2015-04-28  Jason Merrill  <jason@redhat.com>
434         PR c++/65896
435         * constexpr.c (cxx_eval_store_expression): Don't try to actually
436         store an empty class.
438         PR c++/65656
439         * constexpr.c (cxx_eval_builtin_function_call): Fix
440         __builtin_constant_p.
442         PR c++/50800
443         * tree.c (strip_typedefs): Add remove_attributes parm.
444         (strip_typedefs_expr): Likewise.
445         (apply_identity_attributes): New subroutine of strip_typedefs.
446         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
447         (convert_nontype_argument, unify): Likewise.
448         * cp-tree.h: Adjust.
450         PR c++/65734
451         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
453 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
455         * class.c (layout_class_type): Remove check if
456         PCC_BITFIELD_TYPE_MATTERS is defined.
458 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
460         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
462 2015-04-24  Jason Merrill  <jason@redhat.com>
464         PR c++/50800
465         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
467         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
468         Remove obsolete code.
469         [NE_EXPR]: Likewise.
471 2015-04-23  Jason Merrill  <jason@redhat.com>
473         PR c++/65646
474         * pt.c (check_explicit_specialization): Don't
475         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
476         headers.
477         * decl.c (grokvardecl): Revert earlier fix.
479 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
481         PR c++/65801
482         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
483         suppresses the diagnostic.
485 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
487         Reject trailing return type for an operator auto().
488         * decl.c (grokdeclarator): Reject trailing return types for
489         all conversion operators, don't handle conversion operators
490         in the previous checks that deal with auto.
492 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
494         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
496 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
498         * class.c (resolve_address_of_overloaded_function, instantiate_type):
499         Rename tsubst_flags_t parameter flags -> complain.
501 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
503         * call.c (build_op_delete_call, build_over_call): Check mark_used
504         return value.
505         * class.c (resolve_address_of_overloaded_function): Likewise.
506         * decl.c (cxx_maybe_build_cleanup): Likewise.
507         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
508         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
509         * rtti.c (build_dynamic_cast_1): Likewise.
510         * semantics.c (process_outer_var_ref): Likewise.
511         * typeck.c (build_class_member_access_expr,
512         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
514 2015-04-15  Jason Merrill  <jason@redhat.com>
516         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
517         (build_constexpr_constructor_member_initializers): Loop to find
518         the BIND_EXPR.
519         * decl.c (start_preparsed_function): Clobber the object at the
520         beginning of a constructor.
522         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
523         * method.c (implicitly_declare_fn): Likewise.
524         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
526         * decl2.c (determine_visibility): Use get_template_info.
528 2015-04-15  Jason Merrill  <jason@redhat.com>
529             Marek Polacek  <polacek@redhat.com>
531         PR c++/65727
532         * lambda.c (lambda_expr_this_capture): In unevaluated context go
533         through the normal loop, just don't capture.
534         (maybe_resolve_dummy): Handle null return.
536 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
538         * call.c (enforce_access): Emit error + inform.
540 2015-04-15  Marek Polacek  <polacek@redhat.com>
542         * constexpr.c (use_new_call): Remove #define.
543         (lookup_parameter_binding): Remove function.
544         (cxx_bind_parameters_in_call): Remove unused code.
545         (cxx_eval_call_expression): Likewise.
546         (cxx_eval_constant_expression): Likewise.
548 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
550         * tree.c (replace_placeholders_t): Remove unused type.
551         (replace_placeholders): Remove unused pset.
553 2015-04-14  Jason Merrill  <jason@redhat.com>
555         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
557         PR c++/65695
558         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
560         PR c++/65721
561         * name-lookup.c (do_class_using_decl): Complain about specifying
562         the current class even if there are dependent bases.
564 2015-04-14  David Krauss  <david_work@me.com>
566         PR c++/59766
567         * decl.c (grokdeclarator): Do not flag friends with deduced return.
569 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
570             Jason Merrill  <jason@redhat.com>
572         PR c++/60994
573         * parser.c (cp_parser_class_name): Add enum_ok parameter.
574         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
575         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
576         a class template.
578 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
580         PR c++/65736
581         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
582         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
583         the expression to the original type at the end.
585 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
587         PR c++/65690
588         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
589         TYPE_USER_ALIGN.
591         PR c++/65690
592         * tree.c (build_cplus_array_type): Layout type before variants are
593         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
594         variant.
596 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
598         PR c++/64085
599         * lambda.c (add_capture): Use dependent_type_p for capture by
600         reference too.
602 2015-04-02  Marek Polacek  <polacek@redhat.com>
604         PR c++/65642
605         * constexpr.c (cxx_eval_pointer_plus_expression): Call
606         cxx_eval_constant_expression on the first operand.
608 2015-04-01  Jason Merrill  <jason@redhat.com>
610         PR c++/65625
611         * decl.c (make_typename_type): Handle seeing a variable template.
613 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
615         PR c++/56100
616         * pt.c (instantiating_current_function_p): New.
617         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
618         * cp-tree.h (instantiating_current_function_p): Declare.
620 2015-04-01  Jason Merrill  <jason@redhat.com>
622         PR c++/65646
623         * decl.c (grokvardecl): Don't call check_explicit_specialization
624         for non-template members of a class template.
626 2015-04-01  Marek Polacek  <polacek@redhat.com>
628         PR c++/65554
629         * class.c (finish_struct): Require that the second field of a
630         user-defined initializer_list be of size type.
632 2015-03-31  Marek Polacek  <polacek@redhat.com>
634         PR c++/65390
635         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
636         checking for constness.
638 2015-03-30  Marek Polacek  <polacek@redhat.com>
640         PR c++/65398
641         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
642          *(&A[i] p+ j) => A[i + j] transformation here.
643         (cxx_eval_pointer_plus_expression): New function.
644         (cxx_eval_constant_expression): Use it here.
646 2015-03-27  Tobias Burnus  <burnus@net-b.de>
648         PR c/65586
649         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
650         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
651         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
652         -fopenmp-simd.
654 2015-03-27  Marek Polacek  <polacek@redhat.com>
656         PR c++/65556
657         * semantics.c (finish_switch_cond): If the unlowered type is not an
658         enum, use the type of the condition.
660 2015-03-27  Jason Merrill  <jason@redhat.com>
662         PR c++/65509
663         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
664         constants.
666 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
668         PR c++/65154
669         * init.c (build_vec_init): Fix initializing aggregates
670         with empty init list.
672 2015-03-26  Jason Merrill  <jason@redhat.com>
674         PR c++/65525
675         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
677 2015-03-25  Marek Polacek  <polacek@redhat.com>
679         PR c++/65558
680         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
681         on an anonymous namespace.
683 2015-03-25  Marek Polacek  <polacek@redhat.com>
685         PR c++/61670
686         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
688 2015-03-24  Jason Merrill  <jason@redhat.com>
690         PR c++/65046
691         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
692         * parser.c (cp_parser_namespace_definition): Don't set it.
693         * name-lookup.c (handle_namespace_attrs): Check
694         DECL_NAMESPACE_ASSOCIATIONS instead.
696         PR c++/65498
697         * pt.c (get_mostly_instantiated_function_type): Just return the
698         type of the partially instantiated template in DECL_TI_TEMPLATE.
700 2015-03-20  Marek Polacek  <polacek@redhat.com>
702         PR c++/65398
703         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
704         A[i + j].
706 2015-03-20  Marek Polacek  <polacek@redhat.com>
708         PR c++/65072
709         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
710         variant.
712 2015-03-19  Jason Merrill  <jason@redhat.com>
714         PR c++/65046
715         Automatically propagate ABI tags to variables and functions
716         from their (return) type.
717         * class.c (check_tag): Handle variables and functions.
718         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
719         (mark_or_check_tags): Likewise.
720         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
721         (check_abi_tags): Add single argument overload for decls.
722         Handle inheriting tags for decls.
723         * mangle.c (write_mangled_name): Call it.
724         (mangle_return_type_p): Split out from write_encoding.
725         (unmangled_name_p): Split out from write_mangled_name.
726         (write_mangled_name): Ignore abi_tag on namespace.
727         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
728         * parser.c (cp_parser_namespace_definition): Set it.
729         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
730         about abi_tag attribute on non-inline namespace.
731         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
732         (handle_abi_tag_attribute): Allow tags on variables.
734 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
736         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
737         attribute for DECL_EXTERNAL VAR_DECLs.
739 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
741         PR c++/65340
742         * call.c (build_over_call): Pass the tsubst_flags_t argument to
743         mark_used.
744         * decl2.c (mark_used): Inline the require_deduced_type call and
745         guard the error call.
747 2015-03-16  Jason Merrill  <jason@redhat.com>
749         PR c++/65061
750         * parser.c (cp_parser_template_name): Call strip_using_decl.
752 2015-03-16  Marek Polacek  <polacek@redhat.com>
754         DR 1688
755         PR c++/65327
756         * decl.c (grokdeclarator): Allow volatile and constexpr together.
758 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
760         PR c++/65323
761         * decl.c (check_default_argument): Don't call
762         maybe_warn_zero_as_null_pointer_constant.
764 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
766         * cp-gimplify.c (simple_empty_class_p): New.
767         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
768         the code for empty class copies into simple_empty_class_p, and
769         adapt it to handle COMPOUND_EXPRs.
771 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
773         PR c++/65370
774         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
775         only if the location of newdecl doesn't match the location of olddecl.
777 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
779         PR c++/65127
780         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
781         is not a PARM_DECL.
783 2015-03-10  Jason Merrill  <jason@redhat.com>
785         PR c++/65333
786         DR 1558
787         * pt.c (dependent_type_p_r): Check both class and alias template args.
789 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
791         PR c/65120
792         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
793         before preparing arguments to warn_logical_not_parentheses.
794         Use maybe_constant_value on rhs.
796 2015-03-09  Jason Merrill  <jason@redhat.com>
798         PR c++/65339
799         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
801 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
803         PR c/65120
804         * parser.c (cp_parser_binary_expression): Don't warn for
805         !!x == y or !b == y where b is bool.
807 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
809         * ptree.c (cxx_print_lambda_node): New.
810         (cxx_print_xnode): Handle LAMBDA_EXPR.
812 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
814         PR c++/65295
815         * constexpr.c (cxx_eval_constant_expression): Remove assert in
816         RESULT_DECL handling.
818 2015-02-26  Marek Polacek  <polacek@redhat.com>
820         PR c++/65202
821         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
822         a RETURN_EXPR if its operand is null.
824 2015-02-25  Jason Merrill  <jason@redhat.com>
826         PR c++/65209
827         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
828         DECL_COMDAT.
829         (constrain_visibility_for_template): Handle reference arguments.
831         PR debug/58315
832         * decl.c (start_preparsed_function): Use create_artificial_label
833         for cdtor_label.
835 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
836             Jakub Jelinek  <jakub@redhat.com>
838         PR c++/65075
839         * constexpr.c (check_constexpr_bind_expr_vars): Allow
840         implicit typedefs for lambda types.
842 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
844         PR c++/60894
845         * decl.c (lookup_and_check_tag): Use strip_using_decl.
847 2015-02-13  Jason Merrill  <jason@redhat.com>
849         PR c++/65054
850         * pt.c (template_args_equal): Look through conversions here.
851         * tree.c (cp_tree_equal): Not here.
853 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
855         PR c++/60211
856         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
857         pragma_external context.
859 2015-02-13  Jason Merrill  <jason@redhat.com>
861         PR c++/65051
862         * call.c (reference_binding): Don't look for bad conversion
863         if TO is incomplete.
865 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
867         PR c++/64970
868         * decl.c (make_typename_type): Pass tsubst_flags_t argument
869         to lookup_template_class.
871 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
873         PR ipa/65034
874         * decl.c (start_preparsed_function): Use void_type_node instead
875         of NULL_TREE as LABEL_DECL type.
877 2015-02-12  Jason Merrill  <jason@redhat.com>
879         PR c++/64898
880         * mangle.c (write_mangled_name): Fix test for variable template
881         instantiation.
883         * decl.c (begin_destructor_body): Condition clobber on
884         -flifetime-dse.
886 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
888         PR c++/64959
889         * parser.c (lookup_literal_operator): Return all candidates.
890         (cp_parser_userdef_char_literal): Simplify error handling.
891         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
892         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
893         Also give higher priority to standard string UDL operator.
895 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
897         PR debug/55541
898         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
899         * decl.c (poplevel): If functionbody, try not to create an extra
900         BLOCK for function body and use subblocks as that, if it is non-NULL
901         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
902         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
904         PR sanitizer/64984
905         * except.c (check_noexcept_r): Return NULL for internal
906         calls.
908 2015-02-10  Jason Merrill  <jason@redhat.com>
910         PR c++/64994
911         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
913 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
915         PR ipa/64982
916         * method.c (use_thunk): Do not check for stdarg thunks.
918 2015-02-06  Jason Merrill  <jason@redhat.com>
920         PR c++/64899
921         * init.c (build_vec_init): Handle default-initialized array with
922         constexpr default constructor.
924 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
926         PR c/64824
927         PR c/64868
928         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
930 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
932         PR c++/64877
933         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
934         for generated expressions.
936 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
938         PR c++/64901
939         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
940         DECL_OVERRIDE_P.
942 2015-02-02  Jason Merrill  <jason@redhat.com>
944         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
946 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
948         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
949         changed to pass input_location as first argument.
951 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
953         PR c++/64717
954         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
955         into SAVE_EXPR.
957 2015-01-29  Jason Merrill  <jason@redhat.com>
959         PR c++/49508
960         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
961         erroneous return statement.
963         PR c++/64521
964         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
965         point.
967 2015-01-27  Caroline Tice  <cmtice@google.com>
969         Committing VTV Cywin/Ming patch for Patrick Wollgast
970         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
971         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
973 2015-01-27  Jason Merrill  <jason@redhat.com>
975         PR c++/58597
976         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
977         current_function_decl.
979         PR c++/63889
980         * pt.c (finish_template_variable): Move from semantics.c.
981         Handle multiple template arg levels.  Handle coercion here.
982         (lookup_template_variable): Not here.
984 2015-01-23  Jason Merrill  <jason@redhat.com>
986         PR c++/64314
987         PR c++/57510
988         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
989         that has been completely split out.
991         PR c++/64701
992         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
993         statement codes.
995         PR c++/64727
996         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
997         of CONST_DECL.
999 2015-01-21  Jason Merrill  <jason@redhat.com>
1001         PR c++/64603
1002         * constexpr.c (cxx_eval_constant_expression): Only shortcut
1003         constant CONSTRUCTORs.
1005         PR c++/64647
1006         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1007         give a hard error in a template instantiation.
1009 2015-01-21  Richard Biener  <rguenther@suse.de>
1011         PR middle-end/64313
1012         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1013         for builtins the user declared correctly.
1015 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1017         PR c++/58614
1018         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1019         TREE_TYPE (elt) == error_mark_node.
1021 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
1023         PR tree-optimization/62053
1024         * tree.c (build_cplus_array_type): Layout type after variants are set.
1026 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
1028         * cp-gimplify.c (cp_genericize_r): Call
1029         cp_ubsan_maybe_instrument_member_call for member calls.
1030         (cp_ubsan_check_member_access_r): New function.
1031         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1032         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1033         cp_ubsan_instrument_member_accesses,
1034         cp_ubsan_maybe_instrument_downcast,
1035         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1036         * cp-ubsan.c: New file.
1037         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1038         * constexpr.c (cxx_eval_call_expression): Return void_node
1039         for IFN_UBSAN_VPTR.
1040         (potential_constant_expression_1): Return true for
1041         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1042         * typeck.c (build_class_member_access_expr): Provide locus
1043         for COMPONENT_REFs.
1044         (build_static_cast_1): Instrument downcasts.
1045         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1046         add ubsan instrumentation for virtual_access.
1047         * call.c: Include internal-fn.h.
1048         (set_flags_from_callee): Handle internal calls.
1050 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
1052         PR c++/59366
1053         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1054         and function templates, declared only in the class.
1055         * decl.c (duplicate_decls): Reveal hidden friend functions or
1056         function templates, if they are redeclared outside the class.
1058 2015-01-15  Jason Merrill  <jason@redhat.com>
1060         PR c++/64356
1061         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1063         PR c++/63283
1064         * constexpr.c (potential_constant_expression_1): Handle reference
1065         args in templates.
1067 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1068             James Norris  <jnorris@codesourcery.com>
1069             Cesar Philippidis  <cesar@codesourcery.com>
1070             Ilmir Usmanov  <i.usmanov@samsung.com>
1071             Jakub Jelinek  <jakub@redhat.com>
1073         * parser.c: Include "gomp-constants.h".
1074         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1075         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1076         Use OMP_CLAUSE_SET_MAP_KIND.
1077         (cp_parser_omp_construct, cp_parser_pragma): Handle
1078         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1079         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1080         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1081         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1082         "create", "delete", "deviceptr", "host", "num_gangs",
1083         "num_workers", "present", "present_or_copy", "pcopy",
1084         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1085         "present_or_create", "pcreate", "vector_length", "wait".
1086         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1087         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1088         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1089         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1090         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1091         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1092         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1093         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1094         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1095         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1096         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1097         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1098         (cp_parser_oacc_parallel, cp_parser_oacc_update)
1099         (cp_parser_oacc_wait): New functions.
1100         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1101         (finish_oacc_parallel): New prototypes.
1102         * semantics.c: Include "gomp-constants.h".
1103         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1104         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1105         OMP_CLAUSE_SET_MAP_KIND.
1106         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1107         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1108         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1109         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1110         functions.
1112 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
1114         PR c++/58671
1115         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1116         self-initialization.
1118 2015-01-13  Jason Merrill  <jason@redhat.com>
1120         PR c++/64356
1121         PR libstdc++/58777
1122         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1123         pointer expressions.
1124         (cxx_eval_increment_expression): Likewise.
1126         PR c++/64514
1127         * pt.c (coerce_template_parameter_pack): Return NULL for a
1128         zero-length fixed parameter pack with a pack expansion arg.
1130         PR c++/64520
1131         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1133 2015-01-12  Jason Merrill  <jason@redhat.com>
1135         PR c++/64547
1136         * constexpr.c (cxx_eval_call_expression): A call to a void
1137         function doesn't need to return a value.
1139 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1141         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1142         input.h, alias.h, symtab.h, options.h, fold-const.h,
1143         wide-int.h, and inchash.h due to flattening of tree.h.
1144         * class.c: Ditto.
1145         * constexpr.c: Ditto.
1146         * cp-array-notation.c: Ditto.
1147         * cp-gimplify.c: Ditto.
1148         * cp-lang.c: Ditto.
1149         * cp-objcp-common.c: Ditto.
1150         * cvt.c: Ditto.
1151         * decl2.c: Ditto.
1152         * decl.c: Ditto.
1153         * dump.c: Ditto.
1154         * error.c: Ditto.
1155         * except.c: Ditto.
1156         * expr.c: Ditto.
1157         * friend.c: Ditto.
1158         * init.c: Ditto.
1159         * lambda.c: Ditto.
1160         * lex.c: Ditto.
1161         * mangle.c: Ditto.
1162         * name-lookup.c: Ditto.
1163         * optimize.c: Ditto.
1164         * parser.c: Ditto.
1165         * pt.c: Ditto.
1166         * ptree.c: Ditto.
1167         * repo.c: Ditto.
1168         * rtti.c: Ditto.
1169         * search.c: Ditto.
1170         * semantics.c: Ditto.
1171         * tree.c: Ditto.
1172         * typeck2.c: Ditto.
1173         * typeck.c: Ditto.
1175 2015-01-08  Jason Merrill  <jason@redhat.com>
1177         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1178         * decl.c (compute_array_index_type): Likewise.
1179         * init.c (build_vec_init): Likewise.
1180         * typeck.c (cp_build_binary_op): Likewise.
1182 2015-01-08  Jason Merrill  <jason@redhat.com>
1184         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1185         whether an initializer-list is too big for a VLA.
1186         (throw_bad_array_length): Remove.
1187         * cp-tree.h: Remove prototype.
1189 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
1191         PR c++/60753
1192         * decl.c (grokfndecl): Add bool parameter.
1193         (grokdeclarator): Adjust calls.
1194         (start_decl): Don't set DECL_DELETED_FN here.
1196 2015-01-06  Jason Merrill  <jason@redhat.com>
1198         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1199         template-ids.
1201         PR c++/64455
1202         * pt.c (type_dependent_expression_p): Handle variable templates.
1203         * constexpr.c (potential_constant_expression_1): Use it.
1205         PR c++/64487
1206         * semantics.c (finish_offsetof): Handle templates here.
1207         * parser.c (cp_parser_builtin_offsetof): Not here.
1209         PR c++/64496
1210         * semantics.c (process_outer_var_ref): Diagnose lambda in local
1211         class NSDMI.
1213 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1215         PR c++/64489
1216         * class.c (check_field_decls): Make copy assignment operators
1217         complex only in c++98 mode.
1219 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1221         PR c++/31397
1222         * class.c (check_for_override): Warn when a virtual function is an
1223         override not marked override.
1225 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1227         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1228         hold base_fndecls.
1229         (get_basefndecls): Adjust.
1231 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1233         Update copyright years.
1235 2015-01-05  Marek Polacek  <polacek@redhat.com>
1237         PR c/64423
1238         * typeck.c (cp_build_array_ref): Pass loc down to
1239         warn_array_subscript_with_type_char.
1242 Copyright (C) 2015 Free Software Foundation, Inc.
1244 Copying and distribution of this file, with or without modification,
1245 are permitted in any medium without royalty provided the copyright
1246 notice and this notice are preserved.