Revert empty class parameter passing ABI changes.
[gcc.git] / gcc / cp / ChangeLog
1 2016-04-14 Jason Merrill <jason@redhat.com>
2
3 * call.c, decl.c, error.c, cp-tree.h, decl.c: Revert empty
4 parameter ABI change.
5
6 2016-04-13 Martin Sebor <msebor@redhat.com>
7
8 PR c++/69517
9 PR c++/70019
10 PR c++/70588
11 * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
12 functions.
13 * decl.c (check_initializer, cp_finish_decl): Call them.
14 (reshape_init_r): Reject incompletely braced intializer-lists
15 for VLAs.
16 * init.c (throw_bad_array_length, build_vla_check)
17 (build_vla_size_check, build_vla_init_check): Define new functions.
18 * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
19 to detect a VLA.
20 (store_init_value): Same.
21
22 2016-04-13 Jason Merrill <jason@redhat.com>
23
24 Warn about empty parameter ABI with -Wabi=9.
25 * call.c (empty_class_msg, mark_for_abi_warning)
26 (warn_empty_class_abi): New.
27 (build_call_a): Use them.
28 * decl.c (store_parm_decls): Use mark_for_abi_warning.
29 * error.c (pp_format_to_string): New.
30
31 Pass empty class parameters like C.
32 * call.c (pass_as_empty_struct, empty_class_arg): New.
33 (type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
34 (build_call_a): Use empty_class_arg.
35 * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
36 * decl.c (cxx_init_decl_processing): Create empty_struct_type.
37
38 2016-04-13 Jason Merrill <jason@redhat.com>
39
40 PR c++/70627
41 * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
42
43 2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
44
45 PR c++/70635
46 * pt.c (resolve_typename_type): Fix typos in infinite recursion
47 avoidance mechanism.
48
49 2016-04-13 Jason Merrill <jason@redhat.com>
50
51 PR c++/70634
52 * pt.c (instantiation_dependent_uneval_expression_p): Split out
53 from instantiation_dependent_expression_p.
54 (value_dependent_expression_p): Use it for unevaluated operands.
55 (instantiation_dependent_r): Don't check value-dependence.
56 (instantiation_dependent_expression_p): Check
57 value-dependence of the expression as a whole.
58 * cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
59 * semantics.c (finish_decltype_type): Use it.
60
61 * constexpr.c (potential_nondependent_constant_expression): New.
62 (potential_nondependent_static_init_expression): New.
63 (maybe_constant_value_1, fold_non_dependent_expr)
64 (maybe_constant_init): Use them.
65 * pt.c (instantiate_non_dependent_expr_sfinae)
66 (instantiate_non_dependent_or_null, convert_nontype_argument): Use
67 them.
68 * cp-tree.h: Declare them.
69
70 2016-04-13 Jakub Jelinek <jakub@redhat.com>
71
72 PR c++/70594
73 * decl.c (pop_labels_1): Removed.
74 (note_label, sort_labels): New functions.
75 (pop_labels): During named_labels traversal, just push the slot
76 pointers into a vector, then qsort it by DECL_UID and only then
77 call pop_label and chain it into BLOCK_VARS.
78
79 2016-04-13 Jason Merrill <jason@redhat.com>
80
81 PR c++/70615
82 * cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
83 (cp_gimplify_expr): Not here.
84
85 2016-04-12 Patrick Palka <ppalka@gcc.gnu.org>
86
87 PR c++/70610
88 * tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Unconditionally
89 recurse into it.
90 * typeck.c (build_x_conditional_expr): Unconditionally remember
91 that the result is an lvalue or xvalue.
92
93 2016-04-12 Jason Merrill <jason@redhat.com>
94
95 * class.c (is_really_empty_class): A zero-length array is empty.
96 An unnamed bit-field doesn't make a class non-empty.
97
98 2016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
99
100 PR c++/68722
101 * parser.c (cp_parser_cache_defarg): When file ends in default
102 argument simply return error_mark_node.
103
104 2016-04-12 Nathan Sidwell <nathan@acm.org>
105
106 PR c++/70501
107 * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
108 similarly to PMF.
109
110 2016-04-11 Jason Merrill <jason@redhat.com>
111
112 * mangle.c (decl_is_template_id): The template itself counts as a
113 template-id.
114
115 2016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
116
117 PR c++/70590
118 PR c++/70452
119 * constexpr.c (cxx_eval_outermost_expression): Call unshare_expr
120 on the result if it's not a CONSTRUCTOR.
121
122 2016-04-07 Patrick Palka <ppalka@gcc.gnu.org>
123
124 PR c++/70452
125 * constexpr.c (find_constructor): New function.
126 (unshare_constructor): New function.
127 (cxx_eval_call_expression): Use unshare_constructor instead of
128 unshare_expr.
129 (find_array_ctor_elt): Likewise.
130 (cxx_eval_vec_init_1): Likewise.
131 (cxx_eval_store_expression): Likewise.
132 (cxx_eval_constant_expression): Likewise.
133
134 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
135
136 PR c/70436
137 * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
138 potentially generating a future -Wparentheses warning in its
139 callers.
140
141 2016-04-06 Jason Merrill <jason@redhat.com>
142
143 * class.c (check_abi_tags): Fix function template handling.
144
145 2016-04-05 Nathan Sidwell <nathan@acm.org>
146
147 PR c++/70512
148 * class.c (fixup_may_alias): New.
149 (fixup_attribute_variants): Call it.
150
151 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
152
153 PR c++/70452
154 * constexpr.c (struct fundef_copy): New struct.
155 (struct fundef_copies_table_t): New struct.
156 (fundef_copies_table): New static variable.
157 (maybe_initialize_fundef_copies_table): New static function.
158 (get_fundef_copy): New static function.
159 (save_fundef_copy): New static function.
160 (cxx_eval_call_expression): Use get_fundef_copy, and
161 save_fundef_copy.
162 (constexpr_call_table): Add "deletable" GTY marker.
163
164 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
165
166 PR c++/70452
167 * cp-tree.h (class cache_map): Remove.
168 * constexpr.c (cv_cache): Change type to
169 GTY((deletable)) hash_map<tree, tree> *.
170 (maybe_constant_value): Adjust following the change to cv_cache.
171 (clear_cv_cache): New static function.
172 (clear_cv_and_fold_caches): Use it.
173 * cp-gimplify.c (fold_cache): Change type to
174 GTY((deletable)) hash_map<tree, tree> *.
175 (clear_fold_cache): Adjust following the change to fold_cache.
176 (cp_fold): Likewise.
177
178 2016-04-02 Martin Sebor <msebor@redhat.com>
179
180 PR c++/67376
181 PR c++/70170
182 PR c++/70172
183 PR c++/70228
184 * constexpr.c (diag_array_subscript): New function.
185 (cxx_eval_array_reference): Detect out of bounds array indices.
186
187 2016-04-01 Jason Merrill <jason@redhat.com>
188
189 PR c++/70449
190 PR c++/70344
191 * pt.c (instantiate_decl): A function isn't fully defined if
192 DECL_INITIAL is error_mark_node.
193 * constexpr.c (cxx_eval_call_expression): Likewise.
194
195 2016-04-01 Jakub Jelinek <jakub@redhat.com>
196 Marek Polacek <polacek@redhat.com>
197
198 PR c++/70488
199 * init.c (warn_placement_new_too_small): Test whether
200 DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.
201
202 2016-04-01 Nathan Sidwell <nathan@acm.org>
203
204 PR c++/68475
205 * decl.c (check_redeclaration_exception_specification): Check
206 regardless of -fno-exceptions.
207 * typeck2.c (merge_exception_specifiers): Relax assert by checking
208 flag_exceptions too.
209
210 2016-03-31 Nathan Sidwell <nathan@acm.org>
211
212 * decl.c (start_preparsed_function): Remove unnecessary bracing.
213 (finish_destructor_body): Don't emit operator delete here.
214
215 2016-03-31 Nathan Sidwell <nathan@acm.org>
216
217 PR c++/70393
218 * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
219 elements in field order.
220
221 2016-03-31 Marek Polacek <polacek@redhat.com>
222
223 PR c/70297
224 * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
225
226 2016-03-31 Richard Biener <rguenther@suse.de>
227
228 PR c++/70430
229 * typeck.c (cp_build_binary_op): Fix operand order of vector
230 conditional in truth op handling.
231
232 2016-03-29 Jason Merrill <jason@redhat.com>
233
234 PR c++/70353
235 * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics
236 in constexpr functions.
237
238 2016-03-28 Jason Merrill <jason@redhat.com>
239
240 PR c++/70422
241 PR c++/64266
242 PR c++/70353
243 * decl.c, pt.c, constexpr.c: Revert last patch.
244
245 2016-03-25 Jason Merrill <jason@redhat.com>
246 Martin Liška <mliska@suse.cz>
247
248 PR c++/64266
249 PR c++/70353
250 Core issue 1962
251 * decl.c (cp_fname_init): Decay the initializer to pointer.
252 (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
253 DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
254 Don't call cp_finish_decl.
255 * pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR,
256 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Don't call cp_finish_decl.
257 * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]:
258 Handle DECL_VALUE_EXPR.
259
260 2016-03-24 Jason Merrill <jason@redhat.com>
261
262 PR c++/70386
263 * constexpr.c (cxx_eval_bare_aggregate): Handle PMFs.
264
265 PR c++/70323
266 * constexpr.c (cxx_eval_call_expression): Don't cache result if
267 *overflow_p.
268
269 2016-03-24 Patrick Palka <ppalka@gcc.gnu.org>
270
271 PR c++/62212
272 * tree.c (build_cplus_array_type): Determine type-dependentess
273 with uses_template_parms instead of with dependent_type_p.
274
275 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
276
277 PR c++/70347
278 * typeck.c (process_init_constructor_union): If the initializer
279 is empty, use the union's NSDMI if it has one.
280
281 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
282
283 PR c++/70332
284 * pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an
285 NSDMI that's part of an aggregrate initialization.
286
287 2016-03-23 Jakub Jelinek <jakub@redhat.com>
288
289 PR c++/70001
290 * constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers
291 for 1..max even for multi-dimensional arrays. Call unshare_expr
292 on it.
293
294 PR c++/70323
295 * constexpr.c (cxx_eval_constant_expression): Diagnose overflow
296 on TREE_OVERFLOW constants.
297
298 PR c++/70376
299 * cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
300 for OMP_TASKLOOP here.
301 (cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
302 genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.
303
304 2016-03-23 Alexandre Oliva <aoliva@redhat.com>
305 Jason Merrill <jason@redhat.com>
306 Jakub Jelinek <jakub@redhat.com>
307
308 PR c++/69315
309 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
310 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
311 (finish_function): Don't set or test them.
312 * decl2.c (mark_used): Don't handle defer_mark_used_calls.
313
314 2016-03-23 Jason Merrill <jason@redhat.com>
315
316 PR c++/70344
317 * constexpr.c (cxx_eval_call_expression): Catch invalid recursion.
318
319 2016-03-23 Marek Polacek <polacek@redhat.com>
320
321 PR c++/69884
322 * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes.
323
324 2016-03-22 Ilya Enkovich <enkovich.gnu@gmail.com>
325
326 * call.c (build_conditional_expr_1): Always use original
327 condition type for vector type checks and build.
328
329 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
330
331 PR c++/70096
332 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.
333
334 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
335
336 PR c++/70204
337 * constexpr.c (non_const_var_error): Check
338 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
339
340 2016-03-21 Richard Henderson <rth@redhat.com>
341
342 PR c++/70273
343 * decl.c (notice_forced_label_r): New.
344 (cp_finish_decl): Use it.
345
346 2016-03-21 Jason Merrill <jason@redhat.com>
347
348 PR c++/70285
349 * cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.
350
351 2016-03-18 Jason Merrill <jason@redhat.com>
352
353 PR c++/70139
354 * constexpr.c (cxx_eval_call_expression): Fix trivial copy.
355
356 PR c++/70147
357 * class.c (vptr_via_virtual_p): New.
358 (most_primary_binfo): Factor out of build_rtti_vtbl_entries.
359 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
360 a vptr from any virtual base in a not-in-charge 'structor.
361
362 * decl.c (build_clobber_this): Factor out of
363 start_preparsed_function and begin_destructor_body. Handle
364 virtual bases better.
365
366 * class.c (build_if_in_charge): Split out from build_base_path.
367 * init.c (expand_virtual_init, expand_default_init): Use it.
368 * call.c (build_special_member_call): Use it.
369
370 2016-03-18 Jakub Jelinek <jakub@redhat.com>
371
372 PR c++/70267
373 * init.c (build_new_1): Complain and return error_mark_node
374 if alloc_fn is not _Jv_AllocObject function returning pointer.
375
376 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
377
378 PR c++/70205
379 * search.c (adjust_result_of_qualified_name_lookup): Don't
380 update the BASELINK_BINFO of DECL if the second call
381 to lookup_base fails.
382
383 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
384
385 PR c++/70218
386 * parser.c (cp_parser_lambda_expression): Move call to
387 pop_deferring_access_checks ahead of the call to
388 cp_parser_end_tentative_firewall.
389
390 2016-03-17 Jakub Jelinek <jakub@redhat.com>
391
392 PR c++/70144
393 * cp-tree.h (magic_varargs_p): Return int instead of bool.
394 * call.c (magic_varargs_p): Return int instead of bool, return 2 for
395 Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
396 varargs.
397 (build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
398 if magic_varargs_p == 1, call decay_conversion
399 instead of mark_type_use. Don't store error_mark_node arguments to
400 argarray, instead return error_mark_node.
401
402 PR c++/70272
403 * decl.c (begin_destructor_body): Don't insert clobber if
404 is_empty_class (current_class_type).
405
406 2016-03-17 Marek Polacek <polacek@redhat.com>
407
408 PR c++/70194
409 * typeck.c (warn_for_null_address): New function.
410 (cp_build_binary_op): Call it.
411
412 2016-03-16 Jason Merrill <jason@redhat.com>
413
414 PR c++/70259
415 * decl.c (start_preparsed_function): Don't clobber an empty base.
416
417 2016-03-16 Jakub Jelinek <jakub@redhat.com>
418
419 PR c++/70147
420 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize
421 BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm.
422
423 PR c++/70147
424 * cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily
425 set in_base_initializer.
426
427 2016-03-15 Marek Polacek <polacek@redhat.com>
428
429 PR c++/70209
430 * tree.c (strip_typedefs): Call strip_typedefs again on the
431 DECL_ORIGINAL_TYPE result.
432
433 2016-03-15 Jason Merrill <jason@redhat.com>
434
435 PR c++/70095
436 * pt.c (instantiate_decl): Fix call to variable_template_p.
437
438 PR c++/70141
439 * pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.
440
441 2016-03-14 Casey Carter <casey@carter.net>
442 Jason Merrill <jason@redhat.com>
443
444 P0184R0: Generalizing the Range-Based For Loop
445 * parser.c (cp_convert_range_for): Set the type of __end separately.
446 (cp_parser_perform_range_for_lookup): Allow different begin/end
447 types if they are comparable.
448
449 2016-03-12 Patrick Palka <ppalka@gcc.gnu.org>
450
451 PR c++/70106
452 * semantics.c (force_paren_expr): Just build a PAREN_EXPR when
453 processing_template_decl and EXPR is a SCOPE_REF.
454
455 2016-03-10 Patrick Palka <ppalka@gcc.gnu.org>
456 Jakub Jelinek <jakub@redhat.com>
457
458 PR c++/70001
459 * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse
460 return value from cxx_eval_constant_expression from earlier
461 elements if it is valid constant initializer requiring no
462 relocations.
463
464 2016-03-10 Marek Polacek <polacek@redhat.com>
465
466 PR c++/70153
467 * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR.
468
469 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
470
471 * parser.c (cp_parser_oacc_loop): Update cclauses and clauses
472 when calling c_finish_omp_clauses.
473
474 2016-03-08 Jason Merrill <jason@redhat.com>
475
476 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
477 diagnostic for use of "concept".
478 (cp_parser_requires_clause_opt): And "requires".
479 (cp_parser_type_parameter, cp_parser_late_return_type_opt)
480 (cp_parser_explicit_template_declaration): Adjust.
481 * Make-lang.in (check-c++-all): Add "concepts" to std list.
482
483 P0036R0: Unary Folds and Empty Parameter Packs
484 * pt.c (expand_empty_fold): Remove special cases for *,+,&,|.
485
486 2016-03-08 Jakub Jelinek <jakub@redhat.com>
487
488 PR c++/70135
489 * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
490 even after the last iteration of the loop.
491
492 * decl.c (duplicate_decls): Fix spelling - becuase -> because.
493
494 2016-03-07 Patrick Palka <ppalka@gcc.gnu.org>
495
496 PR c++/66786
497 * pt.c (get_template_info): Handle PARM_DECL.
498 (template_class_depth): Check DECL_P instead of
499 VAR_OR_FUNCTION_DECL_P.
500
501 2016-03-05 Jason Merrill <jason@redhat.com>
502
503 PR c++/67364
504 * constexpr.c (cxx_eval_store_expression): Replace
505 CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
506
507 2016-03-05 Patrick Palka <ppalka@gcc.gnu.org>
508
509 PR c++/66786
510 * pt.c (template_class_depth): Given a lambda type, iterate
511 into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
512 TYPE_CONTEXT. Given a VAR_DECL, iterate into its
513 CP_DECL_CONTEXT.
514
515 2016-03-04 Jason Merrill <jason@redhat.com>
516
517 PR c++/69203
518 * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New.
519 * init.c (build_vec_delete_1): Set it.
520 * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it.
521
522 2016-03-04 Jakub Jelinek <jakub@redhat.com>
523
524 * decl.c (start_preparsed_function): Don't emit start clobber at the
525 start of constructor clones.
526
527 PR c++/70035
528 * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
529 * decl.c (start_preparsed_function): Call
530 cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
531 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
532 cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.
533
534 2016-03-04 Jason Merrill <jason@redhat.com>
535
536 PR c++/67364
537 * constexpr.c (cxx_eval_component_reference): Further tweak.
538
539 * constexpr.c (struct constexpr_ctx): Add save_exprs field.
540 (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
541 (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
542 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
543
544 PR c++/70067
545 * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
546 same type.
547
548 2016-03-03 Jason Merrill <jason@redhat.com>
549
550 * method.c (synthesized_method_walk): operator= can also be constexpr.
551
552 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
553 LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
554
555 PR c++/67164
556 * pt.c (copy_template_args): New.
557 (tsubst_pack_expansion): Use it.
558
559 * call.c (build_aggr_conv): Use get_nsdmi.
560
561 PR c++/51406
562 * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
563
564 PR c++/67364
565 * constexpr.c (cxx_eval_component_reference): Just return an empty
566 CONSTRUCTOR for an empty class.
567
568 2016-03-01 Jason Merrill <jason@redhat.com>
569
570 PR c++/70036
571 * parser.c (cp_parser_requires_clause): Call
572 check_for_bare_parameter_packs.
573
574 PR c++/51489
575 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
576 the operands.
577
578 PR c++/69995
579 * constexpr.c (cxx_eval_call_expression): Unshare arg.
580 (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
581 [TARGET_EXPR]: Unshare init.
582
583 2016-03-01 Patrick Palka <ppalka@gcc.gnu.org>
584
585 PR c++/68948
586 PR c++/69961
587 * pt.c (tsubst_baselink): Reinstate the check for an invalid
588 constructor call.
589
590 2016-02-28 Jason Merrill <jason@redhat.com>
591
592 PR c++/69995
593 * constexpr.c (cxx_eval_store_expression): Unshare init.
594
595 2016-02-26 Jason Merrill <jason@redhat.com>
596
597 PR c++/69958
598 * pt.c (make_argument_pack): New.
599 (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
600 (tsubst_copy_and_build): Likewise.
601
602 2016-02-25 Jason Merrill <jason@redhat.com>
603
604 PR c++/69889
605 * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
606 * tree.c (build_aggr_init_expr): Set it.
607 * semantics.c (simplify_aggr_init_expr): Check it.
608 * cp-gimplify.c (cp_genericize_r): Don't walk into
609 a call/aggr_init from a thunk.
610
611 PR c++/69842
612 * method.c (forward_parm): Handle parameter packs.
613 * lambda.c (maybe_add_lambda_conv_op): Use it for them.
614
615 PR c++/67364
616 * constexpr.c (cxx_eval_component_reference): Don't complain about
617 unevaluated empty classes.
618
619 PR c++/68049
620 * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
621
622 2016-02-25 Patrick Palka <ppalka@gcc.gnu.org>
623
624 PR c++/69736
625 * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
626 (maybe_undo_parenthesized_ref): Declare.
627 * semantics.c (maybe_undo_parenthesized_ref): Split out from
628 check_return_expr.
629 (finish_call_expr): Use it.
630 * typeck.c (check_return_expr): Use it.
631 * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
632 REF_PARENTHESIZED_P flag.
633
634 2016-02-24 Jakub Jelinek <jakub@redhat.com>
635
636 PR c++/69922
637 * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
638 Avoid folding it.
639 * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
640 tests.
641 * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
642 unless they are folded into INTEGER_CST, error_mark_node or some
643 comparison with NULL, avoid folding them and use either the original
644 comparison or non-folded comparison of folded arguments.
645 * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
646 comparison, don't fold the comparison right away.
647
648 2016-02-24 Jason Merrill <jason@redhat.com>
649
650 PR c++/69323
651 * friend.c (make_friend_class): Likewise.
652 * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
653
654 2016-02-24 Jason Merrill <jason@redhat.com>
655
656 PR c++/69323
657 * pt.c (instantiate_class_template_1): Set
658 processing_template_decl before substituting friend_type.
659
660 016-02-24 Martin Sebor <msebor@redhat.com>
661
662 PR c++/69912
663 * tree.c (build_ctor_subob_ref): Compare types' main variants
664 instead of the types as they are.
665
666 2016-02-24 Jason Merrill <jason@redhat.com>
667
668 * decl.c (start_preparsed_function): Condition ctor clobber on
669 flag_lifetime_dse > 1.
670
671 * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
672
673 2016-02-19 Jason Merrill <jason@redhat.com>
674
675 PR c++/69743
676 * call.c (remaining_arguments): No longer static.
677 * cp-tree.h: Declare it.
678 * pt.c (more_specialized_fn): Use it.
679
680 2016-02-19 Jakub Jelinek <jakub@redhat.com>
681 Bernd Edlinger <bernd.edlinger@hotmail.de>
682
683 * Make-lang.in: Invoke gperf with -L C++.
684 * cfns.gperf: Remove prototypes for hash and libc_name_p
685 inlines.
686 * cfns.h: Regenerated.
687 * except.c (nothrow_libfn_p): Adjust.
688
689 2016-02-19 Jakub Jelinek <jakub@redhat.com>
690
691 PR c++/69850
692 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
693 NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
694
695 2016-02-19 Patrick Palka <ppalka@gcc.gnu.org>
696
697 PR c++/68948
698 * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
699 call here.
700 * semantics.c (finish_call_expr): Don't assume a constructor
701 call is dependent if only the "this" pointer is dependent. When
702 building a constructor call, always use a dummy object.
703
704 2016-02-19 Jakub Jelinek <jakub@redhat.com>
705
706 PR c++/69850
707 * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
708 condition.
709 * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
710 operators if folding preserved the binop, just with different
711 arguments.
712
713 PR c++/67767
714 * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
715 attr_spec is always single element chain, chain all the attributes
716 properly together in the right order.
717
718 2016-02-18 Jason Merrill <jason@redhat.com>
719
720 * mangle.c (maybe_check_abi_tags): Add for_decl parm. Call
721 mangle_decl.
722 (mangle_decl): Call maybe_check_abi_tags for function scope.
723 (mangle_guard_variable): Call maybe_check_abi_tags here.
724 (write_guarded_var_name): Not here.
725
726 2016-02-17 Jason Merrill <jason@redhat.com>
727
728 PR c++/65985
729 * constexpr.c (build_constexpr_constructor_member_initializers):
730 Handle an additional STATEMENT_LIST.
731
732 PR c++/68585
733 * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
734
735 PR c++/68679
736 * decl2.c (reset_type_linkage_2): Look through member templates.
737
738 2016-02-17 Jakub Jelinek <jakub@redhat.com>
739
740 PR c++/69850
741 * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
742
743 2016-02-17 Jason Merrill <jason@redhat.com>
744
745 PR c++/69842
746 * method.c (forward_parm): Split out from...
747 (add_one_base_init): ...here.
748 * lambda.c (maybe_add_lambda_conv_op): Use it.
749
750 2016-02-16 Jason Merrill <jason@redhat.com>
751
752 PR c++/10200
753 PR c++/69753
754 * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
755 tree.c, typeck2.c: Revert earlier changes.
756 * parser.c (cp_parser_lookup_name): Ignore namespace-scope
757 non-type templates after -> or .
758
759 2016-02-16 Jakub Jelinek <jakub@redhat.com>
760
761 PR c/69835
762 * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
763
764 2016-02-16 Jason Merrill <jason@redhat.com>
765
766 PR c++/69657
767 * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
768 (set_decl_namespace): Pass it. Complain about finding a hidden friend.
769 * name-lookup.h: Adjust.
770
771 2016-02-16 James Norris <jnorris@codesourcery.com>
772
773 * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
774 * semantics.c (finish_omp_clauses): Add deviceptr checking.
775
776 2016-02-15 Jakub Jelinek <jakub@redhat.com>
777
778 PR c++/69658
779 * init.c (expand_default_init): Only call reshape_init
780 in the direct-initialization from an initializer list case.
781
782 2016-02-15 Jason Merrill <jason@redhat.com>
783
784 PR c++/69753
785 * semantics.c (finish_call_expr): Implicit 'this' does not make
786 the call dependent.
787 * search.c (any_dependent_bases_p): Split out...
788 * name-lookup.c (do_class_using_decl): ...from here.
789 * call.c (build_new_method_call_1): Don't complain about missing object
790 if there are dependent bases. Tweak error.
791 * tree.c (non_static_member_function_p): Remove.
792 * pt.c (type_dependent_expression_p): A member template of a
793 dependent type is dependent.
794 * cp-tree.h: Adjust.
795
796 PR c++/68890
797 * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
798
799 2016-02-12 Patrick Palka <ppalka@gcc.gnu.org>
800
801 PR c++/69098
802 * pt.c (lookup_and_finish_template_variable): New function,
803 extracted from ...
804 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here. Use it.
805 (tsubst_qualified_id): Consider that EXPR might be a variable
806 template.
807 * typeck.c (check_template_keyword): Don't emit an error
808 if DECL is a variable template.
809
810 2016-02-12 Jakub Jelinek <jakub@redhat.com>
811
812 * error.c: Spelling fixes - behaviour -> behavior and
813 neighbour -> neighbor.
814 * decl.c: Likewise.
815 * typeck.c (cp_build_binary_op): Fix up behavior spelling in
816 diagnostics.
817 * init.c (build_delete): Likewise.
818
819 2016-02-11 Jakub Jelinek <jakub@redhat.com>
820
821 PR c/69768
822 * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
823 arguments for -Waddress warning. Fix up formatting.
824
825 2016-02-11 Paolo Carlini <paolo.carlini@oracle.com>
826
827 PR c++/68726
828 * pt.c (lookup_template_class_1): Check tsubst return value for
829 error_mark_node.
830
831 2016-02-10 Jason Merrill <jason@redhat.com>
832
833 PR c++/68926
834 * pt.c (resolve_nondeduced_context): Add complain parm.
835 (do_auto_deduction): Pass it.
836 * cvt.c (convert_to_void): Likewise.
837 * decl.c (cp_finish_decl): Likewise.
838 * init.c (build_new): Likewise.
839 * rtti.c (get_tinfo_decl_dynamic): Likewise.
840 * semantics.c (finish_decltype_type): Likewise.
841 * typeck.c (decay_conversion): Likewise.
842 * cp-tree.h: Adjust declaration.
843 * call.c (standard_conversion): Add complain parm, pass it along.
844 (implicit_conversion): Pass it.
845
846 PR c++/69657
847 * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
848 (lookup_name_real_1): Likewise.
849 (remove_hidden_names): Handle non-functions too.
850
851 PR c++/10200
852 * parser.c (cp_parser_lookup_name): When looking for a template
853 after . or ->, only consider class templates.
854 (cp_parser_postfix_dot_deref_expression): Handle the current
855 instantiation. Remember a dependent object expression.
856 * typeck2.c (build_x_arrow): Handle the current instantiation.
857
858 * ptree.c (debug_tree): Implement for cp_expr.
859
860 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
861
862 PR c++/69139
863 * parser.c (cp_parser_simple_type_specifier): Make the check
864 for disambiguating between an 'auto' placeholder and an implicit
865 template parameter more robust.
866
867 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
868
869 PR c++/69283
870 PR c++/67835
871 * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
872 setting its TREE_USED flag.
873
874 2016-02-08 Jason Merrill <jason@redhat.com>
875
876 PR c++/69657
877 * name-lookup.c (do_nonmember_using_decl): Leave anticipated
878 built-ins alone.
879
880 2016-02-08 Jakub Jelinek <jakub@redhat.com>
881
882 PR c++/59627
883 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
884 of the DECL_OMP_DECLARE_REDUCTION_P decls.
885
886 2016-02-08 Marek Polacek <polacek@redhat.com>
887
888 PR c++/69688
889 * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
890 Call clear_fold_cache.
891 * cp-tree.h: Adjust declaration.
892 * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
893 rather than clear_cv_cache and clear_fold_cache.
894 * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
895
896 2016-02-08 Jason Merrill <jason@redhat.com>
897
898 * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
899 * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
900 (ocp_convert): Use *_maybe_fold.
901 (cp_convert_to_pointer): Add dofold parameter.
902 * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
903
904 2016-02-05 Martin Sebor <msebor@redhat.com>
905
906 PR c++/69662
907 * init.c (find_field_init): New function.
908 (warn_placement_new_too_small): Call it. Handle one-element arrays
909 at ends of structures special.
910
911 2016-02-05 Jason Merrill <jason@redhat.com>
912
913 PR c++/68948
914 * semantics.c (finish_expr_stmt): If expr is error_mark_node,
915 make sure we've seen_error().
916
917 2016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
918
919 PR c++/68948
920 * pt.c (tsubst_baselink): Diagnose an invalid constructor call
921 if lookup_fnfields returns NULL_TREE and the name being looked
922 up has the form A::A.
923
924 2016-02-04 Patrick Palka <ppalka@gcc.gnu.org>
925
926 * constexpr.c (cxx_eval_binary_expression): Fold equality
927 comparisons involving PTRMEM_CSTs.
928
929 2016-02-04 Jakub Jelinek <jakub@redhat.com>
930
931 * class.c (find_flexarrays): Don't declare dom variable.
932 (diagnose_flexarray): Likewise.
933
934 2016-02-02 Martain Sebor <msebor@redhat.com>
935
936 PR c++/69251
937 PR c++/69253
938 PR c++/69290
939 PR c++/69277
940 PR c++/69349
941 * class.c (walk_subobject_offsets): Avoid testing the upper bound
942 of a flexible array member for equality to null.
943 (find_flexarrays): Remove spurious whitespace introduced in r231665.
944 (diagnose_flexarrays): Avoid checking the upper bound of arrays.
945 (check_flexarrays): Same.
946 * decl.c (compute_array_index_type): Avoid special case for flexible
947 array members.
948 (grokdeclarator): Avoid calling compute_array_index_type for flexible
949 array members.
950 * error.c (dump_type_suffix): Revert changes introduced in r231665
951 and rendered unnecessary by the changes above.
952 * pt.c (tsubst): Same.
953 * tree.c (build_ctor_subob_ref): Handle flexible array members.
954 * typeck2.c (digest_init_r): Revert changes introduced in r231665.
955 (process_init_constructor_array): Same.
956 (process_init_constructor_record): Same.
957
958 2016-02-03 Patrick Palka <ppalka@gcc.gnu.org>
959
960 PR c++/69056
961 * pt.c (try_one_overload): Handle comparing argument packs so
962 that there is no conflict if we deduced more arguments of an
963 argument pack than were explicitly specified.
964
965 2016-01-31 Jakub Jelinek <jakub@redhat.com>
966 Jason Merrill <jason@redhat.com>
967
968 PR c++/68763
969 * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
970 function type if nothing is changing.
971
972 2016-01-31 Jason Merrill <jason@redhat.com>
973
974 PR c++/69009
975 * pt.c (partial_specialization_p, impartial_args): New.
976 (instantiate_decl): Call impartial_args.
977
978 * mangle.c (maybe_check_abi_tags): New.
979 (write_guarded_var_name): Call it.
980 (mangle_ref_init_variable): Call check_abi_tags.
981
982 * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
983 between template and instantiation.
984
985 2016-01-29 Jakub Jelinek <jakub@redhat.com>
986
987 PR debug/66869
988 * decl.c (wrapup_globals_for_namespace): Warn about unused static
989 function declarations.
990
991 2016-01-29 Marek Polacek <polacek@redhat.com>
992
993 PR c++/69509
994 PR c++/69516
995 * constexpr.c (cxx_eval_array_reference): Give the "array subscript
996 out of bound" error earlier.
997 * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
998 commentary.
999
1000 2016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
1001
1002 * name-lookup.c (begin_scope): After reusing a cp_binding_level
1003 structure, update free_binding_level before the structure's
1004 level_chain field gets cleared, not after.
1005
1006 2016-01-28 Jason Merrill <jason@redhat.com>
1007
1008 PR c++/67407
1009 * search.c (dfs_walk_once, dfs_walk_once_r)
1010 (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
1011 hash_set instead of BINFO_MARKED.
1012 (dfs_unmark_r): Remove.
1013
1014 2016-01-28 Patrick Palka <ppalka@gcc.gnu.org>
1015
1016 PR c++/24208
1017 * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
1018 (cp_lexer_debugging_p): Use it.
1019 (cp_lexer_start_debugging): Likewise.
1020 (cp_lexer_stop_debugging): Likewise.
1021
1022 2016-01-27 Marek Polacek <polacek@redhat.com>
1023
1024 PR c/68062
1025 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
1026 needed. Add -Wsign-compare warning.
1027
1028 2016-01-27 Ryan Burn <contact@rnburn.com>
1029
1030 PR cilkplus/69267
1031 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
1032 superfluous post_p argument in call to
1033 cilk_gimplify_call_params_in_spawned_fn.
1034
1035 2016-01-27 Marek Polacek <polacek@redhat.com>
1036
1037 PR c++/69379
1038 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
1039 wrapped in NOP_EXPRs.
1040
1041 2016-01-27 Martin Sebor <msebor@redhat.com>
1042
1043 PR c++/69317
1044 * mangle.c (mangle_decl): Reference the correct (saved) version
1045 of the ABI in -Wabi diagnostics.
1046
1047 2016-01-27 Marek Polacek <polacek@redhat.com>
1048
1049 PR c++/69496
1050 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
1051 elements of the array.
1052
1053 2016-01-26 Jason Merrill <jason@redhat.com>
1054
1055 PR c++/68949
1056 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
1057 (cxx_eval_call_expression): Don't look through clones.
1058 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
1059 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
1060 maybe-in-charge *tor.
1061
1062 2016-01-26 Jason Merrill <jason@redhat.com>
1063
1064 PR c++/68782
1065 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
1066 and TREE_SIDE_EFFECTS.
1067 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
1068 verify_constructor_flags.
1069
1070 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1071
1072 PR c++/68357
1073 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
1074 return error_mark_node instead of building trees with error_mark_node
1075 operands.
1076
1077 2016-01-26 David Malcolm <dmalcolm@redhat.com>
1078
1079 PR other/69006
1080 * error.c (print_instantiation_partial_context_line): Add missing
1081 newlines from output for the t == NULL case.
1082 (print_instantiation_partial_context): Remove call to pp_newline.
1083
1084 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
1085
1086 Revert:
1087 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1088
1089 PR c++/11858
1090 PR c++/24663
1091 PR c++/24664
1092 * decl.c (grokdeclarator): Don't decay array parameter type to
1093 a pointer type if it's dependent.
1094 (grokparms): Invoke strip_top_quals instead of directly invoking
1095 cp_build_qualified_type.
1096 * pt.c (decay_dependent_array_parm_type): New static function.
1097 (type_unification_real): Call decay_dependent_array_parm_type
1098 to decay a dependent array parameter type to its corresponding
1099 pointer type before unification.
1100 (more_specialized_fn): Likewise.
1101 (get_bindings): Likewise.
1102 * tree.c (cp_build_qualified_type): Trivial typofix in
1103 documentation.
1104
1105 2016-01-23 Martin Sebor <msebor@redhat.com>
1106
1107 PR c++/58109
1108 PR c++/69022
1109 * decl2.c (is_late_template_attribute): Handle dependent argument
1110 to attribute align and attribute vector_size.
1111
1112 2016-01-21 Jason Merrill <jason@redhat.com>
1113
1114 PR c++/69392
1115 * lambda.c (lambda_capture_field_type): Handle 'this' specially
1116 for init-capture, too.
1117
1118 PR c++/65687
1119 * decl.c (type_is_deprecated): Don't look into a typedef.
1120
1121 PR c++/40751
1122 PR c++/64987
1123 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
1124
1125 PR c++/43407
1126 * decl.c (start_enum): Add attributes parameter.
1127 * parser.c (cp_parser_enum_specifier): Pass it.
1128 * pt.c (lookup_template_class_1): Pass it.
1129 * cp-tree.h: Adjust.
1130
1131 2016-01-19 Jason Merrill <jason@redhat.com>
1132
1133 PR c++/59759
1134 * pt.c (convert_template_argument): Handle VAR_DECL properly.
1135
1136 2016-01-19 Marek Polacek <polacek@redhat.com>
1137
1138 PR c++/68586
1139 * constexpr.c (clear_cv_cache): New.
1140 * cp-gimplify.c (clear_fold_cache): New.
1141 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
1142 * decl.c (finish_enum_value_list): Call them.
1143
1144 PR c++/68965
1145 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
1146
1147 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1148
1149 PR c++/11858
1150 PR c++/24663
1151 PR c++/24664
1152 * decl.c (grokdeclarator): Don't decay array parameter type to
1153 a pointer type if it's dependent.
1154 (grokparms): Invoke strip_top_quals instead of directly invoking
1155 cp_build_qualified_type.
1156 * pt.c (decay_dependent_array_parm_type): New static function.
1157 (type_unification_real): Call decay_dependent_array_parm_type
1158 to decay a dependent array parameter type to its corresponding
1159 pointer type before unification.
1160 (more_specialized_fn): Likewise.
1161 (get_bindings): Likewise.
1162 * tree.c (cp_build_qualified_type): Trivial typofix in
1163 documentation.
1164
1165 2016-01-18 Jason Merrill <jason@redhat.com>
1166
1167 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
1168
1169 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
1170
1171 PR c++/68767
1172 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
1173 (contains_label_1, contains_label_p): Remove.
1174
1175 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1176
1177 PR c++/69091
1178 * pt.c (type_dependent_expression_p): For a function template
1179 specialization, a type is dependent iff any of its template
1180 arguments are.
1181
1182 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1183
1184 * cp-array-notation.c (cp_expand_cond_array_notations): Return
1185 error_mark_node only if find_rank failed, not if it was
1186 successful.
1187
1188 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1189
1190 PR c++/68936
1191 * tree.c (build_min_non_dep_call_vec): Don't retain the
1192 KOENIG_LOOKUP_P flag of the non-dependent expression that's
1193 been built.
1194 (build_min_non_dep_op_overload): Instead, do it here.
1195
1196 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1197
1198 PR bootstrap/68271
1199 * parser.h (cp_token): Remove pragma_kind field. Add comment
1200 with number of unused bits.
1201 * parser.c (eof_token): Remove pragma_kind field initializer.
1202 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
1203 field, don't clear CPP_PRAGMA u.value.
1204 (cp_parser_pragma_kind): New function.
1205 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
1206 cp_parser_omp_construct, cp_parser_initial_pragma,
1207 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
1208 pragma_kind field.
1209
1210 2016-01-15 Jason Merrill <jason@redhat.com>
1211
1212 PR c++/68847
1213 * call.c (build_cxx_call): Use fold_non_dependent_expr.
1214
1215 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
1216 value.
1217
1218 PR c++/69257
1219 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
1220 array/function-to-pointer conversion. Call
1221 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
1222 * call.c (convert_like_real): Print call context if
1223 decay_conversion errors.
1224
1225 2016-01-14 Tom de Vries <tom@codesourcery.com>
1226
1227 PR tree-optimization/68773
1228 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
1229 set force_output.
1230
1231 2016-01-14 Jason Merrill <jason@redhat.com>
1232
1233 PR c++/69261
1234 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
1235
1236 2016-01-12 Marek Polacek <polacek@redhat.com>
1237
1238 PR c++/68979
1239 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
1240 error_at and adjust the return value.
1241
1242 2016-01-12 Jakub Jelinek <jakub@redhat.com>
1243
1244 PR objc++/68511
1245 PR c++/69213
1246 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
1247 GS_ERROR whenever seen_error (), only if *expr_p contains
1248 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
1249
1250 PR c++/66808
1251 PR c++/69000
1252 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
1253
1254 2016-01-11 Jason Merrill <jason@redhat.com>
1255
1256 PR c++/69131
1257 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
1258 (process_subob_fn): Likewise. Don't consider triviality if true.
1259 (synthesize_method_walk): Pass it.
1260
1261 2016-01-11 David Malcolm <dmalcolm@redhat.com>
1262
1263 PR c++/68795
1264 * parser.c (cp_parser_postfix_expression): Initialize
1265 close_paren_loc to UNKNOWN_LOCATION; only use it if
1266 it has been written to by
1267 cp_parser_parenthesized_expression_list.
1268 (cp_parser_parenthesized_expression_list): Document the behavior
1269 with respect to the CLOSE_PAREN_LOC param.
1270
1271 2016-01-11 Jakub Jelinek <jakub@redhat.com>
1272
1273 PR c++/69211
1274 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
1275 folded operands have side-effects, but folding changed any of them,
1276 build a new tree with the folded operands instead of returning the
1277 unfolded tree.
1278
1279 2016-01-09 Marek Polacek <polacek@redhat.com>
1280
1281 PR c++/69113
1282 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
1283
1284 2016-01-09 Jakub Jelinek <jakub@redhat.com>
1285
1286 PR c++/69164
1287 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
1288
1289 2016-01-08 Jason Merrill <jason@redhat.com>
1290
1291 PR c++/69158
1292 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
1293 in completion.
1294
1295 2016-01-08 Marek Polacek <polacek@redhat.com>
1296
1297 PR c++/68449
1298 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
1299
1300 2016-01-08 Jason Merrill <jason@redhat.com>
1301
1302 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
1303 workaround.
1304
1305 PR c++/68983
1306 PR c++/67557
1307 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
1308 TREE_ADDRESSABLE type.
1309
1310 PR c++/68983
1311 PR c++/67557
1312 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
1313
1314 2016-01-05 Nathan Sidwell <nathan@acm.org>
1315
1316 PR c++/58583
1317 * pt.c (build_non_dependent_expr): Don't try a checking fold when
1318 parsing an nsdmi.
1319
1320 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1321
1322 Update copyright years.
1323 \f
1324 Copyright (C) 2016 Free Software Foundation, Inc.
1325
1326 Copying and distribution of this file, with or without modification,
1327 are permitted in any medium without royalty provided the copyright
1328 notice and this notice are preserved.