2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git] / gcc / cp / ChangeLog
blobb3feab14b09d18df7caf0cb80399b4799af89b85
1 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3         * class.c (resolve_address_of_overloaded_function, instantiate_type):
4         Rename tsubst_flags_t parameter flags -> complain.
6 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
8         * call.c (build_op_delete_call, build_over_call): Check mark_used
9         return value.
10         * class.c (resolve_address_of_overloaded_function): Likewise.
11         * decl.c (cxx_maybe_build_cleanup): Likewise.
12         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
13         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
14         * rtti.c (build_dynamic_cast_1): Likewise.
15         * semantics.c (process_outer_var_ref): Likewise.
16         * typeck.c (build_class_member_access_expr,
17         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
19 2015-04-15  Jason Merrill  <jason@redhat.com>
21         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
22         (build_constexpr_constructor_member_initializers): Loop to find
23         the BIND_EXPR.
24         * decl.c (start_preparsed_function): Clobber the object at the
25         beginning of a constructor.
27         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
28         * method.c (implicitly_declare_fn): Likewise.
29         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
31         * decl2.c (determine_visibility): Use get_template_info.
33 2015-04-15  Jason Merrill  <jason@redhat.com>
34             Marek Polacek  <polacek@redhat.com>
36         PR c++/65727
37         * lambda.c (lambda_expr_this_capture): In unevaluated context go
38         through the normal loop, just don't capture.
39         (maybe_resolve_dummy): Handle null return.
41 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
43         * call.c (enforce_access): Emit error + inform.
45 2015-04-15  Marek Polacek  <polacek@redhat.com>
47         * constexpr.c (use_new_call): Remove #define.
48         (lookup_parameter_binding): Remove function.
49         (cxx_bind_parameters_in_call): Remove unused code.
50         (cxx_eval_call_expression): Likewise.
51         (cxx_eval_constant_expression): Likewise.
53 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
55         * tree.c (replace_placeholders_t): Remove unused type.
56         (replace_placeholders): Remove unused pset.
58 2015-04-14  Jason Merrill  <jason@redhat.com>
60         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
62         PR c++/65695
63         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
65         PR c++/65721
66         * name-lookup.c (do_class_using_decl): Complain about specifying
67         the current class even if there are dependent bases.
69 2015-04-14  David Krauss  <david_work@me.com>
71         PR c++/59766
72         * decl.c (grokdeclarator): Do not flag friends with deduced return.
74 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
75             Jason Merrill  <jason@redhat.com>
77         PR c++/60994
78         * parser.c (cp_parser_class_name): Add enum_ok parameter.
79         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
80         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
81         a class template.
83 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
85         PR c++/65736
86         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
87         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
88         the expression to the original type at the end.
90 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
92         PR c++/65690
93         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
94         TYPE_USER_ALIGN.
96         PR c++/65690
97         * tree.c (build_cplus_array_type): Layout type before variants are
98         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
99         variant.
101 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
103         PR c++/64085
104         * lambda.c (add_capture): Use dependent_type_p for capture by
105         reference too.
107 2015-04-02  Marek Polacek  <polacek@redhat.com>
109         PR c++/65642
110         * constexpr.c (cxx_eval_pointer_plus_expression): Call
111         cxx_eval_constant_expression on the first operand.
113 2015-04-01  Jason Merrill  <jason@redhat.com>
115         PR c++/65625
116         * decl.c (make_typename_type): Handle seeing a variable template.
118 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
120         PR c++/56100
121         * pt.c (instantiating_current_function_p): New.
122         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
123         * cp-tree.h (instantiating_current_function_p): Declare.
125 2015-04-01  Jason Merrill  <jason@redhat.com>
127         PR c++/65646
128         * decl.c (grokvardecl): Don't call check_explicit_specialization
129         for non-template members of a class template.
131 2015-04-01  Marek Polacek  <polacek@redhat.com>
133         PR c++/65554
134         * class.c (finish_struct): Require that the second field of a
135         user-defined initializer_list be of size type.
137 2015-03-31  Marek Polacek  <polacek@redhat.com>
139         PR c++/65390
140         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
141         checking for constness.
143 2015-03-30  Marek Polacek  <polacek@redhat.com>
145         PR c++/65398
146         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
147          *(&A[i] p+ j) => A[i + j] transformation here.
148         (cxx_eval_pointer_plus_expression): New function.
149         (cxx_eval_constant_expression): Use it here.
151 2015-03-27  Tobias Burnus  <burnus@net-b.de>
153         PR c/65586
154         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
155         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
156         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
157         -fopenmp-simd.
159 2015-03-27  Marek Polacek  <polacek@redhat.com>
161         PR c++/65556
162         * semantics.c (finish_switch_cond): If the unlowered type is not an
163         enum, use the type of the condition.
165 2015-03-27  Jason Merrill  <jason@redhat.com>
167         PR c++/65509
168         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
169         constants.
171 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
173         PR c++/65154
174         * init.c (build_vec_init): Fix initializing aggregates
175         with empty init list.
177 2015-03-26  Jason Merrill  <jason@redhat.com>
179         PR c++/65525
180         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
182 2015-03-25  Marek Polacek  <polacek@redhat.com>
184         PR c++/65558
185         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
186         on an anonymous namespace.
188 2015-03-25  Marek Polacek  <polacek@redhat.com>
190         PR c++/61670
191         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
193 2015-03-24  Jason Merrill  <jason@redhat.com>
195         PR c++/65046
196         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
197         * parser.c (cp_parser_namespace_definition): Don't set it.
198         * name-lookup.c (handle_namespace_attrs): Check
199         DECL_NAMESPACE_ASSOCIATIONS instead.
201         PR c++/65498
202         * pt.c (get_mostly_instantiated_function_type): Just return the
203         type of the partially instantiated template in DECL_TI_TEMPLATE.
205 2015-03-20  Marek Polacek  <polacek@redhat.com>
207         PR c++/65398
208         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
209         A[i + j].
211 2015-03-20  Marek Polacek  <polacek@redhat.com>
213         PR c++/65072
214         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
215         variant.
217 2015-03-19  Jason Merrill  <jason@redhat.com>
219         PR c++/65046
220         Automatically propagate ABI tags to variables and functions
221         from their (return) type.
222         * class.c (check_tag): Handle variables and functions.
223         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
224         (mark_or_check_tags): Likewise.
225         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
226         (check_abi_tags): Add single argument overload for decls.
227         Handle inheriting tags for decls.
228         * mangle.c (write_mangled_name): Call it.
229         (mangle_return_type_p): Split out from write_encoding.
230         (unmangled_name_p): Split out from write_mangled_name.
231         (write_mangled_name): Ignore abi_tag on namespace.
232         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
233         * parser.c (cp_parser_namespace_definition): Set it.
234         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
235         about abi_tag attribute on non-inline namespace.
236         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
237         (handle_abi_tag_attribute): Allow tags on variables.
239 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
241         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
242         attribute for DECL_EXTERNAL VAR_DECLs.
244 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
246         PR c++/65340
247         * call.c (build_over_call): Pass the tsubst_flags_t argument to
248         mark_used.
249         * decl2.c (mark_used): Inline the require_deduced_type call and
250         guard the error call.
252 2015-03-16  Jason Merrill  <jason@redhat.com>
254         PR c++/65061
255         * parser.c (cp_parser_template_name): Call strip_using_decl.
257 2015-03-16  Marek Polacek  <polacek@redhat.com>
259         DR 1688
260         PR c++/65327
261         * decl.c (grokdeclarator): Allow volatile and constexpr together.
263 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
265         PR c++/65323
266         * decl.c (check_default_argument): Don't call
267         maybe_warn_zero_as_null_pointer_constant.
269 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
271         * cp-gimplify.c (simple_empty_class_p): New.
272         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
273         the code for empty class copies into simple_empty_class_p, and
274         adapt it to handle COMPOUND_EXPRs.
276 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
278         PR c++/65370
279         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
280         only if the location of newdecl doesn't match the location of olddecl.
282 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
284         PR c++/65127
285         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
286         is not a PARM_DECL.
288 2015-03-10  Jason Merrill  <jason@redhat.com>
290         PR c++/65333
291         DR 1558
292         * pt.c (dependent_type_p_r): Check both class and alias template args.
294 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
296         PR c/65120
297         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
298         before preparing arguments to warn_logical_not_parentheses.
299         Use maybe_constant_value on rhs.
301 2015-03-09  Jason Merrill  <jason@redhat.com>
303         PR c++/65339
304         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
306 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
308         PR c/65120
309         * parser.c (cp_parser_binary_expression): Don't warn for
310         !!x == y or !b == y where b is bool.
312 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
314         * ptree.c (cxx_print_lambda_node): New.
315         (cxx_print_xnode): Handle LAMBDA_EXPR.
317 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
319         PR c++/65295
320         * constexpr.c (cxx_eval_constant_expression): Remove assert in
321         RESULT_DECL handling.
323 2015-02-26  Marek Polacek  <polacek@redhat.com>
325         PR c++/65202
326         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
327         a RETURN_EXPR if its operand is null.
329 2015-02-25  Jason Merrill  <jason@redhat.com>
331         PR c++/65209
332         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
333         DECL_COMDAT.
334         (constrain_visibility_for_template): Handle reference arguments.
336         PR debug/58315
337         * decl.c (start_preparsed_function): Use create_artificial_label
338         for cdtor_label.
340 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
341             Jakub Jelinek  <jakub@redhat.com>
343         PR c++/65075
344         * constexpr.c (check_constexpr_bind_expr_vars): Allow
345         implicit typedefs for lambda types.
347 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
349         PR c++/60894
350         * decl.c (lookup_and_check_tag): Use strip_using_decl.
352 2015-02-13  Jason Merrill  <jason@redhat.com>
354         PR c++/65054
355         * pt.c (template_args_equal): Look through conversions here.
356         * tree.c (cp_tree_equal): Not here.
358 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
360         PR c++/60211
361         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
362         pragma_external context.
364 2015-02-13  Jason Merrill  <jason@redhat.com>
366         PR c++/65051
367         * call.c (reference_binding): Don't look for bad conversion
368         if TO is incomplete.
370 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
372         PR c++/64970
373         * decl.c (make_typename_type): Pass tsubst_flags_t argument
374         to lookup_template_class.
376 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
378         PR ipa/65034
379         * decl.c (start_preparsed_function): Use void_type_node instead
380         of NULL_TREE as LABEL_DECL type.
382 2015-02-12  Jason Merrill  <jason@redhat.com>
384         PR c++/64898
385         * mangle.c (write_mangled_name): Fix test for variable template
386         instantiation.
388         * decl.c (begin_destructor_body): Condition clobber on
389         -flifetime-dse.
391 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
393         PR c++/64959
394         * parser.c (lookup_literal_operator): Return all candidates.
395         (cp_parser_userdef_char_literal): Simplify error handling.
396         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
397         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
398         Also give higher priority to standard string UDL operator.
400 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
402         PR debug/55541
403         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
404         * decl.c (poplevel): If functionbody, try not to create an extra
405         BLOCK for function body and use subblocks as that, if it is non-NULL
406         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
407         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
409         PR sanitizer/64984
410         * except.c (check_noexcept_r): Return NULL for internal
411         calls.
413 2015-02-10  Jason Merrill  <jason@redhat.com>
415         PR c++/64994
416         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
418 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
420         PR ipa/64982
421         * method.c (use_thunk): Do not check for stdarg thunks.
423 2015-02-06  Jason Merrill  <jason@redhat.com>
425         PR c++/64899
426         * init.c (build_vec_init): Handle default-initialized array with
427         constexpr default constructor.
429 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
431         PR c/64824
432         PR c/64868
433         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
435 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
437         PR c++/64877
438         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
439         for generated expressions.
441 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
443         PR c++/64901
444         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
445         DECL_OVERRIDE_P.
447 2015-02-02  Jason Merrill  <jason@redhat.com>
449         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
451 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
453         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
454         changed to pass input_location as first argument.
456 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
458         PR c++/64717
459         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
460         into SAVE_EXPR.
462 2015-01-29  Jason Merrill  <jason@redhat.com>
464         PR c++/49508
465         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
466         erroneous return statement.
468         PR c++/64521
469         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
470         point.
472 2015-01-27  Caroline Tice  <cmtice@google.com>
474         Committing VTV Cywin/Ming patch for Patrick Wollgast
475         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
476         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
478 2015-01-27  Jason Merrill  <jason@redhat.com>
480         PR c++/58597
481         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
482         current_function_decl.
484         PR c++/63889
485         * pt.c (finish_template_variable): Move from semantics.c.
486         Handle multiple template arg levels.  Handle coercion here.
487         (lookup_template_variable): Not here.
489 2015-01-23  Jason Merrill  <jason@redhat.com>
491         PR c++/64314
492         PR c++/57510
493         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
494         that has been completely split out.
496         PR c++/64701
497         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
498         statement codes.
500         PR c++/64727
501         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
502         of CONST_DECL.
504 2015-01-21  Jason Merrill  <jason@redhat.com>
506         PR c++/64603
507         * constexpr.c (cxx_eval_constant_expression): Only shortcut
508         constant CONSTRUCTORs.
510         PR c++/64647
511         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
512         give a hard error in a template instantiation.
514 2015-01-21  Richard Biener  <rguenther@suse.de>
516         PR middle-end/64313
517         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
518         for builtins the user declared correctly.
520 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
522         PR c++/58614
523         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
524         TREE_TYPE (elt) == error_mark_node.
526 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
528         PR tree-optimization/62053
529         * tree.c (build_cplus_array_type): Layout type after variants are set.
531 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
533         * cp-gimplify.c (cp_genericize_r): Call
534         cp_ubsan_maybe_instrument_member_call for member calls.
535         (cp_ubsan_check_member_access_r): New function.
536         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
537         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
538         cp_ubsan_instrument_member_accesses,
539         cp_ubsan_maybe_instrument_downcast,
540         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
541         * cp-ubsan.c: New file.
542         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
543         * constexpr.c (cxx_eval_call_expression): Return void_node
544         for IFN_UBSAN_VPTR.
545         (potential_constant_expression_1): Return true for
546         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
547         * typeck.c (build_class_member_access_expr): Provide locus
548         for COMPONENT_REFs.
549         (build_static_cast_1): Instrument downcasts.
550         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
551         add ubsan instrumentation for virtual_access.
552         * call.c: Include internal-fn.h.
553         (set_flags_from_callee): Handle internal calls.
555 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
557         PR c++/59366
558         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
559         and function templates, declared only in the class.
560         * decl.c (duplicate_decls): Reveal hidden friend functions or
561         function templates, if they are redeclared outside the class.
563 2015-01-15  Jason Merrill  <jason@redhat.com>
565         PR c++/64356
566         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
568         PR c++/63283
569         * constexpr.c (potential_constant_expression_1): Handle reference
570         args in templates.
572 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
573             James Norris  <jnorris@codesourcery.com>
574             Cesar Philippidis  <cesar@codesourcery.com>
575             Ilmir Usmanov  <i.usmanov@samsung.com>
576             Jakub Jelinek  <jakub@redhat.com>
578         * parser.c: Include "gomp-constants.h".
579         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
580         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
581         Use OMP_CLAUSE_SET_MAP_KIND.
582         (cp_parser_omp_construct, cp_parser_pragma): Handle
583         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
584         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
585         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
586         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
587         "create", "delete", "deviceptr", "host", "num_gangs",
588         "num_workers", "present", "present_or_copy", "pcopy",
589         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
590         "present_or_create", "pcreate", "vector_length", "wait".
591         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
592         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
593         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
594         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
595         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
596         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
597         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
598         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
599         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
600         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
601         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
602         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
603         (cp_parser_oacc_parallel, cp_parser_oacc_update)
604         (cp_parser_oacc_wait): New functions.
605         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
606         (finish_oacc_parallel): New prototypes.
607         * semantics.c: Include "gomp-constants.h".
608         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
609         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
610         OMP_CLAUSE_SET_MAP_KIND.
611         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
612         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
613         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
614         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
615         functions.
617 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
619         PR c++/58671
620         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
621         self-initialization.
623 2015-01-13  Jason Merrill  <jason@redhat.com>
625         PR c++/64356
626         PR libstdc++/58777
627         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
628         pointer expressions.
629         (cxx_eval_increment_expression): Likewise.
631         PR c++/64514
632         * pt.c (coerce_template_parameter_pack): Return NULL for a
633         zero-length fixed parameter pack with a pack expansion arg.
635         PR c++/64520
636         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
638 2015-01-12  Jason Merrill  <jason@redhat.com>
640         PR c++/64547
641         * constexpr.c (cxx_eval_call_expression): A call to a void
642         function doesn't need to return a value.
644 2015-01-09  Michael Collison  <michael.collison@linaro.org>
646         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
647         input.h, alias.h, symtab.h, options.h, fold-const.h,
648         wide-int.h, and inchash.h due to flattening of tree.h.
649         * class.c: Ditto.
650         * constexpr.c: Ditto.
651         * cp-array-notation.c: Ditto.
652         * cp-gimplify.c: Ditto.
653         * cp-lang.c: Ditto.
654         * cp-objcp-common.c: Ditto.
655         * cvt.c: Ditto.
656         * decl2.c: Ditto.
657         * decl.c: Ditto.
658         * dump.c: Ditto.
659         * error.c: Ditto.
660         * except.c: Ditto.
661         * expr.c: Ditto.
662         * friend.c: Ditto.
663         * init.c: Ditto.
664         * lambda.c: Ditto.
665         * lex.c: Ditto.
666         * mangle.c: Ditto.
667         * name-lookup.c: Ditto.
668         * optimize.c: Ditto.
669         * parser.c: Ditto.
670         * pt.c: Ditto.
671         * ptree.c: Ditto.
672         * repo.c: Ditto.
673         * rtti.c: Ditto.
674         * search.c: Ditto.
675         * semantics.c: Ditto.
676         * tree.c: Ditto.
677         * typeck2.c: Ditto.
678         * typeck.c: Ditto.
680 2015-01-08  Jason Merrill  <jason@redhat.com>
682         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
683         * decl.c (compute_array_index_type): Likewise.
684         * init.c (build_vec_init): Likewise.
685         * typeck.c (cp_build_binary_op): Likewise.
687 2015-01-08  Jason Merrill  <jason@redhat.com>
689         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
690         whether an initializer-list is too big for a VLA.
691         (throw_bad_array_length): Remove.
692         * cp-tree.h: Remove prototype.
694 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
696         PR c++/60753
697         * decl.c (grokfndecl): Add bool parameter.
698         (grokdeclarator): Adjust calls.
699         (start_decl): Don't set DECL_DELETED_FN here.
701 2015-01-06  Jason Merrill  <jason@redhat.com>
703         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
704         template-ids.
706         PR c++/64455
707         * pt.c (type_dependent_expression_p): Handle variable templates.
708         * constexpr.c (potential_constant_expression_1): Use it.
710         PR c++/64487
711         * semantics.c (finish_offsetof): Handle templates here.
712         * parser.c (cp_parser_builtin_offsetof): Not here.
714         PR c++/64496
715         * semantics.c (process_outer_var_ref): Diagnose lambda in local
716         class NSDMI.
718 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
720         PR c++/64489
721         * class.c (check_field_decls): Make copy assignment operators
722         complex only in c++98 mode.
724 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
726         PR c++/31397
727         * class.c (check_for_override): Warn when a virtual function is an
728         override not marked override.
730 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
732         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
733         hold base_fndecls.
734         (get_basefndecls): Adjust.
736 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
738         Update copyright years.
740 2015-01-05  Marek Polacek  <polacek@redhat.com>
742         PR c/64423
743         * typeck.c (cp_build_array_ref): Pass loc down to
744         warn_array_subscript_with_type_char.
747 Copyright (C) 2015 Free Software Foundation, Inc.
749 Copying and distribution of this file, with or without modification,
750 are permitted in any medium without royalty provided the copyright
751 notice and this notice are preserved.