re PR c++/69995 ([C++14] Invalid result when evaluating constexpr function)
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2016-02-28  Jason Merrill  <jason@redhat.com>
2
3         PR c++/69995
4         * constexpr.c (cxx_eval_store_expression): Unshare init.
5
6 2016-02-26  Jason Merrill  <jason@redhat.com>
7
8         PR c++/69958
9         * pt.c (make_argument_pack): New.
10         (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
11         (tsubst_copy_and_build): Likewise.
12
13 2016-02-25  Jason Merrill  <jason@redhat.com>
14
15         PR c++/69889
16         * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
17         * tree.c (build_aggr_init_expr): Set it.
18         * semantics.c (simplify_aggr_init_expr): Check it.
19         * cp-gimplify.c (cp_genericize_r): Don't walk into
20         a call/aggr_init from a thunk.
21
22         PR c++/69842
23         * method.c (forward_parm): Handle parameter packs.
24         * lambda.c (maybe_add_lambda_conv_op): Use it for them.
25
26         PR c++/67364
27         * constexpr.c (cxx_eval_component_reference): Don't complain about
28         unevaluated empty classes.
29
30         PR c++/68049
31         * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
32
33 2016-02-25  Patrick Palka  <ppalka@gcc.gnu.org>
34
35         PR c++/69736
36         * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
37         (maybe_undo_parenthesized_ref): Declare.
38         * semantics.c (maybe_undo_parenthesized_ref): Split out from
39         check_return_expr.
40         (finish_call_expr): Use it.
41         * typeck.c (check_return_expr): Use it.
42         * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
43         REF_PARENTHESIZED_P flag.
44
45 2016-02-24  Jakub Jelinek  <jakub@redhat.com>
46
47         PR c++/69922
48         * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
49         Avoid folding it.
50         * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
51         tests.
52         * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
53         unless they are folded into INTEGER_CST, error_mark_node or some
54         comparison with NULL, avoid folding them and use either the original
55         comparison or non-folded comparison of folded arguments.
56         * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
57         comparison, don't fold the comparison right away.
58
59 2016-02-24  Jason Merrill  <jason@redhat.com>
60
61         PR c++/69323
62         * friend.c (make_friend_class): Likewise.
63         * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
64
65 2016-02-24  Jason Merrill  <jason@redhat.com>
66
67         PR c++/69323
68         * pt.c (instantiate_class_template_1): Set
69         processing_template_decl before substituting friend_type.
70
71 016-02-24  Martin Sebor  <msebor@redhat.com>
72
73         PR c++/69912
74         * tree.c (build_ctor_subob_ref): Compare types' main variants
75         instead of the types as they are.
76
77 2016-02-24  Jason Merrill  <jason@redhat.com>
78
79         * decl.c (start_preparsed_function): Condition ctor clobber on
80         flag_lifetime_dse > 1.
81
82         * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
83
84 2016-02-19  Jason Merrill  <jason@redhat.com>
85
86         PR c++/69743
87         * call.c (remaining_arguments): No longer static.
88         * cp-tree.h: Declare it.
89         * pt.c (more_specialized_fn): Use it.
90
91 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
92             Bernd Edlinger  <bernd.edlinger@hotmail.de>
93
94         * Make-lang.in: Invoke gperf with -L C++.
95         * cfns.gperf: Remove prototypes for hash and libc_name_p
96         inlines.
97         * cfns.h: Regenerated.
98         * except.c (nothrow_libfn_p): Adjust.
99
100 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
101
102         PR c++/69850
103         * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
104         NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
105
106 2016-02-19  Patrick Palka  <ppalka@gcc.gnu.org>
107
108         PR c++/68948
109         * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
110         call here.
111         * semantics.c (finish_call_expr): Don't assume a constructor
112         call is dependent if only the "this" pointer is dependent.  When
113         building a constructor call, always use a dummy object.
114
115 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
116
117         PR c++/69850
118         * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
119         condition.
120         * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
121         operators if folding preserved the binop, just with different
122         arguments.
123
124         PR c++/67767
125         * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
126         attr_spec is always single element chain, chain all the attributes
127         properly together in the right order.
128
129 2016-02-18  Jason Merrill  <jason@redhat.com>
130
131         * mangle.c (maybe_check_abi_tags): Add for_decl parm.  Call
132         mangle_decl.
133         (mangle_decl): Call maybe_check_abi_tags for function scope.
134         (mangle_guard_variable): Call maybe_check_abi_tags here.
135         (write_guarded_var_name): Not here.
136
137 2016-02-17  Jason Merrill  <jason@redhat.com>
138
139         PR c++/65985
140         * constexpr.c (build_constexpr_constructor_member_initializers):
141         Handle an additional STATEMENT_LIST.
142
143         PR c++/68585
144         * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
145
146         PR c++/68679
147         * decl2.c (reset_type_linkage_2): Look through member templates.
148
149 2016-02-17  Jakub Jelinek  <jakub@redhat.com>
150
151         PR c++/69850
152         * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
153
154 2016-02-17  Jason Merrill  <jason@redhat.com>
155
156         PR c++/69842
157         * method.c (forward_parm): Split out from...
158         (add_one_base_init): ...here.
159         * lambda.c (maybe_add_lambda_conv_op): Use it.
160
161 2016-02-16  Jason Merrill  <jason@redhat.com>
162
163         PR c++/10200
164         PR c++/69753
165         * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
166         tree.c, typeck2.c: Revert earlier changes.
167         * parser.c (cp_parser_lookup_name): Ignore namespace-scope
168         non-type templates after -> or .
169
170 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
171
172         PR c/69835
173         * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
174
175 2016-02-16  Jason Merrill  <jason@redhat.com>
176
177         PR c++/69657
178         * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
179         (set_decl_namespace): Pass it.  Complain about finding a hidden friend.
180         * name-lookup.h: Adjust.
181
182 2016-02-16  James Norris  <jnorris@codesourcery.com>
183
184         * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
185         * semantics.c (finish_omp_clauses): Add deviceptr checking.
186
187 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
188
189         PR c++/69658
190         * init.c (expand_default_init): Only call reshape_init
191         in the direct-initialization from an initializer list case.
192
193 2016-02-15  Jason Merrill  <jason@redhat.com>
194
195         PR c++/69753
196         * semantics.c (finish_call_expr): Implicit 'this' does not make
197         the call dependent.
198         * search.c (any_dependent_bases_p): Split out...
199         * name-lookup.c (do_class_using_decl): ...from here.
200         * call.c (build_new_method_call_1): Don't complain about missing object
201         if there are dependent bases.  Tweak error.
202         * tree.c (non_static_member_function_p): Remove.
203         * pt.c (type_dependent_expression_p): A member template of a
204         dependent type is dependent.
205         * cp-tree.h: Adjust.
206
207         PR c++/68890
208         * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
209
210 2016-02-12  Patrick Palka  <ppalka@gcc.gnu.org>
211
212         PR c++/69098
213         * pt.c (lookup_and_finish_template_variable): New function,
214         extracted from ...
215         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here.  Use it.
216         (tsubst_qualified_id): Consider that EXPR might be a variable
217         template.
218         * typeck.c (check_template_keyword): Don't emit an error
219         if DECL is a variable template.
220
221 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
222
223         * error.c: Spelling fixes - behaviour -> behavior and
224         neighbour -> neighbor.
225         * decl.c: Likewise.
226         * typeck.c (cp_build_binary_op): Fix up behavior spelling in
227         diagnostics.
228         * init.c (build_delete): Likewise.
229
230 2016-02-11  Jakub Jelinek  <jakub@redhat.com>
231
232         PR c/69768
233         * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
234         arguments for -Waddress warning.  Fix up formatting.
235
236 2016-02-11  Paolo Carlini  <paolo.carlini@oracle.com>
237
238         PR c++/68726
239         * pt.c (lookup_template_class_1): Check tsubst return value for
240         error_mark_node.
241
242 2016-02-10  Jason Merrill  <jason@redhat.com>
243
244         PR c++/68926
245         * pt.c (resolve_nondeduced_context): Add complain parm.
246         (do_auto_deduction): Pass it.
247         * cvt.c (convert_to_void): Likewise.
248         * decl.c (cp_finish_decl): Likewise.
249         * init.c (build_new): Likewise.
250         * rtti.c (get_tinfo_decl_dynamic): Likewise.
251         * semantics.c (finish_decltype_type): Likewise.
252         * typeck.c (decay_conversion): Likewise.
253         * cp-tree.h: Adjust declaration.
254         * call.c (standard_conversion): Add complain parm, pass it along.
255         (implicit_conversion): Pass it.
256
257         PR c++/69657
258         * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
259         (lookup_name_real_1): Likewise.
260         (remove_hidden_names): Handle non-functions too.
261
262         PR c++/10200
263         * parser.c (cp_parser_lookup_name): When looking for a template
264         after . or ->, only consider class templates.
265         (cp_parser_postfix_dot_deref_expression): Handle the current
266         instantiation.  Remember a dependent object expression.
267         * typeck2.c (build_x_arrow): Handle the current instantiation.
268
269         * ptree.c (debug_tree): Implement for cp_expr.
270
271 2016-02-08  Patrick Palka  <ppalka@gcc.gnu.org>
272
273         PR c++/69139
274         * parser.c (cp_parser_simple_type_specifier): Make the check
275         for disambiguating between an 'auto' placeholder and an implicit
276         template parameter more robust.
277
278 2016-02-08  Patrick Palka  <ppalka@gcc.gnu.org>
279
280         PR c++/69283
281         PR c++/67835
282         * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
283         setting its TREE_USED flag.
284
285 2016-02-08  Jason Merrill  <jason@redhat.com>
286
287         PR c++/69657
288         * name-lookup.c (do_nonmember_using_decl): Leave anticipated
289         built-ins alone.
290
291 2016-02-08  Jakub Jelinek  <jakub@redhat.com>
292
293         PR c++/59627
294         * parser.c (cp_parser_omp_declare_reduction): Set assembler name
295         of the DECL_OMP_DECLARE_REDUCTION_P decls.
296
297 2016-02-08  Marek Polacek  <polacek@redhat.com>
298
299         PR c++/69688
300         * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
301         Call clear_fold_cache.
302         * cp-tree.h: Adjust declaration.
303         * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
304         rather than clear_cv_cache and clear_fold_cache.
305         * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
306
307 2016-02-08  Jason Merrill  <jason@redhat.com>
308
309         * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
310         * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
311         (ocp_convert): Use *_maybe_fold.
312         (cp_convert_to_pointer): Add dofold parameter.
313         * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
314
315 2016-02-05  Martin Sebor  <msebor@redhat.com>
316
317         PR c++/69662
318         * init.c (find_field_init): New function.
319         (warn_placement_new_too_small): Call it.  Handle one-element arrays
320         at ends of structures special.
321
322 2016-02-05  Jason Merrill  <jason@redhat.com>
323
324         PR c++/68948
325         * semantics.c (finish_expr_stmt): If expr is error_mark_node,
326         make sure we've seen_error().
327
328 2016-02-05  Patrick Palka  <ppalka@gcc.gnu.org>
329
330         PR c++/68948
331         * pt.c (tsubst_baselink): Diagnose an invalid constructor call
332         if lookup_fnfields returns NULL_TREE and the name being looked
333         up has the form A::A.
334
335 2016-02-04  Patrick Palka  <ppalka@gcc.gnu.org>
336
337         * constexpr.c (cxx_eval_binary_expression): Fold equality
338         comparisons involving PTRMEM_CSTs.
339
340 2016-02-04  Jakub Jelinek  <jakub@redhat.com>
341
342         * class.c (find_flexarrays): Don't declare dom variable.
343         (diagnose_flexarray): Likewise.
344
345 2016-02-02  Martain Sebor  <msebor@redhat.com>
346
347         PR c++/69251
348         PR c++/69253
349         PR c++/69290
350         PR c++/69277
351         PR c++/69349
352         * class.c (walk_subobject_offsets): Avoid testing the upper bound
353         of a flexible array member for equality to null.
354         (find_flexarrays): Remove spurious whitespace introduced in r231665.
355         (diagnose_flexarrays): Avoid checking the upper bound of arrays.
356         (check_flexarrays): Same.
357         * decl.c (compute_array_index_type): Avoid special case for flexible
358         array members.
359         (grokdeclarator): Avoid calling compute_array_index_type for flexible
360         array members.
361         * error.c (dump_type_suffix): Revert changes introduced in r231665
362         and rendered unnecessary by the changes above.
363         * pt.c (tsubst):  Same.
364         * tree.c (build_ctor_subob_ref): Handle flexible array members.
365         * typeck2.c (digest_init_r): Revert changes introduced in r231665.
366         (process_init_constructor_array): Same.
367         (process_init_constructor_record): Same.
368
369 2016-02-03  Patrick Palka  <ppalka@gcc.gnu.org>
370
371         PR c++/69056
372         * pt.c (try_one_overload): Handle comparing argument packs so
373         that there is no conflict if we deduced more arguments of an
374         argument pack than were explicitly specified.
375
376 2016-01-31  Jakub Jelinek  <jakub@redhat.com>
377             Jason Merrill  <jason@redhat.com>
378
379         PR c++/68763
380         * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
381         function type if nothing is changing.
382
383 2016-01-31  Jason Merrill  <jason@redhat.com>
384
385         PR c++/69009
386         * pt.c (partial_specialization_p, impartial_args): New.
387         (instantiate_decl): Call impartial_args.
388
389         * mangle.c (maybe_check_abi_tags): New.
390         (write_guarded_var_name): Call it.
391         (mangle_ref_init_variable): Call check_abi_tags.
392
393         * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
394         between template and instantiation.
395
396 2016-01-29  Jakub Jelinek  <jakub@redhat.com>
397
398         PR debug/66869
399         * decl.c (wrapup_globals_for_namespace): Warn about unused static
400         function declarations.
401
402 2016-01-29  Marek Polacek  <polacek@redhat.com>
403
404         PR c++/69509
405         PR c++/69516
406         * constexpr.c (cxx_eval_array_reference): Give the "array subscript
407         out of bound" error earlier.
408         * init.c (build_vec_init): Change NE_EXPR into GT_EXPR.  Update the
409         commentary.
410
411 2016-01-29  Patrick Palka  <ppalka@gcc.gnu.org>
412
413         * name-lookup.c (begin_scope): After reusing a cp_binding_level
414         structure, update free_binding_level before the structure's
415         level_chain field gets cleared, not after.
416
417 2016-01-28  Jason Merrill  <jason@redhat.com>
418
419         PR c++/67407
420         * search.c (dfs_walk_once, dfs_walk_once_r)
421         (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
422         hash_set instead of BINFO_MARKED.
423         (dfs_unmark_r): Remove.
424
425 2016-01-28  Patrick Palka  <ppalka@gcc.gnu.org>
426
427         PR c++/24208
428         * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
429         (cp_lexer_debugging_p): Use it.
430         (cp_lexer_start_debugging): Likewise.
431         (cp_lexer_stop_debugging): Likewise.
432
433 2016-01-27  Marek Polacek  <polacek@redhat.com>
434
435         PR c/68062
436         * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
437         needed.  Add -Wsign-compare warning.
438
439 2016-01-27  Ryan Burn  <contact@rnburn.com>
440
441         PR cilkplus/69267
442         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
443         superfluous post_p argument in call to
444         cilk_gimplify_call_params_in_spawned_fn.
445
446 2016-01-27  Marek Polacek  <polacek@redhat.com>
447
448         PR c++/69379
449         * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
450         wrapped in NOP_EXPRs.
451
452 2016-01-27  Martin Sebor  <msebor@redhat.com>
453
454         PR c++/69317
455         * mangle.c (mangle_decl): Reference the correct (saved) version
456         of the ABI in -Wabi diagnostics.
457
458 2016-01-27  Marek Polacek  <polacek@redhat.com>
459
460         PR c++/69496
461         * constexpr.c (cxx_eval_array_reference): Evaluate the number of
462         elements of the array.
463
464 2016-01-26  Jason Merrill  <jason@redhat.com>
465
466         PR c++/68949
467         * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
468         (cxx_eval_call_expression): Don't look through clones.
469         * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
470         * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
471         maybe-in-charge *tor.
472
473 2016-01-26  Jason Merrill  <jason@redhat.com>
474
475         PR c++/68782
476         * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
477         and TREE_SIDE_EFFECTS.
478         (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
479         verify_constructor_flags.
480
481 2016-01-26  Jakub Jelinek  <jakub@redhat.com>
482
483         PR c++/68357
484         * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
485         return error_mark_node instead of building trees with error_mark_node
486         operands.
487
488 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
489
490         PR other/69006
491         * error.c (print_instantiation_partial_context_line): Add missing
492         newlines from output for the t == NULL case.
493         (print_instantiation_partial_context): Remove call to pp_newline.
494
495 2016-01-24  Patrick Palka  <ppalka@gcc.gnu.org>
496
497         Revert:
498         2016-01-18  Patrick Palka  <ppalka@gcc.gnu.org>
499
500         PR c++/11858
501         PR c++/24663
502         PR c++/24664
503         * decl.c (grokdeclarator): Don't decay array parameter type to
504         a pointer type if it's dependent.
505         (grokparms): Invoke strip_top_quals instead of directly invoking
506         cp_build_qualified_type.
507         * pt.c (decay_dependent_array_parm_type): New static function.
508         (type_unification_real): Call decay_dependent_array_parm_type
509         to decay a dependent array parameter type to its corresponding
510         pointer type before unification.
511         (more_specialized_fn): Likewise.
512         (get_bindings): Likewise.
513         * tree.c (cp_build_qualified_type): Trivial typofix in
514         documentation.
515
516 2016-01-23  Martin Sebor  <msebor@redhat.com>
517
518         PR c++/58109
519         PR c++/69022
520         * decl2.c (is_late_template_attribute): Handle dependent argument
521         to attribute align and attribute vector_size.
522
523 2016-01-21  Jason Merrill  <jason@redhat.com>
524
525         PR c++/69392
526         * lambda.c (lambda_capture_field_type): Handle 'this' specially
527         for init-capture, too.
528
529         PR c++/65687
530         * decl.c (type_is_deprecated): Don't look into a typedef.
531
532         PR c++/40751
533         PR c++/64987
534         * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
535
536         PR c++/43407
537         * decl.c (start_enum): Add attributes parameter.
538         * parser.c (cp_parser_enum_specifier): Pass it.
539         * pt.c (lookup_template_class_1): Pass it.
540         * cp-tree.h: Adjust.
541
542 2016-01-19  Jason Merrill  <jason@redhat.com>
543
544         PR c++/59759
545         * pt.c (convert_template_argument): Handle VAR_DECL properly.
546
547 2016-01-19  Marek Polacek  <polacek@redhat.com>
548
549         PR c++/68586
550         * constexpr.c (clear_cv_cache): New.
551         * cp-gimplify.c (clear_fold_cache): New.
552         * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
553         * decl.c (finish_enum_value_list): Call them.
554
555         PR c++/68965
556         * pt.c (tsubst_copy): Mark elements in expanded vector as used.
557
558 2016-01-18  Patrick Palka  <ppalka@gcc.gnu.org>
559
560         PR c++/11858
561         PR c++/24663
562         PR c++/24664
563         * decl.c (grokdeclarator): Don't decay array parameter type to
564         a pointer type if it's dependent.
565         (grokparms): Invoke strip_top_quals instead of directly invoking
566         cp_build_qualified_type.
567         * pt.c (decay_dependent_array_parm_type): New static function.
568         (type_unification_real): Call decay_dependent_array_parm_type
569         to decay a dependent array parameter type to its corresponding
570         pointer type before unification.
571         (more_specialized_fn): Likewise.
572         (get_bindings): Likewise.
573         * tree.c (cp_build_qualified_type): Trivial typofix in
574         documentation.
575
576 2016-01-18  Jason Merrill  <jason@redhat.com>
577
578         * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
579
580         * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
581
582         PR c++/68767
583         * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify.  Do fold COND_EXPR.
584         (contains_label_1, contains_label_p): Remove.
585
586 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
587
588         PR c++/69091
589         * pt.c (type_dependent_expression_p): For a function template
590         specialization, a type is dependent iff any of its template
591         arguments are.
592
593 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
594
595         * cp-array-notation.c (cp_expand_cond_array_notations): Return
596         error_mark_node only if find_rank failed, not if it was
597         successful.
598
599 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
600
601         PR c++/68936
602         * tree.c (build_min_non_dep_call_vec): Don't retain the
603         KOENIG_LOOKUP_P flag of the non-dependent expression that's
604         been built.
605         (build_min_non_dep_op_overload): Instead, do it here.
606
607 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
608
609         PR bootstrap/68271
610         * parser.h (cp_token): Remove pragma_kind field.  Add comment
611         with number of unused bits.
612         * parser.c (eof_token): Remove pragma_kind field initializer.
613         (cp_lexer_get_preprocessor_token): Don't set pragma_kind
614         field, don't clear CPP_PRAGMA u.value.
615         (cp_parser_pragma_kind): New function.
616         (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
617         cp_parser_omp_construct, cp_parser_initial_pragma,
618         cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
619         pragma_kind field.
620
621 2016-01-15  Jason Merrill  <jason@redhat.com>
622
623         PR c++/68847
624         * call.c (build_cxx_call): Use fold_non_dependent_expr.
625
626         * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
627         value.
628
629         PR c++/69257
630         * typeck.c (decay_conversion): Don't call mark_rvalue_use for
631         array/function-to-pointer conversion.  Call
632         complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
633         * call.c (convert_like_real): Print call context if
634         decay_conversion errors.
635
636 2016-01-14  Tom de Vries  <tom@codesourcery.com>
637
638         PR tree-optimization/68773
639         * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
640         set force_output.
641
642 2016-01-14  Jason Merrill  <jason@redhat.com>
643
644         PR c++/69261
645         * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
646
647 2016-01-12  Marek Polacek  <polacek@redhat.com>
648
649         PR c++/68979
650         * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
651         error_at and adjust the return value.
652
653 2016-01-12  Jakub Jelinek  <jakub@redhat.com>
654
655         PR objc++/68511
656         PR c++/69213
657         * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
658         GS_ERROR whenever seen_error (), only if *expr_p contains
659         cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
660
661         PR c++/66808
662         PR c++/69000
663         * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
664
665 2016-01-11  Jason Merrill  <jason@redhat.com>
666
667         PR c++/69131
668         * method.c (walk_field_subobs): Add dtor_from_ctor parm.
669         (process_subob_fn): Likewise.  Don't consider triviality if true.
670         (synthesize_method_walk): Pass it.
671
672 2016-01-11  David Malcolm  <dmalcolm@redhat.com>
673
674         PR c++/68795
675         * parser.c (cp_parser_postfix_expression): Initialize
676         close_paren_loc to UNKNOWN_LOCATION; only use it if
677         it has been written to by
678         cp_parser_parenthesized_expression_list.
679         (cp_parser_parenthesized_expression_list): Document the behavior
680         with respect to the CLOSE_PAREN_LOC param.
681
682 2016-01-11  Jakub Jelinek  <jakub@redhat.com>
683
684         PR c++/69211
685         * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
686         folded operands have side-effects, but folding changed any of them,
687         build a new tree with the folded operands instead of returning the
688         unfolded tree.
689
690 2016-01-09  Marek Polacek  <polacek@redhat.com>
691
692         PR c++/69113
693         * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
694
695 2016-01-09  Jakub Jelinek  <jakub@redhat.com>
696
697         PR c++/69164
698         * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
699
700 2016-01-08  Jason Merrill  <jason@redhat.com>
701
702         PR c++/69158
703         * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
704         in completion.
705
706 2016-01-08  Marek Polacek  <polacek@redhat.com>
707
708         PR c++/68449
709         * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
710
711 2016-01-08  Jason Merrill  <jason@redhat.com>
712
713         * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
714         workaround.
715
716         PR c++/68983
717         PR c++/67557
718         * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
719         TREE_ADDRESSABLE type.
720
721         PR c++/68983
722         PR c++/67557
723         * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
724
725 2016-01-05  Nathan Sidwell  <nathan@acm.org>
726
727         PR c++/58583
728         * pt.c (build_non_dependent_expr): Don't try a checking fold when
729         parsing an nsdmi.
730
731 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
732
733         Update copyright years.
734 \f
735 Copyright (C) 2016 Free Software Foundation, Inc.
736
737 Copying and distribution of this file, with or without modification,
738 are permitted in any medium without royalty provided the copyright
739 notice and this notice are preserved.