2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git] / gcc / cp / ChangeLog
blob0fa0926cd5ce60e8d0e558d90ddfff8ee282b871
1 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
3         * call.c (build_op_delete_call, convert_like_real, build_over_call):
4         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
5         of "%q+D".
6         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
7         * decl.c (duplicate_decls): Likewise for warning/warning_at.
8         * except.c (maybe_noexcept_warning): Likewise.
9         * friend.c (make_friend_class): Likewise for inform.
10         * mangle.c (mangle_decl): Likewise for warning/warning_at.
11         * method.c (process_subob_fn, walk_field_subobs,
12         maybe_explain_implicit_delete): Likewise for inform.
13         * parser.c (cp_parser_lambda_introducer): Likewise.
14         * pt.c (check_specialization_namespace,
15         maybe_process_partial_specialization): Likewise for permerror.
16         (redeclare_class_template): Likewise for inform_n.
17         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
18         * search.c (check_final_overrider): Likewise.
19         * semantics.c (process_outer_var_ref): Likewise.
21 2015-07-27  Jason Merrill  <jason@redhat.com>
23         * constexpr.c (cxx_eval_call_expression): Don't add this call to
24         the hash table if !depth_ok.
26 2015-07-27  Marek Polacek  <polacek@redhat.com>
28         PR c++/66555
29         PR c/54979
30         * call.c (build_new_op_1): Call warn_tautological_cmp.
31         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
32         compare warnings.
34 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
36         PR c++/18969
37         * typeck.c (check_return_expr): Also do the basic return-value
38         validity checking if processing_template_decl and yet types are
39         not dependent.  Remove obsolete code.
41 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
43         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
44         in warning_at instead of "%q+D" in warning.
45         (warn_extern_redeclared_static): Likewise for inform.
46         (check_redeclaration_no_default_args): Likewise for permerror.
47         (duplicate_decls): Likewise.
48         (check_previous_goto_1): Likewise for inform.
49         (check_goto, start_decl, check_for_uninitialized_const_var,
50         start_preparsed_function, finish_function§): Likewise.
51         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
52         * init.c (sort_mem_initializers): Likewise.
53         * typeck.c (convert_for_initialization): Likewise for inform.
54         (maybe_warn_about_returning_address_of_local): Likewise.
55         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
56         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
58 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
60         PR c++/66857
61         * cvt.c (ocp_convert): Don't call scalar_constant_value when
62         converting to a class type.
64 2015-07-24  Jason Merrill  <jason@redhat.com>
66         PR c++/64969
67         * pt.c (splice_late_return_type): Correct deduced return type for
68         abbreviated function template.
70 2015-07-24  Richard Biener  <rguenther@suse.de>
72         * init.c (build_vec_init): Build iterator bound in the same
73         type as the iterator.
75 2015-07-23  Marek Polacek  <polacek@redhat.com>
77         PR c++/66572
78         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
80 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
82         PR c++/52987
83         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
84         redundant error messages.
86 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
88         * decl.c (grokdeclarator): For an erroneous template parameter
89         propagate error_mark_node as type.
91 2015-07-20  Marek Polacek  <polacek@redhat.com>
93         PR c++/55095
94         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
96 2015-07-15  Jason Merrill  <jason@redhat.com>
98         PR c++/65091
99         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
100         template if there is no type x in scope.
102 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
104         PR c++/66850
105         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
106         template template parm in the redeclaration.
107         (lookup_template_class_1): Peel off irrelevant template levels
108         from current_template_parms before augmenting the argument
109         list.
111 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
113         PR c++/65071
114         * parser.c (cp_parser_sizeof_pack): Also consider template template
115         parameters.
117 2015-07-14  Jason Merrill  <jason@redhat.com>
119         * call.c (build_new_method_call_1): Call reshape_init.
121 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
123         * pt.c (check_template_shadow): Emit error + inform instead of
124         two errors.
126 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
128         PR c++/65186
129         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
130         template parm type under C++11 and later.
132 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
134         * call.c: Fix double word typos.
135         * cp-array-notation.c: Same.
136         * cp-tree.h: Same.
137         * init.c: Same.
138         * name-lookup.c: Same.
139         * parser.c: Same.
141 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
143         PR c++/30044
144         * pt.c (begin_template_parm_list): Add a dummy parameter level
145         to current_template_parms.
146         (end_template_parm_list): Remove the dummy parameter level
147         before adding the real one.
148         (tsubst): Don't attempt to substitute for template parameters
149         corresponding to a dummy argument level.
150         (template_parms_to_args): Remove obsolete hack for
151         giving template template arguments the proper level.
152         (splite_late_return_type): Remove obsolete hack for giving
153         template template arguments the proper level.
154         * error.c (dump_template_decl): Don't print dummy template
155         levels.
157 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
159         PR c++/54521
160         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
161         the second step of copy-initialization.
163 2015-07-10  Jason Merrill  <jason@redhat.com>
165         * pt.c (find_parameter_packs_r): Handle variable templates.
166         (variable_template_specialization_p): New.
167         * cp-tree.h: Declare it.
169         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
171 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
173         * decl2.c (cpp_check): Revert latest change.
175 2015-07-09  Jason Merrill  <jason@redhat.com>
177         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
178         value_dependent_expression_p.
180         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
181         template_parameter_pack_p.
182         * parser.c (declarator_can_be_parameter_pack): False if
183         parameter_pack_p is set.
184         (make_parameter_declarator): Add template_parameter_pack_p parm.
185         (cp_parser_template_parameter): Remove parameter pack parsing.
186         (cp_parser_parameter_declaration): Handle all parameter packs.
187         Tweak default argument permerror.
189 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
191         * parser.c (cp_parser_default_type_template_argument)
192         (cp_parser_default_template_template_argument): Factor out from
193         cp_parser_type_parameter.
195 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
197         * typeck.c (warn_args_num): Rename to error_args_num.
198         (convert_arguments): Adjust calls.
200 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
202         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
204 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
206         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
208 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
210         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
211         * pt.c (apply_late_template_attributes): Likewise.
213 2015-07-08  Marek Polacek  <polacek@redhat.com>
215         PR c++/66748
216         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
217         accessing TYPE_LANG_SPECIFIC node.
219 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
221         * call.c: Adjust includes.
222         * class.c: Likewise.
223         * constexpr.c: Likewise.
224         * cp-array-notation.c: Likewise.
225         * cp-gimplify.c: Likewise.
226         * cp-lang.c: Likewise.
227         * cp-objcp-common.c: Likewise.
228         * cp-ubsan.c: Likewise.
229         * cvt.c: Likewise.
230         * decl.c: Likewise.
231         * decl2.c: Likewise.
232         * dump.c: Likewise.
233         * error.c: Likewise.
234         * except.c: Likewise.
235         * expr.c: Likewise.
236         * friend.c: Likewise.
237         * init.c: Likewise.
238         * lambda.c: Likewise.
239         * lex.c: Likewise.
240         * mangle.c: Likewise.
241         * method.c: Likewise.
242         * name-lookup.c: Likewise.
243         * optimize.c: Likewise.
244         * parser.c: Likewise.
245         * pt.c: Likewise.
246         * ptree.c: Likewise.
247         * repo.c: Likewise.
248         * rtti.c: Likewise.
249         * search.c: Likewise.
250         * semantics.c: Likewise.
251         * tree.c: Likewise.
252         * typeck.c: Likewise.
253         * typeck2.c: Likewise.
255 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
257         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
259 2015-07-06  Jason Merrill  <jason@redhat.com>
261         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
262         for a template template parameter.
263         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
264         by reduce_template_parm_level.
266         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
267         expansion.
269 2015-07-02  Jason Merrill  <jason@redhat.com>
271         PR c++/66743
272         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
273         TYPE_VALUES_RAW rather than TYPE_FIELDS.
275 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
277         * pt.c (type_dependent_expression_p): Handle expressions
278         that refer to variable templates.
280 2015-07-01  Jason Merrill  <jason@redhat.com>
282         * lex.c (init_reswords): s/CXX0X/CXX11/.
283         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
285         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
286         Attribute mangling is now -fabi-version=10.
288         PR c++/65945
289         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
290         * class.c (layout_nonempty_base_or_field): Warn if that affects
291         the offset of a field.
293 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
295         PR c++/60365
296         * parser.c (cp_parser_check_std_attribute): New.
297         (cp_parser_std_attribute_list): Call it.
299 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
301         PR c++/66686
302         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
303         return 0 if tsubst returns a dependent type.
305 2015-06-30  Jason Merrill  <jason@redhat.com>
307         PR debug/66653
308         * decl2.c (is_late_template_attribute): True for tls_model.
310         PR debug/66653
311         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
312         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
313         (SET_DECL_GNU_TLS_P): New.
314         * call.c (make_temporary_var_for_ref_to_temp): Use
315         CP_DECL_THREAD_LOCAL_P.
316         (set_up_extended_ref_temp): Likewise.
317         * decl.c (duplicate_decls, expand_static_init): Likewise.
318         (redeclaration_error_message, grokvardecl): Likewise.
319         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
320         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
321         (handle_tls_init): Likewise.
322         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
323         * semantics.c (finish_id_expression): Likewise.
324         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
325         (finish_omp_threadprivate): Likewise.
326         * tree.c (decl_storage_duration): Likewise.
327         * cp-gimplify.c (omp_var_to_track): Likewise.
328         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
329         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
330         already set.
332 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
334         Implement N4197 - Adding u8 character literals
335         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
336         and CPP_UTF8CHAR_USERDEF tokens;
337         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
339 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
341         PR c++/65977
342         * decl.c (grokfndecl): Allow constexpr declarations of friend
343         template specializations.
345 2015-06-29  Manuel LĂłpez-Ibáñez  <manu@gcc.gnu.org>
347         PR fortran/66605
348         * decl.c (finish_function): Call do_warn_unused_parameter.
350 2015-06-29  Marek Polacek  <polacek@redhat.com>
352         PR c/66322
353         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
354         (push_switch): Set OUTSIDE_RANGE_P.
355         (pop_switch): Update c_do_switch_warnings call.
356         (finish_case_label): Update c_add_case_label call.
357         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
358         here.
360 2015-06-27  Marek Polacek  <polacek@redhat.com>
362         * call.c: Use VECTOR_TYPE_P.
363         * constexpr.c: Likewise.
364         * cvt.c: Likewise.
365         * decl.c: Likewise.
366         * decl2.c: Likewise.
367         * init.c: Likewise.
368         * semantics.c: Likewise.
369         * tree.c: Likewise.
370         * typeck.c: Likewise.
371         * typeck2.c: Likewise.
373 2015-06-27  Marek Polacek  <polacek@redhat.com>
375         * call.c (set_up_extended_ref_temp): Use VAR_P.
376         * class.c: Use VAR_P throughout.
377         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
378         * cp-array-notation.c (make_triplet_val_inv): Likewise.
379         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
380         throughout.
381         * decl2.c: Likewise.
382         * error.c (dump_decl): Use VAR_P.
383         * mangle.c (decl_implicit_alias_p): Likewise.
384         * parser.c: Use VAR_P throughout.
385         * pt.c: Likewise.
386         * semantics.c: Likewise.
387         * vtable-class-hierarchy.c: Likewise.
388         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
390 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
392         * pt.c (check_unstripped_args): Mark parameter as unused.
394 2015-06-26  Jason Merrill  <jason@redhat.com>
396         PR c++/66216
397         * class.c (finish_struct): Call fixup_attribute_variants.
399         PR c++/66684
400         * typeck2.c (merge_exception_specifiers): Allow different
401         noexcept-specifiers if we've had errors.
403         PR c++/66255
404         * pt.c (check_unstripped_args): Split out from...
405         (retrieve_specialization): ...here.  Allow typedefs in the type of
406         a non-type argument.
408         PR c++/66067
409         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
410         TYPE_DECLs.
411         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
413         PR c++/66654
414         * typeck2.c (digest_init_r): Only expect reshaping if the class is
415         aggregate.
417 2015-06-26  Marek Polacek  <polacek@redhat.com>
419         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
420         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
422 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
424         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
425         * class.c: Likewise.
426         * cp-ubsan.c: Likewise.
427         * decl.c: Likewise.
428         * decl2.c: Likewise.
429         * lambda.c: Likewise.
430         * mangle.c: Likewise.
431         * method.c: Likewise.
432         * optimize.c: Likewise.
433         * parser.c: Likewise.
434         * semantics.c: Likewise.
435         * tree.c: Likewise.
436         * vtable-class-hierarchy.c: Likewise.
438 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
440         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
441         rather than ggc_hasher.
442         (constexpr_call_hasher): Likewise.
443         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
444         * decl.c (typename_hasher): Likewise.
445         * mangle.c (conv_type_hasher): Likewise.
446         * pt.c (spec_hasher): Likewise.
447         * tree.c (cplus_array_hasher, list_hasher): Likewise.
448         * typeck2.c (abstract_type_hasher): Likewise.
450 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
452         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
453         rather than pointer_hash.
454         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
455         * semantics.c (nrv_data): Likewise.
456         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
458 2015-06-24  Jason Merrill  <jason@redhat.com>
460         PR c++/66647
461         * pt.c (dependent_type_p_r): Check for dependent alias template
462         specialization sooner.
464         PR c++/66501
465         * class.c (type_has_nontrivial_assignment): Remove.
466         * cp-tree.h: Remove declaration.
467         * init.c (vec_copy_assign_is_trivial): New.
468         (build_vec_init): Use it.
470 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
472         Implement N3928 - Extending static_assert
473         * parser.c (cp_parser_static_assert): Support static_assert with
474         no message string.  Supply an empty string in this case.
475         * semantics.c (finish_static_assert): Don't try to print a message if
476         the message strnig is empty.
478 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
480         PR c++/65750
481         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
482         implicit template parm if 'auto' is a placeholder for trailing
483         return type.
485 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
487         Revert:
488         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
490         PR c++/30044
491         * parser.c (cp_parser_template_parameter_list): Update
492         current_template_parms right after processing a paramater.
493         * pt.c (template_parms_to_args): Remove obsolete hack for
494         giving template template arguments the proper level.
495         (check_default_tmpl_args): Account for tested template
496         parameter_lists.
497         (splite_late_return_type): Remove obsolete hack for giving
498         template template arguments the proper level.
500 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
502         PR c++/65811
503         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
505 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
507         PR c++/30044
508         * parser.c (cp_parser_template_parameter_list): Update
509         current_template_parms right after processing a paramater.
510         * pt.c (template_parms_to_args): Remove obsolete hack for
511         giving template template arguments the proper level.
512         (check_default_tmpl_args): Account for tested template
513         parameter_lists.
514         (splite_late_return_type): Remove obsolete hack for giving
515         template template arguments the proper level.
517 2015-06-23  Jason Merrill  <jason@redhat.com>
519         PR c++/65879
520         * decl.c (grokfndecl): Check the linkage of ctype, not just
521         TYPE_ANONYMOUS_P.
522         * tree.c (no_linkage_check): Skip the 'this' pointer.
524         PR c++/66501
525         * class.c (type_has_nontrivial_assignment): New.
526         * init.c (build_vec_init): Use it.
527         * cp-tree.h: Declare it.
528         * method.c (trivial_fn_p): Templates aren't trivial.
530         PR c++/66542
531         * decl.c (expand_static_init): Make sure the destructor is callable
532         here even if we have an initializer.
534 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
536         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
537         -fdump-ada-spec is passed.
539 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
541         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
543 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
545         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
547 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
549         * decl.c (grokdeclarator): Remove pointless code.
551 2015-06-22  Jason Merrill  <jason@redhat.com>
553         PR c++/66515
554         * call.c (implicit_conversion): Only reshape for classes.
556 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
558         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
559         manually swapping.
560         * semantics.c (finish_omp_atomic): Likewise.
561         * typeck.c (cp_build_array_ref): Likewise.
563 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
565         PR c++/65882
566         * call.c (build_new_op_1): Check tf_warning flag in all cases.
568 2015-06-19  Jason Merrill  <jason@redhat.com>
570         PR c++/66585
571         * pt.c (instantiate_class_template_1): Clear
572         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
574         PR c++/65880
575         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
576         cv-qualifiers.
577         * typeck.c (merge_types): build_ptrmemfunc_type before applying
578         quals and attributes.
580         PR c++/65973
581         * constexpr.c (build_constexpr_constructor_member_initializers):
582         Handle an empty STATEMENT_LIST.
584         PR c++/65843
585         * pt.c (tsubst_copy_and_build): Register a capture proxy in
586         local_specializations.
588 2015-06-17  Jason Merrill  <jason@redhat.com>
590         PR c++/66001
591         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
592         TRY_FINALLY_EXPR.
593         (potential_constant_expression_1): Likewise.
595 2015-06-17  Jason Merrill  <jason@redhat.com>
597         PR c++/66515
598         * call.c (implicit_conversion): Call reshape_init here, early.
599         (build_aggr_conv): Not here.
601 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
603         PR c++/66571
604         * pt.c (tsubst_omp_clause_decl): New function.
605         (tsubst_omp_clauses): Use it or tsubst_copy instead of
606         tsubst_expr on OMP_CLAUSE_DECL.
608 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
610         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
611         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
612         * decl.c (grokdeclarator, xref_tag_1): Likewise.
613         * error.c (dump_aggr_type): likewise.
614         * pt.c (push_template_decl_real): Likewise.
615         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
617 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
619         * call.c: Do not include input.h, line-map.h or is-a.h.
620         * class.c: Likewise.
621         * constexpr.c: Likewise.
622         * cp-array-notation.c: Likewise.
623         * cp-gimplify.c: Likewise.
624         * cp-lang.c: Likewise.
625         * cp-objcp-common.c: Likewise.
626         * cp-tree.h: Likewise.
627         * cp-ubsan.c: Likewise.
628         * cvt.c: Likewise.
629         * decl.c: Likewise.
630         * decl2.c: Likewise.
631         * dump.c: Likewise.
632         * error.c: Likewise.
633         * except.c: Likewise.
634         * expr.c: Likewise.
635         * friend.c: Likewise.
636         * init.c: Likewise.
637         * lambda.c: Likewise.
638         * lex.c: Likewise.
639         * mangle.c: Likewise.
640         * method.c: Likewise.
641         * name-lookup.c: Likewise.
642         * optimize.c: Likewise.
643         * parser.c: Likewise.
644         * pt.c: Likewise.
645         * ptree.c: Likewise.
646         * repo.c: Likewise.
647         * rtti.c: Likewise.
648         * search.c: Likewise.
649         * semantics.c: Likewise.
650         * tree.c: Likewise.
651         * typeck.c: Likewise.
652         * typeck2.c: Likewise.
653         * vtable-class-hierarchy.c: Likewise.
655 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
657         PR c++/59682
658         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
660 2015-06-16  Jason Merrill  <jason@redhat.com>
662         PR c++/66536
663         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
664         mismatch.
666         PR c++/58063
667         * tree.c (bot_manip): Remap SAVE_EXPR.
669         PR c++/66387
670         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
672 2015-06-15  Nathan Sidwell  <nathan@acm.org>
674         PR c++/58583
675         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
676         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
677         protect it from recursive instantiation.
679 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
681         PR c++/51048
682         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
683         using a local type is pure virtual.
685 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
687         * call.c: Remove comment documenting the long-deleted
688         function build_method_call.
690 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
692         PR c++/65168
693         * typeck.c (cp_build_binary_op): Warn when comparing an address
694         of a reference against NULL.
696 2015-06-12  Jason Merrill  <jason@redhat.com>
698         PR c++/65719
699         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
700         variables as DECL_NOT_REALLY_EXTERN.
702 2015-06-11  Jason Merrill  <jason@redhat.com>
704         PR c++/66445
705         * constexpr.c (potential_constant_expression_1): Handle a
706         DECL_EXPR of TYPE_DECL.
708         PR c++/66450
709         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
710         ctx->ctor.
712 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
714         * decl.c (cxx_init_decl_processing): Register the main
715         translation unit through the new debug hook.
717 2015-06-10  Jason Merrill  <jason@redhat.com>
719         PR c++/66289
720         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
721         * pt.c (push_template_decl_real): Set it.
722         (dependent_alias_template_spec_p): Use it.
723         (dependent_type_p_r): Use dependent_alias_template_spec_p.
724         (uses_all_template_parms_data, uses_all_template_parms_r)
725         (complex_alias_template_p): New.
726         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
728 2015-06-09  Jason Merrill  <jason@redhat.com>
730         DR 1467
731         PR c++/51747
732         * typeck2.c (digest_init_r): Replace previous change with
733         gcc_unreachable.
735         PR c++/66387
736         * semantics.c (process_outer_var_ref): Make sure the value is
737         actually constant before returning it.
738         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
739         array.
741 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
743         PR c++/65815
744         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
745         * init.c (expand_default_init): Likewise.
747 2015-06-09  Jason Merrill  <jason@redhat.com>
749         PR c++/66383
750         * tree.c (replace_placeholders_r): Handle placeholders for an
751         outer object.
752         * typeck2.c (store_init_value): Only replace_placeholders for
753         objects of class type.
755 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
757         * call.c : Adjust include files.
758         * class.c : Likewise.
759         * constexpr.c : Likewise.
760         * cp-array-notation.c : Likewise.
761         * cp-cilkplus.c : Likewise.
762         * cp-gimplify.c : Likewise.
763         * cp-lang.c : Likewise.
764         * cp-objcp-common.c : Likewise.
765         * cp-tree.h : Likewise.
766         * cp-ubsan.c : Likewise.
767         * cvt.c : Likewise.
768         * decl.c : Likewise.
769         * decl2.c : Likewise.
770         * dump.c : Likewise.
771         * error.c : Likewise.
772         * except.c : Likewise.
773         * expr.c : Likewise.
774         * friend.c : Likewise.
775         * init.c : Likewise.
776         * lambda.c : Likewise.
777         * lex.c : Likewise.
778         * mangle.c : Likewise.
779         * method.c : Likewise.
780         * name-lookup.c : Likewise.
781         * optimize.c : Likewise.
782         * parser.c : Likewise.
783         * pt.c : Likewise.
784         * ptree.c : Likewise.
785         * repo.c : Likewise.
786         * rtti.c : Likewise.
787         * search.c : Likewise.
788         * semantics.c : Likewise.
789         * tree.c : Likewise.
790         * typeck.c : Likewise.
791         * typeck2.c : Likewise.
792         * vtable-class-hierarchy.c : Likewise.
794 2015-06-05  Jason Merrill  <jason@redhat.com>
796         PR c++/66405
797         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
798         the expansion has extra args.
799         (use_pack_expansion_extra_args_p): Return true in that case.
801         PR c++/66405
802         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
803         dependent even if it has a type.
805 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
807         * cp-objcp-common.c: Adjust comment for
808         cxx_warn_unused_global_decl.
809         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
810         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
811         * cp-tree.h (note_mangling_alias): Protoize.
812         (cp_write_global_declarations): Remove.
813         (cxx_post_compilation_parsing_cleanups): Protoize.
814         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
815         argument.
816         * decl2.c (mangling_aliases): New global.
817         (build_java_method_aliases): New.  Adapted from
818         collect_candidates_for_java_method_aliases.
819         (collect_candidates_for_java_method_aliases): Remove.
820         (build_java_method_aliases): Remove.
821         (generate_mangling_aliases): New.
822         (note_mangling_alias): New.  Moved from mangle_decl.
823         (locus_at_end_of_parsing): New global.
824         (c_parse_final_cleanups): Rename from
825         cp_write_global_declarations.
826         Use locus_at_end_of_parsing.
827         Call generate_mangling_aliases.
828         Rename call to collect_candidates_for_java_method_aliases into
829         build_java_method_aliases.
830         Remove call to finalize_compilation_unit.
831         Move vtable handling into cxx_post_compilation_parsing_cleanups.
832         Do not call check_global_declarations or
833         emit_debug_global_declarations.
834         (cxx_post_compilation_parsing_cleanups): New.
835         * mangle.c (mangle_decl): Move code to note_mangling_alias.
836         * name-lookup.c (do_namespace_alias): Call early_global_decl.
838 2015-06-05  Nathan Sidwell  <nathan@acm.org>
840         PR c++/52595
841         * parser.c (cp_parser_cache_defarg): Continue looking for
842         declarators when scanning a potential template argument list of an
843         NSDMI.
845 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
847         * call.c: Adjust includes for restructured coretypes.h.
848         * class.c: Likewise.
849         * constexpr.c: Likewise.
850         * cp-array-notation.c: Likewise.
851         * cp-gimplify.c: Likewise.
852         * cp-lang.c: Likewise.
853         * cp-objcp-common.c: Likewise.
854         * cp-tree.h: Likewise.
855         * cp-ubsan.c: Likewise.
856         * cvt.c: Likewise.
857         * decl.c: Likewise.
858         * decl2.c: Likewise.
859         * dump.c: Likewise.
860         * error.c: Likewise.
861         * except.c: Likewise.
862         * expr.c: Likewise.
863         * friend.c: Likewise.
864         * init.c: Likewise.
865         * lambda.c: Likewise.
866         * lex.c: Likewise.
867         * mangle.c: Likewise.
868         * method.c: Likewise.
869         * name-lookup.c: Likewise.
870         * optimize.c: Likewise.
871         * parser.c: Likewise.
872         * pt.c: Likewise.
873         * ptree.c: Likewise.
874         * repo.c: Likewise.
875         * rtti.c: Likewise.
876         * search.c: Likewise.
877         * semantics.c: Likewise.
878         * tree.c: Likewise.
879         * typeck.c: Likewise.
880         * typeck2.c: Likewise.
881         * vtable-class-hierarchy.c: Likewise.
883 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
885         PR c++/66192
886         PR target/66200
887         * cp-tree.h (get_guard_cond): Adjust declaration
888         * decl.c (expand_static_init): Use atomic load acquire
889         and adjust call to get_guard_cond.
890         * decl2.c (build_atomic_load_byte): New function.
891         (get_guard_cond): Handle thread_safety.
892         (one_static_initialization_or_destruction): Adjust call to
893         get_guard_cond.
895 2015-06-03  Jason Merrill  <jason@redhat.com>
897         PR c++/44282
898         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
899         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
900         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
901         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
903 2015-06-03  Manuel LĂłpez-Ibáñez  <manu@gcc.gnu.org>
904             Paolo Carlini  <paolo.carlini@oracle.com>
906         PR c++/66130
907         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
908         use it in the diagnostic.
909         (decay_conversion): Adjust call.
910         * semantics.c (finish_decltype_type): Likewise.
911         * call.c (resolve_args, build_new_op_1,
912         perform_implicit_conversion_flags): Adjust calls.
913         * cvt.c (ocp_convert, convert_to_void): Likewise.
914         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
916 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
918         * decl.c (check_tag_decl): Use declspecs->locations as locations in
919         error_at and warning_at calls.
921 2015-06-03  Marek Polacek  <polacek@redhat.com>
923         PR sanitizer/66190
924         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
925         (cp_genericize_r): Don't instrument static initializers.
926         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
928 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
930         * decl.c (start_function): Call plugin before parsing.
931         (finish_function): Call plugin after parsing.
933 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
935         * cp-tree.h (init_error): Remove declaration.
936         * error.c (scratch_pretty_printer): Rename to ...
937         (actual_pretty_printer): ... this.
938         (cxx_pp): Constify and update accordingly.
939         (init_error): Remove definition.
940         * lex.c (cxx_init): Do not call init_error.
942 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
944         PR c++/61683
945         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
947 2015-06-01  Jason Merrill  <jason@redhat.com>
949         PR c++/65942
950         * decl2.c (mark_used): Don't always instantiate constexpr fns.
951         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
953         PR c++/44282
954         * mangle.c (attr_strcmp): New.
955         (write_CV_qualifiers_for_type): Also write out attributes that
956         affect type identity.
957         (write_type): Strip all attributes after writing qualifiers.
959 2015-05-31  Jason Merrill  <jason@redhat.com>
961         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
963         PR c++/66320
964         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
965         with the wrong type as non-constant.
967 2015-05-27  Jason Merrill  <jason@redhat.com>
969         * decl.c (check_redeclaration_exception_specification): Depend on
970         -Wsystem-headers rather than -pedantic.
972         * decl.c (warn_extern_redeclared_static): Use the location of
973         newdecl in diagnostics, not input_location.
974         (validate_constexpr_redeclaration): Likewise.
975         (check_redeclaration_no_default_args): Likewise.
976         (duplicate_decls): Likewise.
977         (check_redeclaration_exception_specification): Likewise.
978         Change second diagnostic to inform.
980 2015-05-24  Nathan Sidwell  <nathan@acm.org>
982         PR c++/66243
983         * decl.c (build_enumerator): Don't silently convert scoped enums.
985 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
987         PR lto/66180
988         * mangle.c (mangle_decl): Mangle anonymous namespace types as
989         "<anon>".
991 2015-05-23  Nathan Sidwell  <nathan@acm.org>
993         PR c++/65936
994         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
996 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
998         * Make-lang.in (check_g++_parallelize): Update comment.
1000 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1002         PR c++/65598
1003         * decl.c (grokdeclarator): Use the correct location in error
1004         messages about 'explicit'.
1006 2015-05-22  Marek Polacek  <polacek@redhat.com>
1007             Edward Smith-Rowland  <3dw4rd@verizon.net>
1009         PR c/47043
1010         * cp-tree.h (build_enumerator): Update declaration.
1011         * decl.c (build_enumerator): Add attributes parameter.  Call
1012         cplus_decl_attributes.
1013         * init.c (constant_value_1): Pass tf_none to mark_used.
1014         * parser.c (cp_parser_enumerator_definition): Parse attributes and
1015         pass them down to build_enumerator.
1016         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1017         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1019 2015-05-21  Nathan Sidwell  <nathan@acm.org>
1021         PR c++/60943
1022         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1024 2015-05-21  Marek Polacek  <polacek@redhat.com>
1026         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1028 2015-05-20  Jason Merrill  <jason@redhat.com>
1030         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1031         before register_specialization.
1033         * decl.c (grok_op_properties): Don't complain about size_t
1034         placement delete here.
1035         * call.c (second_parm_is_size_t): Split out from...
1036         (non_placement_deallocation_fn_p): ...here.
1037         (build_op_delete_call): Warn about size_t placement delete with
1038         -Wc++14-compat.
1040 2015-05-19  Nathan Sidwell  <nathan@acm.org>
1042         PR c++/65954
1043         * typeck.c (finish_class_member_access_expr): Diagnose failed
1044         lookup of enum class member.
1046 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1048         PR middle-end/66199
1049         * parser.c (cp_parser_omp_for_loop): Don't add
1050         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1051         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1052         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1053         constructs.
1055 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1057         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1058         swaps.
1060 2015-05-18  Jason Merrill  <jason@redhat.com>
1062         * pt.c (retrieve_specialization): Make sure our arguments have
1063         gone through strip_typedefs.
1065         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1066         (determine_specialization): Call coerce_template_parms.
1068         DR 1391
1069         * pt.c (type_unification_real): Check convertibility here.
1070         (unify_one_argument): Not here.
1072         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1073         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1074         [TREE_LIST]: Fix no-change case.
1076         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1078 2015-05-16  Manuel LĂłpez-Ibáñez  <manu@gcc.gnu.org>
1080         PR fortran/44054
1081         * error.c (cp_diagnostic_starter): Use diagnostic_location
1082         function.
1083         (cp_print_error_function): Likewise.
1084         (cp_printer): Replace locus pointer with accessor function.
1086 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1088         * parser.c (cp_parser_selection_statement): Add location and
1089         guard_kind arguments to calls to
1090         cp_parser_implicitly_scoped_statement.
1091         (cp_parser_iteration_statement): Likewise for calls to
1092         cp_parser_already_scoped_statement.
1093         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1094         "guard_kind" params; use them to warn for misleading
1095         indentation.
1096         (cp_parser_already_scoped_statement): Likewise.
1098 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
1100         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1101         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1102         * semantics.c (finish_member_declaration): Likewise.
1103         * method.c (lazily_declare_fn): Allways add method to main variant list.
1105 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
1107         PR bootstrap/66085
1108         * decl2.c (note_mangling_alias): Declare arguments as unused.
1110 2015-05-08  Jason Merrill  <jason@redhat.com>
1112         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1113         -Wc++0x-compat.
1115 2015-05-08  Jason Merrill  <jason@redhat.com>
1117         * decl2.c (mangling_aliases): New variable.
1118         (note_mangling_alias, generate_mangling_aliases): New.
1119         (cp_write_global_declarations): Call generate_mangling_aliases.
1120         (generate_mangling_alias): Split out from...
1121         * mangle.c (mangle_decl): ...here.
1122         * cp-tree.h: Declare note_mangling_alias.
1124 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
1126         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1127         (build_java_method_aliases): Adapt to use create_same_body_alias
1128         instead of assemble_alias.  Move variable declarations to
1129         definition and tidy up.
1130         (cp_write_global_declarations): Call build_java_method_aliases
1131         instead of collecting candidates first.
1133 2015-05-07  Jason Merrill  <jason@redhat.com>
1135         PR c++/59012
1136         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1137         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1138         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1139         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1140         (apply_late_template_attributes): Handle attribute pack expansion.
1142 2015-05-07  Marek Polacek  <polacek@redhat.com>
1144         PR c/65179
1145         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
1146         value.
1148 2015-05-07  Jason Merrill  <jason@redhat.com>
1150         DR 1467
1151         PR c++/51747
1152         * typeck2.c (digest_init_r): Fix single element list.
1154 2015-05-05  Jason Merrill  <jason@redhat.com>
1156         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
1157         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
1158         MUST_NOT_THROW_EXPR.
1159         (cp_genericize_data): Add try_block field.
1160         (cp_genericize_tree): Initialize it.
1161         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
1162         implicit rethrow.
1164         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
1165         Return false.
1167         * semantics.c (finish_call_expr): Check complain.
1169         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
1170         maybe-in-charge constructor.
1172         * decl.c (start_decl): Don't push the plain VAR_DECL for a
1173         variable template.
1175         DR 1518
1176         DR 1630
1177         PR c++/54835
1178         PR c++/60417
1179         * call.c (convert_like_real): Check value-initialization before
1180         explicit.
1181         * typeck2.c (process_init_constructor_record): Don't set
1182         CONSTRUCTOR_IS_DIRECT_INIT.
1183         (process_init_constructor_array): Likewise.
1184         * init.c (build_vec_init): Likewise.
1186 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1188         * parser.c (cp_parser_asm_definition): Only test for
1189         error_mark_node if "outputs" was just set.  Likewise for "inputs".
1191 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1192             Jakub Jelinek  <jakub@redhat.com>
1194         PR c++/66007
1195         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1196         result in an actual error.
1198 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1199             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
1201         PR c++/65858
1202         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1203         false.
1205 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
1207         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
1208         trailing semicolon.
1210 2015-04-29  Jason Merrill  <jason@redhat.com>
1212         PR c++/50800
1213         * tree.c (apply_identity_attributes): Fix handling of classes.
1215 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1217         * parser.c (cp_parser_oacc_enter_exit_data): Use
1218         OMP_STANDALONE_CLAUSES.
1220 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
1222         PR c++/64667
1223         * init.c (perform_member_init): Handle references for -Winit-self.
1225 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
1227         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1228         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1230 2015-04-28  Jason Merrill  <jason@redhat.com>
1232         PR c++/65896
1233         * constexpr.c (cxx_eval_store_expression): Don't try to actually
1234         store an empty class.
1236         PR c++/65656
1237         * constexpr.c (cxx_eval_builtin_function_call): Fix
1238         __builtin_constant_p.
1240         PR c++/50800
1241         * tree.c (strip_typedefs): Add remove_attributes parm.
1242         (strip_typedefs_expr): Likewise.
1243         (apply_identity_attributes): New subroutine of strip_typedefs.
1244         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
1245         (convert_nontype_argument, unify): Likewise.
1246         * cp-tree.h: Adjust.
1248         PR c++/65734
1249         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
1251 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
1253         * class.c (layout_class_type): Remove check if
1254         PCC_BITFIELD_TYPE_MATTERS is defined.
1256 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1258         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
1260 2015-04-24  Jason Merrill  <jason@redhat.com>
1262         PR c++/50800
1263         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
1265         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
1266         Remove obsolete code.
1267         [NE_EXPR]: Likewise.
1269 2015-04-23  Jason Merrill  <jason@redhat.com>
1271         PR c++/65646
1272         * pt.c (check_explicit_specialization): Don't
1273         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
1274         headers.
1275         * decl.c (grokvardecl): Revert earlier fix.
1277 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
1279         PR c++/65801
1280         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1281         suppresses the diagnostic.
1283 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
1285         Reject trailing return type for an operator auto().
1286         * decl.c (grokdeclarator): Reject trailing return types for
1287         all conversion operators, don't handle conversion operators
1288         in the previous checks that deal with auto.
1290 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
1292         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1294 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1296         * class.c (resolve_address_of_overloaded_function, instantiate_type):
1297         Rename tsubst_flags_t parameter flags -> complain.
1299 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1301         * call.c (build_op_delete_call, build_over_call): Check mark_used
1302         return value.
1303         * class.c (resolve_address_of_overloaded_function): Likewise.
1304         * decl.c (cxx_maybe_build_cleanup): Likewise.
1305         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
1306         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
1307         * rtti.c (build_dynamic_cast_1): Likewise.
1308         * semantics.c (process_outer_var_ref): Likewise.
1309         * typeck.c (build_class_member_access_expr,
1310         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
1312 2015-04-15  Jason Merrill  <jason@redhat.com>
1314         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
1315         (build_constexpr_constructor_member_initializers): Loop to find
1316         the BIND_EXPR.
1317         * decl.c (start_preparsed_function): Clobber the object at the
1318         beginning of a constructor.
1320         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
1321         * method.c (implicitly_declare_fn): Likewise.
1322         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
1324         * decl2.c (determine_visibility): Use get_template_info.
1326 2015-04-15  Jason Merrill  <jason@redhat.com>
1327             Marek Polacek  <polacek@redhat.com>
1329         PR c++/65727
1330         * lambda.c (lambda_expr_this_capture): In unevaluated context go
1331         through the normal loop, just don't capture.
1332         (maybe_resolve_dummy): Handle null return.
1334 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
1336         * call.c (enforce_access): Emit error + inform.
1338 2015-04-15  Marek Polacek  <polacek@redhat.com>
1340         * constexpr.c (use_new_call): Remove #define.
1341         (lookup_parameter_binding): Remove function.
1342         (cxx_bind_parameters_in_call): Remove unused code.
1343         (cxx_eval_call_expression): Likewise.
1344         (cxx_eval_constant_expression): Likewise.
1346 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
1348         * tree.c (replace_placeholders_t): Remove unused type.
1349         (replace_placeholders): Remove unused pset.
1351 2015-04-14  Jason Merrill  <jason@redhat.com>
1353         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
1355         PR c++/65695
1356         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1358         PR c++/65721
1359         * name-lookup.c (do_class_using_decl): Complain about specifying
1360         the current class even if there are dependent bases.
1362 2015-04-14  David Krauss  <david_work@me.com>
1364         PR c++/59766
1365         * decl.c (grokdeclarator): Do not flag friends with deduced return.
1367 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
1368             Jason Merrill  <jason@redhat.com>
1370         PR c++/60994
1371         * parser.c (cp_parser_class_name): Add enum_ok parameter.
1372         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
1373         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
1374         a class template.
1376 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
1378         PR c++/65736
1379         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1380         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
1381         the expression to the original type at the end.
1383 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
1385         PR c++/65690
1386         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1387         TYPE_USER_ALIGN.
1389         PR c++/65690
1390         * tree.c (build_cplus_array_type): Layout type before variants are
1391         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1392         variant.
1394 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1396         PR c++/64085
1397         * lambda.c (add_capture): Use dependent_type_p for capture by
1398         reference too.
1400 2015-04-02  Marek Polacek  <polacek@redhat.com>
1402         PR c++/65642
1403         * constexpr.c (cxx_eval_pointer_plus_expression): Call
1404         cxx_eval_constant_expression on the first operand.
1406 2015-04-01  Jason Merrill  <jason@redhat.com>
1408         PR c++/65625
1409         * decl.c (make_typename_type): Handle seeing a variable template.
1411 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1413         PR c++/56100
1414         * pt.c (instantiating_current_function_p): New.
1415         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1416         * cp-tree.h (instantiating_current_function_p): Declare.
1418 2015-04-01  Jason Merrill  <jason@redhat.com>
1420         PR c++/65646
1421         * decl.c (grokvardecl): Don't call check_explicit_specialization
1422         for non-template members of a class template.
1424 2015-04-01  Marek Polacek  <polacek@redhat.com>
1426         PR c++/65554
1427         * class.c (finish_struct): Require that the second field of a
1428         user-defined initializer_list be of size type.
1430 2015-03-31  Marek Polacek  <polacek@redhat.com>
1432         PR c++/65390
1433         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1434         checking for constness.
1436 2015-03-30  Marek Polacek  <polacek@redhat.com>
1438         PR c++/65398
1439         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1440          *(&A[i] p+ j) => A[i + j] transformation here.
1441         (cxx_eval_pointer_plus_expression): New function.
1442         (cxx_eval_constant_expression): Use it here.
1444 2015-03-27  Tobias Burnus  <burnus@net-b.de>
1446         PR c/65586
1447         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1448         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1449         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1450         -fopenmp-simd.
1452 2015-03-27  Marek Polacek  <polacek@redhat.com>
1454         PR c++/65556
1455         * semantics.c (finish_switch_cond): If the unlowered type is not an
1456         enum, use the type of the condition.
1458 2015-03-27  Jason Merrill  <jason@redhat.com>
1460         PR c++/65509
1461         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1462         constants.
1464 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
1466         PR c++/65154
1467         * init.c (build_vec_init): Fix initializing aggregates
1468         with empty init list.
1470 2015-03-26  Jason Merrill  <jason@redhat.com>
1472         PR c++/65525
1473         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1475 2015-03-25  Marek Polacek  <polacek@redhat.com>
1477         PR c++/65558
1478         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1479         on an anonymous namespace.
1481 2015-03-25  Marek Polacek  <polacek@redhat.com>
1483         PR c++/61670
1484         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1486 2015-03-24  Jason Merrill  <jason@redhat.com>
1488         PR c++/65046
1489         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1490         * parser.c (cp_parser_namespace_definition): Don't set it.
1491         * name-lookup.c (handle_namespace_attrs): Check
1492         DECL_NAMESPACE_ASSOCIATIONS instead.
1494         PR c++/65498
1495         * pt.c (get_mostly_instantiated_function_type): Just return the
1496         type of the partially instantiated template in DECL_TI_TEMPLATE.
1498 2015-03-20  Marek Polacek  <polacek@redhat.com>
1500         PR c++/65398
1501         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1502         A[i + j].
1504 2015-03-20  Marek Polacek  <polacek@redhat.com>
1506         PR c++/65072
1507         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1508         variant.
1510 2015-03-19  Jason Merrill  <jason@redhat.com>
1512         PR c++/65046
1513         Automatically propagate ABI tags to variables and functions
1514         from their (return) type.
1515         * class.c (check_tag): Handle variables and functions.
1516         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1517         (mark_or_check_tags): Likewise.
1518         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
1519         (check_abi_tags): Add single argument overload for decls.
1520         Handle inheriting tags for decls.
1521         * mangle.c (write_mangled_name): Call it.
1522         (mangle_return_type_p): Split out from write_encoding.
1523         (unmangled_name_p): Split out from write_mangled_name.
1524         (write_mangled_name): Ignore abi_tag on namespace.
1525         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1526         * parser.c (cp_parser_namespace_definition): Set it.
1527         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1528         about abi_tag attribute on non-inline namespace.
1529         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1530         (handle_abi_tag_attribute): Allow tags on variables.
1532 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
1534         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1535         attribute for DECL_EXTERNAL VAR_DECLs.
1537 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
1539         PR c++/65340
1540         * call.c (build_over_call): Pass the tsubst_flags_t argument to
1541         mark_used.
1542         * decl2.c (mark_used): Inline the require_deduced_type call and
1543         guard the error call.
1545 2015-03-16  Jason Merrill  <jason@redhat.com>
1547         PR c++/65061
1548         * parser.c (cp_parser_template_name): Call strip_using_decl.
1550 2015-03-16  Marek Polacek  <polacek@redhat.com>
1552         DR 1688
1553         PR c++/65327
1554         * decl.c (grokdeclarator): Allow volatile and constexpr together.
1556 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1558         PR c++/65323
1559         * decl.c (check_default_argument): Don't call
1560         maybe_warn_zero_as_null_pointer_constant.
1562 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
1564         * cp-gimplify.c (simple_empty_class_p): New.
1565         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
1566         the code for empty class copies into simple_empty_class_p, and
1567         adapt it to handle COMPOUND_EXPRs.
1569 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
1571         PR c++/65370
1572         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1573         only if the location of newdecl doesn't match the location of olddecl.
1575 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1577         PR c++/65127
1578         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1579         is not a PARM_DECL.
1581 2015-03-10  Jason Merrill  <jason@redhat.com>
1583         PR c++/65333
1584         DR 1558
1585         * pt.c (dependent_type_p_r): Check both class and alias template args.
1587 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
1589         PR c/65120
1590         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1591         before preparing arguments to warn_logical_not_parentheses.
1592         Use maybe_constant_value on rhs.
1594 2015-03-09  Jason Merrill  <jason@redhat.com>
1596         PR c++/65339
1597         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1599 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
1601         PR c/65120
1602         * parser.c (cp_parser_binary_expression): Don't warn for
1603         !!x == y or !b == y where b is bool.
1605 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
1607         * ptree.c (cxx_print_lambda_node): New.
1608         (cxx_print_xnode): Handle LAMBDA_EXPR.
1610 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
1612         PR c++/65295
1613         * constexpr.c (cxx_eval_constant_expression): Remove assert in
1614         RESULT_DECL handling.
1616 2015-02-26  Marek Polacek  <polacek@redhat.com>
1618         PR c++/65202
1619         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1620         a RETURN_EXPR if its operand is null.
1622 2015-02-25  Jason Merrill  <jason@redhat.com>
1624         PR c++/65209
1625         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1626         DECL_COMDAT.
1627         (constrain_visibility_for_template): Handle reference arguments.
1629         PR debug/58315
1630         * decl.c (start_preparsed_function): Use create_artificial_label
1631         for cdtor_label.
1633 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
1634             Jakub Jelinek  <jakub@redhat.com>
1636         PR c++/65075
1637         * constexpr.c (check_constexpr_bind_expr_vars): Allow
1638         implicit typedefs for lambda types.
1640 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1642         PR c++/60894
1643         * decl.c (lookup_and_check_tag): Use strip_using_decl.
1645 2015-02-13  Jason Merrill  <jason@redhat.com>
1647         PR c++/65054
1648         * pt.c (template_args_equal): Look through conversions here.
1649         * tree.c (cp_tree_equal): Not here.
1651 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1653         PR c++/60211
1654         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1655         pragma_external context.
1657 2015-02-13  Jason Merrill  <jason@redhat.com>
1659         PR c++/65051
1660         * call.c (reference_binding): Don't look for bad conversion
1661         if TO is incomplete.
1663 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
1665         PR c++/64970
1666         * decl.c (make_typename_type): Pass tsubst_flags_t argument
1667         to lookup_template_class.
1669 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
1671         PR ipa/65034
1672         * decl.c (start_preparsed_function): Use void_type_node instead
1673         of NULL_TREE as LABEL_DECL type.
1675 2015-02-12  Jason Merrill  <jason@redhat.com>
1677         PR c++/64898
1678         * mangle.c (write_mangled_name): Fix test for variable template
1679         instantiation.
1681         * decl.c (begin_destructor_body): Condition clobber on
1682         -flifetime-dse.
1684 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1686         PR c++/64959
1687         * parser.c (lookup_literal_operator): Return all candidates.
1688         (cp_parser_userdef_char_literal): Simplify error handling.
1689         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
1690         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1691         Also give higher priority to standard string UDL operator.
1693 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
1695         PR debug/55541
1696         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1697         * decl.c (poplevel): If functionbody, try not to create an extra
1698         BLOCK for function body and use subblocks as that, if it is non-NULL
1699         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
1700         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1702         PR sanitizer/64984
1703         * except.c (check_noexcept_r): Return NULL for internal
1704         calls.
1706 2015-02-10  Jason Merrill  <jason@redhat.com>
1708         PR c++/64994
1709         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1711 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
1713         PR ipa/64982
1714         * method.c (use_thunk): Do not check for stdarg thunks.
1716 2015-02-06  Jason Merrill  <jason@redhat.com>
1718         PR c++/64899
1719         * init.c (build_vec_init): Handle default-initialized array with
1720         constexpr default constructor.
1722 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
1724         PR c/64824
1725         PR c/64868
1726         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1728 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
1730         PR c++/64877
1731         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1732         for generated expressions.
1734 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
1736         PR c++/64901
1737         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1738         DECL_OVERRIDE_P.
1740 2015-02-02  Jason Merrill  <jason@redhat.com>
1742         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1744 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
1746         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1747         changed to pass input_location as first argument.
1749 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
1751         PR c++/64717
1752         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1753         into SAVE_EXPR.
1755 2015-01-29  Jason Merrill  <jason@redhat.com>
1757         PR c++/49508
1758         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1759         erroneous return statement.
1761         PR c++/64521
1762         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1763         point.
1765 2015-01-27  Caroline Tice  <cmtice@google.com>
1767         Committing VTV Cywin/Ming patch for Patrick Wollgast
1768         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1769         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1771 2015-01-27  Jason Merrill  <jason@redhat.com>
1773         PR c++/58597
1774         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1775         current_function_decl.
1777         PR c++/63889
1778         * pt.c (finish_template_variable): Move from semantics.c.
1779         Handle multiple template arg levels.  Handle coercion here.
1780         (lookup_template_variable): Not here.
1782 2015-01-23  Jason Merrill  <jason@redhat.com>
1784         PR c++/64314
1785         PR c++/57510
1786         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1787         that has been completely split out.
1789         PR c++/64701
1790         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1791         statement codes.
1793         PR c++/64727
1794         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1795         of CONST_DECL.
1797 2015-01-21  Jason Merrill  <jason@redhat.com>
1799         PR c++/64603
1800         * constexpr.c (cxx_eval_constant_expression): Only shortcut
1801         constant CONSTRUCTORs.
1803         PR c++/64647
1804         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1805         give a hard error in a template instantiation.
1807 2015-01-21  Richard Biener  <rguenther@suse.de>
1809         PR middle-end/64313
1810         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1811         for builtins the user declared correctly.
1813 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1815         PR c++/58614
1816         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1817         TREE_TYPE (elt) == error_mark_node.
1819 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
1821         PR tree-optimization/62053
1822         * tree.c (build_cplus_array_type): Layout type after variants are set.
1824 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
1826         * cp-gimplify.c (cp_genericize_r): Call
1827         cp_ubsan_maybe_instrument_member_call for member calls.
1828         (cp_ubsan_check_member_access_r): New function.
1829         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1830         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1831         cp_ubsan_instrument_member_accesses,
1832         cp_ubsan_maybe_instrument_downcast,
1833         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1834         * cp-ubsan.c: New file.
1835         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1836         * constexpr.c (cxx_eval_call_expression): Return void_node
1837         for IFN_UBSAN_VPTR.
1838         (potential_constant_expression_1): Return true for
1839         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1840         * typeck.c (build_class_member_access_expr): Provide locus
1841         for COMPONENT_REFs.
1842         (build_static_cast_1): Instrument downcasts.
1843         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1844         add ubsan instrumentation for virtual_access.
1845         * call.c: Include internal-fn.h.
1846         (set_flags_from_callee): Handle internal calls.
1848 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
1850         PR c++/59366
1851         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1852         and function templates, declared only in the class.
1853         * decl.c (duplicate_decls): Reveal hidden friend functions or
1854         function templates, if they are redeclared outside the class.
1856 2015-01-15  Jason Merrill  <jason@redhat.com>
1858         PR c++/64356
1859         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1861         PR c++/63283
1862         * constexpr.c (potential_constant_expression_1): Handle reference
1863         args in templates.
1865 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1866             James Norris  <jnorris@codesourcery.com>
1867             Cesar Philippidis  <cesar@codesourcery.com>
1868             Ilmir Usmanov  <i.usmanov@samsung.com>
1869             Jakub Jelinek  <jakub@redhat.com>
1871         * parser.c: Include "gomp-constants.h".
1872         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1873         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1874         Use OMP_CLAUSE_SET_MAP_KIND.
1875         (cp_parser_omp_construct, cp_parser_pragma): Handle
1876         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1877         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1878         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1879         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1880         "create", "delete", "deviceptr", "host", "num_gangs",
1881         "num_workers", "present", "present_or_copy", "pcopy",
1882         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1883         "present_or_create", "pcreate", "vector_length", "wait".
1884         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1885         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1886         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1887         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1888         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1889         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1890         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1891         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1892         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1893         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1894         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1895         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1896         (cp_parser_oacc_parallel, cp_parser_oacc_update)
1897         (cp_parser_oacc_wait): New functions.
1898         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1899         (finish_oacc_parallel): New prototypes.
1900         * semantics.c: Include "gomp-constants.h".
1901         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
1902         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
1903         OMP_CLAUSE_SET_MAP_KIND.
1904         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1905         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1906         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1907         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1908         functions.
1910 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
1912         PR c++/58671
1913         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1914         self-initialization.
1916 2015-01-13  Jason Merrill  <jason@redhat.com>
1918         PR c++/64356
1919         PR libstdc++/58777
1920         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1921         pointer expressions.
1922         (cxx_eval_increment_expression): Likewise.
1924         PR c++/64514
1925         * pt.c (coerce_template_parameter_pack): Return NULL for a
1926         zero-length fixed parameter pack with a pack expansion arg.
1928         PR c++/64520
1929         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1931 2015-01-12  Jason Merrill  <jason@redhat.com>
1933         PR c++/64547
1934         * constexpr.c (cxx_eval_call_expression): A call to a void
1935         function doesn't need to return a value.
1937 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1939         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1940         input.h, alias.h, symtab.h, options.h, fold-const.h,
1941         wide-int.h, and inchash.h due to flattening of tree.h.
1942         * class.c: Ditto.
1943         * constexpr.c: Ditto.
1944         * cp-array-notation.c: Ditto.
1945         * cp-gimplify.c: Ditto.
1946         * cp-lang.c: Ditto.
1947         * cp-objcp-common.c: Ditto.
1948         * cvt.c: Ditto.
1949         * decl2.c: Ditto.
1950         * decl.c: Ditto.
1951         * dump.c: Ditto.
1952         * error.c: Ditto.
1953         * except.c: Ditto.
1954         * expr.c: Ditto.
1955         * friend.c: Ditto.
1956         * init.c: Ditto.
1957         * lambda.c: Ditto.
1958         * lex.c: Ditto.
1959         * mangle.c: Ditto.
1960         * name-lookup.c: Ditto.
1961         * optimize.c: Ditto.
1962         * parser.c: Ditto.
1963         * pt.c: Ditto.
1964         * ptree.c: Ditto.
1965         * repo.c: Ditto.
1966         * rtti.c: Ditto.
1967         * search.c: Ditto.
1968         * semantics.c: Ditto.
1969         * tree.c: Ditto.
1970         * typeck2.c: Ditto.
1971         * typeck.c: Ditto.
1973 2015-01-08  Jason Merrill  <jason@redhat.com>
1975         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1976         * decl.c (compute_array_index_type): Likewise.
1977         * init.c (build_vec_init): Likewise.
1978         * typeck.c (cp_build_binary_op): Likewise.
1980 2015-01-08  Jason Merrill  <jason@redhat.com>
1982         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1983         whether an initializer-list is too big for a VLA.
1984         (throw_bad_array_length): Remove.
1985         * cp-tree.h: Remove prototype.
1987 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
1989         PR c++/60753
1990         * decl.c (grokfndecl): Add bool parameter.
1991         (grokdeclarator): Adjust calls.
1992         (start_decl): Don't set DECL_DELETED_FN here.
1994 2015-01-06  Jason Merrill  <jason@redhat.com>
1996         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1997         template-ids.
1999         PR c++/64455
2000         * pt.c (type_dependent_expression_p): Handle variable templates.
2001         * constexpr.c (potential_constant_expression_1): Use it.
2003         PR c++/64487
2004         * semantics.c (finish_offsetof): Handle templates here.
2005         * parser.c (cp_parser_builtin_offsetof): Not here.
2007         PR c++/64496
2008         * semantics.c (process_outer_var_ref): Diagnose lambda in local
2009         class NSDMI.
2011 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2013         PR c++/64489
2014         * class.c (check_field_decls): Make copy assignment operators
2015         complex only in c++98 mode.
2017 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2019         PR c++/31397
2020         * class.c (check_for_override): Warn when a virtual function is an
2021         override not marked override.
2023 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2025         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2026         hold base_fndecls.
2027         (get_basefndecls): Adjust.
2029 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2031         Update copyright years.
2033 2015-01-05  Marek Polacek  <polacek@redhat.com>
2035         PR c/64423
2036         * typeck.c (cp_build_array_ref): Pass loc down to
2037         warn_array_subscript_with_type_char.
2040 Copyright (C) 2015 Free Software Foundation, Inc.
2042 Copying and distribution of this file, with or without modification,
2043 are permitted in any medium without royalty provided the copyright
2044 notice and this notice are preserved.