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