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