PR c++/50800
[official-gcc.git] / gcc / cp / ChangeLog
blob7c7ec095c3843ea5f1511b6eedd66db3bb82e7d4
1 2015-04-24  Jason Merrill  <jason@redhat.com>
3         PR c++/50800
4         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
6         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
7         Remove obsolete code.
8         [NE_EXPR]: Likewise.
10 2015-04-23  Jason Merrill  <jason@redhat.com>
12         PR c++/65646
13         * pt.c (check_explicit_specialization): Don't
14         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
15         headers.
16         * decl.c (grokvardecl): Revert earlier fix.
18 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
20         PR c++/65801
21         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
22         suppresses the diagnostic.
24 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
26         Reject trailing return type for an operator auto().
27         * decl.c (grokdeclarator): Reject trailing return types for
28         all conversion operators, don't handle conversion operators
29         in the previous checks that deal with auto.
31 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
33         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
35 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
37         * class.c (resolve_address_of_overloaded_function, instantiate_type):
38         Rename tsubst_flags_t parameter flags -> complain.
40 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
42         * call.c (build_op_delete_call, build_over_call): Check mark_used
43         return value.
44         * class.c (resolve_address_of_overloaded_function): Likewise.
45         * decl.c (cxx_maybe_build_cleanup): Likewise.
46         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
47         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
48         * rtti.c (build_dynamic_cast_1): Likewise.
49         * semantics.c (process_outer_var_ref): Likewise.
50         * typeck.c (build_class_member_access_expr,
51         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
53 2015-04-15  Jason Merrill  <jason@redhat.com>
55         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
56         (build_constexpr_constructor_member_initializers): Loop to find
57         the BIND_EXPR.
58         * decl.c (start_preparsed_function): Clobber the object at the
59         beginning of a constructor.
61         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
62         * method.c (implicitly_declare_fn): Likewise.
63         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
65         * decl2.c (determine_visibility): Use get_template_info.
67 2015-04-15  Jason Merrill  <jason@redhat.com>
68             Marek Polacek  <polacek@redhat.com>
70         PR c++/65727
71         * lambda.c (lambda_expr_this_capture): In unevaluated context go
72         through the normal loop, just don't capture.
73         (maybe_resolve_dummy): Handle null return.
75 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
77         * call.c (enforce_access): Emit error + inform.
79 2015-04-15  Marek Polacek  <polacek@redhat.com>
81         * constexpr.c (use_new_call): Remove #define.
82         (lookup_parameter_binding): Remove function.
83         (cxx_bind_parameters_in_call): Remove unused code.
84         (cxx_eval_call_expression): Likewise.
85         (cxx_eval_constant_expression): Likewise.
87 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
89         * tree.c (replace_placeholders_t): Remove unused type.
90         (replace_placeholders): Remove unused pset.
92 2015-04-14  Jason Merrill  <jason@redhat.com>
94         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
96         PR c++/65695
97         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
99         PR c++/65721
100         * name-lookup.c (do_class_using_decl): Complain about specifying
101         the current class even if there are dependent bases.
103 2015-04-14  David Krauss  <david_work@me.com>
105         PR c++/59766
106         * decl.c (grokdeclarator): Do not flag friends with deduced return.
108 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
109             Jason Merrill  <jason@redhat.com>
111         PR c++/60994
112         * parser.c (cp_parser_class_name): Add enum_ok parameter.
113         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
114         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
115         a class template.
117 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
119         PR c++/65736
120         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
121         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
122         the expression to the original type at the end.
124 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
126         PR c++/65690
127         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
128         TYPE_USER_ALIGN.
130         PR c++/65690
131         * tree.c (build_cplus_array_type): Layout type before variants are
132         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
133         variant.
135 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
137         PR c++/64085
138         * lambda.c (add_capture): Use dependent_type_p for capture by
139         reference too.
141 2015-04-02  Marek Polacek  <polacek@redhat.com>
143         PR c++/65642
144         * constexpr.c (cxx_eval_pointer_plus_expression): Call
145         cxx_eval_constant_expression on the first operand.
147 2015-04-01  Jason Merrill  <jason@redhat.com>
149         PR c++/65625
150         * decl.c (make_typename_type): Handle seeing a variable template.
152 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
154         PR c++/56100
155         * pt.c (instantiating_current_function_p): New.
156         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
157         * cp-tree.h (instantiating_current_function_p): Declare.
159 2015-04-01  Jason Merrill  <jason@redhat.com>
161         PR c++/65646
162         * decl.c (grokvardecl): Don't call check_explicit_specialization
163         for non-template members of a class template.
165 2015-04-01  Marek Polacek  <polacek@redhat.com>
167         PR c++/65554
168         * class.c (finish_struct): Require that the second field of a
169         user-defined initializer_list be of size type.
171 2015-03-31  Marek Polacek  <polacek@redhat.com>
173         PR c++/65390
174         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
175         checking for constness.
177 2015-03-30  Marek Polacek  <polacek@redhat.com>
179         PR c++/65398
180         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
181          *(&A[i] p+ j) => A[i + j] transformation here.
182         (cxx_eval_pointer_plus_expression): New function.
183         (cxx_eval_constant_expression): Use it here.
185 2015-03-27  Tobias Burnus  <burnus@net-b.de>
187         PR c/65586
188         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
189         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
190         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
191         -fopenmp-simd.
193 2015-03-27  Marek Polacek  <polacek@redhat.com>
195         PR c++/65556
196         * semantics.c (finish_switch_cond): If the unlowered type is not an
197         enum, use the type of the condition.
199 2015-03-27  Jason Merrill  <jason@redhat.com>
201         PR c++/65509
202         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
203         constants.
205 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
207         PR c++/65154
208         * init.c (build_vec_init): Fix initializing aggregates
209         with empty init list.
211 2015-03-26  Jason Merrill  <jason@redhat.com>
213         PR c++/65525
214         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
216 2015-03-25  Marek Polacek  <polacek@redhat.com>
218         PR c++/65558
219         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
220         on an anonymous namespace.
222 2015-03-25  Marek Polacek  <polacek@redhat.com>
224         PR c++/61670
225         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
227 2015-03-24  Jason Merrill  <jason@redhat.com>
229         PR c++/65046
230         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
231         * parser.c (cp_parser_namespace_definition): Don't set it.
232         * name-lookup.c (handle_namespace_attrs): Check
233         DECL_NAMESPACE_ASSOCIATIONS instead.
235         PR c++/65498
236         * pt.c (get_mostly_instantiated_function_type): Just return the
237         type of the partially instantiated template in DECL_TI_TEMPLATE.
239 2015-03-20  Marek Polacek  <polacek@redhat.com>
241         PR c++/65398
242         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
243         A[i + j].
245 2015-03-20  Marek Polacek  <polacek@redhat.com>
247         PR c++/65072
248         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
249         variant.
251 2015-03-19  Jason Merrill  <jason@redhat.com>
253         PR c++/65046
254         Automatically propagate ABI tags to variables and functions
255         from their (return) type.
256         * class.c (check_tag): Handle variables and functions.
257         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
258         (mark_or_check_tags): Likewise.
259         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
260         (check_abi_tags): Add single argument overload for decls.
261         Handle inheriting tags for decls.
262         * mangle.c (write_mangled_name): Call it.
263         (mangle_return_type_p): Split out from write_encoding.
264         (unmangled_name_p): Split out from write_mangled_name.
265         (write_mangled_name): Ignore abi_tag on namespace.
266         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
267         * parser.c (cp_parser_namespace_definition): Set it.
268         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
269         about abi_tag attribute on non-inline namespace.
270         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
271         (handle_abi_tag_attribute): Allow tags on variables.
273 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
275         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
276         attribute for DECL_EXTERNAL VAR_DECLs.
278 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
280         PR c++/65340
281         * call.c (build_over_call): Pass the tsubst_flags_t argument to
282         mark_used.
283         * decl2.c (mark_used): Inline the require_deduced_type call and
284         guard the error call.
286 2015-03-16  Jason Merrill  <jason@redhat.com>
288         PR c++/65061
289         * parser.c (cp_parser_template_name): Call strip_using_decl.
291 2015-03-16  Marek Polacek  <polacek@redhat.com>
293         DR 1688
294         PR c++/65327
295         * decl.c (grokdeclarator): Allow volatile and constexpr together.
297 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
299         PR c++/65323
300         * decl.c (check_default_argument): Don't call
301         maybe_warn_zero_as_null_pointer_constant.
303 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
305         * cp-gimplify.c (simple_empty_class_p): New.
306         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
307         the code for empty class copies into simple_empty_class_p, and
308         adapt it to handle COMPOUND_EXPRs.
310 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
312         PR c++/65370
313         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
314         only if the location of newdecl doesn't match the location of olddecl.
316 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
318         PR c++/65127
319         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
320         is not a PARM_DECL.
322 2015-03-10  Jason Merrill  <jason@redhat.com>
324         PR c++/65333
325         DR 1558
326         * pt.c (dependent_type_p_r): Check both class and alias template args.
328 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
330         PR c/65120
331         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
332         before preparing arguments to warn_logical_not_parentheses.
333         Use maybe_constant_value on rhs.
335 2015-03-09  Jason Merrill  <jason@redhat.com>
337         PR c++/65339
338         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
340 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
342         PR c/65120
343         * parser.c (cp_parser_binary_expression): Don't warn for
344         !!x == y or !b == y where b is bool.
346 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
348         * ptree.c (cxx_print_lambda_node): New.
349         (cxx_print_xnode): Handle LAMBDA_EXPR.
351 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
353         PR c++/65295
354         * constexpr.c (cxx_eval_constant_expression): Remove assert in
355         RESULT_DECL handling.
357 2015-02-26  Marek Polacek  <polacek@redhat.com>
359         PR c++/65202
360         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
361         a RETURN_EXPR if its operand is null.
363 2015-02-25  Jason Merrill  <jason@redhat.com>
365         PR c++/65209
366         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
367         DECL_COMDAT.
368         (constrain_visibility_for_template): Handle reference arguments.
370         PR debug/58315
371         * decl.c (start_preparsed_function): Use create_artificial_label
372         for cdtor_label.
374 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
375             Jakub Jelinek  <jakub@redhat.com>
377         PR c++/65075
378         * constexpr.c (check_constexpr_bind_expr_vars): Allow
379         implicit typedefs for lambda types.
381 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
383         PR c++/60894
384         * decl.c (lookup_and_check_tag): Use strip_using_decl.
386 2015-02-13  Jason Merrill  <jason@redhat.com>
388         PR c++/65054
389         * pt.c (template_args_equal): Look through conversions here.
390         * tree.c (cp_tree_equal): Not here.
392 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
394         PR c++/60211
395         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
396         pragma_external context.
398 2015-02-13  Jason Merrill  <jason@redhat.com>
400         PR c++/65051
401         * call.c (reference_binding): Don't look for bad conversion
402         if TO is incomplete.
404 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
406         PR c++/64970
407         * decl.c (make_typename_type): Pass tsubst_flags_t argument
408         to lookup_template_class.
410 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
412         PR ipa/65034
413         * decl.c (start_preparsed_function): Use void_type_node instead
414         of NULL_TREE as LABEL_DECL type.
416 2015-02-12  Jason Merrill  <jason@redhat.com>
418         PR c++/64898
419         * mangle.c (write_mangled_name): Fix test for variable template
420         instantiation.
422         * decl.c (begin_destructor_body): Condition clobber on
423         -flifetime-dse.
425 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
427         PR c++/64959
428         * parser.c (lookup_literal_operator): Return all candidates.
429         (cp_parser_userdef_char_literal): Simplify error handling.
430         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
431         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
432         Also give higher priority to standard string UDL operator.
434 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
436         PR debug/55541
437         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
438         * decl.c (poplevel): If functionbody, try not to create an extra
439         BLOCK for function body and use subblocks as that, if it is non-NULL
440         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
441         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
443         PR sanitizer/64984
444         * except.c (check_noexcept_r): Return NULL for internal
445         calls.
447 2015-02-10  Jason Merrill  <jason@redhat.com>
449         PR c++/64994
450         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
452 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
454         PR ipa/64982
455         * method.c (use_thunk): Do not check for stdarg thunks.
457 2015-02-06  Jason Merrill  <jason@redhat.com>
459         PR c++/64899
460         * init.c (build_vec_init): Handle default-initialized array with
461         constexpr default constructor.
463 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
465         PR c/64824
466         PR c/64868
467         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
469 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
471         PR c++/64877
472         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
473         for generated expressions.
475 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
477         PR c++/64901
478         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
479         DECL_OVERRIDE_P.
481 2015-02-02  Jason Merrill  <jason@redhat.com>
483         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
485 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
487         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
488         changed to pass input_location as first argument.
490 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
492         PR c++/64717
493         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
494         into SAVE_EXPR.
496 2015-01-29  Jason Merrill  <jason@redhat.com>
498         PR c++/49508
499         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
500         erroneous return statement.
502         PR c++/64521
503         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
504         point.
506 2015-01-27  Caroline Tice  <cmtice@google.com>
508         Committing VTV Cywin/Ming patch for Patrick Wollgast
509         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
510         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
512 2015-01-27  Jason Merrill  <jason@redhat.com>
514         PR c++/58597
515         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
516         current_function_decl.
518         PR c++/63889
519         * pt.c (finish_template_variable): Move from semantics.c.
520         Handle multiple template arg levels.  Handle coercion here.
521         (lookup_template_variable): Not here.
523 2015-01-23  Jason Merrill  <jason@redhat.com>
525         PR c++/64314
526         PR c++/57510
527         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
528         that has been completely split out.
530         PR c++/64701
531         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
532         statement codes.
534         PR c++/64727
535         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
536         of CONST_DECL.
538 2015-01-21  Jason Merrill  <jason@redhat.com>
540         PR c++/64603
541         * constexpr.c (cxx_eval_constant_expression): Only shortcut
542         constant CONSTRUCTORs.
544         PR c++/64647
545         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
546         give a hard error in a template instantiation.
548 2015-01-21  Richard Biener  <rguenther@suse.de>
550         PR middle-end/64313
551         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
552         for builtins the user declared correctly.
554 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
556         PR c++/58614
557         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
558         TREE_TYPE (elt) == error_mark_node.
560 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
562         PR tree-optimization/62053
563         * tree.c (build_cplus_array_type): Layout type after variants are set.
565 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
567         * cp-gimplify.c (cp_genericize_r): Call
568         cp_ubsan_maybe_instrument_member_call for member calls.
569         (cp_ubsan_check_member_access_r): New function.
570         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
571         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
572         cp_ubsan_instrument_member_accesses,
573         cp_ubsan_maybe_instrument_downcast,
574         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
575         * cp-ubsan.c: New file.
576         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
577         * constexpr.c (cxx_eval_call_expression): Return void_node
578         for IFN_UBSAN_VPTR.
579         (potential_constant_expression_1): Return true for
580         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
581         * typeck.c (build_class_member_access_expr): Provide locus
582         for COMPONENT_REFs.
583         (build_static_cast_1): Instrument downcasts.
584         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
585         add ubsan instrumentation for virtual_access.
586         * call.c: Include internal-fn.h.
587         (set_flags_from_callee): Handle internal calls.
589 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
591         PR c++/59366
592         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
593         and function templates, declared only in the class.
594         * decl.c (duplicate_decls): Reveal hidden friend functions or
595         function templates, if they are redeclared outside the class.
597 2015-01-15  Jason Merrill  <jason@redhat.com>
599         PR c++/64356
600         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
602         PR c++/63283
603         * constexpr.c (potential_constant_expression_1): Handle reference
604         args in templates.
606 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
607             James Norris  <jnorris@codesourcery.com>
608             Cesar Philippidis  <cesar@codesourcery.com>
609             Ilmir Usmanov  <i.usmanov@samsung.com>
610             Jakub Jelinek  <jakub@redhat.com>
612         * parser.c: Include "gomp-constants.h".
613         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
614         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
615         Use OMP_CLAUSE_SET_MAP_KIND.
616         (cp_parser_omp_construct, cp_parser_pragma): Handle
617         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
618         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
619         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
620         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
621         "create", "delete", "deviceptr", "host", "num_gangs",
622         "num_workers", "present", "present_or_copy", "pcopy",
623         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
624         "present_or_create", "pcreate", "vector_length", "wait".
625         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
626         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
627         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
628         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
629         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
630         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
631         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
632         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
633         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
634         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
635         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
636         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
637         (cp_parser_oacc_parallel, cp_parser_oacc_update)
638         (cp_parser_oacc_wait): New functions.
639         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
640         (finish_oacc_parallel): New prototypes.
641         * semantics.c: Include "gomp-constants.h".
642         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
643         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
644         OMP_CLAUSE_SET_MAP_KIND.
645         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
646         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
647         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
648         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
649         functions.
651 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
653         PR c++/58671
654         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
655         self-initialization.
657 2015-01-13  Jason Merrill  <jason@redhat.com>
659         PR c++/64356
660         PR libstdc++/58777
661         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
662         pointer expressions.
663         (cxx_eval_increment_expression): Likewise.
665         PR c++/64514
666         * pt.c (coerce_template_parameter_pack): Return NULL for a
667         zero-length fixed parameter pack with a pack expansion arg.
669         PR c++/64520
670         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
672 2015-01-12  Jason Merrill  <jason@redhat.com>
674         PR c++/64547
675         * constexpr.c (cxx_eval_call_expression): A call to a void
676         function doesn't need to return a value.
678 2015-01-09  Michael Collison  <michael.collison@linaro.org>
680         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
681         input.h, alias.h, symtab.h, options.h, fold-const.h,
682         wide-int.h, and inchash.h due to flattening of tree.h.
683         * class.c: Ditto.
684         * constexpr.c: Ditto.
685         * cp-array-notation.c: Ditto.
686         * cp-gimplify.c: Ditto.
687         * cp-lang.c: Ditto.
688         * cp-objcp-common.c: Ditto.
689         * cvt.c: Ditto.
690         * decl2.c: Ditto.
691         * decl.c: Ditto.
692         * dump.c: Ditto.
693         * error.c: Ditto.
694         * except.c: Ditto.
695         * expr.c: Ditto.
696         * friend.c: Ditto.
697         * init.c: Ditto.
698         * lambda.c: Ditto.
699         * lex.c: Ditto.
700         * mangle.c: Ditto.
701         * name-lookup.c: Ditto.
702         * optimize.c: Ditto.
703         * parser.c: Ditto.
704         * pt.c: Ditto.
705         * ptree.c: Ditto.
706         * repo.c: Ditto.
707         * rtti.c: Ditto.
708         * search.c: Ditto.
709         * semantics.c: Ditto.
710         * tree.c: Ditto.
711         * typeck2.c: Ditto.
712         * typeck.c: Ditto.
714 2015-01-08  Jason Merrill  <jason@redhat.com>
716         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
717         * decl.c (compute_array_index_type): Likewise.
718         * init.c (build_vec_init): Likewise.
719         * typeck.c (cp_build_binary_op): Likewise.
721 2015-01-08  Jason Merrill  <jason@redhat.com>
723         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
724         whether an initializer-list is too big for a VLA.
725         (throw_bad_array_length): Remove.
726         * cp-tree.h: Remove prototype.
728 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
730         PR c++/60753
731         * decl.c (grokfndecl): Add bool parameter.
732         (grokdeclarator): Adjust calls.
733         (start_decl): Don't set DECL_DELETED_FN here.
735 2015-01-06  Jason Merrill  <jason@redhat.com>
737         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
738         template-ids.
740         PR c++/64455
741         * pt.c (type_dependent_expression_p): Handle variable templates.
742         * constexpr.c (potential_constant_expression_1): Use it.
744         PR c++/64487
745         * semantics.c (finish_offsetof): Handle templates here.
746         * parser.c (cp_parser_builtin_offsetof): Not here.
748         PR c++/64496
749         * semantics.c (process_outer_var_ref): Diagnose lambda in local
750         class NSDMI.
752 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
754         PR c++/64489
755         * class.c (check_field_decls): Make copy assignment operators
756         complex only in c++98 mode.
758 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
760         PR c++/31397
761         * class.c (check_for_override): Warn when a virtual function is an
762         override not marked override.
764 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
766         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
767         hold base_fndecls.
768         (get_basefndecls): Adjust.
770 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
772         Update copyright years.
774 2015-01-05  Marek Polacek  <polacek@redhat.com>
776         PR c/64423
777         * typeck.c (cp_build_array_ref): Pass loc down to
778         warn_array_subscript_with_type_char.
781 Copyright (C) 2015 Free Software Foundation, Inc.
783 Copying and distribution of this file, with or without modification,
784 are permitted in any medium without royalty provided the copyright
785 notice and this notice are preserved.