]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
a7b12f1f
JM
12016-04-15 Jason Merrill <jason@redhat.com>
2
3d8dfcb4
JM
3 PR c++/70685
4 * constexpr.c (get_fundef_copy): Handle null *slot.
5
a7b12f1f
JM
6 PR c++/70505
7 * pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR
8 unknown_type_node, too.
9
70f4fdeb
JJ
102016-04-15 Jason Merrill <jason@redhat.com>
11 Nathan Sidwell <nathan@acm.org>
12
13 PR c++/70594
14 * constexpr.c (constexpr_call_table): Preserve in GC.
15 (struct fundef_copy, struct fundef_copies_table_t): Delete.
16 (fundef_copies_table): Preserve in GC. Change to pointer to
17 tree->tree hash.
18 (maybe_initialize_fundef_copies_table): Adjust.
19 (get_fundef_copy): Return a TREE_LIST. Use non-inserting search.
20 (save_fundef_copy): Adjust for a TREE_LIST.
21 (cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST.
22 (fini_constexpr): New.
23 * cp-tree.h (fini_constexpr): Declare.
24 * decl2.c (c_parse_final_cleanups): Call fini_constexpr.
25
dda1bf61
JJ
262016-04-15 Jakub Jelinek <jakub@redhat.com>
27
28 PR c/70436
29 * parser.c (cp_parser_pragma): Add IF_P argument, pass it down
30 where needed.
31 (cp_parser_declaration_seq_opt, cp_parser_member_specification_opt,
32 cp_parser_objc_interstitial_code, cp_parser_omp_declare_simd,
33 cp_parser_oacc_routine): Adjust cp_parser_pragma callers.
34 (cp_parser_statement): Likewise. Adjust cp_parser_cilk_for caller.
35 (cp_parser_omp_structured_block): Add IF_P argument, pass it down to
36 cp_parser_statement.
37 (cp_parser_oacc_data, cp_parser_oacc_host_data, cp_parser_oacc_loop,
38 cp_parser_oacc_kernels_parallel, cp_parser_omp_critical,
39 cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_master,
40 cp_parser_omp_ordered, cp_parser_omp_parallel, cp_parser_omp_single,
41 cp_parser_omp_task, cp_parser_omp_taskgroup, cp_parser_omp_distribute,
42 cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target,
43 cp_parser_omp_taskloop, cp_parser_omp_construct,
44 cp_parser_cilk_grainsize, cp_parser_cilk_simd, cp_parser_cilk_for):
45 Add IF_P argument, pass it down where needed.
46 (cp_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
47 (cp_parser_omp_sections_scope): Adjust cp_parser_omp_structured_block
48 calls.
49
3ae9a8b7
JM
502016-04-14 Jason Merrill <jason@redhat.com>
51
8e718ecb
JM
52 PR c++/70494
53 * decl.c (cxx_maybe_build_cleanup): Handle non-decls.
54 * typeck2.c (split_nonconstant_init_1): Use it.
55
26144dde
JM
56 PR c++/70528
57 * class.c (type_has_constexpr_default_constructor): Return true
58 for an implicitly declared constructor.
59
65bddf28
JM
60 PR c++/70622
61 * parser.c (cp_parser_init_declarator): Add auto_result parm.
62 (cp_parser_simple_declaration): Pass it.
63 (strip_declarator_types): New.
64
d25a101f
JM
65 PR c++/70543
66 * pt.c (value_dependent_expression_p) [VAR_DECL]: A type-dependent
67 initializer also makes the variable value-dependent.
68
3ae9a8b7
JM
69 PR c++/70648
70 * constexpr.c (cxx_eval_store_expression): Also copy
71 CONSTRUCTOR_NO_IMPLICIT_ZERO.
72
d8747845
MS
732016-04-14 Martin Sebor <msebor@redhat.com>
74
75 PR c++/69517
76 PR c++/70019
77 PR c++/70588
78 * cp-tree.h, decl.c, init.c, typeck2.c: Revert.
79
9f285ccb
JM
802016-04-14 Jason Merrill <jason@redhat.com>
81
82 * call.c, decl.c, error.c, cp-tree.h, decl.c: Revert empty
83 parameter ABI change.
84
342fac95
MS
852016-04-13 Martin Sebor <msebor@redhat.com>
86
87 PR c++/69517
88 PR c++/70019
89 PR c++/70588
90 * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
91 functions.
92 * decl.c (check_initializer, cp_finish_decl): Call them.
93 (reshape_init_r): Reject incompletely braced intializer-lists
94 for VLAs.
95 * init.c (throw_bad_array_length, build_vla_check)
96 (build_vla_size_check, build_vla_init_check): Define new functions.
97 * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
98 to detect a VLA.
99 (store_init_value): Same.
100
5655267c
JM
1012016-04-13 Jason Merrill <jason@redhat.com>
102
2ee35bea
JM
103 Warn about empty parameter ABI with -Wabi=9.
104 * call.c (empty_class_msg, mark_for_abi_warning)
105 (warn_empty_class_abi): New.
106 (build_call_a): Use them.
107 * decl.c (store_parm_decls): Use mark_for_abi_warning.
108 * error.c (pp_format_to_string): New.
109
5655267c
JM
110 Pass empty class parameters like C.
111 * call.c (pass_as_empty_struct, empty_class_arg): New.
112 (type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
113 (build_call_a): Use empty_class_arg.
114 * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
115 * decl.c (cxx_init_decl_processing): Create empty_struct_type.
116
0d9cdbdd
JM
1172016-04-13 Jason Merrill <jason@redhat.com>
118
119 PR c++/70627
120 * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
121
545a4139
PC
1222016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
123
124 PR c++/70635
125 * pt.c (resolve_typename_type): Fix typos in infinite recursion
126 avoidance mechanism.
127
eb07f187
JM
1282016-04-13 Jason Merrill <jason@redhat.com>
129
463d91c6
JM
130 PR c++/70634
131 * pt.c (instantiation_dependent_uneval_expression_p): Split out
132 from instantiation_dependent_expression_p.
133 (value_dependent_expression_p): Use it for unevaluated operands.
134 (instantiation_dependent_r): Don't check value-dependence.
135 (instantiation_dependent_expression_p): Check
136 value-dependence of the expression as a whole.
137 * cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
138 * semantics.c (finish_decltype_type): Use it.
139
eb07f187
JM
140 * constexpr.c (potential_nondependent_constant_expression): New.
141 (potential_nondependent_static_init_expression): New.
142 (maybe_constant_value_1, fold_non_dependent_expr)
143 (maybe_constant_init): Use them.
144 * pt.c (instantiate_non_dependent_expr_sfinae)
145 (instantiate_non_dependent_or_null, convert_nontype_argument): Use
146 them.
147 * cp-tree.h: Declare them.
148
3eddc1c9
JJ
1492016-04-13 Jakub Jelinek <jakub@redhat.com>
150
151 PR c++/70594
152 * decl.c (pop_labels_1): Removed.
153 (note_label, sort_labels): New functions.
154 (pop_labels): During named_labels traversal, just push the slot
155 pointers into a vector, then qsort it by DECL_UID and only then
156 call pop_label and chain it into BLOCK_VARS.
157
9d409934
JM
1582016-04-13 Jason Merrill <jason@redhat.com>
159
160 PR c++/70615
161 * cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
162 (cp_gimplify_expr): Not here.
163
92886d3e
PP
1642016-04-12 Patrick Palka <ppalka@gcc.gnu.org>
165
166 PR c++/70610
167 * tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Unconditionally
168 recurse into it.
169 * typeck.c (build_x_conditional_expr): Unconditionally remember
170 that the result is an lvalue or xvalue.
171
08d6d8bb
JM
1722016-04-12 Jason Merrill <jason@redhat.com>
173
174 * class.c (is_really_empty_class): A zero-length array is empty.
175 An unnamed bit-field doesn't make a class non-empty.
176
2b2f52bc
PC
1772016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
178
179 PR c++/68722
180 * parser.c (cp_parser_cache_defarg): When file ends in default
181 argument simply return error_mark_node.
182
d4619dc1
NS
1832016-04-12 Nathan Sidwell <nathan@acm.org>
184
185 PR c++/70501
186 * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
187 similarly to PMF.
188
a9c2f3d9
JM
1892016-04-11 Jason Merrill <jason@redhat.com>
190
191 * mangle.c (decl_is_template_id): The template itself counts as a
192 template-id.
193
56cfb596
PP
1942016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
195
196 PR c++/70590
197 PR c++/70452
198 * constexpr.c (cxx_eval_outermost_expression): Call unshare_expr
199 on the result if it's not a CONSTRUCTOR.
200
0146e25f
PP
2012016-04-07 Patrick Palka <ppalka@gcc.gnu.org>
202
203 PR c++/70452
204 * constexpr.c (find_constructor): New function.
205 (unshare_constructor): New function.
206 (cxx_eval_call_expression): Use unshare_constructor instead of
207 unshare_expr.
208 (find_array_ctor_elt): Likewise.
209 (cxx_eval_vec_init_1): Likewise.
210 (cxx_eval_store_expression): Likewise.
211 (cxx_eval_constant_expression): Likewise.
212
6b37bdaf
PP
2132016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
214
215 PR c/70436
216 * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
217 potentially generating a future -Wparentheses warning in its
218 callers.
219
469abfd2
JM
2202016-04-06 Jason Merrill <jason@redhat.com>
221
222 * class.c (check_abi_tags): Fix function template handling.
223
c08d28ac
NS
2242016-04-05 Nathan Sidwell <nathan@acm.org>
225
226 PR c++/70512
227 * class.c (fixup_may_alias): New.
228 (fixup_attribute_variants): Call it.
229
c0daf32d
PP
2302016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
231
232 PR c++/70452
233 * constexpr.c (struct fundef_copy): New struct.
234 (struct fundef_copies_table_t): New struct.
235 (fundef_copies_table): New static variable.
236 (maybe_initialize_fundef_copies_table): New static function.
237 (get_fundef_copy): New static function.
238 (save_fundef_copy): New static function.
239 (cxx_eval_call_expression): Use get_fundef_copy, and
240 save_fundef_copy.
241 (constexpr_call_table): Add "deletable" GTY marker.
242
7a7ac32a
PP
2432016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
244
245 PR c++/70452
246 * cp-tree.h (class cache_map): Remove.
247 * constexpr.c (cv_cache): Change type to
248 GTY((deletable)) hash_map<tree, tree> *.
249 (maybe_constant_value): Adjust following the change to cv_cache.
250 (clear_cv_cache): New static function.
251 (clear_cv_and_fold_caches): Use it.
252 * cp-gimplify.c (fold_cache): Change type to
253 GTY((deletable)) hash_map<tree, tree> *.
254 (clear_fold_cache): Adjust following the change to fold_cache.
255 (cp_fold): Likewise.
256
abdc16c8
MS
2572016-04-02 Martin Sebor <msebor@redhat.com>
258
259 PR c++/67376
260 PR c++/70170
261 PR c++/70172
262 PR c++/70228
263 * constexpr.c (diag_array_subscript): New function.
264 (cxx_eval_array_reference): Detect out of bounds array indices.
265
ddd6d421
JM
2662016-04-01 Jason Merrill <jason@redhat.com>
267
268 PR c++/70449
269 PR c++/70344
270 * pt.c (instantiate_decl): A function isn't fully defined if
271 DECL_INITIAL is error_mark_node.
272 * constexpr.c (cxx_eval_call_expression): Likewise.
273
0f875435
JJ
2742016-04-01 Jakub Jelinek <jakub@redhat.com>
275 Marek Polacek <polacek@redhat.com>
276
277 PR c++/70488
278 * init.c (warn_placement_new_too_small): Test whether
279 DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.
280
f9bf89bb
NS
2812016-04-01 Nathan Sidwell <nathan@acm.org>
282
283 PR c++/68475
284 * decl.c (check_redeclaration_exception_specification): Check
285 regardless of -fno-exceptions.
286 * typeck2.c (merge_exception_specifiers): Relax assert by checking
287 flag_exceptions too.
288
8f80cbdb
NS
2892016-03-31 Nathan Sidwell <nathan@acm.org>
290
291 * decl.c (start_preparsed_function): Remove unnecessary bracing.
292 (finish_destructor_body): Don't emit operator delete here.
293
88504f34
NS
2942016-03-31 Nathan Sidwell <nathan@acm.org>
295
296 PR c++/70393
297 * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
298 elements in field order.
299
5fde6a45
MP
3002016-03-31 Marek Polacek <polacek@redhat.com>
301
302 PR c/70297
303 * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
304
efc3536f
RB
3052016-03-31 Richard Biener <rguenther@suse.de>
306
307 PR c++/70430
308 * typeck.c (cp_build_binary_op): Fix operand order of vector
309 conditional in truth op handling.
310
e0bffbbb
JM
3112016-03-29 Jason Merrill <jason@redhat.com>
312
313 PR c++/70353
314 * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics
315 in constexpr functions.
316
bfec0b4d
JM
3172016-03-28 Jason Merrill <jason@redhat.com>
318
319 PR c++/70422
320 PR c++/64266
321 PR c++/70353
322 * decl.c, pt.c, constexpr.c: Revert last patch.
323
d7796e23
JM
3242016-03-25 Jason Merrill <jason@redhat.com>
325 Martin Liška <mliska@suse.cz>
326
327 PR c++/64266
328 PR c++/70353
329 Core issue 1962
330 * decl.c (cp_fname_init): Decay the initializer to pointer.
331 (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
332 DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
333 Don't call cp_finish_decl.
334 * pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR,
335 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Don't call cp_finish_decl.
336 * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]:
337 Handle DECL_VALUE_EXPR.
338
52228180
JM
3392016-03-24 Jason Merrill <jason@redhat.com>
340
8a29084d
JM
341 PR c++/70386
342 * constexpr.c (cxx_eval_bare_aggregate): Handle PMFs.
343
52228180
JM
344 PR c++/70323
345 * constexpr.c (cxx_eval_call_expression): Don't cache result if
346 *overflow_p.
347
887ab4e5
PP
3482016-03-24 Patrick Palka <ppalka@gcc.gnu.org>
349
350 PR c++/62212
351 * tree.c (build_cplus_array_type): Determine type-dependentess
352 with uses_template_parms instead of with dependent_type_p.
353
426b9428
PP
3542016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
355
356 PR c++/70347
357 * typeck.c (process_init_constructor_union): If the initializer
358 is empty, use the union's NSDMI if it has one.
359
cd1588c4
PP
3602016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
361
362 PR c++/70332
363 * pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an
364 NSDMI that's part of an aggregrate initialization.
365
04833609
JJ
3662016-03-23 Jakub Jelinek <jakub@redhat.com>
367
928af3bf
JJ
368 PR c++/70001
369 * constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers
370 for 1..max even for multi-dimensional arrays. Call unshare_expr
371 on it.
372
61637db3
JJ
373 PR c++/70323
374 * constexpr.c (cxx_eval_constant_expression): Diagnose overflow
375 on TREE_OVERFLOW constants.
376
04833609
JJ
377 PR c++/70376
378 * cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
379 for OMP_TASKLOOP here.
380 (cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
381 genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.
382
05aca4e7
AO
3832016-03-23 Alexandre Oliva <aoliva@redhat.com>
384 Jason Merrill <jason@redhat.com>
385 Jakub Jelinek <jakub@redhat.com>
386
387 PR c++/69315
388 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
389 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
390 (finish_function): Don't set or test them.
391 * decl2.c (mark_used): Don't handle defer_mark_used_calls.
392
96a4ef9d
JM
3932016-03-23 Jason Merrill <jason@redhat.com>
394
395 PR c++/70344
396 * constexpr.c (cxx_eval_call_expression): Catch invalid recursion.
397
fbdb6baf
MP
3982016-03-23 Marek Polacek <polacek@redhat.com>
399
400 PR c++/69884
401 * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes.
402
6cedf922
IE
4032016-03-22 Ilya Enkovich <enkovich.gnu@gmail.com>
404
405 * call.c (build_conditional_expr_1): Always use original
406 condition type for vector type checks and build.
407
16f6d7dc
PP
4082016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
409
410 PR c++/70096
411 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.
412
a3e2b438
PP
4132016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
414
415 PR c++/70204
416 * constexpr.c (non_const_var_error): Check
417 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
418
ad779205
RH
4192016-03-21 Richard Henderson <rth@redhat.com>
420
421 PR c++/70273
422 * decl.c (notice_forced_label_r): New.
423 (cp_finish_decl): Use it.
424
683b8101
JM
4252016-03-21 Jason Merrill <jason@redhat.com>
426
427 PR c++/70285
428 * cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.
429
eb0dbdc7
JM
4302016-03-18 Jason Merrill <jason@redhat.com>
431
86461cad
JM
432 PR c++/70139
433 * constexpr.c (cxx_eval_call_expression): Fix trivial copy.
434
b5a28d80
JM
435 PR c++/70147
436 * class.c (vptr_via_virtual_p): New.
437 (most_primary_binfo): Factor out of build_rtti_vtbl_entries.
438 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
439 a vptr from any virtual base in a not-in-charge 'structor.
440
bf08acda
JM
441 * decl.c (build_clobber_this): Factor out of
442 start_preparsed_function and begin_destructor_body. Handle
443 virtual bases better.
444
eb0dbdc7
JM
445 * class.c (build_if_in_charge): Split out from build_base_path.
446 * init.c (expand_virtual_init, expand_default_init): Use it.
447 * call.c (build_special_member_call): Use it.
448
dd125026
JJ
4492016-03-18 Jakub Jelinek <jakub@redhat.com>
450
451 PR c++/70267
452 * init.c (build_new_1): Complain and return error_mark_node
453 if alloc_fn is not _Jv_AllocObject function returning pointer.
454
91914f0a
PP
4552016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
456
457 PR c++/70205
458 * search.c (adjust_result_of_qualified_name_lookup): Don't
459 update the BASELINK_BINFO of DECL if the second call
460 to lookup_base fails.
461
753a8910
PP
4622016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
463
464 PR c++/70218
465 * parser.c (cp_parser_lambda_expression): Move call to
466 pop_deferring_access_checks ahead of the call to
467 cp_parser_end_tentative_firewall.
468
a3aad0e6
JJ
4692016-03-17 Jakub Jelinek <jakub@redhat.com>
470
17366700
JJ
471 PR c++/70144
472 * cp-tree.h (magic_varargs_p): Return int instead of bool.
473 * call.c (magic_varargs_p): Return int instead of bool, return 2 for
474 Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
475 varargs.
476 (build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
477 if magic_varargs_p == 1, call decay_conversion
478 instead of mark_type_use. Don't store error_mark_node arguments to
479 argarray, instead return error_mark_node.
480
a3aad0e6
JJ
481 PR c++/70272
482 * decl.c (begin_destructor_body): Don't insert clobber if
483 is_empty_class (current_class_type).
484
b1970801
MP
4852016-03-17 Marek Polacek <polacek@redhat.com>
486
487 PR c++/70194
488 * typeck.c (warn_for_null_address): New function.
489 (cp_build_binary_op): Call it.
490
c5e003cf
JM
4912016-03-16 Jason Merrill <jason@redhat.com>
492
493 PR c++/70259
494 * decl.c (start_preparsed_function): Don't clobber an empty base.
495
1935f250
JJ
4962016-03-16 Jakub Jelinek <jakub@redhat.com>
497
6651c93e
JJ
498 PR c++/70147
499 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize
500 BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm.
501
1935f250
JJ
502 PR c++/70147
503 * cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily
504 set in_base_initializer.
505
42c729c5
MP
5062016-03-15 Marek Polacek <polacek@redhat.com>
507
508 PR c++/70209
509 * tree.c (strip_typedefs): Call strip_typedefs again on the
510 DECL_ORIGINAL_TYPE result.
511
3f91db69
JM
5122016-03-15 Jason Merrill <jason@redhat.com>
513
d1ccf407
JM
514 PR c++/70095
515 * pt.c (instantiate_decl): Fix call to variable_template_p.
516
3f91db69
JM
517 PR c++/70141
518 * pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.
519
598a208c
CC
5202016-03-14 Casey Carter <casey@carter.net>
521 Jason Merrill <jason@redhat.com>
522
08a1cadc 523 P0184R0: Generalizing the Range-Based For Loop
598a208c
CC
524 * parser.c (cp_convert_range_for): Set the type of __end separately.
525 (cp_parser_perform_range_for_lookup): Allow different begin/end
526 types if they are comparable.
527
3f1e5d3a
PP
5282016-03-12 Patrick Palka <ppalka@gcc.gnu.org>
529
530 PR c++/70106
531 * semantics.c (force_paren_expr): Just build a PAREN_EXPR when
532 processing_template_decl and EXPR is a SCOPE_REF.
533
b87a8d7d
PP
5342016-03-10 Patrick Palka <ppalka@gcc.gnu.org>
535 Jakub Jelinek <jakub@redhat.com>
536
537 PR c++/70001
538 * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse
539 return value from cxx_eval_constant_expression from earlier
540 elements if it is valid constant initializer requiring no
541 relocations.
542
d49b0aa0
MP
5432016-03-10 Marek Polacek <polacek@redhat.com>
544
545 PR c++/70153
546 * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR.
547
96b3c82d
CP
5482016-03-09 Cesar Philippidis <cesar@codesourcery.com>
549
550 * parser.c (cp_parser_oacc_loop): Update cclauses and clauses
551 when calling c_finish_omp_clauses.
552
1e546b68
JM
5532016-03-08 Jason Merrill <jason@redhat.com>
554
80aac5c8
JM
555 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
556 diagnostic for use of "concept".
557 (cp_parser_requires_clause_opt): And "requires".
558 (cp_parser_type_parameter, cp_parser_late_return_type_opt)
559 (cp_parser_explicit_template_declaration): Adjust.
560 * Make-lang.in (check-c++-all): Add "concepts" to std list.
561
1e546b68
JM
562 P0036R0: Unary Folds and Empty Parameter Packs
563 * pt.c (expand_empty_fold): Remove special cases for *,+,&,|.
564
56aae4b7
JJ
5652016-03-08 Jakub Jelinek <jakub@redhat.com>
566
d259b234
JJ
567 PR c++/70135
568 * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
569 even after the last iteration of the loop.
570
56aae4b7
JJ
571 * decl.c (duplicate_decls): Fix spelling - becuase -> because.
572
dbb23418
PP
5732016-03-07 Patrick Palka <ppalka@gcc.gnu.org>
574
575 PR c++/66786
576 * pt.c (get_template_info): Handle PARM_DECL.
577 (template_class_depth): Check DECL_P instead of
578 VAR_OR_FUNCTION_DECL_P.
579
d96e8407
JM
5802016-03-05 Jason Merrill <jason@redhat.com>
581
582 PR c++/67364
583 * constexpr.c (cxx_eval_store_expression): Replace
584 CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
585
7a3a3fad
PP
5862016-03-05 Patrick Palka <ppalka@gcc.gnu.org>
587
588 PR c++/66786
589 * pt.c (template_class_depth): Given a lambda type, iterate
590 into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
591 TYPE_CONTEXT. Given a VAR_DECL, iterate into its
592 CP_DECL_CONTEXT.
593
d5bcd6d4
JM
5942016-03-04 Jason Merrill <jason@redhat.com>
595
596 PR c++/69203
597 * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New.
598 * init.c (build_vec_delete_1): Set it.
599 * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it.
600
0c8825de
JJ
6012016-03-04 Jakub Jelinek <jakub@redhat.com>
602
411d61c4
JJ
603 * decl.c (start_preparsed_function): Don't emit start clobber at the
604 start of constructor clones.
605
0c8825de
JJ
606 PR c++/70035
607 * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
608 * decl.c (start_preparsed_function): Call
609 cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
610 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
611 cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.
612
b54eff8b
JM
6132016-03-04 Jason Merrill <jason@redhat.com>
614
188e53bd
JM
615 PR c++/67364
616 * constexpr.c (cxx_eval_component_reference): Further tweak.
617
39dce2b7
JM
618 * constexpr.c (struct constexpr_ctx): Add save_exprs field.
619 (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
620 (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
621 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
622
b54eff8b
JM
623 PR c++/70067
624 * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
625 same type.
626
639475f0
JM
6272016-03-03 Jason Merrill <jason@redhat.com>
628
b47d1d90
JM
629 * method.c (synthesized_method_walk): operator= can also be constexpr.
630
a0a6a8c9
JM
631 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
632 LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
633
264fd142
JM
634 PR c++/67164
635 * pt.c (copy_template_args): New.
636 (tsubst_pack_expansion): Use it.
637
45c3e69b
JM
638 * call.c (build_aggr_conv): Use get_nsdmi.
639
16dc6b17
JM
640 PR c++/51406
641 * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
642
639475f0
JM
643 PR c++/67364
644 * constexpr.c (cxx_eval_component_reference): Just return an empty
645 CONSTRUCTOR for an empty class.
646
7f0e23e9
JM
6472016-03-01 Jason Merrill <jason@redhat.com>
648
5c969cb8
JM
649 PR c++/70036
650 * parser.c (cp_parser_requires_clause): Call
651 check_for_bare_parameter_packs.
652
c8a66fc9
JM
653 PR c++/51489
654 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
655 the operands.
656
7f0e23e9
JM
657 PR c++/69995
658 * constexpr.c (cxx_eval_call_expression): Unshare arg.
659 (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
660 [TARGET_EXPR]: Unshare init.
661
76d881bf
PP
6622016-03-01 Patrick Palka <ppalka@gcc.gnu.org>
663
664 PR c++/68948
665 PR c++/69961
666 * pt.c (tsubst_baselink): Reinstate the check for an invalid
667 constructor call.
668
7574c916
JM
6692016-02-28 Jason Merrill <jason@redhat.com>
670
671 PR c++/69995
672 * constexpr.c (cxx_eval_store_expression): Unshare init.
673
56cde077
JM
6742016-02-26 Jason Merrill <jason@redhat.com>
675
676 PR c++/69958
677 * pt.c (make_argument_pack): New.
678 (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
679 (tsubst_copy_and_build): Likewise.
680
6284a979
JM
6812016-02-25 Jason Merrill <jason@redhat.com>
682
8ba8c375
JM
683 PR c++/69889
684 * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
685 * tree.c (build_aggr_init_expr): Set it.
686 * semantics.c (simplify_aggr_init_expr): Check it.
687 * cp-gimplify.c (cp_genericize_r): Don't walk into
688 a call/aggr_init from a thunk.
689
bd28a34f
JM
690 PR c++/69842
691 * method.c (forward_parm): Handle parameter packs.
692 * lambda.c (maybe_add_lambda_conv_op): Use it for them.
693
6a0cc1cd
JM
694 PR c++/67364
695 * constexpr.c (cxx_eval_component_reference): Don't complain about
696 unevaluated empty classes.
697
6284a979
JM
698 PR c++/68049
699 * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
700
1137001c
PP
7012016-02-25 Patrick Palka <ppalka@gcc.gnu.org>
702
703 PR c++/69736
704 * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
705 (maybe_undo_parenthesized_ref): Declare.
706 * semantics.c (maybe_undo_parenthesized_ref): Split out from
707 check_return_expr.
708 (finish_call_expr): Use it.
709 * typeck.c (check_return_expr): Use it.
710 * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
711 REF_PARENTHESIZED_P flag.
712
03ca8fb3
JJ
7132016-02-24 Jakub Jelinek <jakub@redhat.com>
714
715 PR c++/69922
716 * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
717 Avoid folding it.
718 * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
719 tests.
720 * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
721 unless they are folded into INTEGER_CST, error_mark_node or some
722 comparison with NULL, avoid folding them and use either the original
723 comparison or non-folded comparison of folded arguments.
724 * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
725 comparison, don't fold the comparison right away.
726
944e9f5f
JM
7272016-02-24 Jason Merrill <jason@redhat.com>
728
729 PR c++/69323
730 * friend.c (make_friend_class): Likewise.
731 * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
732
b8599b68
JM
7332016-02-24 Jason Merrill <jason@redhat.com>
734
735 PR c++/69323
736 * pt.c (instantiate_class_template_1): Set
737 processing_template_decl before substituting friend_type.
738
3b96b93a
MS
739016-02-24 Martin Sebor <msebor@redhat.com>
740
741 PR c++/69912
742 * tree.c (build_ctor_subob_ref): Compare types' main variants
743 instead of the types as they are.
744
28577b86
JM
7452016-02-24 Jason Merrill <jason@redhat.com>
746
a021961c
JM
747 * decl.c (start_preparsed_function): Condition ctor clobber on
748 flag_lifetime_dse > 1.
749
28577b86
JM
750 * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
751
2207c599
JM
7522016-02-19 Jason Merrill <jason@redhat.com>
753
754 PR c++/69743
755 * call.c (remaining_arguments): No longer static.
756 * cp-tree.h: Declare it.
757 * pt.c (more_specialized_fn): Use it.
758
3a27b4db
JJ
7592016-02-19 Jakub Jelinek <jakub@redhat.com>
760 Bernd Edlinger <bernd.edlinger@hotmail.de>
761
762 * Make-lang.in: Invoke gperf with -L C++.
763 * cfns.gperf: Remove prototypes for hash and libc_name_p
764 inlines.
765 * cfns.h: Regenerated.
766 * except.c (nothrow_libfn_p): Adjust.
767
7a965d51
JJ
7682016-02-19 Jakub Jelinek <jakub@redhat.com>
769
770 PR c++/69850
771 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
772 NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
773
200e869c
PP
7742016-02-19 Patrick Palka <ppalka@gcc.gnu.org>
775
776 PR c++/68948
777 * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
778 call here.
779 * semantics.c (finish_call_expr): Don't assume a constructor
780 call is dependent if only the "this" pointer is dependent. When
781 building a constructor call, always use a dummy object.
782
19e21586
JJ
7832016-02-19 Jakub Jelinek <jakub@redhat.com>
784
03a616ac
JJ
785 PR c++/69850
786 * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
787 condition.
788 * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
789 operators if folding preserved the binop, just with different
790 arguments.
791
19e21586
JJ
792 PR c++/67767
793 * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
794 attr_spec is always single element chain, chain all the attributes
795 properly together in the right order.
796
747b61fc
JM
7972016-02-18 Jason Merrill <jason@redhat.com>
798
799 * mangle.c (maybe_check_abi_tags): Add for_decl parm. Call
800 mangle_decl.
801 (mangle_decl): Call maybe_check_abi_tags for function scope.
802 (mangle_guard_variable): Call maybe_check_abi_tags here.
803 (write_guarded_var_name): Not here.
804
50ccdf5b
JM
8052016-02-17 Jason Merrill <jason@redhat.com>
806
fa837fb6
JM
807 PR c++/65985
808 * constexpr.c (build_constexpr_constructor_member_initializers):
809 Handle an additional STATEMENT_LIST.
810
bcb5f3c9
JM
811 PR c++/68585
812 * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
813
50ccdf5b
JM
814 PR c++/68679
815 * decl2.c (reset_type_linkage_2): Look through member templates.
816
932c0da4
JJ
8172016-02-17 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/69850
820 * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
821
0f02dd56
JM
8222016-02-17 Jason Merrill <jason@redhat.com>
823
824 PR c++/69842
825 * method.c (forward_parm): Split out from...
826 (add_one_base_init): ...here.
827 * lambda.c (maybe_add_lambda_conv_op): Use it.
828
6bab4c63
JM
8292016-02-16 Jason Merrill <jason@redhat.com>
830
831 PR c++/10200
832 PR c++/69753
833 * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
834 tree.c, typeck2.c: Revert earlier changes.
835 * parser.c (cp_parser_lookup_name): Ignore namespace-scope
836 non-type templates after -> or .
837
bf14eba2
JJ
8382016-02-16 Jakub Jelinek <jakub@redhat.com>
839
840 PR c/69835
841 * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
842
7128d6ab
JM
8432016-02-16 Jason Merrill <jason@redhat.com>
844
845 PR c++/69657
846 * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
847 (set_decl_namespace): Pass it. Complain about finding a hidden friend.
848 * name-lookup.h: Adjust.
849
ba539195
JN
8502016-02-16 James Norris <jnorris@codesourcery.com>
851
852 * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
853 * semantics.c (finish_omp_clauses): Add deviceptr checking.
854
f0516ca4
JJ
8552016-02-15 Jakub Jelinek <jakub@redhat.com>
856
857 PR c++/69658
858 * init.c (expand_default_init): Only call reshape_init
859 in the direct-initialization from an initializer list case.
860
fe69277d
JM
8612016-02-15 Jason Merrill <jason@redhat.com>
862
2bd0a2d6
JM
863 PR c++/69753
864 * semantics.c (finish_call_expr): Implicit 'this' does not make
865 the call dependent.
866 * search.c (any_dependent_bases_p): Split out...
867 * name-lookup.c (do_class_using_decl): ...from here.
868 * call.c (build_new_method_call_1): Don't complain about missing object
869 if there are dependent bases. Tweak error.
870 * tree.c (non_static_member_function_p): Remove.
871 * pt.c (type_dependent_expression_p): A member template of a
872 dependent type is dependent.
873 * cp-tree.h: Adjust.
874
fe69277d
JM
875 PR c++/68890
876 * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
877
38d795d2
PP
8782016-02-12 Patrick Palka <ppalka@gcc.gnu.org>
879
880 PR c++/69098
881 * pt.c (lookup_and_finish_template_variable): New function,
882 extracted from ...
883 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here. Use it.
884 (tsubst_qualified_id): Consider that EXPR might be a variable
885 template.
886 * typeck.c (check_template_keyword): Don't emit an error
887 if DECL is a variable template.
888
9c582551
JJ
8892016-02-12 Jakub Jelinek <jakub@redhat.com>
890
891 * error.c: Spelling fixes - behaviour -> behavior and
892 neighbour -> neighbor.
893 * decl.c: Likewise.
894 * typeck.c (cp_build_binary_op): Fix up behavior spelling in
895 diagnostics.
896 * init.c (build_delete): Likewise.
897
66756373
JJ
8982016-02-11 Jakub Jelinek <jakub@redhat.com>
899
900 PR c/69768
901 * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
902 arguments for -Waddress warning. Fix up formatting.
903
0d7d9458
PC
9042016-02-11 Paolo Carlini <paolo.carlini@oracle.com>
905
906 PR c++/68726
907 * pt.c (lookup_template_class_1): Check tsubst return value for
908 error_mark_node.
909
3a4219ca
JM
9102016-02-10 Jason Merrill <jason@redhat.com>
911
46f0d909
JM
912 PR c++/68926
913 * pt.c (resolve_nondeduced_context): Add complain parm.
914 (do_auto_deduction): Pass it.
915 * cvt.c (convert_to_void): Likewise.
916 * decl.c (cp_finish_decl): Likewise.
917 * init.c (build_new): Likewise.
918 * rtti.c (get_tinfo_decl_dynamic): Likewise.
919 * semantics.c (finish_decltype_type): Likewise.
920 * typeck.c (decay_conversion): Likewise.
921 * cp-tree.h: Adjust declaration.
922 * call.c (standard_conversion): Add complain parm, pass it along.
923 (implicit_conversion): Pass it.
924
89908c8f
JM
925 PR c++/69657
926 * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
927 (lookup_name_real_1): Likewise.
928 (remove_hidden_names): Handle non-functions too.
929
ff2faafc
JM
930 PR c++/10200
931 * parser.c (cp_parser_lookup_name): When looking for a template
932 after . or ->, only consider class templates.
933 (cp_parser_postfix_dot_deref_expression): Handle the current
934 instantiation. Remember a dependent object expression.
935 * typeck2.c (build_x_arrow): Handle the current instantiation.
936
3a4219ca
JM
937 * ptree.c (debug_tree): Implement for cp_expr.
938
efb45a9f
PP
9392016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
940
941 PR c++/69139
942 * parser.c (cp_parser_simple_type_specifier): Make the check
943 for disambiguating between an 'auto' placeholder and an implicit
944 template parameter more robust.
945
20a0c6f9
PP
9462016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
947
948 PR c++/69283
949 PR c++/67835
950 * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
951 setting its TREE_USED flag.
952
1374a761
JM
9532016-02-08 Jason Merrill <jason@redhat.com>
954
955 PR c++/69657
956 * name-lookup.c (do_nonmember_using_decl): Leave anticipated
957 built-ins alone.
958
f68bc23f
JJ
9592016-02-08 Jakub Jelinek <jakub@redhat.com>
960
961 PR c++/59627
962 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
963 of the DECL_OMP_DECLARE_REDUCTION_P decls.
964
eba9e839
MP
9652016-02-08 Marek Polacek <polacek@redhat.com>
966
967 PR c++/69688
968 * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
969 Call clear_fold_cache.
970 * cp-tree.h: Adjust declaration.
971 * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
972 rather than clear_cv_cache and clear_fold_cache.
973 * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
974
415594bb
JM
9752016-02-08 Jason Merrill <jason@redhat.com>
976
977 * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
978 * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
979 (ocp_convert): Use *_maybe_fold.
980 (cp_convert_to_pointer): Add dofold parameter.
981 * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
982
46cb9332
MS
9832016-02-05 Martin Sebor <msebor@redhat.com>
984
985 PR c++/69662
986 * init.c (find_field_init): New function.
987 (warn_placement_new_too_small): Call it. Handle one-element arrays
988 at ends of structures special.
989
0fd9d492
JM
9902016-02-05 Jason Merrill <jason@redhat.com>
991
992 PR c++/68948
993 * semantics.c (finish_expr_stmt): If expr is error_mark_node,
994 make sure we've seen_error().
995
76c85fbb
PP
9962016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
997
998 PR c++/68948
999 * pt.c (tsubst_baselink): Diagnose an invalid constructor call
1000 if lookup_fnfields returns NULL_TREE and the name being looked
1001 up has the form A::A.
1002
618d6c1c
PP
10032016-02-04 Patrick Palka <ppalka@gcc.gnu.org>
1004
1005 * constexpr.c (cxx_eval_binary_expression): Fold equality
1006 comparisons involving PTRMEM_CSTs.
1007
d1243d27
JJ
10082016-02-04 Jakub Jelinek <jakub@redhat.com>
1009
1010 * class.c (find_flexarrays): Don't declare dom variable.
1011 (diagnose_flexarray): Likewise.
1012
05dd97db
MS
10132016-02-02 Martain Sebor <msebor@redhat.com>
1014
1015 PR c++/69251
1016 PR c++/69253
1017 PR c++/69290
1018 PR c++/69277
1019 PR c++/69349
1020 * class.c (walk_subobject_offsets): Avoid testing the upper bound
1021 of a flexible array member for equality to null.
1022 (find_flexarrays): Remove spurious whitespace introduced in r231665.
1023 (diagnose_flexarrays): Avoid checking the upper bound of arrays.
1024 (check_flexarrays): Same.
1025 * decl.c (compute_array_index_type): Avoid special case for flexible
1026 array members.
1027 (grokdeclarator): Avoid calling compute_array_index_type for flexible
1028 array members.
1029 * error.c (dump_type_suffix): Revert changes introduced in r231665
1030 and rendered unnecessary by the changes above.
1031 * pt.c (tsubst): Same.
1032 * tree.c (build_ctor_subob_ref): Handle flexible array members.
1033 * typeck2.c (digest_init_r): Revert changes introduced in r231665.
1034 (process_init_constructor_array): Same.
1035 (process_init_constructor_record): Same.
1036
ab4bae0c
PP
10372016-02-03 Patrick Palka <ppalka@gcc.gnu.org>
1038
1039 PR c++/69056
1040 * pt.c (try_one_overload): Handle comparing argument packs so
1041 that there is no conflict if we deduced more arguments of an
1042 argument pack than were explicitly specified.
1043
75a27d35
JJ
10442016-01-31 Jakub Jelinek <jakub@redhat.com>
1045 Jason Merrill <jason@redhat.com>
1046
1047 PR c++/68763
1048 * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
1049 function type if nothing is changing.
1050
b676a079
JM
10512016-01-31 Jason Merrill <jason@redhat.com>
1052
6978c505
JM
1053 PR c++/69009
1054 * pt.c (partial_specialization_p, impartial_args): New.
1055 (instantiate_decl): Call impartial_args.
1056
b1568582
JM
1057 * mangle.c (maybe_check_abi_tags): New.
1058 (write_guarded_var_name): Call it.
1059 (mangle_ref_init_variable): Call check_abi_tags.
1060
b676a079
JM
1061 * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
1062 between template and instantiation.
1063
16b77b32
JJ
10642016-01-29 Jakub Jelinek <jakub@redhat.com>
1065
1066 PR debug/66869
1067 * decl.c (wrapup_globals_for_namespace): Warn about unused static
1068 function declarations.
1069
5453bfed
MP
10702016-01-29 Marek Polacek <polacek@redhat.com>
1071
1072 PR c++/69509
1073 PR c++/69516
1074 * constexpr.c (cxx_eval_array_reference): Give the "array subscript
1075 out of bound" error earlier.
1076 * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
1077 commentary.
1078
e9f69069
PP
10792016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
1080
1081 * name-lookup.c (begin_scope): After reusing a cp_binding_level
1082 structure, update free_binding_level before the structure's
1083 level_chain field gets cleared, not after.
1084
e448880c
JM
10852016-01-28 Jason Merrill <jason@redhat.com>
1086
1087 PR c++/67407
1088 * search.c (dfs_walk_once, dfs_walk_once_r)
1089 (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
1090 hash_set instead of BINFO_MARKED.
1091 (dfs_unmark_r): Remove.
1092
2b4f7b94
PP
10932016-01-28 Patrick Palka <ppalka@gcc.gnu.org>
1094
1095 PR c++/24208
1096 * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
1097 (cp_lexer_debugging_p): Use it.
1098 (cp_lexer_start_debugging): Likewise.
1099 (cp_lexer_stop_debugging): Likewise.
1100
fa74a4bc
MP
11012016-01-27 Marek Polacek <polacek@redhat.com>
1102
1103 PR c/68062
1104 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
1105 needed. Add -Wsign-compare warning.
1106
5d70666e
RB
11072016-01-27 Ryan Burn <contact@rnburn.com>
1108
1109 PR cilkplus/69267
1110 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
1111 superfluous post_p argument in call to
1112 cilk_gimplify_call_params_in_spawned_fn.
1113
05bf54c3
MP
11142016-01-27 Marek Polacek <polacek@redhat.com>
1115
1116 PR c++/69379
1117 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
1118 wrapped in NOP_EXPRs.
1119
60214d0d
MS
11202016-01-27 Martin Sebor <msebor@redhat.com>
1121
1122 PR c++/69317
1123 * mangle.c (mangle_decl): Reference the correct (saved) version
1124 of the ABI in -Wabi diagnostics.
1125
95e3030c
MP
11262016-01-27 Marek Polacek <polacek@redhat.com>
1127
1128 PR c++/69496
1129 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
1130 elements of the array.
1131
ca30abcd
JM
11322016-01-26 Jason Merrill <jason@redhat.com>
1133
1134 PR c++/68949
1135 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
1136 (cxx_eval_call_expression): Don't look through clones.
1137 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
1138 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
1139 maybe-in-charge *tor.
1140
2d63bc39
JM
11412016-01-26 Jason Merrill <jason@redhat.com>
1142
1143 PR c++/68782
1144 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
1145 and TREE_SIDE_EFFECTS.
1146 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
1147 verify_constructor_flags.
1148
476805ae
JJ
11492016-01-26 Jakub Jelinek <jakub@redhat.com>
1150
1151 PR c++/68357
1152 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
1153 return error_mark_node instead of building trees with error_mark_node
1154 operands.
1155
01e1dea3
DM
11562016-01-26 David Malcolm <dmalcolm@redhat.com>
1157
1158 PR other/69006
1159 * error.c (print_instantiation_partial_context_line): Add missing
1160 newlines from output for the t == NULL case.
1161 (print_instantiation_partial_context): Remove call to pp_newline.
1162
a59b92b0
PP
11632016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
1164
1165 Revert:
1166 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1167
1168 PR c++/11858
1169 PR c++/24663
1170 PR c++/24664
1171 * decl.c (grokdeclarator): Don't decay array parameter type to
1172 a pointer type if it's dependent.
1173 (grokparms): Invoke strip_top_quals instead of directly invoking
1174 cp_build_qualified_type.
1175 * pt.c (decay_dependent_array_parm_type): New static function.
1176 (type_unification_real): Call decay_dependent_array_parm_type
1177 to decay a dependent array parameter type to its corresponding
1178 pointer type before unification.
1179 (more_specialized_fn): Likewise.
1180 (get_bindings): Likewise.
1181 * tree.c (cp_build_qualified_type): Trivial typofix in
1182 documentation.
1183
69da7802
MS
11842016-01-23 Martin Sebor <msebor@redhat.com>
1185
1186 PR c++/58109
1187 PR c++/69022
1188 * decl2.c (is_late_template_attribute): Handle dependent argument
1189 to attribute align and attribute vector_size.
1190
97ca3d0d
JM
11912016-01-21 Jason Merrill <jason@redhat.com>
1192
130ee9a9
JM
1193 PR c++/69392
1194 * lambda.c (lambda_capture_field_type): Handle 'this' specially
1195 for init-capture, too.
1196
020491e6
JM
1197 PR c++/65687
1198 * decl.c (type_is_deprecated): Don't look into a typedef.
1199
2f3932b9
JM
1200 PR c++/40751
1201 PR c++/64987
1202 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
1203
97ca3d0d
JM
1204 PR c++/43407
1205 * decl.c (start_enum): Add attributes parameter.
1206 * parser.c (cp_parser_enum_specifier): Pass it.
1207 * pt.c (lookup_template_class_1): Pass it.
1208 * cp-tree.h: Adjust.
1209
33f48842
JM
12102016-01-19 Jason Merrill <jason@redhat.com>
1211
1212 PR c++/59759
1213 * pt.c (convert_template_argument): Handle VAR_DECL properly.
1214
1e297006
MP
12152016-01-19 Marek Polacek <polacek@redhat.com>
1216
1217 PR c++/68586
1218 * constexpr.c (clear_cv_cache): New.
1219 * cp-gimplify.c (clear_fold_cache): New.
1220 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
1221 * decl.c (finish_enum_value_list): Call them.
1222
38a979f2
MP
1223 PR c++/68965
1224 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
1225
17c15cb9
PP
12262016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1227
1228 PR c++/11858
1229 PR c++/24663
1230 PR c++/24664
1231 * decl.c (grokdeclarator): Don't decay array parameter type to
1232 a pointer type if it's dependent.
1233 (grokparms): Invoke strip_top_quals instead of directly invoking
1234 cp_build_qualified_type.
1235 * pt.c (decay_dependent_array_parm_type): New static function.
1236 (type_unification_real): Call decay_dependent_array_parm_type
1237 to decay a dependent array parameter type to its corresponding
1238 pointer type before unification.
1239 (more_specialized_fn): Likewise.
1240 (get_bindings): Likewise.
1241 * tree.c (cp_build_qualified_type): Trivial typofix in
1242 documentation.
1243
7f26f7df
JM
12442016-01-18 Jason Merrill <jason@redhat.com>
1245
4b0b30ef
JM
1246 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
1247
8d8f3235
JM
1248 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
1249
7f26f7df
JM
1250 PR c++/68767
1251 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
1252 (contains_label_1, contains_label_p): Remove.
1253
ec7886c1
PP
12542016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1255
1256 PR c++/69091
1257 * pt.c (type_dependent_expression_p): For a function template
1258 specialization, a type is dependent iff any of its template
1259 arguments are.
1260
203484bb
PP
12612016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1262
1263 * cp-array-notation.c (cp_expand_cond_array_notations): Return
1264 error_mark_node only if find_rank failed, not if it was
1265 successful.
1266
aa2500e9
PP
12672016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1268
1269 PR c++/68936
1270 * tree.c (build_min_non_dep_call_vec): Don't retain the
1271 KOENIG_LOOKUP_P flag of the non-dependent expression that's
1272 been built.
1273 (build_min_non_dep_op_overload): Instead, do it here.
1274
e0a575ff
JJ
12752016-01-15 Jakub Jelinek <jakub@redhat.com>
1276
1277 PR bootstrap/68271
1278 * parser.h (cp_token): Remove pragma_kind field. Add comment
1279 with number of unused bits.
1280 * parser.c (eof_token): Remove pragma_kind field initializer.
1281 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
1282 field, don't clear CPP_PRAGMA u.value.
1283 (cp_parser_pragma_kind): New function.
1284 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
1285 cp_parser_omp_construct, cp_parser_initial_pragma,
1286 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
1287 pragma_kind field.
1288
56233bd6
JM
12892016-01-15 Jason Merrill <jason@redhat.com>
1290
c5e3b6fc
JM
1291 PR c++/68847
1292 * call.c (build_cxx_call): Use fold_non_dependent_expr.
1293
f3255019
JM
1294 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
1295 value.
1296
56233bd6
JM
1297 PR c++/69257
1298 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
1299 array/function-to-pointer conversion. Call
1300 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
1301 * call.c (convert_like_real): Print call context if
1302 decay_conversion errors.
1303
e6d6ec9e
TV
13042016-01-14 Tom de Vries <tom@codesourcery.com>
1305
1306 PR tree-optimization/68773
1307 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
1308 set force_output.
1309
a7ccb9e7
JM
13102016-01-14 Jason Merrill <jason@redhat.com>
1311
1312 PR c++/69261
1313 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
1314
5342156c
MP
13152016-01-12 Marek Polacek <polacek@redhat.com>
1316
1317 PR c++/68979
1318 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
1319 error_at and adjust the return value.
1320
723033a6
JJ
13212016-01-12 Jakub Jelinek <jakub@redhat.com>
1322
65364cc5
JJ
1323 PR objc++/68511
1324 PR c++/69213
1325 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
1326 GS_ERROR whenever seen_error (), only if *expr_p contains
1327 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
1328
723033a6
JJ
1329 PR c++/66808
1330 PR c++/69000
1331 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
1332
9fc21977
JM
13332016-01-11 Jason Merrill <jason@redhat.com>
1334
1335 PR c++/69131
1336 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
1337 (process_subob_fn): Likewise. Don't consider triviality if true.
1338 (synthesize_method_walk): Pass it.
1339
655441d6
DM
13402016-01-11 David Malcolm <dmalcolm@redhat.com>
1341
1342 PR c++/68795
1343 * parser.c (cp_parser_postfix_expression): Initialize
1344 close_paren_loc to UNKNOWN_LOCATION; only use it if
1345 it has been written to by
1346 cp_parser_parenthesized_expression_list.
1347 (cp_parser_parenthesized_expression_list): Document the behavior
1348 with respect to the CLOSE_PAREN_LOC param.
1349
9cb6bd74
JJ
13502016-01-11 Jakub Jelinek <jakub@redhat.com>
1351
1352 PR c++/69211
1353 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
1354 folded operands have side-effects, but folding changed any of them,
1355 build a new tree with the folded operands instead of returning the
1356 unfolded tree.
1357
73f0dae2
MP
13582016-01-09 Marek Polacek <polacek@redhat.com>
1359
1360 PR c++/69113
1361 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
1362
c50e614b
JJ
13632016-01-09 Jakub Jelinek <jakub@redhat.com>
1364
1365 PR c++/69164
1366 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
1367
fe71aa4e
JM
13682016-01-08 Jason Merrill <jason@redhat.com>
1369
1370 PR c++/69158
1371 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
1372 in completion.
1373
bd8f5bb2
MP
13742016-01-08 Marek Polacek <polacek@redhat.com>
1375
1376 PR c++/68449
1377 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
1378
0795b6f2
JM
13792016-01-08 Jason Merrill <jason@redhat.com>
1380
550c5f8a
JM
1381 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
1382 workaround.
1383
45177337
JM
1384 PR c++/68983
1385 PR c++/67557
1386 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
1387 TREE_ADDRESSABLE type.
1388
0795b6f2
JM
1389 PR c++/68983
1390 PR c++/67557
1391 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
1392
ce3e43d7
NS
13932016-01-05 Nathan Sidwell <nathan@acm.org>
1394
1395 PR c++/58583
1396 * pt.c (build_non_dependent_expr): Don't try a checking fold when
1397 parsing an nsdmi.
1398
818ab71a 13992016-01-04 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
1400
1401 Update copyright years.
ad41bd84 1402\f
818ab71a 1403Copyright (C) 2016 Free Software Foundation, Inc.
ad41bd84
JM
1404
1405Copying and distribution of this file, with or without modification,
1406are permitted in any medium without royalty provided the copyright
1407notice and this notice are preserved.