]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
PR c++/85552 - wrong instantiation of dtor for DMI.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2019-06-12 Jason Merrill <jason@redhat.com>
2
3 PR c++/85552 - wrong instantiation of dtor for DMI.
4 * typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.
5
6 2019-06-13 Paolo Carlini <paolo.carlini@oracle.com>
7
8 * decl.c (grokdeclarator): Use id_loc in five additional places
9 in the last part of the function.
10
11 2019-06-13 Paolo Carlini <paolo.carlini@oracle.com>
12
13 * decl.c (grokdeclarator): Move further up the declaration of
14 id_loc, use it immediately, update its value after the loop
15 over declarator, use it again in the final part of function;
16 improve locations of error messages about multiple data types
17 and conflicting specifiers.
18
19 2019-06-13 Richard Biener <rguenther@suse.de>
20
21 PR c++/90801
22 * typeck2.c (split_nonconstant_init_1): Properly count
23 num_split_elts, optimize single constructor elt removal.
24
25 2019-06-12 Marek Polacek <polacek@redhat.com>
26
27 PR c++/66999 - 'this' captured by reference.
28 * parser.c (cp_parser_lambda_introducer): Reject `&this'. Use
29 cp_lexer_nth_token_is instead of cp_lexer_peek_nth_token.
30
31 PR c++/90825 - endless recursion when evaluating sizeof.
32 PR c++/90832 - endless recursion when evaluating sizeof.
33 * constexpr.c (cxx_eval_constant_expression): Don't recurse on the
34 result of fold_sizeof_expr if is returns a SIZEOF_EXPR.
35 * typeck.c (cxx_sizeof_expr): Only return a SIZEOF_EXPR if the operand
36 is instantiation-dependent.
37
38 PR c++/90736 - bogus error with alignof.
39 * constexpr.c (adjust_temp_type): Use cv_unqualified type.
40
41 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
42
43 PR c++/90449 - add -Winaccessible-base option.
44 * class.c (warn_about_ambiguous_bases): Changed name to:
45 maybe_warn_about_inaccessible_bases.
46 (maybe_warn_about_inaccessible_bases): Implemented new
47 Winaccessible-base warning option for both direct and virtual
48 base warnings.
49 (layout_class_type): Call to warn_about_ambiguous_bases changed to fit
50 new name.
51
52 2019-06-11 Richard Biener <rguenther@suse.de>
53
54 PR c++/90801
55 * typeck2.c (split_nonconstant_init_1): Avoid ordered remove
56 from CONSTRUCTOR by marking to remove elements and doing all
57 of them in a O(n) scan.
58
59 2019-06-11 Jakub Jelinek <jakub@redhat.com>
60
61 PR c++/90810
62 * init.c (constant_value_1): Handle VECTOR_CST DECL_INITIAL for
63 !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P decls like CONSTRUCTOR.
64
65 2019-06-11 Martin Liska <mliska@suse.cz>
66
67 PR c++/87847
68 * pt.c (init_template_processing): Disable hash table
69 sanitization for decl_specializations and type_specializations.
70
71 2019-06-10 Jason Merrill <jason@redhat.com>
72
73 * constexpr.c (free_constructor): New.
74 (cxx_eval_call_expression): Free parameter value CONSTRUCTORs.
75
76 * constexpr.c (unshare_constructor): Only unshare if T is itself a
77 CONSTRUCTOR.
78 (cxx_eval_call_expression): Don't call it on the result here.
79
80 Reduce constexpr_call memory consumption.
81 * constexpr.c (cxx_bind_parameters_in_call): Use TREE_VEC rather
82 than TREE_LIST.
83 (constexpr_call_hasher::equal, cxx_bind_parameters_in_call)
84 (cxx_eval_call_expression): Adjust.
85
86 2019-06-10 Jakub Jelinek <jakub@redhat.com>
87
88 * parser.c (cp_parser_omp_clause_reduction): Don't sorry_at on inscan
89 reductions.
90 (cp_parser_omp_scan_loop_body): New function.
91 (cp_parser_omp_for_loop): Call cp_parser_omp_scan_loop_body if there
92 are inscan reduction clauses.
93 (cp_parser_pragma): Reject PRAGMA_OMP_SCAN.
94 * semantics.c (finish_omp_clauses): Reject mixing inscan with
95 non-inscan reductions on the same construct, or inscan reductions with
96 ordered or schedule clauses, or inscan array reductions.
97 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_{IN,EX}CLUSIVE.
98 (tsubst_expr): Handle OMP_SCAN.
99
100 2019-06-07 Jason Merrill <jason@redhat.com>
101
102 * constexpr.c (cxx_eval_constant_expression): Call
103 STRIP_ANY_LOCATION_WRAPPER early.
104 [CONVERT_EXPR]: Don't build anything for conversion to void.
105 [ADDR_EXPR]: ggc_free unused ADDR_EXPR.
106
107 2019-06-05 Martin Sebor <msebor@redhat.com>
108
109 PR c/90737
110 * typeck.c (maybe_warn_about_returning_address_of_local): Only
111 consider functions returning pointers as candidates for
112 -Wreturn-local-addr.
113
114 2019-06-05 Paolo Carlini <paolo.carlini@oracle.com>
115
116 * decl.c (smallest_type_location): New.
117 (check_special_function_return_type): Use it.
118 (grokdeclarator): Lkewise.
119
120 2019-06-05 Paolo Carlini <paolo.carlini@oracle.com>
121
122 * decl.c (grokdeclarator): Use locations[ds_friend]
123 in one place.
124
125 2019-06-05 Martin Sebor <msebor@redhat.com>
126
127 * call.c (build_conditional_expr_1): Adjust quoting and hyphenation.
128 (convert_like_real): Same.
129 (convert_arg_to_ellipsis): Same.
130 * constexpr.c (diag_array_subscript): Same.
131 * constraint.cc (diagnose_trait_expression): Same.
132 * cvt.c (ocp_convert): Same.
133 * decl.c (start_decl): Same.
134 (check_for_uninitialized_const_var): Same.
135 (grokfndecl): Same.
136 (check_special_function_return_type): Same.
137 (finish_enum_value_list): Same.
138 (start_preparsed_function): Same.
139 * parser.c (cp_parser_decl_specifier_seq): Same.
140 * typeck.c (cp_build_binary_op): Same.
141 (build_static_cast_1): Same.
142
143 2019-06-04 Nina Dinka Ranns <dinka.ranns@gmail.com>
144
145 PR c++/63149 - Wrong auto deduction from braced-init-list.
146 * pt.c (listify_autos): use non cv qualified auto_node in
147 std::initializer_list<auto>.
148
149 2019-06-04 Paolo Carlini <paolo.carlini@oracle.com>
150
151 * decl.c (grokdeclarator): Use declarator->id_loc in two
152 additional places.
153
154 2019-06-04 Nathan Sidwell <nathan@acm.org>
155
156 * name-lookup.c (lookup_type_scope_1): Reimplement, handle local
157 and namespace scopes separately.
158
159 2019-06-04 Harald van Dijk <harald@gigawatt.nl>
160
161 PR c++/60531 - Wrong error about unresolved overloaded function
162 * typeck.c (cp_build_binary_op): See if overload can be resolved.
163 (cp_build_unary_op): Ditto.
164
165 2019-06-04 Jason Merrill <jason@redhat.com>
166
167 Reduce accumulated garbage in constexpr evaluation.
168 * constexpr.c (cxx_eval_call_expression): ggc_free any bindings we
169 don't save.
170 (cxx_eval_increment_expression): ggc_free the MODIFY_EXPR after
171 evaluating it.
172
173 2019-06-04 Jakub Jelinek <jakub@redhat.com>
174
175 * cp-tree.h (CP_OMP_CLAUSE_INFO): Allow for any clauses up to _condvar_
176 instead of only up to linear.
177
178 2019-06-03 Paolo Carlini <paolo.carlini@oracle.com>
179
180 * parser.c (cp_parser_unqualified_id): Use build_min_nt_loc in
181 five places.
182
183 2019-06-01 Ville Voutilainen <ville.voutilainen@gmail.com>
184
185 PR c++/85254
186 * class.c (fixup_type_variants): Handle CLASSTYPE_FINAL.
187
188 2019-05-31 Nathan Sidwell <nathan@acm.org>
189
190 * cp-tree.h (IDENTIFIER_LAMBDA_P): New.
191 (TYPE_ANON_P): New.
192 (LAMBDA_TYPE_P, TYPE_UNNAMED_P): Likewise.
193 (LAMBDANAME_PREFIX, LAMBDANAME_FORMAT): Delete.
194 (make_lambda_name): Don't declare.
195 * error.c (dump_aggr_type): Check for lambdas before other
196 anonymous names.
197 * lambda.c (begin_lambda_type): Use make_anon_name.
198 * cp-lang.c (cxx_dwarf_name): Lambda names smell anonymous.
199 * mangle.c (write_local_name): Likewise.
200 * name-lookup.c (lambda_cnt, make_lambda_name): Delete.
201
202 2019-05-30 Marek Polacek <polacek@redhat.com>
203
204 * cp-tree.h (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Fix a typo.
205
206 2019-05-31 Paolo Carlini <paolo.carlini@oracle.com>
207
208 * decl.c (grokdeclarator): Use declarator->id_loc in five
209 error_at calls.
210
211 2019-05-29 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/90598
214 * tree.c (lvalue_kind): Return clk_none for expressions with
215 with VOID_TYPE_P.
216
217 2019-05-29 Paolo Carlini <paolo.carlini@oracle.com>
218
219 PR c++/89875
220 * parser.c (cp_parser_sizeof_operand): When the type-id production
221 did not work out commit to the tentative parse.
222
223 2019-05-29 Jakub Jelinek <jakub@redhat.com>
224
225 P1091R3 - Extending structured bindings to be more like var decls
226 P1381R1 - Reference capture of structured bindings
227 * decl.c (cp_maybe_mangle_decomp): Handle TREE_STATIC decls even at
228 function scope.
229 (cp_finish_decomp): Copy over various decl properties from decl to
230 v[i] in the tuple case.
231 (grokdeclarator): Allow static, thread_local and __thread for C++2a
232 and use pedwarn instead of error for older standard revisions.
233 Make other structured binding diagnostic messages more i18n friendly.
234
235 2019-05-28 Nathan Sidwell <nathan@acm.org>
236
237 * decl.c (duplicate_decls): Assert a template newdecl has no
238 specializations.
239
240 2019-05-28 Marek Polacek <polacek@redhat.com>
241
242 PR c++/90548 - ICE with generic lambda and empty pack.
243 * pt.c (tsubst_copy_and_build): Handle pack expansion properly.
244
245 2019-05-28 Nathan Sidwell <nathan@acm.org>
246
247 * cp-tree.h (make_anon_name): Drop declaration.
248 (TYPE_UNNAMED_P): Use IDENTIFIER_ANON_P.
249 * cp-lang.c (cxx_dwarf_name): Likewise.
250 * class.c (find_flexarrays): Likewise.
251 * decl.c (name_unnamed_type, xref_tag_1): Likewise.
252 * error.c (dump_aggr_type): Likewise.
253 * pt.c (push_template_decl_real): Likewise.
254 * name-lookup.c (consider_binding_level): Likewise.
255 (anon_cnt, make_anon_name): Delete.
256
257 2019-05-25 Marek Polacek <polacek@redhat.com>
258
259 PR c++/90572 - wrong disambiguation in friend declaration.
260 * parser.c (cp_parser_constructor_declarator_p): Don't allow missing
261 typename for friend declarations.
262
263 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
264
265 * cp-tree.h (CP_AGGREGATE_TYPE_P): Fix whitespace.
266
267 * init.c (std_placement_new_fn_p): Remove outdated TODO comment that
268 was resolved by r254694.
269
270 2019-05-22 Jason Merrill <jason@redhat.com>
271
272 PR c++/20408 - unnecessary code for empty struct.
273 * call.c (build_call_a): Use simple_empty_class_p.
274
275 PR c++/86485 - -Wmaybe-unused with empty class ?:
276 * cp-gimplify.c (simple_empty_class_p): Also true for MODIFY_EXPR.
277
278 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
279
280 * parser.c (cp_parser_template_declaration_after_parameters): Use
281 DECL_SOURCE_LOCATION in literal operator template errors.
282
283 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
284
285 PR c++/67184
286 PR c++/69445
287 * call.c (build_over_call): Devirtualize when the final overrider
288 comes from the base.
289
290 2019-05-21 Nathan Sidwell <nathan@acm.org>
291
292 * name-lookup.c (do_nonmember_using_decl): Drop INSERT_P
293 parameter. Document.
294 (finish_nonmember_using_decl): Adjust do_nonmember_using_decl
295 calls. Remove stray FIXME comment.
296
297 * name-lookup.h (struct cp_binding_level): Drop usings field.
298 (finish_namespace_using_decl, finish_local_using_decl): Replace with ...
299 (finish_nonmember_using_decl): ... this.
300 * name-lookup.c (push_using_decl_1, push_using_decl):
301 (do_nonmember_using_decl): ... here. Add INSERT_P arg. Reimplement.
302 (validate_nonmember_using_decl, finish_namespace_using_decl)
303 (finish_local_using_decl): Replace with ...
304 (finish_nonmember_using_decl): ... this. Drop DECL parm.
305 * parser.c (cp_parser_using_declaration): Don't do lookup here.
306 * pt.c (tsubst_expr): Do not do using decl lookup here.
307
308 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
309
310 * decl2.c (cpp_check) <IS_ASSIGNMENT_OPERATOR>: New case.
311
312 2019-05-20 Marek Polacek <polacek@redhat.com>
313
314 CWG 2094 - volatile scalars are trivially copyable.
315 PR c++/85679
316 * tree.c (trivially_copyable_p): Don't check CP_TYPE_VOLATILE_P for
317 scalar types.
318
319 2019-05-20 Marek Polacek <polacek@redhat.com>
320
321 * pt.c (convert_template_argument): Add a diagnostic for the
322 [temp.arg]/2 ambiguity case.
323
324 * name-lookup.c (finish_using_directive): Don't issue inform() if the
325 warning didn't trigger. Add quoting. Tweak the inform message.
326
327 2019-05-20 Paolo Carlini <paolo.carlini@oracle.com>
328
329 * cp-tree.h: Remove remnants of CONV_NONCONVERTING.
330
331 2019-05-20 Nathan Sidwell <nathan@acm.org>
332
333 * name-lookup.c (finish_namespace_using_directive)
334 (finish_local_using_directive): Merge to ...
335 (finish_using_directive): ... here. Handle both contexts.
336 * name-lookup.h (finish_namespace_using_directive)
337 (finish_local_using_directive): Replace with ...
338 (finish_using_directive): ... this.
339 * parser.c (cp_parser_using_directive): Adjust.
340 * pt.c (tsubst_expr): Likewise.
341
342 * cp-tree.h (struct lang_decl_ns): Remove usings field.
343 (DECL_NAMESPACE_USING): Delete.
344 * name-lookup.c (name_lookup::search_usings): Use namespace's
345 binding scope.
346 (name_lookup::queue_namespae): Likewise.
347 (finish_namespace_using_directive, push_namespace): Likewise.
348 (has_using_namespace_std_directive): Just search the entire
349 binding stack.
350
351 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
352
353 PR c++/90532 Ensure __is_constructible(T[]) is false
354 * method.c (is_xible_helper): Return error_mark_node for construction
355 of an array of unknown bound.
356
357 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
358
359 PR c++/89433
360 * parser.c (cp_finalize_oacc_routine): Rework checking if already
361 marked with an OpenACC 'routine' directive.
362
363 PR c++/89433
364 * parser.c (cp_parser_oacc_routine)
365 (cp_parser_late_parsing_oacc_routine): Normalize order of clauses.
366 (cp_finalize_oacc_routine): Call oacc_verify_routine_clauses.
367
368 PR c++/89433
369 * parser.c (cp_finalize_oacc_routine): Refer to OpenACC 'routine'
370 clauses from "omp declare target" attribute.
371
372 2019-05-16 Martin Sebor <msebor@redhat.com>
373
374 * call.c (print_z_candidate): Wrap diagnostic text in a gettext
375 macro. Adjust.
376 (print_z_candidates): Same.
377 (build_conditional_expr_1): Quote keywords, operators, and types
378 in diagnostics.
379 (build_op_delete_call): Same.
380 (maybe_print_user_conv_context): Wrap diagnostic text in a gettext
381 macro.
382 (convert_like_real): Same.
383 (convert_arg_to_ellipsis): Quote keywords, operators, and types
384 in diagnostics.
385 (build_over_call): Same.
386 (joust): Break up an overlong line. Wrap diagnostic text in a gettext
387 macro.
388 * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English.
389 (cxx_eval_constant_expression): Quote keywords, operators, and types
390 in diagnostics.
391 (potential_constant_expression_1): Same.
392 * cp-gimplify.c (cp_genericize_r): Same.
393 * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types
394 in diagnostics.
395 (type_promotes_to): Same.
396 * decl.c (check_previous_goto_1): Same.
397 (check_goto): Same.
398 (start_decl): Same.
399 (cp_finish_decl): Avoid parenthesizing a sentence for consistency.
400 (grok_op_properties): Quote keywords, operators, and types
401 in diagnostics.
402 * decl2.c (grokfield): Same.
403 (coerce_delete_type): Same.
404 * except.c (is_admissible_throw_operand_or_catch_parameter): Same.
405 * friend.c (do_friend): Quote C++ tokens.
406 * init.c (build_new_1): Quote keywords, operators, and types
407 in diagnostics.
408 (build_vec_delete_1): Same.
409 (build_delete): Same.
410 * lex.c (parse_strconst_pragma): Same.
411 (handle_pragma_implementation): Same.
412 (unqualified_fn_lookup_error): Same.
413 * mangle.c (write_type): Same.
414 * method.c (defaulted_late_check): Avoid two consecutive punctuators.
415 * name-lookup.c (cp_binding_level_debug): Remove a trailing newline.
416 (pop_everything): Same.
417 * parser.c (cp_lexer_start_debugging): Quote a macro name.
418 in a diagnostic
419 (cp_lexer_stop_debugging): Same.
420 (cp_parser_userdef_numeric_literal): Quote a C++ header name
421 in a diagnostic.
422 (cp_parser_nested_name_specifier_opt): Quote keywords, operators,
423 and types in diagnostics.
424 (cp_parser_question_colon_clause): Same.
425 (cp_parser_asm_definition): Same.
426 (cp_parser_init_declarator): Same.
427 (cp_parser_template_declaration_after_parameters): Avoid capitalizing
428 a sentence in a diagnostic.
429 (cp_parser_omp_declare_reduction): Quote keywords, operators, and types
430 in diagnostics.
431 (cp_parser_transaction): Same.
432 * pt.c (maybe_process_partial_specialization): Replace second call
433 to permerror with inform for consistency with other uses.
434 (expand_integer_pack): Quote keywords, operators, and types
435 in diagnostics.
436 * rtti.c (get_typeid): Quote keywords, operators, and types
437 in diagnostics.
438 (build_dynamic_cast_1): Same.
439 * semantics.c (finish_asm_stmt): Same.
440 (finish_label_decl): Same.
441 (finish_bases): Same.
442 (finish_offsetof): Same.
443 (cp_check_omp_declare_reduction): Same.
444 (finish_decltype_type): Same.
445 * tree.c (handle_init_priority_attribute): Same. Add detail
446 to diagnostics.
447 (maybe_warn_zero_as_null_pointer_constant): Same.
448 * typeck.c (cp_build_binary_op): Quote keywords, operators, and types
449 in diagnostics.
450 (cp_build_unary_op): Same.
451 (check_for_casting_away_constness): Same.
452 (build_static_cast): Same.
453 (build_const_cast_1): Same.
454 (maybe_warn_about_returning_address_of_local): Same.
455 (check_return_expr): Same.
456 * typeck2.c (abstract_virtuals_error_sfinae): Same.
457 (digest_init_r): Replace a tab with spaces in a diagnostic.
458 (build_functional_cast): Quote keywords, operators, and types
459 in diagnostics.
460
461 2019-05-15 Jakub Jelinek <jakub@redhat.com>
462
463 PR debug/90197
464 * cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
465 before the condition (or if missing or constant non-zero at the end
466 of the loop. Emit a DEBUG_BEGIN_STMT before the increment expression
467 if any. Don't call protected_set_expr_location on incr if it already
468 has a location.
469
470 2019-05-15 Marek Polacek <polacek@redhat.com>
471
472 CWG 2096 - constraints on literal unions.
473 * class.c (check_field_decls): Initialize booleans directly. A union
474 is literal if at least one of its non-static data members is of
475 non-volatile literal type.
476
477 2019-05-15 Paolo Carlini <paolo.carlini@oracle.com>
478
479 * cp-tree.h (REFERENCE_VLA_OK): Remove.
480 * lambda.c (build_capture_proxy): Remove use of the above.
481
482 2019-05-15 Paolo Carlini <paolo.carlini@oracle.com>
483
484 * call.c (perform_overload_resolution, build_new_method_call_1):
485 Use OVL_P; remove redundant TEMPLATE_DECL checks.
486 * decl.c (grokfndecl): Likewise.
487 * mangle.c (write_expression): Likewise.
488 * parser.c (cp_parser_template_id): Likewise.
489 * pt.c (resolve_overloaded_unification, type_dependent_expression_p):
490 Likewise.
491 * search.c (build_baselink): Likewise.
492 * tree.c (is_overloaded_fn, dependent_name, maybe_get_fns): Likewise.
493
494 2019-05-14 Paolo Carlini <paolo.carlini@oracle.com>
495
496 PR preprocessor/90382
497 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
498 min_location.
499
500 2019-05-13 Jason Merrill <jason@redhat.com>
501
502 Use releasing_vec more broadly.
503 * cp-tree.h (struct releasing_vec): Replace get_ref method with
504 operator&.
505 (vec_safe_push, vec_safe_reserve, vec_safe_length, vec_safe_splice):
506 Forwarding functions for releasing_vec.
507 (release_tree_vector): Declare but don't define.
508 * call.c (build_op_delete_call, build_temp, call_copy_ctor)
509 (perform_direct_initialization_if_possible): Use releasing_vec.
510 * constexpr.c (cxx_eval_vec_init_1, cxx_eval_store_expression):
511 Likewise.
512 * cp-gimplify.c (cp_fold): Likewise.
513 * cvt.c (force_rvalue, ocp_convert): Likewise.
514 * decl.c (get_tuple_decomp_init): Likewise.
515 * except.c (build_throw): Likewise.
516 * init.c (perform_member_init, expand_default_init): Likewise.
517 * method.c (do_build_copy_assign, locate_fn_flags): Likewise.
518 * parser.c (cp_parser_userdef_char_literal)
519 (cp_parser_userdef_numeric_literal)
520 (cp_parser_userdef_string_literal)
521 (cp_parser_perform_range_for_lookup)
522 (cp_parser_range_for_member_function, cp_parser_omp_for_loop)
523 (cp_parser_omp_for_loop_init): Likewise.
524 * pt.c (tsubst_copy_and_build, do_class_deduction): Likewise.
525 * semantics.c (calculate_direct_bases, calculate_bases)
526 (finish_omp_barrier, finish_omp_flush, finish_omp_taskwait)
527 (finish_omp_taskyield, finish_omp_cancel)
528 (finish_omp_cancellation_point): Likewise.
529 * tree.c (build_vec_init_elt, strip_typedefs, strip_typedefs_expr)
530 (build_min_non_dep_op_overload): Likewise.
531 * typeck.c (build_function_call_vec, cp_build_function_call_nary)
532 (cp_build_modify_expr): Likewise.
533 * typeck2.c (build_functional_cast): Likewise.
534
535 2019-05-11 Paolo Carlini <paolo.carlini@oracle.com>
536
537 * typeck.c (cp_build_function_call_vec): When mark_used fails
538 unconditionally return error_mark_node.
539
540 2019-05-10 Paolo Carlini <paolo.carlini@oracle.com>
541
542 * decl.c (grokvardecl): Use an accurate location in error message
543 about main as a global variable.
544
545 2019-05-10 Paolo Carlini <paolo.carlini@oracle.com>
546
547 * call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P.
548 * cp-gimplify.c (cp_fold): Likewise.
549 * cp-objcp-common.c (cp_type_dwarf_attribute): Likewise.
550 * cp-tree.h (TYPE_OBJ_P, TYPE_PTROBV_P): Likewise.
551 * cvt.c (perform_qualification_conversions): Likewise.
552 * decl.c (grokdeclarator): Likewise.
553 * decl2.c (build_memfn_type): Likewise.
554 * mangle.c (canonicalize_for_substitution, write_type): Likewise.
555 * parser.c (cp_parser_omp_declare_reduction): Likewise.
556 * pt.c (check_explicit_specialization, uses_deducible_template_parms,
557 check_cv_quals_for_unify, dependent_type_p_r): Likewise.
558 * rtti.c (ptr_initializer): Likewise.
559 * semantics.c (finish_asm_stmt, finish_offsetof,
560 cp_check_omp_declare_reduction): Likewise.
561 * tree.c (cp_build_qualified_type_real,
562 cp_build_type_attribute_variant, cxx_type_hash_eq,
563 cxx_copy_lang_qualifiers, cp_free_lang_data): Likewise.
564 * typeck.c (structural_comptypes, convert_arguments,
565 cp_build_addr_expr_1, unary_complex_lvalue, cp_build_c_cast,
566 cp_build_modify_expr, comp_ptr_ttypes_real, type_memfn_rqual):
567 Likewise.
568
569 2019-05-10 Marek Polacek <polacek@redhat.com>
570
571 PR c++/78010 - bogus -Wsuggest-override warning on final function.
572 * class.c (check_for_override): Don't warn for final functions.
573
574 2019-05-10 Jakub Jelinek <jakub@redhat.com>
575
576 PR pch/90326
577 * config-lang.in (gtfiles): Remove c-family/c-lex.c, add
578 c-family/c-cppbuiltin.c.
579
580 2019-05-09 Paolo Carlini <paolo.carlini@oracle.com>
581
582 PR c++/90382
583 Revert:
584 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
585
586 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
587 min_location.
588
589 2019-05-08 Nathan Sidwell <nathan@acm.org>
590
591 Kill DECL_SAVED_FUNCTION_DATA .
592 * cp-tree.h (language_function): Remove x_auto_return_pattern.
593 (current_function_auto_return_pattern): Delete.
594 (lang_decl_fn): Replace saved_language_function with
595 saved_auto_return type.
596 (DECL_SAVED_FUNCTION_DATA): Delete.
597 (DECL_SAVED_AUTO_RETURN_TYPE): New.
598 (FNDECL_USED_AUTO): Correct documentation.
599 * decl.c (duplicate_decls): Adjust AUTO return handling.
600 (start_preparsed_function): Replace
601 current_function_auto_return_pattern with
602 DECL_SAVED_AUTO_RETURN_TYPE. Remove DECL_SAVED_FUNCTION_DATA
603 zapping.
604 (finish_function): Likewise.
605 (save_function_data): Delete.
606 (fndecl_declared_return_type): Reimplement.
607 * mangle.c (write_unqualified_name): Use DECL_SAVED_AUTO_RETURN_TYPE.
608 * method.c (make_thunk, make_alias_for): Likewise.
609 * parser.c (cp_parser_jump_statement): Likewise.
610 * pt.c (do_auto_deduction): Likewise.
611 * typeck.c (check_return_expr): Likewise.
612
613 2019-05-06 Jason Merrill <jason@redhat.com>
614
615 PR c++/90171 - reorganize usual_deallocation_fn_p
616 * call.c (struct dealloc_info): New.
617 (usual_deallocation_fn_p): Take a dealloc_info*.
618 (aligned_deallocation_fn_p, sized_deallocation_fn_p): Remove.
619 (build_op_delete_call): Adjust.
620
621 2019-05-07 Jason Merrill <jason@redhat.com>
622
623 PR c++/86485 - -Wmaybe-unused with empty class ?:
624 * typeck.c (build_static_cast_1): Use cp_build_addr_expr.
625
626 * pt.c (type_dependent_expression_p): A non-type template parm with
627 a placeholder type is type-dependent.
628
629 2019-05-06 Marek Polacek <polacek@redhat.com>
630
631 PR c++/90265 - ICE with generic lambda.
632 * pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
633 element in the vector.
634
635 2019-05-03 Martin Liska <mliska@suse.cz>
636
637 * call.c (build_aggr_conv): Use is_empty instead of
638 elements () == 0 (and similar usages).
639 * parser.c (cp_parser_lambda_introducer): Likewise.
640
641 2019-05-02 Nathan Sidwell <nathan@acm.org>
642
643 * semantics.c (finish_id_expression_1): Remove unreachable code.
644
645 2019-05-01 Nathan Sidwell <nathan@acm.org>
646
647 * name-lookup.h (get_class_binding_direct): Change final arg to
648 bool.
649 (get_class_binding): Likewise.
650 * name-lookup.c (get_class_binding_direct): Replace TYPE_OR_FNS
651 arg with WANT_TYPE bool. Simplify.
652 (get_class_binding): Adjust final arg.
653 * decl.c (reshape_init_class): Adjust get_class_binding calls.
654
655 2019-04-30 Nathan Sidwell <nathan@acm.org>
656
657 * cp-objcp-common.c (cp_common_init_ts): Use MARK_TS_EXP for _EXPR
658 nodes. Call c_common_init_ts.
659
660 2019-04-29 Nathan Sidwell <nathan@acm.org>
661
662 * decl.c (duplicate_decls): Add whitespace, move comments into
663 conditional blocks.
664 * method.c (explain_implicit_non_constexpr): Refactor.
665 * pt.c (check_explicit_specialization): Fix indentation.
666 * semantics.c (process_outer_var_ref): Reformat.
667 (finish_id_expression_1): Use STRIP_TEMPLATE.
668
669 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
670
671 PR c++/90243 - orphaned note in uninstantiated constexpr function
672 * decl.c (check_for_uninitialized_const_var): Suppress notes if no
673 error was shown.
674
675 2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
676
677 PR c++/90173
678 * decl.c (grokdeclarator): Set type to error_mark_node
679 upon error about template placeholder type non followed
680 by a simple declarator-id.
681
682 2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
683
684 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
685 min_location.
686
687 2019-04-24 Jason Merrill <jason@redhat.com>
688
689 PR c++/90227 - error with template parameter packs.
690 * pt.c (coerce_template_parms): Do add empty pack when
691 require_all_args.
692
693 2019-04-24 Richard Biener <rguenther@suse.de>
694
695 * call.c (null_ptr_cst_p): Order checks according to expensiveness.
696 (conversion_null_warnings): Likewise.
697 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Return
698 early if type1 == type2.
699
700 2019-04-22 Jason Merrill <jason@redhat.com>
701
702 PR c++/87366 - wrong error with alias template.
703 * typeck.c (structural_comptypes): When comparing_specializations,
704 aliases are unequal.
705 (comptypes): When comparing_specializations, do structural
706 comparison.
707
708 2019-04-19 Jason Merrill <jason@redhat.com>
709
710 PR c++/90190 - CTAD with list-constructor.
711 * pt.c (do_class_deduction): Don't try the single element deduction
712 if the single element is also a braced list.
713
714 PR c++/90171 - ICE with destroying delete with size_t parm.
715 * call.c (sized_deallocation_fn_p): New. Use it instead of
716 second_parm_is_size_t in most cases.
717 (second_parm_is_size_t): Don't check for aligned.
718
719 2019-04-19 Paolo Carlini <paolo.carlini@oracle.com>
720
721 PR c++/89900
722 * pt.c (fn_type_unification): When handling null explicit
723 arguments do not special case non-parameter packs.
724
725 2019-04-19 Jakub Jelinek <jakub@redhat.com>
726
727 PR c++/90138
728 * pt.c (process_template_parm): Set decl to pushdecl result. If
729 !is_non_type, also set parm to that.
730
731 PR c/89888
732 * decl.c (struct cp_switch): Remove outside_range_p member.
733 (push_switch): Don't clear it.
734 (pop_switch): Adjust c_do_switch_warnings caller.
735 (finish_case_label): Adjust c_add_case_label caller.
736
737 PR c++/90108
738 * decl.c (duplicate_decls): If remove is main variant and
739 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
740 variant that has newdecl as TYPE_NAME if any.
741
742 2019-04-18 Jason Merrill <jason@redhat.com>
743
744 PR c++/87554 - ICE with extern template and reference member.
745 * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.
746
747 2019-04-17 Jason Merrill <jason@redhat.com>
748
749 PR c++/90047 - ICE with enable_if alias template.
750 * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the
751 hash table when we're in SFINAE context.
752
753 2019-04-17 Marek Polacek <polacek@redhat.com>
754
755 PR c++/90124 - bogus error with incomplete type in decltype.
756 * typeck.c (build_class_member_access_expr): Check
757 cp_unevaluated_operand.
758
759 2019-04-12 Jakub Jelinek <jakub@redhat.com>
760
761 PR c/89933
762 * decl.c (duplicate_decls): When newdecl's type is its main variant,
763 don't try to remove it from the variant list, but instead assert
764 it has no variants.
765
766 2019-04-12 Martin Sebor <msebor@redhat.com>
767
768 PR c/88383
769 PR c/89288
770 * parser.c (cp_parser_has_attribute_expression): Handle assignment
771 expressions.
772
773 2019-04-12 Jason Merrill <jason@redhat.com>
774
775 * call.c (null_member_pointer_value_p): Handle an empty CONSTRUCTOR
776 of PMF type.
777
778 2019-04-12 Marek Polacek <polacek@redhat.com>
779
780 * except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
781 instead of perform_implicit_conversion_flags.
782
783 PR c++/87603 - constexpr functions are no longer noexcept.
784 * constexpr.c (is_sub_constant_expr): Remove unused function.
785 * cp-tree.h (is_sub_constant_expr): Remove declaration.
786 * except.c (check_noexcept_r): Don't consider a call to a constexpr
787 function noexcept.
788
789 2019-04-11 Jakub Jelinek <jakub@redhat.com>
790
791 PR translation/90035
792 * parser.h (struct cp_parser): Add
793 type_definition_forbidden_message_arg member.
794 * parser.c (cp_debug_parser): Print it.
795 (cp_parser_check_type_definition): Pass
796 parser->type_definition_forbidden_message_arg as second argument to
797 error.
798 (cp_parser_has_attribute_expression, cp_parser_sizeof_operand): Set
799 parser->type_definition_forbidden_message_arg and use G_() with
800 %qs for parser->type_definition_forbidden_message instead of
801 building untranslatable message using concat.
802
803 2019-04-09 Jakub Jelinek <jakub@redhat.com>
804
805 PR translation/90011
806 * typeck2.c (check_narrowing): Remove trailing space from diagnostics.
807
808 2019-04-08 Marek Polacek <polacek@redhat.com>
809
810 * typeck2.c (digest_init_r): Don't condition the object slicing warning
811 on flag_checking.
812
813 2019-04-08 Paolo Carlini <paolo.carlini@oracle.com>
814
815 PR c++/89914
816 * semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P
817 when maybe_instantiate_noexcept fails.
818 (classtype_has_nothrow_assign_or_copy_p): Likewise.
819 * method.c (implicitly_declare_fn): Avoid passing error_mark_node
820 to build_exception_variant.
821
822 2019-04-05 Marek Polacek <polacek@redhat.com>
823
824 PR c++/87145 - bogus error converting class type in template arg list.
825 * pt.c (convert_nontype_argument): Don't call
826 build_converted_constant_expr if it could involve calling a conversion
827 function with a instantiation-dependent constructor as its argument.
828
829 2019-04-05 Martin Sebor <msebor@redhat.com>
830
831 PR bootstrap/89980
832 * decl.c (reshape_init_array_1): Avoid treating empty strings
833 as zeros in array initializers.
834 Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT().
835
836 2019-04-04 Jason Merrill <jason@redhat.com>
837
838 PR c++/89948 - ICE with break in statement-expr.
839 * constexpr.c (cxx_eval_statement_list): Jumping out of a
840 statement-expr is non-constant.
841
842 2019-04-04 Jason Merrill <jason@redhat.com>
843
844 PR c++/89966 - error with non-type auto tparm.
845 * pt.c (do_auto_deduction): Clear tf_partial.
846
847 2019-04-04 Jason Merrill <jason@redhat.com>
848
849 PR c++/86986 - ICE with TTP with parameter pack.
850 * pt.c (coerce_template_parameter_pack): Only look at the type of a
851 non-type parameter pack.
852 (fixed_parameter_pack_p_1): Don't recurse into the type of a
853 non-type parameter pack.
854 (coerce_template_template_parms): Call add_outermost_template_args.
855
856 2019-04-04 Martin Sebor <msebor@redhat.com>
857
858 PR c++/89974
859 PR c++/89878
860 PR c++/89833
861 PR c++/47488
862 * decl.c (reshape_init_array_1): Strip trailing zero-initializers
863 from arrays of trivial type and known size.
864 * mangle.c (write_expression): Convert braced initializer lists
865 to STRING_CSTs.
866 (write_expression): Trim trailing zero-initializers from arrays
867 of trivial type.
868 (write_template_arg_literal): Mangle strings the same as braced
869 initializer lists.
870
871 2019-04-03 Jason Merrill <jason@redhat.com>
872
873 PR c++/81866 - ICE with member template and default targ.
874 * pt.c (tsubst_template_decl): Handle getting a type from
875 retrieve_specialization.
876
877 PR c++/86586 - -fcompare-debug=-Wsign-compare.
878 * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare.
879
880 PR c++/89331 - ICE with offsetof in incomplete class.
881 * semantics.c (finish_offsetof): Handle error_mark_node.
882 * typeck.c (build_class_member_access_expr): Call
883 complete_type_or_maybe_complain before converting to base.
884
885 PR c++/89917 - ICE with lambda in variadic mem-init.
886 * pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
887
888 2019-04-01 Jason Merrill <jason@redhat.com>
889
890 PR c++/86946 - ICE with function call in template argument.
891 DR 1321
892 * pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use
893 dependent_name.
894
895 2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
896
897 PR c++/62207
898 * pt.c (tsubst_copy): Deal with lookup_name not returing a variable.
899
900 2019-03-31 Marek Polacek <polacek@redhat.com>
901
902 PR c++/89852 - ICE with C++11 functional cast with { }.
903 * constexpr.c (fold_non_dependent_expr_template): New static function
904 broken out of...
905 (fold_non_dependent_expr): ...here.
906 (fold_non_dependent_init): New function.
907 * cp-tree.h (fold_non_dependent_init): Declare.
908 * typeck2.c (massage_init_elt): Call fold_non_dependent_init instead
909 of fold_non_dependent_expr. Don't call maybe_constant_init.
910
911 2019-03-30 Jason Merrill <jason@redhat.com>
912
913 PR c++/89744 - ICE with specialization of member class template.
914 * pt.c (lookup_template_class_1): If the partial instantiation is
915 explicitly specialized, adjust.
916 (maybe_process_partial_specialization): Also adjust
917 CLASSTYPE_TI_ARGS.
918
919 2019-03-29 Jakub Jelinek <jakub@redhat.com>
920
921 PR sanitizer/89869
922 * typeck.c: Include gimplify.h.
923 (cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
924 for second time. Formatting fixes.
925
926 2019-03-29 Marek Polacek <polacek@redhat.com>
927
928 PR c++/89876 - ICE with deprecated conversion.
929 * call.c (convert_like_real): Only give warnings with tf_warning.
930
931 2019-03-28 Marek Polacek <polacek@redhat.com>
932
933 PR c++/89612 - ICE with member friend template with noexcept.
934 * pt.c (maybe_instantiate_noexcept): For function templates, use their
935 template result (function decl). Don't set up local specializations.
936 Temporarily turn on processing_template_decl. Update the template type
937 too.
938
939 PR c++/89836 - bool constant expression and explicit conversions.
940 * call.c (build_converted_constant_expr_internal): New function,
941 renamed from...
942 (build_converted_constant_expr): ...this. New.
943 (build_converted_constant_bool_expr): New.
944 * cp-tree.h (build_converted_constant_bool_expr): Declare.
945 * decl.c (build_explicit_specifier): Call
946 build_converted_constant_bool_expr.
947
948 2019-03-28 Jakub Jelinek <jakub@redhat.com>
949
950 PR c++/89785
951 * constexpr.c (struct check_for_return_continue_data): New type.
952 (check_for_return_continue): New function.
953 (potential_constant_expression_1) <case SWITCH_STMT>: Walk
954 SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
955 in loop bodies and set *jump_target to that if found.
956
957 2019-03-27 Jason Merrill <jason@redhat.com>
958
959 PR c++/89831 - error with qualified-id in const member function.
960 * semantics.c (finish_non_static_data_member): Use object cv-quals
961 in scoped case, too.
962
963 PR c++/89421 - ICE with lambda in template parameter list.
964 * parser.c (cp_parser_lambda_expression): Also reject a lambda in a
965 template parameter list before C++20.
966 * pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
967 * semantics.c (begin_class_definition): Restore error about defining
968 non-lambda class in template parm list.
969
970 2019-03-26 Jason Merrill <jason@redhat.com>
971
972 PR c++/86932 - missed SFINAE with empty pack.
973 * pt.c (coerce_template_parms): Don't add an empty pack if
974 tf_partial.
975 (fn_type_unification): Pass tf_partial to coerce_template_parms.
976
977 PR c++/86429 - constexpr variable in lambda.
978 PR c++/82643
979 PR c++/87327
980 * constexpr.c (cxx_eval_constant_expression): In a lambda function,
981 try evaluating the captured variable directly.
982
983 2019-03-26 Jakub Jelinek <jakub@redhat.com>
984
985 PR c++/89796
986 * semantics.c (finish_omp_atomic): Add warning_sentinel for
987 -Wunused-value around finish_expr_stmt call.
988
989 2019-03-25 Paolo Carlini <paolo.carlini@oracle.com>
990
991 PR c++/84661
992 PR c++/85013
993 * parser.c (cp_parser_binary_expression): Don't call cp_fully_fold
994 to undo the disabling of warnings.
995
996 2019-03-25 Jason Merrill <jason@redhat.com>
997
998 PR c++/87748 - substitution failure error with decltype.
999 * pt.c (most_specialized_partial_spec): Clear
1000 processing_template_decl.
1001
1002 2019-03-25 Marek Polacek <polacek@redhat.com>
1003
1004 PR c++/89214 - ICE when initializing aggregates with bases.
1005 * typeck2.c (digest_init_r): Warn about object slicing instead of
1006 crashing.
1007
1008 PR c++/89705 - ICE with reference binding with conversion function.
1009 * call.c (reference_binding): If the result of the conversion function
1010 is a prvalue of non-class type, use the cv-unqualified type.
1011
1012 2019-03-25 Nathan Sidwell <nathan@acm.org>
1013
1014 * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group.
1015
1016 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR c++/60702
1019 * cp-tree.h (get_tls_wrapper_fn): Remove declaration.
1020 (maybe_get_tls_wrapper_call): Declare.
1021 * decl2.c (get_tls_wrapper_fn): Make static.
1022 (maybe_get_tls_wrapper_call): New function.
1023 * typeck.c (build_class_member_access_expr): Handle accesses to TLS
1024 variables.
1025 * semantics.c (finish_qualified_id_expr): Likewise.
1026 (finish_id_expression_1): Use maybe_get_tls_wrapper_call.
1027 * pt.c (tsubst_copy_and_build): Likewise.
1028
1029 PR c++/87481
1030 * constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
1031 (cxx_eval_constant_expression): When not skipping, not constant class
1032 or location wrapper, increment *ctx->constexpr_ops_count and if it is
1033 above constexpr_loop_nest_limit, diagnose failure.
1034 (cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
1035 initialize ctx.constexpr_ops_count to its address.
1036 (is_sub_constant_expr): Likewise.
1037
1038 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1039
1040 PR c++/71446
1041 * call.c (filed_in_pset): Change pset from hash_set<tree> * to
1042 hash_set<tree, true> &, adjust uses accordingly.
1043 (build_aggr_conv): Change pset from hash_set<tree> *
1044 to hash_set<tree, true>. Replace goto fail; with return NULL;,
1045 adjust pset uses.
1046
1047 PR c++/89767
1048 * parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
1049 variables, check for duplicates in this function.
1050 * lambda.c (add_capture): Don't check for duplicates nor use
1051 IDENTIFIER_MARKED.
1052 (register_capture_members): Don't clear IDENTIFIER_MARKED here.
1053
1054 2019-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1055
1056 PR c++/89571
1057 * method.c (after_nsdmi_defaulted_late_checks): Avoid passing
1058 error_mark_node to comp_except_specs.
1059
1060 2019-03-20 Jason Merrill <jason@redhat.com>
1061
1062 PR c++/87480 - decltype of member access in default template arg
1063 * pt.c (type_unification_real): Accept a dependent result in
1064 template context.
1065
1066 2019-03-19 Martin Sebor <msebor@redhat.com>
1067
1068 PR tree-optimization/89688
1069 * typeck2.c (store_init_value): Call braced_lists_to_string for more
1070 kinds of initializers.
1071
1072 2019-03-18 Jason Merrill <jason@redhat.com>
1073
1074 PR c++/89630 - ICE with dependent using-decl as template arg.
1075 * tree.c (cp_tree_equal): Always return false for USING_DECL.
1076
1077 PR c++/89761 - ICE with sizeof... in pack expansion.
1078 * pt.c (argument_pack_element_is_expansion_p): Handle
1079 ARGUMENT_PACK_SELECT.
1080
1081 PR c++/89640 - GNU attributes on lambda.
1082 * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes.
1083
1084 PR c++/89682 - wrong access error in default argument.
1085 * pt.c (tsubst_default_argument): Don't defer access checks.
1086
1087 2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1088
1089 PR c++/85014
1090 * semantics.c (finish_non_static_data_member): Check return value
1091 of context_for_name_lookup and immediately return error_mark_node
1092 if isn't a type.
1093
1094 2019-03-17 Jason Merrill <jason@redhat.com>
1095
1096 PR c++/89571 - ICE with ill-formed noexcept on constructor.
1097 * pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
1098 (regenerate_decl_from_template): Use it for noexcept-specs.
1099
1100 2019-03-14 Jason Merrill <jason@redhat.com>
1101
1102 * parser.c (cp_parser_decl_specifier_seq): Support C++20
1103 concept-definition syntax without 'bool'.
1104
1105 2019-03-14 Jakub Jelinek <jakub@redhat.com>
1106
1107 PR c++/89512
1108 * semantics.c (finish_qualified_id_expr): Reject variable templates.
1109
1110 PR c++/89652
1111 * constexpr.c (struct constexpr_ctx): Change save_exprs type from
1112 hash_set<tree> to vec<tree>.
1113 (cxx_eval_call_expression): Adjust for save_exprs being a vec instead
1114 of hash_set.
1115 (cxx_eval_loop_expr): Likewise. Truncate the vector after each
1116 removal of SAVE_EXPRs from values.
1117 (cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
1118 method on save_exprs instead of add.
1119
1120 2019-03-13 Jason Merrill <jason@redhat.com>
1121
1122 PR c++/86521 - C++17 copy elision in initialization by constructor.
1123 * call.c (joust_maybe_elide_copy): New.
1124 (joust): Call it.
1125
1126 2019-03-13 Marek Polacek <polacek@redhat.com>
1127
1128 PR c++/88979 - further P0634 fix for constructors.
1129 * parser.c (cp_parser_decl_specifier_seq): Pass flags to
1130 cp_parser_constructor_declarator_p.
1131 (cp_parser_direct_declarator): Allow missing typename for constructor
1132 parameters.
1133 (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to
1134 cp_parser_type_specifier.
1135
1136 PR c++/89686 - mixing init-capture and simple-capture in lambda.
1137 * parser.c (cp_parser_lambda_introducer): Give error when combining
1138 init-capture and simple-capture.
1139
1140 PR c++/89660 - bogus error with -Wredundant-move.
1141 * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
1142 as the std::move's argument. Don't call convert_for_initialization
1143 when warn_redundant_move isn't on.
1144
1145 2019-03-11 Jason Merrill <jason@redhat.com>
1146
1147 PR c++/86521 - wrong overload resolution with ref-qualifiers.
1148 * call.c (build_user_type_conversion_1): Don't use a conversion to a
1149 reference of the wrong rvalueness for direct binding.
1150
1151 2019-03-11 Martin Liska <mliska@suse.cz>
1152
1153 * cvt.c (build_expr_type_conversion): Wrap apostrophes
1154 in gcc internal format with %'.
1155 * decl.c (check_no_redeclaration_friend_default_args): Likewise.
1156 (grokfndecl): Likewise.
1157 * name-lookup.c (do_pushtag): Likewise.
1158 * pt.c (unify_parameter_deduction_failure): Likewise.
1159 (unify_template_deduction_failure): Likewise.
1160
1161 2019-03-11 Martin Liska <mliska@suse.cz>
1162
1163 * call.c (convert_arg_to_ellipsis): Wrap an option name
1164 in a string format message and fix GNU coding style.
1165 (build_over_call): Likewise.
1166 * class.c (check_field_decl): Likewise.
1167 (layout_nonempty_base_or_field): Likewise.
1168 * constexpr.c (cxx_eval_loop_expr): Likewise.
1169 * cvt.c (type_promotes_to): Likewise.
1170 * decl.c (cxx_init_decl_processing): Likewise.
1171 (mark_inline_variable): Likewise.
1172 (grokdeclarator): Likewise.
1173 * decl2.c (record_mangling): Likewise.
1174 * error.c (maybe_warn_cpp0x): Likewise.
1175 * except.c (doing_eh): Likewise.
1176 * mangle.c (maybe_check_abi_tags): Likewise.
1177 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1178 (cp_parser_userdef_numeric_literal): Likewise.
1179 (cp_parser_primary_expression): Likewise.
1180 (cp_parser_unqualified_id): Likewise.
1181 (cp_parser_pseudo_destructor_name): Likewise.
1182 (cp_parser_builtin_offsetof): Likewise.
1183 (cp_parser_lambda_expression): Likewise.
1184 (cp_parser_lambda_introducer): Likewise.
1185 (cp_parser_lambda_declarator_opt): Likewise.
1186 (cp_parser_selection_statement): Likewise.
1187 (cp_parser_init_statement): Likewise.
1188 (cp_parser_decomposition_declaration): Likewise.
1189 (cp_parser_function_specifier_opt): Likewise.
1190 (cp_parser_static_assert): Likewise.
1191 (cp_parser_simple_type_specifier): Likewise.
1192 (cp_parser_namespace_definition): Likewise.
1193 (cp_parser_using_declaration): Likewise.
1194 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1195 (cp_parser_initializer_list): Likewise.
1196 (cp_parser_type_parameter_key): Likewise.
1197 (cp_parser_member_declaration): Likewise.
1198 (cp_parser_try_block): Likewise.
1199 (cp_parser_std_attribute_spec): Likewise.
1200 (cp_parser_requires_clause_opt): Likewise.
1201 * pt.c (check_template_variable): Likewise.
1202 (check_default_tmpl_args): Likewise.
1203 (push_tinst_level_loc): Likewise.
1204 (instantiate_pending_templates): Likewise.
1205 (invalid_nontype_parm_type_p): Likewise.
1206 * repo.c (get_base_filename): Likewise.
1207 * rtti.c (typeid_ok_p): Likewise.
1208 (build_dynamic_cast_1): Likewise.
1209 * tree.c (maybe_warn_parm_abi): Likewise.
1210
1211 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1212
1213 PR other/80058
1214 * parser.c (cp_parser_template_declaration_after_parameters): Avoid
1215 one space before " at the end of line and another after " on another
1216 line in a string literal.
1217
1218 PR tree-optimization/89550
1219 * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if
1220 warning_at returned true.
1221 * decl2.c (c_parse_final_cleanups): Likewise.
1222 * typeck.c (convert_for_assignment): Likewise.
1223 * decl.c (finish_function): Likewise.
1224
1225 PR c++/89585
1226 * parser.c (cp_parser_asm_definition): Just warn instead of error
1227 on volatile qualifier outside of function body.
1228
1229 PR c++/89599
1230 * constexpr.c (potential_constant_expression_1): Reject
1231 REINTERPRET_CAST_P NOP_EXPRs.
1232
1233 PR c++/89622
1234 * call.c (joust): Call print_z_candidate only if pedwarn returned
1235 true.
1236
1237 2019-03-07 Jason Merrill <jason@redhat.com>
1238
1239 PR c++/88123 - lambda and using-directive.
1240 * name-lookup.c (op_unqualified_lookup)
1241 (maybe_save_operator_binding, discard_operator_bindings)
1242 (push_operator_bindings): New.
1243 * typeck.c (build_x_binary_op, build_x_unary_op): Call
1244 maybe_save_operator_binding.
1245 * decl.c (start_preparsed_function): Call push_operator_bindings.
1246 * tree.c (cp_free_lang_data): Call discard_operator_bindings.
1247
1248 PR c++/88820 - ICE with CTAD and member template used in DMI.
1249 * pt.c (do_class_deduction): Handle parm used as its own arg.
1250
1251 2019-03-07 Jakub Jelinek <jakub@redhat.com>
1252
1253 PR c++/89585
1254 * parser.c (cp_parser_asm_definition): Parse asm qualifiers even
1255 at toplevel, but diagnose them.
1256
1257 2019-03-06 Jason Merrill <jason@redhat.com>
1258
1259 PR c++/89381 - implicit copy and using-declaration.
1260 * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider
1261 op= brought in by a using-declaration.
1262
1263 2019-03-06 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR c++/87148
1266 * init.c (build_value_init_noctor): Ignore flexible array members.
1267
1268 2019-03-06 Jason Merrill <jason@redhat.com>
1269
1270 PR c++/89576 - if constexpr of lambda capture.
1271 * semantics.c (maybe_convert_cond): Do convert a non-dependent
1272 condition in a template.
1273 * typeck.c (condition_conversion): Handle being called in a
1274 template.
1275
1276 2019-03-06 Marek Polacek <polacek@redhat.com>
1277
1278 PR c++/87378 - bogus -Wredundant-move warning.
1279 * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
1280 overload resolution would actually succeed.
1281
1282 2019-03-05 Jason Merrill <jason@redhat.com>
1283
1284 * class.c (is_really_empty_class): Add ignore_vptr parm.
1285 (trivial_default_constructor_is_constexpr): Pass it.
1286 * call.c (build_over_call): Pass it.
1287 * constexpr.c (cxx_eval_constant_expression): Pass it instead of
1288 checking TYPE_POLYMORPHIC_P.
1289 (cxx_eval_component_reference, potential_constant_expression_1):
1290 Pass it.
1291 * cp-gimplify.c (simple_empty_class_p): Pass it.
1292 * init.c (expand_aggr_init_1): Pass it.
1293
1294 2019-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1295
1296 PR c++/84605
1297 * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too.
1298
1299 2019-03-04 Jakub Jelinek <jakub@redhat.com>
1300
1301 PR c++/71446
1302 * call.c (field_in_pset): New function.
1303 (build_aggr_conv): Handle CONSTRUCTOR_IS_DESIGNATED_INIT correctly.
1304
1305 2019-03-02 Jakub Jelinek <jakub@redhat.com>
1306
1307 PR c++/71446
1308 * cp-tree.h (CONSTRUCTOR_IS_DESIGNATED_INIT): Define.
1309 * parser.c (cp_parser_braced_list): Adjust cp_parser_initializer_list
1310 caller, set CONSTRUCTOR_IS_DESIGNATED_INIT.
1311 (cp_parser_initializer_list): Add designated parameter, set *designated
1312 to a bool whether any designators were parsed.
1313 * decl.c (reshape_init): Copy over CONSTRUCTOR_IS_DESIGNATED_INIT if
1314 needed.
1315 * pt.c (tsubst_copy_and_build): Likewise.
1316 * call.c (implicit_conversion): If CONSTRUCTOR_IS_DESIGNATED_INIT,
1317 don't call build_list_conv, nor build_complex_conv, nor attempt to
1318 convert a single element initializer to scalar.
1319
1320 2019-03-01 Marek Polacek <polacek@redhat.com>
1321
1322 PR c++/89537 - missing location for error with non-static member fn.
1323 * call.c (resolve_args): Use EXPR_LOCATION.
1324 * typeck.c (build_class_member_access_expr): Use input_location.
1325
1326 PR c++/89532 - ICE with incomplete type in decltype.
1327 * semantics.c (finish_compound_literal): Return error_mark_node
1328 if digest_init_flags returns error_mark_node.
1329
1330 2019-03-01 Jakub Jelinek <jakub@redhat.com>
1331
1332 Implement P1002R1, Try-catch blocks in constexpr functions
1333 PR c++/89513
1334 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
1335 Diagnose constexpr ctor or function with function-try-block with
1336 pedwarn for c++17 and earlier. Formatting fix.
1337 (cp_parser_try_block): Use pedwarn instead of error and only for
1338 c++17 and earlier when try block appears in constexpr function.
1339 * constexpr.c (build_constexpr_constructor_member_initializers):
1340 Handle TRY_BLOCK here instead of erroring on it.
1341
1342 2019-02-28 Jason Merrill <jason@redhat.com>
1343
1344 PR c++/88183 - ICE with .* fold-expression.
1345 * pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
1346
1347 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1348 * class.c, lambda.c, pt.c: Revert earlier change.
1349 * lambda.c (add_capture): Don't special-case capture of dependent
1350 VLA.
1351
1352 * name-lookup.c (print_binding_level): Print this_entity.
1353
1354 2019-02-27 Marek Polacek <polacek@redhat.com>
1355
1356 PR c++/88857 - ICE with value-initialization of argument in template.
1357 * call.c (convert_like_real): Don't call build_value_init in template.
1358
1359 2019-02-27 Jason Merrill <jason@redhat.com>
1360
1361 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1362 * semantics.c (process_outer_var_ref): Do capture dependent vars.
1363 * class.c (finish_struct): Only add TAG_DEFN if T is in
1364 current_function_decl.
1365 * lambda.c (vla_capture_type): Force the capture type out into the
1366 lambda's enclosing function.
1367 (add_capture): Pass in the lambda.
1368 * pt.c (tsubst_lambda_expr): complete_type a VLA capture type.
1369
1370 2019-02-27 Marek Polacek <polacek@redhat.com>
1371
1372 PR c++/89511 - ICE with using-declaration and unscoped enumerator.
1373 * parser.c (cp_parser_using_declaration): For an unscoped enum
1374 only use its context if it's not a function declaration.
1375
1376 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1377
1378 PR c++/89488
1379 * method.c (process_subob_fn): When maybe_instantiate_noexcept
1380 returns false don't call merge_exception_specifiers.
1381
1382 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1383
1384 PR c++/88987
1385 * parser.c (cp_parser_noexcept_specification_opt): Return NULL_TREE
1386 for a non-constant parsed expression.
1387
1388 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1389
1390 PR c++/89481
1391 * constexpr.c (cxx_eval_store_expression): When changing active union
1392 member, set no_zero_init.
1393
1394 2019-02-23 Marek Polacek <polacek@redhat.com>
1395
1396 PR c++/88294 - ICE with non-constant noexcept-specifier.
1397 * pt.c (maybe_instantiate_noexcept): Set up the list of local
1398 specializations. Set current_class_{ptr,ref}.
1399
1400 2019-02-22 David Malcolm <dmalcolm@redhat.com>
1401
1402 PR c++/89390
1403 * parser.c (cp_parser_unqualified_id): Capture and use locations
1404 for destructors.
1405
1406 2019-02-22 Marek Polacek <polacek@redhat.com>
1407
1408 PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
1409 * decl.c (build_explicit_specifier): Don't check
1410 processing_template_decl. Call instantiation_dependent_expression_p
1411 instead of value_dependent_expression_p. Call
1412 instantiate_non_dependent_expr_sfinae before
1413 build_converted_constant_expr instead of calling
1414 instantiate_non_dependent_expr after it. Add
1415 processing_template_decl_sentinel.
1416
1417 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1418
1419 * parser.c (cp_parser_oacc_simple_clause): Remove parser formal
1420 parameter, move loc formal parameter to the front. Adjust all
1421 users.
1422 (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust
1423 all users.
1424
1425 2019-02-21 Jason Merrill <jason@redhat.com>
1426
1427 PR c++/87685 - generic lambda 'this' capture error.
1428 * lambda.c (lambda_expr_this_capture): Change add_capture_p to int.
1429 (maybe_generic_this_capture): Pass -1.
1430
1431 PR c++/88394 - ICE with VLA init-capture.
1432 * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE.
1433
1434 PR c++/88869 - C++17 ICE with CTAD and explicit specialization.
1435 * pt.c (do_class_deduction): Don't include explicit specialization
1436 args in outer_args.
1437
1438 PR c++/89422 - ICE with -g and lambda in default arg in template.
1439 * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
1440
1441 2019-02-21 Jason Merrill <jason@redhat.com>
1442
1443 PR c++/88419 - C++17 ICE with class template arg deduction.
1444 * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
1445 CLASS_PLACEHOLDER_TEMPLATE.
1446
1447 2019-02-21 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR c++/89285
1450 * constexpr.c (struct constexpr_fundef): Add parms and result members.
1451 (retrieve_constexpr_fundef): Adjust for the above change.
1452 (register_constexpr_fundef): Save constexpr body with copy_fn,
1453 temporarily set DECL_CONTEXT on DECL_RESULT before that.
1454 (get_fundef_copy): Change FUN argument to FUNDEF with
1455 constexpr_fundef * type, grab body and parms/result out of
1456 constexpr_fundef struct and temporarily change it for copy_fn calls
1457 too.
1458 (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily
1459 adjust current_function_decl from ctx->call context. Test
1460 !potential_constant_expression instead of !is_constant_expression.
1461 (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo
1462 convert_for_arg_passing changes for TREE_ADDRESSABLE type passing.
1463 (cxx_eval_call_expression): Adjust get_fundef_copy caller.
1464 (cxx_eval_conditional_expression): For IF_STMT, allow then or else
1465 operands to be NULL.
1466 (label_matches): Handle BREAK_STMT and CONTINUE_STMT.
1467 (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT.
1468 (cxx_eval_switch_expr): Add support for SWITCH_STMT.
1469 (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT,
1470 DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT.
1471 For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore
1472 DECL_EXPR with USING_DECL operand.
1473 * lambda.c (maybe_add_lambda_conv_op): Build thisarg using
1474 build_int_cst to make it a valid constant expression.
1475
1476 2019-02-20 Jason Merrill <jason@redhat.com>
1477
1478 PR c++/88690 - C++17 ICE with empty base in aggregate.
1479 * typeck2.c (process_init_constructor_record): Skip trivial
1480 initialization of an empty base.
1481
1482 2019-02-21 Richard Biener <rguenther@suse.de>
1483
1484 PR middle-end/89392
1485 * vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
1486 make symtab process new functions here.
1487
1488 2019-02-20 Jason Merrill <jason@redhat.com>
1489
1490 PR c++/87921 - wrong error with inline static data member.
1491 * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P
1492 for a non-template inline variable. Do nothing for an
1493 already-instantiated variable.
1494 (c_parse_final_cleanups): Check DECL_IN_AGGR_P without
1495 DECL_INLINE_VAR_P.
1496 * decl.c (check_initializer): Likewise.
1497 (make_rtl_for_nonlocal_decl): Likewise.
1498 * pt.c (instantiate_decl): Likewise.
1499 * typeck2.c (store_init_value): Likewise.
1500
1501 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1502
1503 PR c++/89403
1504 * decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
1505 for flag_syntax_only from here...
1506 * semantics.c (expand_or_defer_fn_1): ... here.
1507
1508 PR c++/89405
1509 * decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
1510 DECL_COMMON, set DECL_INTERFACE_KNOWN.
1511
1512 PR c++/89336
1513 * constexpr.c (cxx_eval_store_expression): Diagnose changing of active
1514 union member for -std=c++17 and earlier.
1515
1516 2019-02-19 Jason Merrill <jason@redhat.com>
1517
1518 PR c++/87513 - 'sorry' mangling PMF template-id.
1519 * mangle.c (write_expression): Handle SCOPE_REF to BASELINK.
1520
1521 2019-02-19 Jason Merrill <jason@redhat.com>
1522
1523 PR c++/88380 - wrong-code with flexible array and NSDMI.
1524 * typeck2.c (process_init_constructor_record): Skip flexarrays.
1525
1526 2019-02-20 will wray <wjwray@gmail.com>
1527
1528 PR c++/88572 - wrong handling of braces on scalar init.
1529 * decl.c (reshape_init_r): Allow braces around scalar initializer
1530 within aggregate init. Reject double braced-init of scalar
1531 variable.
1532
1533 2019-02-20 Paolo Carlini <paolo.carlini@oracle.com>
1534
1535 PR c++/84536
1536 * pt.c (tsubst_init): Diagnose an initializer expanding to an
1537 empty list of expressions; tweak wrt dependent types.
1538 (regenerate_decl_from_template): For VAR_DECLs call tsubst_init
1539 instead of tsubst_expr.
1540
1541 2019-02-19 Jason Merrill <jason@redhat.com>
1542
1543 PR c++/88368 - wrong 'use of deleted function'
1544 * method.c (walk_field_subobs): Remember errors from get_nsdmi.
1545 (get_defaulted_eh_spec): Call push_tinst_level.
1546 * pt.c (maybe_instantiate_noexcept): Keep error_mark_node.
1547 * typeck2.c (merge_exception_specifiers): Handle error_mark_node.
1548
1549 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1550
1551 PR c/87924
1552 * parser.c (cp_parser_oacc_clause_wait): Add representation of wait
1553 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1554
1555 2019-02-19 Jakub Jelinek <jakub@redhat.com>
1556
1557 PR c++/89387
1558 * lambda.c (maybe_generic_this_capture): Don't check
1559 DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
1560
1561 PR c++/89391
1562 * typeck.c (build_reinterpret_cast_1): Don't handle void to
1563 && conversion go through build_target_expr_with_type.
1564
1565 PR c++/89390
1566 * error.c (qualified_name_lookup_error): Only call
1567 suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
1568
1569 2019-02-19 Tom Honermann <tom@honermann.net>
1570
1571 * name-lookup.c (get_std_name_hint): Added u8string as a name hint.
1572
1573 2019-02-18 Jason Merrill <jason@redhat.com>
1574
1575 PR c++/89336 - multiple stores in constexpr stmt.
1576 * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
1577 assigned value.
1578
1579 * pt.c (check_explicit_specialization): If the declarator is a
1580 template-id, only check whether the arguments are dependent.
1581
1582 Improve duplicate [[likely]] diagnostic.
1583 * parser.c (cp_parser_statement): Make attrs_loc a range. Pass it
1584 to process_stmt_hotness_attribute.
1585 * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc.
1586 (genericize_if_stmt): Use likely/unlikely instead of predictor_name.
1587
1588 2019-02-17 Marek Polacek <polacek@redhat.com>
1589
1590 PR c++/89217 - ICE with list-initialization in range-based for loop.
1591 * constexpr.c (unshare_constructor): No longer static.
1592 * cp-tree.h (unshare_constructor): Declare.
1593 * semantics.c (finish_compound_literal): When dealing with a
1594 non-dependent expression in a template, return the original
1595 expression. Pass LOOKUP_NO_NARROWING to digest_init_flags.
1596
1597 2019-02-13 Marek Polacek <polacek@redhat.com>
1598
1599 PR c++/89297 - ICE with OVERLOAD in template.
1600 * semantics.c (finish_compound_literal): Call
1601 instantiate_non_dependent_expr_sfinae.
1602
1603 2019-02-13 Alexandre Oliva <aoliva@redhat.com>
1604
1605 PR c++/86379
1606 * cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
1607 * name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
1608 * search.c (protected_accessible_p): Follow USING_DECL_DECLS.
1609 (shared_member_p): Likewise.
1610 (lookup_member): Likewise.
1611 * decl.c (grok_special_member_properties): Skip USING_DECLs.
1612 * semantics.c (finish_omp_declare_simd_methods): Likewise.
1613 (finish_qualified_id_expr): Do not call shared_member_p with
1614 a dependent expr.
1615
1616 PR c++/87322
1617 * pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
1618 Move cp_evaluated resetting before signature tsubsting.
1619 (gen_elem_of_pack_expansion_instantiation): Separate local
1620 specializations per index.
1621
1622 2019-02-13 David Malcolm <dmalcolm@redhat.com>
1623
1624 PR c++/89036
1625 * class.c (add_method): Drop destructor assertion.
1626
1627 2019-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1628
1629 PR c++/88986
1630 * decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
1631 context (the first argument).
1632 * pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
1633 as context.
1634
1635 2019-02-12 Jason Merrill <jason@redhat.com>
1636
1637 PR c++/89144 - link error with constexpr initializer_list.
1638 * call.c (convert_like_real) [ck_list]: Don't allocate a temporary
1639 array for an empty list.
1640 * typeck2.c (store_init_value): Don't use cxx_constant_init in a
1641 template.
1642
1643 2019-02-11 Jason Merrill <jason@redhat.com>
1644
1645 PR c++/89241 - ICE with __func__ in lambda in template.
1646 * pt.c (enclosing_instantiation_of): Also check
1647 instantiated_lambda_fn_p for the template context.
1648
1649 2019-02-11 Marek Polacek <polacek@redhat.com>
1650
1651 PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
1652 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
1653 null member pointer value.
1654
1655 2019-02-11 Jakub Jelinek <jakub@redhat.com>
1656
1657 PR c++/88977
1658 * pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
1659 to maybe_constant_value calls.
1660
1661 2019-02-11 Marek Polacek <polacek@redhat.com>
1662
1663 * typeck2.c (digest_init_r): Remove commented code.
1664
1665 2019-02-11 Martin Sebor <msebor@redhat.com>
1666
1667 PR c++/87996
1668 * decl.c (compute_array_index_type_loc): Preserve signed sizes
1669 for diagnostics. Call valid_array_size_p instead of error.
1670 * init.c (build_new_1): Compute size for diagnostic. Call
1671 invalid_array_size_error
1672 (build_new): Call valid_array_size_p instead of error.
1673
1674 2019-02-07 Alexandre Oliva <aoliva@redhat.com>
1675
1676 PR c++/86218
1677 * call.c (compare_ics): Deal with ck_aggr in either cs.
1678
1679 2019-02-06 David Malcolm <dmalcolm@redhat.com>
1680
1681 PR c++/71302
1682 * call.c (get_location_for_expr_unwinding_for_system_header): New
1683 function.
1684 (conversion_null_warnings): Use it when getting locations for
1685 EXPR, effectively adding a call to
1686 get_location_for_expr_unwinding_for_system_header for
1687 -Wconversion-null and making use of EXPR_LOCATION for
1688 -Wzero-as-null-pointer-constant.
1689
1690 2019-02-05 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c++/89187
1693 * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on
1694 PARM_DECLs of the thunk.
1695 * lambda.c (maybe_add_lambda_conv_op): Likewise.
1696
1697 2019-02-05 Marek Polacek <polacek@redhat.com>
1698
1699 PR c++/89158 - by-value capture of constexpr variable broken.
1700 * call.c (convert_like_real) <case ck_user>: Call mark_exp_read
1701 instead of mark_rvalue_use.
1702
1703 2019-02-05 Alexandre Oliva <aoliva@redhat.com>
1704
1705 PR c++/87770
1706 * pt.c (instantiates_primary_template_p): New.
1707 (type_dependent_expression_p): Use it.
1708
1709 2019-02-01 Jason Merrill <jason@redhat.com>
1710
1711 PR c++/88761 - ICE with reference capture of constant.
1712 * lambda.c (mark_const_cap_r): Do walk subtrees of DECL_EXPR for
1713 non-proxy decls.
1714
1715 2019-02-01 Marek Polacek <polacek@redhat.com>
1716
1717 PR c++/88325 - ICE with invalid out-of-line template member definition.
1718 * parser.c (cp_parser_class_name): Don't call make_typename_type
1719 for overloads.
1720
1721 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1722
1723 PR c++/87175
1724 * parser.c (cp_parser_gnu_attributes_opt): Set ok to false
1725 if require_open failed.
1726
1727 2019-01-31 Marek Polacek <polacek@redhat.com>
1728
1729 PR c++/89083, c++/80864 - ICE with list initialization in template.
1730 * constexpr.c (adjust_temp_type): Use copy_node and change the type
1731 instead of using build_constructor.
1732 * decl.c (reshape_init_r): Don't reshape a digested initializer.
1733 Return the initializer for COMPOUND_LITERAL_P.
1734
1735 PR c++/88983 - ICE with switch in constexpr function.
1736 * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY.
1737 (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the
1738 label in the else branch if we found it in the then branch.
1739
1740 2019-01-30 Jason Merrill <jason@redhat.com>
1741
1742 PR c++/88752 - ICE with lambda and constexpr if.
1743 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New.
1744 * pt.c (tsubst_lambda_expr): Set it.
1745 (instantiated_lambda_fn_p): Check it.
1746 (enclosing_instantiation_of): Use it.
1747
1748 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1749
1750 PR libstdc++/88170
1751 * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
1752 a C cast in pp_c_flag_gnu_v3 mode.
1753
1754 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR c++/88988
1757 * lambda.c (is_capture_proxy): Don't return true for
1758 DECL_OMP_PRIVATIZED_MEMBER artificial vars.
1759
1760 2019-01-30 Marek Polacek <polacek@redhat.com>
1761
1762 PR c++/89119 - ICE with value-initialization in template.
1763 * pt.c (tsubst_copy_and_build): Handle RANGE_EXPR.
1764
1765 2019-01-29 Jason Merrill <jason@redhat.com>
1766
1767 PR c++/86943 - wrong code converting lambda to function pointer.
1768 * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the
1769 call. Only forward parms for decltype.
1770 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P
1771 specially.
1772 * typeck.c (check_return_expr): Don't mess with a thunk call.
1773
1774 2019-01-28 Jason Merrill <jason@redhat.com>
1775
1776 PR c++/89089 - ICE with [[no_unique_address]].
1777 PR c++/88865 - wrong layout with [[no_unique_address]].
1778 * class.c (check_field_decls): A potentially-overlapping field makes
1779 the class non-layout-POD, but not non-empty.
1780 (end_of_class): Always consider empty data members.
1781 (layout_class_type): Set DECL_SIZE for empty fields.
1782
1783 2019-01-28 Marek Polacek <polacek@redhat.com>
1784
1785 PR c++/88358 - name wrongly treated as type.
1786 * parser.c (cp_parser_direct_declarator): Don't assume a qualified-id
1787 in parameter-list is a type if the function's declarator-id is not
1788 qualified.
1789
1790 2019-01-27 Marek Polacek <polacek@redhat.com>
1791
1792 PR c++/88815 - narrowing conversion lost in decltype.
1793 PR c++/78244 - narrowing conversion in template not detected.
1794 * cp-tree.h (CONSTRUCTOR_IS_DEPENDENT): New.
1795 * pt.c (instantiation_dependent_r): Consider a CONSTRUCTOR with
1796 CONSTRUCTOR_IS_DEPENDENT instantiation-dependent.
1797 * semantics.c (finish_compound_literal): When the compound literal
1798 isn't instantiation-dependent and the type isn't type-dependent,
1799 fall back to the normal processing. Set CONSTRUCTOR_IS_DEPENDENT.
1800
1801 PR c++/89024 - ICE with incomplete enum type.
1802 * call.c (standard_conversion): When converting an
1803 ARITHMETIC_TYPE_P to an incomplete type, return NULL.
1804
1805 2019-01-25 Paolo Carlini <paolo.carlini@oracle.com>
1806
1807 PR c++/88969
1808 * call.c (build_op_delete_call): Implement 7.6.2.5/(10.1).
1809 * decl2.c (coerce_delete_type): Use build_pointer_type instead
1810 of TYPE_POINTER_TO.
1811
1812 2019-01-24 Jason Merrill <jason@redhat.com>
1813
1814 PR c++/89001 - mangling of reference temporaries
1815 * cp-tree.h (struct saved_scope): Add ref_temp_count.
1816 (current_ref_temp_count): New macro.
1817 * mangle.c (mangle_ref_init_variable): Use it.
1818 * typeck2.c (store_init_value): Clear it.
1819 * call.c (make_temporary_var_for_ref_to_temp): Copy public and
1820 comdat.
1821
1822 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR c++/88976
1825 * semantics.c (finish_omp_cancel): Diagnose more than one if
1826 on #pragma omp cancel with different modifiers. Use
1827 maybe_convert_cond when not in template or build_x_binary_op
1828 otherwise.
1829
1830 2019-01-23 Marek Polacek <polacek@redhat.com>
1831
1832 PR c++/88757 - qualified name treated wrongly as type.
1833 * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids
1834 in parameter-list as types if name lookup for declarator-id didn't
1835 find one or more function templates.
1836
1837 2019-01-23 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c/44715
1840 * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only
1841 after genericizing cond and incr expressions.
1842
1843 PR c++/88984
1844 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
1845 before the begin_bc_block call.
1846
1847 2019-01-21 Jason Merrill <jason@redhat.com>
1848
1849 PR c++/87893 - constexpr ctor ICE on ARM.
1850 PR c++/88293 - ICE with comma expression.
1851 * constexpr.c (initialized_type): Don't shortcut non-void type.
1852 Handle COMPOUND_EXPR.
1853 (cxx_eval_outermost_constant_expr): Return early for void type.
1854
1855 2019-01-21 Jakub Jelinek <jakub@redhat.com>
1856
1857 PR c++/88949
1858 * optimize.c (cxx_copy_decl): New function.
1859 (clone_body): Use it instead of copy_decl_no_change.
1860
1861 PR sanitizer/88901
1862 * typeck.c (cp_build_binary_op): Don't instrument
1863 SANITIZE_POINTER_COMPARE if processing_template_decl.
1864 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
1865
1866 2019-01-18 Jason Merrill <jason@redhat.com>
1867
1868 PR c++/88875 - error with explicit list constructor.
1869 * call.c (reference_binding): Don't modify EXPR. Set
1870 need_temporary_p on the ck_user conversion for a temporary.
1871 (convert_like_real): Check it.
1872
1873 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 PR c/51628
1876 PR c/88664
1877 * call.c (convert_for_arg_passing): Upate the
1878 warn_for_address_or_pointer_of_packed_member call.
1879 * typeck.c (convert_for_assignment): Likewise.
1880
1881 2019-01-17 Jason Merrill <jason@redhat.com>
1882
1883 PR c++/86205 - ICE with ?: of throw and template-id.
1884 * pt.c (resolve_nondeduced_context_or_error): Split out from...
1885 * typeck.c (decay_conversion): ...here.
1886 * call.c (build_conditional_expr_1): Use it.
1887
1888 PR c++/86740, ICE with constexpr if and nested generic lambdas.
1889 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
1890
1891 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1892
1893 * decl.c (grokdeclarator): Use typespec_loc in error messages
1894 about 'auto' and trailing return type.
1895
1896 2019-01-17 David Malcolm <dmalcolm@redhat.com>
1897
1898 PR c++/88699
1899 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
1900 USING_DECLs.
1901
1902 2019-01-17 Nathan Sidwell <nathan@acm.org>
1903
1904 PR c++/86610
1905 * semantics.c (process_outer_var_ref): Only skip dependent types
1906 in templates.
1907
1908 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
1909
1910 PR c++/87768
1911 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
1912 * name-lookup.c (do_push_to_top_level): Save and reset it.
1913 (do_pop_from_top_level): Restore it.
1914
1915 PR c++/86648
1916 * pt.c (make_template_placeholder): Use auto_identifier.
1917 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
1918 * error.c (dump_type): Handle template placeholders.
1919 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
1920
1921 PR c++/88146
1922 * cvt.c (convert_to_void): Handle all cdtor calls as if
1923 returning void.
1924
1925 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1926
1927 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
1928 error messages about ill-formed uses of mutable.
1929
1930 2019-01-16 Marek Polacek <polacek@redhat.com>
1931
1932 PR c++/78244 - narrowing conversion in template not detected.
1933 * call.c (perform_implicit_conversion_flags): Set
1934 IMPLICIT_CONV_EXPR_BRACED_INIT.
1935 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
1936 * pt.c (tsubst_copy_and_build): Use it.
1937
1938 2019-01-15 David Malcolm <dmalcolm@redhat.com>
1939
1940 PR c++/88795
1941 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
1942 fails.
1943
1944 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
1945
1946 * decl.c (start_decl): Improve error location.
1947 * decl2.c (grokfield): Likewise.
1948
1949 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
1950
1951 * decl.c (grokdeclarator): Move further up the location_t loc
1952 declaration and use the location when building a TYPE_DECL for
1953 a typedef name.
1954 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
1955 about an ill-formed bit-field as typedef.
1956
1957 2019-01-14 Marek Polacek <polacek@redhat.com>
1958
1959 PR c++/88830 - ICE with abstract class.
1960 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
1961 Fix formatting.
1962
1963 PR c++/88825 - ICE with bogus function return type deduction.
1964 * typeck.c (can_do_nrvo_p): Check error_mark_node.
1965
1966 2019-01-14 Tom Honermann <tom@honermann.net>
1967
1968 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1969 * cvt.c (type_promotes_to): Handle char8_t promotion.
1970 * decl.c (grokdeclarator): Handle invalid type specifier
1971 combinations involving char8_t.
1972 * lex.c (init_reswords): Add char8_t as a reserved word.
1973 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
1974 * parser.c (cp_keyword_starts_decl_specifier_p)
1975 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
1976 type specifier.
1977 (cp_parser_string_literal): Use char8_array_type_node for the type
1978 of CPP_UTF8STRING.
1979 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
1980 headers.
1981 * rtti.c (emit_support_tinfos): type_info support for char8_t.
1982 * tree.c (char_type_p): Recognize char8_t as a character type.
1983 * typeck.c (string_conv_p): Handle conversions of u8 string
1984 literals of char8_t type.
1985 (check_literal_operator_args): Handle UDLs with u8 string literals
1986 of char8_t type.
1987 * typeck2.c (ordinary_char_type_p): New.
1988 (digest_init_r): Disallow initializing a char array with a u8 string
1989 literal.
1990
1991 2019-01-14 Martin Liska <mliska@suse.cz>
1992
1993 PR gcov-profile/88263
1994 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
1995 as location of the TLS wrapper.
1996
1997 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
1998
1999 * decl.c (cp_finish_decl): Improve error location.
2000 * decl2.c (grokfield): Likewise, improve two locations.
2001
2002 2019-01-11 Marek Polacek <polacek@redhat.com>
2003
2004 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
2005 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
2006 ADDR_EXPR.
2007
2008 2019-01-11 Jason Merrill <jason@redhat.com>
2009
2010 PR c++/88312 - pack expansion of decltype.
2011 * pt.c (instantiation_dependent_r): A template non-type parameter
2012 pack is instantiation-dependent.
2013
2014 2019-01-11 Jason Merrill <jason@redhat.com>
2015
2016 PR c++/88613 - ICE with use of const var in lambda.
2017 * expr.c (mark_use): Fix location wrapper handling.
2018 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
2019
2020 2019-01-11 Tobias Burnus <burnus@net-b.de>
2021
2022 PR C++/88114
2023 * decl2.c (maybe_emit_vtables): If needed, generate code for
2024 the destructor of an abstract class.
2025 (mark_used): Update comment for older function-name change.
2026
2027 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
2028
2029 * decl.c (start_decl): Improve error location.
2030 (grokdeclarator): Likewise, improve two locations.
2031
2032 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2033
2034 PR other/16615
2035
2036 * cp-tree.h: Mechanically replace "can not" with "cannot".
2037 * parser.c: Likewise.
2038 * pt.c: Likewise.
2039
2040 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2041
2042 * decl.c (grok_reference_init): Improve error location.
2043 (grokdeclarator): Likewise, improve two locations.
2044
2045 2019-01-08 Marek Polacek <polacek@redhat.com>
2046
2047 PR c++/88538 - braced-init-list in template-argument-list.
2048 * parser.c (cp_parser_template_argument): Handle braced-init-list when
2049 in C++20.
2050
2051 PR c++/88548 - this accepted in static member functions.
2052 * parser.c (cp_debug_parser): Adjust printing of
2053 local_variables_forbidden_p.
2054 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
2055 (cp_parser_primary_expression): When checking
2056 local_variables_forbidden_p, use THIS_FORBIDDEN or
2057 LOCAL_VARS_FORBIDDEN.
2058 (cp_parser_lambda_body): Update the type of
2059 local_variables_forbidden_p. Set it to 0 rather than false.
2060 (cp_parser_condition): Adjust call to cp_parser_declarator.
2061 (cp_parser_explicit_instantiation): Likewise.
2062 (cp_parser_init_declarator): Likewise.
2063 (cp_parser_declarator): New parameter. Use it.
2064 (cp_parser_direct_declarator): New parameter. Use it to set
2065 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
2066 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
2067 (cp_parser_parameter_declaration): Likewise.
2068 (cp_parser_default_argument): Update the type of
2069 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2070 rather than true.
2071 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
2072 'static' or 'friend'.
2073 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
2074 (cp_parser_late_parsing_default_args): Update the type of
2075 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2076 rather than true.
2077 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
2078 (cp_parser_objc_class_ivars): Likewise.
2079 (cp_parser_objc_struct_declaration): Likewise.
2080 (cp_parser_omp_for_loop_init): Likewise.
2081 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
2082 to unsigned char.
2083 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
2084 Define.
2085
2086 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2087
2088 * decl.c (start_decl): Improve permerror location.
2089
2090 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2091 Jakub Jelinek <jakub@redhat.com>
2092
2093 PR c++/88554
2094 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
2095 fixit hint if current_class_ref is NULL. Use a single if instead of
2096 two nested ones.
2097
2098 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2099
2100 * decl.c (start_decl): Improve two error_at locations.
2101 (expand_static_init): Likewise.
2102
2103 2019-01-07 Marek Polacek <polacek@redhat.com>
2104
2105 PR c++/88741 - wrong error with initializer-string.
2106 * decl.c (cp_complete_array_type): Strip any location wrappers.
2107
2108 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2109
2110 PR c++/88261
2111 PR c++/69338
2112 PR c++/69696
2113 PR c++/69697
2114 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
2115 * typeck2.c (digest_init_r): Raise an error for non-static
2116 initialization of a flexible array member.
2117 (process_init_constructor, massage_init_elt,
2118 process_init_constructor_array, process_init_constructor_record,
2119 process_init_constructor_union, process_init_constructor): Add the
2120 flags parameter and pass it thru.
2121 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
2122 digest_init_flags for static decls.
2123
2124 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2125
2126 PR c++/85052
2127 * cp-tree.h (cp_build_vec_convert): Declare.
2128 * parser.c (cp_parser_postfix_expression): Parse
2129 __builtin_convertvector.
2130 * constexpr.c: Include fold-const-call.h.
2131 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
2132 (potential_constant_expression_1): Likewise.
2133 * semantics.c (cp_build_vec_convert): New function.
2134 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
2135 IFN_VEC_CONVERT.
2136
2137 2019-01-03 Jakub Jelinek <jakub@redhat.com>
2138
2139 PR c++/88636
2140 * decl.c (builtin_function_1): Return result of pushdecl_top_level
2141 or pushdecl rather than decl.
2142
2143 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2144
2145 * tree.c (handle_nodiscard_attribute): Improve warning location.
2146
2147 2019-01-02 Marek Polacek <polacek@redhat.com>
2148
2149 PR c++/88612 - ICE with -Waddress-of-packed-member.
2150 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
2151 * typeck.c (convert_for_assignment): Likewise.
2152
2153 PR c++/88631 - CTAD failing for value-initialization.
2154 * typeck2.c (build_functional_cast): Try deducing the template
2155 arguments even if there are no arguments to deduce from.
2156
2157 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2158
2159 Update copyright years.
2160 \f
2161 Copyright (C) 2019 Free Software Foundation, Inc.
2162
2163 Copying and distribution of this file, with or without modification,
2164 are permitted in any medium without royalty provided the copyright
2165 notice and this notice are preserved.