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