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