* typeck.c (warn_args_num): Don't print "declare here" for builtins.
[official-gcc.git] / gcc / cp / ChangeLog
blob6460314253142b0c3fbb99566d3c7000d20252fd
1 2015-05-21  Marek Polacek  <polacek@redhat.com>
3         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
5 2015-05-20  Jason Merrill  <jason@redhat.com>
7         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
8         before register_specialization.
10         * decl.c (grok_op_properties): Don't complain about size_t
11         placement delete here.
12         * call.c (second_parm_is_size_t): Split out from...
13         (non_placement_deallocation_fn_p): ...here.
14         (build_op_delete_call): Warn about size_t placement delete with
15         -Wc++14-compat.
17 2015-05-19  Nathan sidwell  <nathan@acm.org>
19         PR c++/65954
20         * typeck.c (finish_class_member_access_expr): Diagnose failed
21         lookup of enum class member.
23 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
25         PR middle-end/66199
26         * parser.c (cp_parser_omp_for_loop): Don't add
27         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
28         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
29         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
30         constructs.
32 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
34         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
35         swaps.
37 2015-05-18  Jason Merrill  <jason@redhat.com>
39         * pt.c (retrieve_specialization): Make sure our arguments have
40         gone through strip_typedefs.
42         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
43         (determine_specialization): Call coerce_template_parms.
45         DR 1391
46         * pt.c (type_unification_real): Check convertibility here.
47         (unify_one_argument): Not here.
49         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
50         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
51         [TREE_LIST]: Fix no-change case.
53         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
55 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
57         PR fortran/44054
58         * error.c (cp_diagnostic_starter): Use diagnostic_location
59         function.
60         (cp_print_error_function): Likewise.
61         (cp_printer): Replace locus pointer with accessor function.
63 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
65         * parser.c (cp_parser_selection_statement): Add location and
66         guard_kind arguments to calls to
67         cp_parser_implicitly_scoped_statement.
68         (cp_parser_iteration_statement): Likewise for calls to
69         cp_parser_already_scoped_statement.
70         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
71         "guard_kind" params; use them to warn for misleading
72         indentation.
73         (cp_parser_already_scoped_statement): Likewise.
75 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
77         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
78         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
79         * semantics.c (finish_member_declaration): Likewise.
80         * method.c (lazily_declare_fn): Allways add method to main variant list.
82 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
84         PR bootstrap/66085
85         * decl2.c (note_mangling_alias): Declare arguments as unused.
87 2015-05-08  Jason Merrill  <jason@redhat.com>
89         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
90         -Wc++0x-compat.
92 2015-05-08  Jason Merrill  <jason@redhat.com>
94         * decl2.c (mangling_aliases): New variable.
95         (note_mangling_alias, generate_mangling_aliases): New.
96         (cp_write_global_declarations): Call generate_mangling_aliases.
97         (generate_mangling_alias): Split out from...
98         * mangle.c (mangle_decl): ...here.
99         * cp-tree.h: Declare note_mangling_alias.
101 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
103         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
104         (build_java_method_aliases): Adapt to use create_same_body_alias
105         instead of assemble_alias.  Move variable declarations to
106         definition and tidy up.
107         (cp_write_global_declarations): Call build_java_method_aliases
108         instead of collecting candidates first.
110 2015-05-07  Jason Merrill  <jason@redhat.com>
112         PR c++/59012
113         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
114         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
115         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
116         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
117         (apply_late_template_attributes): Handle attribute pack expansion.
119 2015-05-07  Marek Polacek  <polacek@redhat.com>
121         PR c/65179
122         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
123         value.
125 2015-05-07  Jason Merrill  <jason@redhat.com>
127         DR 1467
128         PR c++/51747
129         * typeck2.c (digest_init_r): Fix single element list.
131 2015-05-05  Jason Merrill  <jason@redhat.com>
133         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
134         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
135         MUST_NOT_THROW_EXPR.
136         (cp_genericize_data): Add try_block field.
137         (cp_genericize_tree): Initialize it.
138         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
139         implicit rethrow.
141         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
142         Return false.
144         * semantics.c (finish_call_expr): Check complain.
146         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
147         maybe-in-charge constructor.
149         * decl.c (start_decl): Don't push the plain VAR_DECL for a
150         variable template.
152         DR 1518
153         DR 1630
154         PR c++/54835
155         PR c++/60417
156         * call.c (convert_like_real): Check value-initialization before
157         explicit.
158         * typeck2.c (process_init_constructor_record): Don't set
159         CONSTRUCTOR_IS_DIRECT_INIT.
160         (process_init_constructor_array): Likewise.
161         * init.c (build_vec_init): Likewise.
163 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
165         * parser.c (cp_parser_asm_definition): Only test for
166         error_mark_node if "outputs" was just set.  Likewise for "inputs".
168 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
169             Jakub Jelinek  <jakub@redhat.com>
171         PR c++/66007
172         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
173         result in an actual error.
175 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
176             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
178         PR c++/65858
179         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
180         false.
182 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
184         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
185         trailing semicolon.
187 2015-04-29  Jason Merrill  <jason@redhat.com>
189         PR c++/50800
190         * tree.c (apply_identity_attributes): Fix handling of classes.
192 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
194         * parser.c (cp_parser_oacc_enter_exit_data): Use
195         OMP_STANDALONE_CLAUSES.
197 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
199         PR c++/64667
200         * init.c (perform_member_init): Handle references for -Winit-self.
202 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
204         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
205         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
207 2015-04-28  Jason Merrill  <jason@redhat.com>
209         PR c++/65896
210         * constexpr.c (cxx_eval_store_expression): Don't try to actually
211         store an empty class.
213         PR c++/65656
214         * constexpr.c (cxx_eval_builtin_function_call): Fix
215         __builtin_constant_p.
217         PR c++/50800
218         * tree.c (strip_typedefs): Add remove_attributes parm.
219         (strip_typedefs_expr): Likewise.
220         (apply_identity_attributes): New subroutine of strip_typedefs.
221         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
222         (convert_nontype_argument, unify): Likewise.
223         * cp-tree.h: Adjust.
225         PR c++/65734
226         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
228 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
230         * class.c (layout_class_type): Remove check if
231         PCC_BITFIELD_TYPE_MATTERS is defined.
233 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
235         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
237 2015-04-24  Jason Merrill  <jason@redhat.com>
239         PR c++/50800
240         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
242         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
243         Remove obsolete code.
244         [NE_EXPR]: Likewise.
246 2015-04-23  Jason Merrill  <jason@redhat.com>
248         PR c++/65646
249         * pt.c (check_explicit_specialization): Don't
250         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
251         headers.
252         * decl.c (grokvardecl): Revert earlier fix.
254 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
256         PR c++/65801
257         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
258         suppresses the diagnostic.
260 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
262         Reject trailing return type for an operator auto().
263         * decl.c (grokdeclarator): Reject trailing return types for
264         all conversion operators, don't handle conversion operators
265         in the previous checks that deal with auto.
267 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
269         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
271 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
273         * class.c (resolve_address_of_overloaded_function, instantiate_type):
274         Rename tsubst_flags_t parameter flags -> complain.
276 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
278         * call.c (build_op_delete_call, build_over_call): Check mark_used
279         return value.
280         * class.c (resolve_address_of_overloaded_function): Likewise.
281         * decl.c (cxx_maybe_build_cleanup): Likewise.
282         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
283         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
284         * rtti.c (build_dynamic_cast_1): Likewise.
285         * semantics.c (process_outer_var_ref): Likewise.
286         * typeck.c (build_class_member_access_expr,
287         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
289 2015-04-15  Jason Merrill  <jason@redhat.com>
291         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
292         (build_constexpr_constructor_member_initializers): Loop to find
293         the BIND_EXPR.
294         * decl.c (start_preparsed_function): Clobber the object at the
295         beginning of a constructor.
297         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
298         * method.c (implicitly_declare_fn): Likewise.
299         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
301         * decl2.c (determine_visibility): Use get_template_info.
303 2015-04-15  Jason Merrill  <jason@redhat.com>
304             Marek Polacek  <polacek@redhat.com>
306         PR c++/65727
307         * lambda.c (lambda_expr_this_capture): In unevaluated context go
308         through the normal loop, just don't capture.
309         (maybe_resolve_dummy): Handle null return.
311 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
313         * call.c (enforce_access): Emit error + inform.
315 2015-04-15  Marek Polacek  <polacek@redhat.com>
317         * constexpr.c (use_new_call): Remove #define.
318         (lookup_parameter_binding): Remove function.
319         (cxx_bind_parameters_in_call): Remove unused code.
320         (cxx_eval_call_expression): Likewise.
321         (cxx_eval_constant_expression): Likewise.
323 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
325         * tree.c (replace_placeholders_t): Remove unused type.
326         (replace_placeholders): Remove unused pset.
328 2015-04-14  Jason Merrill  <jason@redhat.com>
330         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
332         PR c++/65695
333         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
335         PR c++/65721
336         * name-lookup.c (do_class_using_decl): Complain about specifying
337         the current class even if there are dependent bases.
339 2015-04-14  David Krauss  <david_work@me.com>
341         PR c++/59766
342         * decl.c (grokdeclarator): Do not flag friends with deduced return.
344 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
345             Jason Merrill  <jason@redhat.com>
347         PR c++/60994
348         * parser.c (cp_parser_class_name): Add enum_ok parameter.
349         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
350         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
351         a class template.
353 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
355         PR c++/65736
356         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
357         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
358         the expression to the original type at the end.
360 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
362         PR c++/65690
363         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
364         TYPE_USER_ALIGN.
366         PR c++/65690
367         * tree.c (build_cplus_array_type): Layout type before variants are
368         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
369         variant.
371 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
373         PR c++/64085
374         * lambda.c (add_capture): Use dependent_type_p for capture by
375         reference too.
377 2015-04-02  Marek Polacek  <polacek@redhat.com>
379         PR c++/65642
380         * constexpr.c (cxx_eval_pointer_plus_expression): Call
381         cxx_eval_constant_expression on the first operand.
383 2015-04-01  Jason Merrill  <jason@redhat.com>
385         PR c++/65625
386         * decl.c (make_typename_type): Handle seeing a variable template.
388 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
390         PR c++/56100
391         * pt.c (instantiating_current_function_p): New.
392         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
393         * cp-tree.h (instantiating_current_function_p): Declare.
395 2015-04-01  Jason Merrill  <jason@redhat.com>
397         PR c++/65646
398         * decl.c (grokvardecl): Don't call check_explicit_specialization
399         for non-template members of a class template.
401 2015-04-01  Marek Polacek  <polacek@redhat.com>
403         PR c++/65554
404         * class.c (finish_struct): Require that the second field of a
405         user-defined initializer_list be of size type.
407 2015-03-31  Marek Polacek  <polacek@redhat.com>
409         PR c++/65390
410         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
411         checking for constness.
413 2015-03-30  Marek Polacek  <polacek@redhat.com>
415         PR c++/65398
416         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
417          *(&A[i] p+ j) => A[i + j] transformation here.
418         (cxx_eval_pointer_plus_expression): New function.
419         (cxx_eval_constant_expression): Use it here.
421 2015-03-27  Tobias Burnus  <burnus@net-b.de>
423         PR c/65586
424         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
425         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
426         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
427         -fopenmp-simd.
429 2015-03-27  Marek Polacek  <polacek@redhat.com>
431         PR c++/65556
432         * semantics.c (finish_switch_cond): If the unlowered type is not an
433         enum, use the type of the condition.
435 2015-03-27  Jason Merrill  <jason@redhat.com>
437         PR c++/65509
438         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
439         constants.
441 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
443         PR c++/65154
444         * init.c (build_vec_init): Fix initializing aggregates
445         with empty init list.
447 2015-03-26  Jason Merrill  <jason@redhat.com>
449         PR c++/65525
450         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
452 2015-03-25  Marek Polacek  <polacek@redhat.com>
454         PR c++/65558
455         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
456         on an anonymous namespace.
458 2015-03-25  Marek Polacek  <polacek@redhat.com>
460         PR c++/61670
461         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
463 2015-03-24  Jason Merrill  <jason@redhat.com>
465         PR c++/65046
466         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
467         * parser.c (cp_parser_namespace_definition): Don't set it.
468         * name-lookup.c (handle_namespace_attrs): Check
469         DECL_NAMESPACE_ASSOCIATIONS instead.
471         PR c++/65498
472         * pt.c (get_mostly_instantiated_function_type): Just return the
473         type of the partially instantiated template in DECL_TI_TEMPLATE.
475 2015-03-20  Marek Polacek  <polacek@redhat.com>
477         PR c++/65398
478         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
479         A[i + j].
481 2015-03-20  Marek Polacek  <polacek@redhat.com>
483         PR c++/65072
484         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
485         variant.
487 2015-03-19  Jason Merrill  <jason@redhat.com>
489         PR c++/65046
490         Automatically propagate ABI tags to variables and functions
491         from their (return) type.
492         * class.c (check_tag): Handle variables and functions.
493         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
494         (mark_or_check_tags): Likewise.
495         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
496         (check_abi_tags): Add single argument overload for decls.
497         Handle inheriting tags for decls.
498         * mangle.c (write_mangled_name): Call it.
499         (mangle_return_type_p): Split out from write_encoding.
500         (unmangled_name_p): Split out from write_mangled_name.
501         (write_mangled_name): Ignore abi_tag on namespace.
502         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
503         * parser.c (cp_parser_namespace_definition): Set it.
504         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
505         about abi_tag attribute on non-inline namespace.
506         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
507         (handle_abi_tag_attribute): Allow tags on variables.
509 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
511         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
512         attribute for DECL_EXTERNAL VAR_DECLs.
514 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
516         PR c++/65340
517         * call.c (build_over_call): Pass the tsubst_flags_t argument to
518         mark_used.
519         * decl2.c (mark_used): Inline the require_deduced_type call and
520         guard the error call.
522 2015-03-16  Jason Merrill  <jason@redhat.com>
524         PR c++/65061
525         * parser.c (cp_parser_template_name): Call strip_using_decl.
527 2015-03-16  Marek Polacek  <polacek@redhat.com>
529         DR 1688
530         PR c++/65327
531         * decl.c (grokdeclarator): Allow volatile and constexpr together.
533 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
535         PR c++/65323
536         * decl.c (check_default_argument): Don't call
537         maybe_warn_zero_as_null_pointer_constant.
539 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
541         * cp-gimplify.c (simple_empty_class_p): New.
542         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
543         the code for empty class copies into simple_empty_class_p, and
544         adapt it to handle COMPOUND_EXPRs.
546 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
548         PR c++/65370
549         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
550         only if the location of newdecl doesn't match the location of olddecl.
552 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
554         PR c++/65127
555         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
556         is not a PARM_DECL.
558 2015-03-10  Jason Merrill  <jason@redhat.com>
560         PR c++/65333
561         DR 1558
562         * pt.c (dependent_type_p_r): Check both class and alias template args.
564 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
566         PR c/65120
567         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
568         before preparing arguments to warn_logical_not_parentheses.
569         Use maybe_constant_value on rhs.
571 2015-03-09  Jason Merrill  <jason@redhat.com>
573         PR c++/65339
574         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
576 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
578         PR c/65120
579         * parser.c (cp_parser_binary_expression): Don't warn for
580         !!x == y or !b == y where b is bool.
582 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
584         * ptree.c (cxx_print_lambda_node): New.
585         (cxx_print_xnode): Handle LAMBDA_EXPR.
587 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
589         PR c++/65295
590         * constexpr.c (cxx_eval_constant_expression): Remove assert in
591         RESULT_DECL handling.
593 2015-02-26  Marek Polacek  <polacek@redhat.com>
595         PR c++/65202
596         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
597         a RETURN_EXPR if its operand is null.
599 2015-02-25  Jason Merrill  <jason@redhat.com>
601         PR c++/65209
602         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
603         DECL_COMDAT.
604         (constrain_visibility_for_template): Handle reference arguments.
606         PR debug/58315
607         * decl.c (start_preparsed_function): Use create_artificial_label
608         for cdtor_label.
610 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
611             Jakub Jelinek  <jakub@redhat.com>
613         PR c++/65075
614         * constexpr.c (check_constexpr_bind_expr_vars): Allow
615         implicit typedefs for lambda types.
617 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
619         PR c++/60894
620         * decl.c (lookup_and_check_tag): Use strip_using_decl.
622 2015-02-13  Jason Merrill  <jason@redhat.com>
624         PR c++/65054
625         * pt.c (template_args_equal): Look through conversions here.
626         * tree.c (cp_tree_equal): Not here.
628 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
630         PR c++/60211
631         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
632         pragma_external context.
634 2015-02-13  Jason Merrill  <jason@redhat.com>
636         PR c++/65051
637         * call.c (reference_binding): Don't look for bad conversion
638         if TO is incomplete.
640 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
642         PR c++/64970
643         * decl.c (make_typename_type): Pass tsubst_flags_t argument
644         to lookup_template_class.
646 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
648         PR ipa/65034
649         * decl.c (start_preparsed_function): Use void_type_node instead
650         of NULL_TREE as LABEL_DECL type.
652 2015-02-12  Jason Merrill  <jason@redhat.com>
654         PR c++/64898
655         * mangle.c (write_mangled_name): Fix test for variable template
656         instantiation.
658         * decl.c (begin_destructor_body): Condition clobber on
659         -flifetime-dse.
661 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
663         PR c++/64959
664         * parser.c (lookup_literal_operator): Return all candidates.
665         (cp_parser_userdef_char_literal): Simplify error handling.
666         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
667         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
668         Also give higher priority to standard string UDL operator.
670 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
672         PR debug/55541
673         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
674         * decl.c (poplevel): If functionbody, try not to create an extra
675         BLOCK for function body and use subblocks as that, if it is non-NULL
676         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
677         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
679         PR sanitizer/64984
680         * except.c (check_noexcept_r): Return NULL for internal
681         calls.
683 2015-02-10  Jason Merrill  <jason@redhat.com>
685         PR c++/64994
686         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
688 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
690         PR ipa/64982
691         * method.c (use_thunk): Do not check for stdarg thunks.
693 2015-02-06  Jason Merrill  <jason@redhat.com>
695         PR c++/64899
696         * init.c (build_vec_init): Handle default-initialized array with
697         constexpr default constructor.
699 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
701         PR c/64824
702         PR c/64868
703         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
705 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
707         PR c++/64877
708         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
709         for generated expressions.
711 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
713         PR c++/64901
714         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
715         DECL_OVERRIDE_P.
717 2015-02-02  Jason Merrill  <jason@redhat.com>
719         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
721 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
723         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
724         changed to pass input_location as first argument.
726 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
728         PR c++/64717
729         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
730         into SAVE_EXPR.
732 2015-01-29  Jason Merrill  <jason@redhat.com>
734         PR c++/49508
735         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
736         erroneous return statement.
738         PR c++/64521
739         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
740         point.
742 2015-01-27  Caroline Tice  <cmtice@google.com>
744         Committing VTV Cywin/Ming patch for Patrick Wollgast
745         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
746         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
748 2015-01-27  Jason Merrill  <jason@redhat.com>
750         PR c++/58597
751         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
752         current_function_decl.
754         PR c++/63889
755         * pt.c (finish_template_variable): Move from semantics.c.
756         Handle multiple template arg levels.  Handle coercion here.
757         (lookup_template_variable): Not here.
759 2015-01-23  Jason Merrill  <jason@redhat.com>
761         PR c++/64314
762         PR c++/57510
763         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
764         that has been completely split out.
766         PR c++/64701
767         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
768         statement codes.
770         PR c++/64727
771         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
772         of CONST_DECL.
774 2015-01-21  Jason Merrill  <jason@redhat.com>
776         PR c++/64603
777         * constexpr.c (cxx_eval_constant_expression): Only shortcut
778         constant CONSTRUCTORs.
780         PR c++/64647
781         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
782         give a hard error in a template instantiation.
784 2015-01-21  Richard Biener  <rguenther@suse.de>
786         PR middle-end/64313
787         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
788         for builtins the user declared correctly.
790 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
792         PR c++/58614
793         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
794         TREE_TYPE (elt) == error_mark_node.
796 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
798         PR tree-optimization/62053
799         * tree.c (build_cplus_array_type): Layout type after variants are set.
801 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
803         * cp-gimplify.c (cp_genericize_r): Call
804         cp_ubsan_maybe_instrument_member_call for member calls.
805         (cp_ubsan_check_member_access_r): New function.
806         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
807         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
808         cp_ubsan_instrument_member_accesses,
809         cp_ubsan_maybe_instrument_downcast,
810         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
811         * cp-ubsan.c: New file.
812         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
813         * constexpr.c (cxx_eval_call_expression): Return void_node
814         for IFN_UBSAN_VPTR.
815         (potential_constant_expression_1): Return true for
816         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
817         * typeck.c (build_class_member_access_expr): Provide locus
818         for COMPONENT_REFs.
819         (build_static_cast_1): Instrument downcasts.
820         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
821         add ubsan instrumentation for virtual_access.
822         * call.c: Include internal-fn.h.
823         (set_flags_from_callee): Handle internal calls.
825 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
827         PR c++/59366
828         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
829         and function templates, declared only in the class.
830         * decl.c (duplicate_decls): Reveal hidden friend functions or
831         function templates, if they are redeclared outside the class.
833 2015-01-15  Jason Merrill  <jason@redhat.com>
835         PR c++/64356
836         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
838         PR c++/63283
839         * constexpr.c (potential_constant_expression_1): Handle reference
840         args in templates.
842 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
843             James Norris  <jnorris@codesourcery.com>
844             Cesar Philippidis  <cesar@codesourcery.com>
845             Ilmir Usmanov  <i.usmanov@samsung.com>
846             Jakub Jelinek  <jakub@redhat.com>
848         * parser.c: Include "gomp-constants.h".
849         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
850         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
851         Use OMP_CLAUSE_SET_MAP_KIND.
852         (cp_parser_omp_construct, cp_parser_pragma): Handle
853         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
854         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
855         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
856         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
857         "create", "delete", "deviceptr", "host", "num_gangs",
858         "num_workers", "present", "present_or_copy", "pcopy",
859         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
860         "present_or_create", "pcreate", "vector_length", "wait".
861         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
862         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
863         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
864         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
865         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
866         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
867         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
868         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
869         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
870         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
871         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
872         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
873         (cp_parser_oacc_parallel, cp_parser_oacc_update)
874         (cp_parser_oacc_wait): New functions.
875         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
876         (finish_oacc_parallel): New prototypes.
877         * semantics.c: Include "gomp-constants.h".
878         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
879         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
880         OMP_CLAUSE_SET_MAP_KIND.
881         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
882         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
883         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
884         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
885         functions.
887 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
889         PR c++/58671
890         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
891         self-initialization.
893 2015-01-13  Jason Merrill  <jason@redhat.com>
895         PR c++/64356
896         PR libstdc++/58777
897         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
898         pointer expressions.
899         (cxx_eval_increment_expression): Likewise.
901         PR c++/64514
902         * pt.c (coerce_template_parameter_pack): Return NULL for a
903         zero-length fixed parameter pack with a pack expansion arg.
905         PR c++/64520
906         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
908 2015-01-12  Jason Merrill  <jason@redhat.com>
910         PR c++/64547
911         * constexpr.c (cxx_eval_call_expression): A call to a void
912         function doesn't need to return a value.
914 2015-01-09  Michael Collison  <michael.collison@linaro.org>
916         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
917         input.h, alias.h, symtab.h, options.h, fold-const.h,
918         wide-int.h, and inchash.h due to flattening of tree.h.
919         * class.c: Ditto.
920         * constexpr.c: Ditto.
921         * cp-array-notation.c: Ditto.
922         * cp-gimplify.c: Ditto.
923         * cp-lang.c: Ditto.
924         * cp-objcp-common.c: Ditto.
925         * cvt.c: Ditto.
926         * decl2.c: Ditto.
927         * decl.c: Ditto.
928         * dump.c: Ditto.
929         * error.c: Ditto.
930         * except.c: Ditto.
931         * expr.c: Ditto.
932         * friend.c: Ditto.
933         * init.c: Ditto.
934         * lambda.c: Ditto.
935         * lex.c: Ditto.
936         * mangle.c: Ditto.
937         * name-lookup.c: Ditto.
938         * optimize.c: Ditto.
939         * parser.c: Ditto.
940         * pt.c: Ditto.
941         * ptree.c: Ditto.
942         * repo.c: Ditto.
943         * rtti.c: Ditto.
944         * search.c: Ditto.
945         * semantics.c: Ditto.
946         * tree.c: Ditto.
947         * typeck2.c: Ditto.
948         * typeck.c: Ditto.
950 2015-01-08  Jason Merrill  <jason@redhat.com>
952         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
953         * decl.c (compute_array_index_type): Likewise.
954         * init.c (build_vec_init): Likewise.
955         * typeck.c (cp_build_binary_op): Likewise.
957 2015-01-08  Jason Merrill  <jason@redhat.com>
959         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
960         whether an initializer-list is too big for a VLA.
961         (throw_bad_array_length): Remove.
962         * cp-tree.h: Remove prototype.
964 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
966         PR c++/60753
967         * decl.c (grokfndecl): Add bool parameter.
968         (grokdeclarator): Adjust calls.
969         (start_decl): Don't set DECL_DELETED_FN here.
971 2015-01-06  Jason Merrill  <jason@redhat.com>
973         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
974         template-ids.
976         PR c++/64455
977         * pt.c (type_dependent_expression_p): Handle variable templates.
978         * constexpr.c (potential_constant_expression_1): Use it.
980         PR c++/64487
981         * semantics.c (finish_offsetof): Handle templates here.
982         * parser.c (cp_parser_builtin_offsetof): Not here.
984         PR c++/64496
985         * semantics.c (process_outer_var_ref): Diagnose lambda in local
986         class NSDMI.
988 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
990         PR c++/64489
991         * class.c (check_field_decls): Make copy assignment operators
992         complex only in c++98 mode.
994 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
996         PR c++/31397
997         * class.c (check_for_override): Warn when a virtual function is an
998         override not marked override.
1000 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
1002         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1003         hold base_fndecls.
1004         (get_basefndecls): Adjust.
1006 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1008         Update copyright years.
1010 2015-01-05  Marek Polacek  <polacek@redhat.com>
1012         PR c/64423
1013         * typeck.c (cp_build_array_ref): Pass loc down to
1014         warn_array_subscript_with_type_char.
1017 Copyright (C) 2015 Free Software Foundation, Inc.
1019 Copying and distribution of this file, with or without modification,
1020 are permitted in any medium without royalty provided the copyright
1021 notice and this notice are preserved.