]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
PR tree-optimization/60899
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
089c9c49 12014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2
3 PR c++/58753
4 PR c++/58930
5 PR c++/58704
6 * typeck2.c (digest_nsdmi_init): New.
7 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
8 * init.c (get_nsdmi): Likewise.
9 * cp-tree.h (digest_nsdmi_init): Declare.
10
31a434dd 112014-05-20 Jason Merrill <jason@redhat.com>
12
13 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
14 up a virtual function in a dummy object.
15
a6028cf3 162014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
17
18 PR c++/60373
19 * decl.c (duplicate_decls): Replace pair of warning_at with
20 warning_at + inform.
21 (maybe_commonize_var): Likewise.
22
6cae5733 232014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
24
25 PR bootstrap/61210
26 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
27 (tsubst_copy_and_build): Perform recursive substitutions in a
28 deterministic order.
29
775b9c9f 302014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
31
32 PR c++/58664
33 * typeck2.c (cxx_incomplete_type_inform): New.
34 (cxx_incomplete_type_diagnostic): Use it.
35 * decl.c (grokdeclarator): Check the element type of an
36 incomplete array type; call the above.
37 * cp-tree.h (cxx_incomplete_type_inform): Declare.
38
3c688d2d 392014-05-19 Jason Merrill <jason@redhat.com>
40
41 PR c++/58761
42 * pt.c (tsubst_copy): Don't check at_function_scope_p.
43 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
44
a4d705f9 452014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
46
47 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
48 * parser.c (cp_parser_enum_specifier): Likewise.
49
25a27413 502014-05-17 Trevor Saunders <tsaunders@mozilla.com>
51
52 * class.c (sorted_fields_type_new): Adjust.
53 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
54 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
55 * cp-tree.h: Remove usage of variable_size gty attribute.
56 * decl.c (make_label_decl): Adjust.
57 (check_goto): Likewise.
58 (start_preparsed_function): Likewise.
59 (save_function_data): Likewise.
60 * lex.c (init_reswords): Likewise.
61 (retrofit_lang_decl): Likewise.
62 (cxx_dup_lang_specific_decl): Likewise.
63 (copy_lang_type): Likewise.
64 (cxx_make_type): Likewise.
65 * name-lookup.c (binding_entry_make): Likewise.
66 (binding_table_construct): Likewise.
67 (binding_table_new): Likewise.
68 (cxx_binding_make): Likewise.
69 (pushdecl_maybe_friend_1): Likewise.
70 (begin_scope): Likewise.
71 (push_to_top_level): Likewise.
72 * parser.c (cp_lexer_alloc): Likewise.
73 (cp_lexer_new_from_tokens): Likewise.
74 (cp_token_cache_new): Likewise.
75 (cp_parser_context_new): Likewise.
76 (cp_parser_new): Likewise.
77 (cp_parser_nested_name_specifier_opt): Likewise.
78 (cp_parser_template_id): Likewise.
79 * pt.c (maybe_process_partial_specialization): Likewise.
80 (register_specialization): Likewise.
81 (add_pending_template): Likewise.
82 (lookup_template_class_1): Likewise.
83 (push_tinst_level): Likewise.
84 * semantics.c (register_constexpr_fundef): Likewise.
85 (cxx_eval_call_expression): Likewise.
86 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
87
70834003 882014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
89
90 PR c++/51640
91 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
92 when cp_parser_lookup_name sets ambiguous_decls.
93
9e66c6e7 942014-05-15 Jason Merrill <jason@redhat.com>
95
96 * call.c (print_conversion_rejection): Use loc consistently.
97
8e8713cd 982014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
99
100 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
101 * call.c (convert_like_real, build_new_method_call_1): Use it.
102 * decl2.c (grokfield): Likewise.
103 * init.c (perform_member_init, build_aggr_init, expand_default_init,
104 build_new_1): Likewise.
105 * mangle.c (write_expression): Likewise.
106 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
107
aa8d51e4 1082014-05-14 Jason Merrill <jason@redhat.com>
109
fdbd4827 110 PR c++/20332
111 PR c++/21631
112 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
113 dropped cv-quals as a bad conversion.
114 (convert_like_real) [ck_ref_bind]: Explain them.
115 (compare_ics): Check badness before stripping reference
116 bindings. Handle comparing bad reference bindings.
117 * typeck.c (comp_cv_qualification): Add overload that just takes
118 integers.
119 * cp-tree.h: Declare it.
120
aa8d51e4 121 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
122 (arg_conversion_rejection, bad_arg_conversion_rejection)
123 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
124 (add_function_candidate): Pass actual argument, rather than type, to
125 bad_arg_conversion_rejection.
126 (print_conversion_rejection): Explain what's wrong with the conversion.
3e9481da 127 (print_z_candidates): Say "candidate:" before each candidate.
aa8d51e4 128 (splice_viable): Be strict if we see a viable or template candidate.
129 (build_user_type_conversion_1): Pass false to strict parameter.
130 (perform_overload_resolution, build_conditional_expr_1): Likewise.
131 (build_new_op_1, build_new_method_call_1): Likewise.
132 (build_op_call_1): Pass true to strict parameter.
133
02b19aed 1342014-05-13 Jason Merrill <jason@redhat.com>
135
f770db5d 136 * call.c (print_error_for_call_failure): Say "no match" rather
137 than "ambiguous" if there were no strict matches.
138 (build_new_method_call_1): Likewise.
139
02b19aed 140 PR c++/61151
141 * semantics.c (is_this_parameter): Allow capture proxies too.
142
c6d185ef 1432014-05-12 Jason Merrill <jason@redhat.com>
144
2371bf7c 145 * call.c (maybe_print_user_conv_context): New.
146 (convert_like_real): Use it. Print call context for bad
147 user-defined conversion.
148 (build_over_call): Print call context for bad 'this' conversion.
149
c6d185ef 150 * call.c (convert_like_real): Use inform for identifying the
151 declaration point.
152
d3f0af4b 1532014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
154
155 * cvt.c (cp_convert_to_pointer): Don't call error_at if
156 complain & tf_error is false.
157
158 * decl.c (make_unbound_class_template): Prefer inform for
159 "declared here"-type message.
160
f1ec53b6 1612014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
162
163 PR c++/60463
164 PR c++/60755
165 * lambda.c (lambda_expr_this_capture): Add new parameter
166 add_capture_p controlling whether the functions will try to
167 capture 'this' via the default capture.
168 (maybe_resolve_dummy): Likewise.
169 * cp-tree.h: Adjust prototypes.
170 * call.c, semantics.c: Change callers of these functions.
171 * call.c (build_new_method_call_1): Use the actual 'this' that
172 would be potentially captured for the overload resolution, instead
173 of the dummy object.
174
67609839 1752014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
176
177 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
178 parameter.
179 (convert_nontype_argument): Adjust calls.
180 (coerce_template_parameter_pack): Add missing complain & tf_error
181 check.
182
70d9340b 1832014-05-09 Jason Merrill <jason@redhat.com>
184
d5e58b85 185 DR 587
186 PR c++/51317
187 * call.c (build_conditional_expr_1, conditional_conversion): Handle
188 non-class lvalues and xvalues that differ only in cv-qualifiers.
189
32390693 190 DR 5
191 PR c++/60019
192 * call.c (build_user_type_conversion_1): The copy-init temporary
193 is cv-unqualified.
194
58cdcc54 195 PR c++/58714
196 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
197
15608833 198 PR c++/54348
199 * call.c (build_conditional_expr_1): If overload resolution finds
200 no match, just say "different types".
201
202 PR c++/32019
203 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
204
70d9340b 205 PR c++/22434
206 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
207 if we didn't find a conversion.
208 Don't accept a bad conversion too early.
209
5544070d 2102014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
211
212 PR c++/13981
213 * typeck.c (convert_for_assignment): Provide an inform for pointers
214 to incomplete class types.
215
662eb060 2162014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
217
218 PR c++/61083
219 * pt.c (convert_nontype_argument): Protect all the error calls
220 with complain & tf_error.
221
a79381fe 2222014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
223
224 PR c++/61080
225 * pt.c (instantiate_decl): Avoid generating the body of a
226 deleted function.
227
d5e91941 2282014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
229
230 PR c++/60999
231 * pt.c (maybe_begin_member_template_processing): Use
232 uses_template_parms.
233
960d5a55 2342014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
235 Mike Stump <mikestump@comcast.net>
236 Richard Sandiford <rdsandiford@googlemail.com>
237
238 * call.c: Include wide-int.h.
239 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
240 (convert_for_arg_passing): Likewise.
241 * class.c: Include wide-int.h.
242 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
243 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
244 (include_empty_classes): Likewise
245 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
246 * cvt.c: Include wide-int.h.
247 (ignore_overflows): Use wide_int_to_tree.
248 * decl.c: Include wide-int.h.
249 (check_array_designated_initializer): Use wide-int interfaces.
250 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
251 (finish_enum_value_list): Use signop.
252 (build_enumerator): Use wide-int interfaces.
253 * init.c: Include wide-int.h.
254 (build_new_1): Use wide-int interfaces.
255 * mangle.c: Include wide-int.h.
256 (write_integer_cst): Use wide-int interfaces.
257 (write_array_type): Likewise.
258 * tree.c: Include wide-int.h.
259 (cp_tree_equal): Use tree_int_cst_equal.
260 * typeck2.c: Include wide-int.h.
261 (process_init_constructor_array): Use wide-int interfaces.
262
321c47b0 2632014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
264
265 PR c++/58582
266 * decl.c (grokfndecl): Check duplicate_decls return value for
267 error_mark_node.
268 * pt.c (instantiate_decl): A deleted function is defined.
269
384b0418 2702014-05-02 Jason Merrill <jason@redhat.com>
271
14b525c6 272 * decl2.c (vague_linkage_p): Local statics have vague linkage.
273
384b0418 274 PR c++/60992
275 * lambda.c (lambda_capture_field_type): Wrap anything dependent
276 other than 'this'.
277 (add_capture): Check for VLA before calling it.
278 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
279 just the current one. Make non-static.
280 * cp-tree.h: Declare it.
281 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
282 the operand was static or constant.
283
27ff10cb 2842014-05-02 Marek Polacek <polacek@redhat.com>
285
286 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
287 warning_at calls.
288
694296f2 2892014-05-01 Marek Polacek <polacek@redhat.com>
290
291 PR c/43395
292 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
293 between label and variable when warning about returning local address.
294
1d911add 2952014-04-30 Jason Merrill <jason@redhat.com>
296
4a2cf6ca 297 PR c++/60980
298 * init.c (build_value_init): Don't try to call an array constructor.
299
1d911add 300 PR c++/60951
301 * typeck2.c (massage_init_elt): Use maybe_constant_init.
302
52cc0072 3032014-04-30 Marek Polacek <polacek@redhat.com>
304
305 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
306 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
307 for non-integer types.
308
f2c1aabc 3092014-04-29 Jason Merrill <jason@redhat.com>
310
311 DR 1351
312 Represent the unevaluated exception specification of an implicitly
313 declared or deleted function with a simple placeholder, not a list
314 of functions.
315 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
316 * except.c (unevaluated_noexcept_spec): New.
317 * class.c (deduce_noexcept_on_destructor): Use it.
318 * decl.c (check_redeclaration_exception_specification): Call
319 maybe_instantiate_noexcept.
320 (duplicate_decls): Call it before merge_types.
321 (start_preparsed_function): Call maybe_instantiate_noexcept.
322 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
323 * init.c (get_nsdmi): Factor out of perform_member_init.
324 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
325 (walk_field_subobs): Consider NSDMI for EH spec.
326 (get_defaulted_eh_spec): New.
327 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
328 (defaulted_late_check): Defer EH checking in non-template classes.
329 (after_nsdmi_defaulted_late_checks): New.
330 * parser.c (cp_parser_class_specifier_1): Use it.
331 (unparsed_classes): New macro.
332 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
333 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
334 Remove list-of-functions handling.
335 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
336 handling and FN parameter.
337 * typeck.c (merge_types): Adjust.
338
7f0ae9af 3392014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
340
341 PR c++/59120
342 * parser.c (cp_parser_alias_declaration): Check return value of
343 cp_parser_require.
344
e1029911 3452014-04-24 Jakub Jelinek <jakub@redhat.com>
346
347 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
348 atomic-clause, allow comma in between atomic-clause and
349 seq_cst.
350
c6a952b0 3512014-04-24 Marc Glisse <marc.glisse@inria.fr>
352
353 PR libstdc++/43622
354 * rtti.c (emit_support_tinfos): Do not iterate on
355 registered_builtin_types (partial revert).
356
90fe9d0c 3572014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
358
359 PR c++/57958
360 * semantics.c (apply_deduced_return_type): Complete non-void type
361 before estimating whether the type is aggregate.
362
c1917557 3632014-04-22 Marc Glisse <marc.glisse@inria.fr>
364
365 PR libstdc++/43622
366 * rtti.c (emit_support_tinfo_1): New function, extracted from
367 emit_support_tinfos.
368 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
369
9f0a7bc6 3702014-04-22 Jakub Jelinek <jakub@redhat.com>
371
372 PR c/59073
373 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
374 fails, don't set OM_PARALLEL_COMBINED and return NULL.
375
e0417caa 3762014-04-18 Jason Merrill <jason@redhat.com>
377
5811f638 378 DR 1571
379 * call.c (reference_binding): Recurse on user-defined conversion.
380
e0417caa 381 PR c++/60872
382 * call.c (standard_conversion): Don't try to apply restrict to void.
383
10c9192f 3842014-04-16 Marc Glisse <marc.glisse@inria.fr>
385
386 * decl.c (reshape_init_r): Handle a single element of vector type.
387
6da7682f 3882014-04-16 Patrick Palka <patrick@parcs.ath.cx>
389
390 PR c++/60765
391 * decl2.c (cplus_decl_attributes): Handle
392 pointer-to-member-function declarations.
393
3942014-04-16 Patrick Palka <patrick@parcs.ath.cx>
395
396 PR c++/60764
397 * call.c (build_user_type_coversion): Use build_dummy_object
398 to create the placeholder object for a constructor method call.
399 (build_special_member_call): Likewise.
400 (build_over_call): Check for the placeholder object with
401 is_dummy_object.
402 (build_new_method_call_1): Likewise. Don't attempt to resolve
403 a dummy object for a constructor method call.
404
d8dbaa4d 4052014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
406
407 PR c++/59295
408 * friend.c (add_friend, make_friend_class): Move repeated friend
409 warning under Wredundant_decls.
410
eb192f47 4112014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
412
413 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
414 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
415 (do_class_using_decl): Likewise.
416 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
417
d78cc47b 4182014-04-15 Jakub Jelinek <jakub@redhat.com>
419
420 PR plugins/59335
421 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
422
48dcce25 4232014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
424
425 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
426
3cf0d3fe 4272014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
428
429 * pt.c (mark_template_parm): Use template_parm_level_and_index.
430
725218f2 4312014-04-11 Jason Merrill <jason@redhat.com>
432
4163a05c 433 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
434 * parser.c: Adjust.
435 (cp_lexer_get_preprocessor_token): Always clear it.
436 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
437
ac89b239 438 DR 1467
439 PR c++/51747
440 * decl.c (reshape_init_r): Handle a single element of class type.
441
725218f2 442 DR 1338
443 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
444 built-in operator new.
445
08f9c377 4462014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
447
448 PR c++/58600
449 * name-lookup.c (parse_using_directive): Return early if the
450 attribs argument is error_mark_node; use get_attribute_name.
451
91d81115 4522014-04-11 Jason Merrill <jason@redhat.com>
453
454 DR 1030
455 PR c++/51253
456 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
457 * call.c (struct z_candidate): Add flags field.
458 (add_candidate): Add flags parm.
459 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
460 (add_template_candidate_real): Pass it.
461 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
462 * tree.c (build_aggr_init_expr): Copy it.
463 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
464
a521cfc1 4652014-04-10 Richard Biener <rguenther@suse.de>
466 Jakub Jelinek <jakub@redhat.com>
467
468 PR ipa/60761
469 * error.c (dump_decl) <case FUNCTION_DECL>: If
470 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
471 recurse on DECL_ABSTRACT_ORIGIN instead of printing
472 <built-in>.
473
3235f8eb 4742014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
475
476 * pt.c (check_template_variable): Check for the return of pedwarn
477 before emitting a note.
478 * parser.c (cp_parser_lambda_introducer): Likewise.
479
bcc1089d 4802014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
481
482 PR c++/59115
483 * pt.c (process_template_parm): For an invalid non-type parameter
484 only set TREE_TYPE to error_mark_node.
485 (push_inline_template_parms_recursive, comp_template_parms,
486 redeclare_class_template, coerce_template_template_parm,
487 coerce_template_template_parms, unify): Use error_operand_p.
488
3da466c2 4892014-04-08 Nathan Sidwell <nathan@codesourcery.com>
490
491 * class.c (check_bases_and_members): Warn about non-virtual dtors
492 in public bases only. Check warn_ecpp before complaining about
493 non-polymorphic bases.
494
50dfcaf2 4952014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
496
497 * decl.c (duplicate_decls): Check for the return of warning_at
498 before emitting a note.
499 (warn_misplaced_attr_for_class_type): Likewise.
500 (check_tag_decl): Likewise.
501
fb73bd50 5022014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
503
504 PR c++/58207
505 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
506
3ef62016 5072014-04-04 Patrick Palka <patrick@parcs.ath.cx>
508
3f136c5f 509 PR c++/44613
510 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
511 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
512 instantiating a variable-sized type.
513
3ef62016 514 PR c++/21113
515 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
516
447c7147 5172014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
518
519 * class.c (find_abi_tags_r): Check for the return of warning
520 before emitting a note.
521 (one_inherited_ctor): Likewise.
522
7144bfbd 5232014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
524
525 * decl.c (duplicate_decls): Check for the return of permerror
526 before emitting a note.
527
a35a8e18 5282014-04-03 Nathan Sidwell <nathan@codesourcery.com>
529
530 * class.c (accessible_nvdtor_p): New.
531 (check_bases): Don't check base destructor here ...
532 (check_bases_and_members): ... check them here. Trigger on
533 Wnon-virtual-dtor flag.
534 (finish_struct_1): Use accessible_nvdtor_p.
535
51e148d7 5362014-04-01 Jason Merrill <jason@redhat.com>
537
f2aceb06 538 * pt.c (process_partial_specialization): Say "not deducible"
539 rather than "not used". Use inform.
540
51e148d7 541 PR c++/60374
542 * pt.c (coerce_template_parms): Check that the pack expansion
543 pattern works with the first matching parameter.
544
19e925b4 5452014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
546
a34ebeff 547 * init.c (perform_member_init): Homogenize uninitialized
19e925b4 548 diagnostics.
549
42a2bdf5 5502014-04-01 Jason Merrill <jason@redhat.com>
551
c138daa7 552 PR c++/60708
553 * call.c (build_array_conv): Call complete_type.
554
48f76477 555 PR c++/60713
556 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
557 (picflag_from_initializer): Return it.
558 (process_init_constructor): Handle it.
559
42a2bdf5 560 PR c++/60642
561 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
562 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
563 * pt.c (get_template_info): Handle NAMESPACE_DECL.
564 (most_general_template): Handle more kinds of template.
565 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
566 instantiations and specializations.
567
a34ebeff 5682014-03-31 Patrick Palka <patrick@parcs.ath.cx>
7f9fe03b 569
570 PR c++/44859
571 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
572 COMPONENT_REFs and ARRAY_REFs sooner.
573
4906c0a4 5742014-03-29 Adam Butcher <adam@jessamine.co.uk>
575
576 PR c++/60626
577 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
578 usage in non-functions with pushed scope.
579
265a34f4 5802014-03-28 Adam Butcher <adam@jessamine.co.uk>
581
582 PR c++/60573
583 * name-lookup.h (cp_binding_level): New transient field defining_class_p
584 to indicate whether a scope is in the process of defining a class.
585 * semantics.c (begin_class_definition): Set defining_class_p.
586 * name-lookup.c (leave_scope): Reset defining_class_p.
587 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
588 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
589 unwinding to class-defining scope to handle the erroneous definition of
590 a generic function of an arbitrarily nested class within an enclosing
591 class.
592
bebb2c46 5932014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
265a34f4 594
595 PR c++/52369
7144bfbd 596 * method.c (walk_field_subobs): Improve the diagnostic
bebb2c46 597 locations for both REFERENCE_TYPEs and non-static const members.
7144bfbd 598 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
bebb2c46 599 instead of %qD to be consistent with the c++11 diagnostic.
600
ecc7201f 6012014-03-25 Jason Merrill <jason@redhat.com>
602
89d453e3 603 PR c++/60566
604 PR c++/58678
605 * class.c (build_vtbl_initializer): Handle abstract dtors here.
606 * search.c (get_pure_virtuals): Not here.
607
88ef2cb8 608 PR c++/60375
609 * parser.c (cp_parser_lambda_expression): Don't parse the body of
610 a lambda in unevaluated context.
611
ecc7201f 612 PR c++/60628
613 * decl.c (create_array_type_for_decl): Complain about array of auto.
614
de48ad32 6152014-03-25 Jakub Jelinek <jakub@redhat.com>
616
617 PR c++/60331
618 * semantics.c (potential_constant_expression_1): Handle
619 DECL_EXPR.
620
bb7b7cec 6212014-03-24 Adam Butcher <adam@jessamine.co.uk>
622
623 PR c++/60627
624 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
625 introducing an implicit function template parameter within an explicit
626 instantiation.
627
87ac398b 6282014-03-22 Jason Merrill <jason@redhat.com>
629
630 PR c++/60574
631 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
632 to error.
633
eb62b291 6342014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
635
636 PR c++/60384
637 * name-lookup.c (push_class_level_binding_1): Check identifier_p
638 on the name argument.
639
2982409c 6402014-03-20 Jakub Jelinek <jakub@redhat.com>
641
642 PR c++/60572
643 * init.c (build_zero_init_1): Ignore fields with error_mark_node
644 type.
645
c97fb132 6462014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
647
648 PR c++/51474
649 * call.c (build_new_method_call_1): Handle pure virtuals called by
650 NSDMIs too.
651
d2caa684 6522014-03-17 Adam Butcher <adam@jessamine.co.uk>
653
fd6b21e6 654 PR c++/60390
655 * parser.c (cp_parser_member_declaration): Don't allow
656 finish_fully_implicit_template to consider friend declarations to be
657 class member templates.
658 (synthesize_implicit_template_parm): Handling winding back through class
659 scope to the class being defined in order to inject a template argument
660 list.
661
d2caa684 662 PR c++/60391
663 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
664 function scope as per cp_parser_skip_to_end_of_statement.
665
34c4877b 6662014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
667
668 PR c++/59571
669 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
670
27ea311d 6712014-03-14 Jason Merrill <jason@redhat.com>
672
67e2ce94 673 PR c++/60532
674 PR c++/58678
675 * search.c (get_pure_virtuals): Handle abstract dtor here.
676 (dfs_get_pure_virtuals): Not here.
677
27ea311d 678 PR c++/58678
679 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
680 abstract class as pure.
681
c498d5d2 6822014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
683
684 PR c++/60383
685 * pt.c (maybe_process_partial_specialization): Check return value
686 of check_specialization_namespace.
687
4e839e56 6882014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
689
690 PR c++/60254
691 * semantics.c (finish_static_assert): Call cxx_constant_value only
692 if require_potential_rvalue_constant_expression returns true.
693
c9b99c30 6942014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
695
696 PR c++/60389
697 * method.c (get_inherited_ctor): New.
698 * cp-tree.h (get_inherited_ctor): Declare it.
699 * semantics.c (is_valid_constexpr_fn): Use it.
700
b919371f 7012014-03-10 Jason Merrill <jason@redhat.com>
702
c39c96ef 703 PR c++/60367
704 * call.c (convert_default_arg): Remove special handling for
705 CONSTRUCTOR.
706
b919371f 707 PR c++/53492
708 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
709 when deciding whether to call push_template_decl for a member class.
710 * pt.c (push_template_decl_real): Return after wrong levels error.
711
9fad7d86 7122014-03-08 Adam Butcher <adam@jessamine.co.uk>
713
356418b4 714 PR c++/60033
715 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
716 lambda, remove the lambda's own template argument list prior to fetching
717 the specialization.
718
9fad7d86 719 PR c++/60393
720 * parser.c (cp_parser_parameter_declaration_clause): Move generic
721 function template unwinding on error into a more general location, ...
722 (cp_parser_skip_to_end_of_statement): ... here.
723
4f50e8b3 7242014-03-07 Jason Merrill <jason@redhat.com>
725
21a224f6 726 * Make-lang.in (check_g++_parallelize): Split dg.exp.
727
9665ba48 728 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
729 we're in a trailing return type.
730
f8ccb73b 731 * typeck.c (comp_template_parms_position): 'auto' and
732 'decltype(auto)' are different from real template parms.
733
197d48cc 734 * parser.c (cp_parser_using_declaration): Consume the semicolon
735 after bare parameter pack error.
736
312942d8 737 * cp-tree.h (REF_PARENTHESIZED_P): New.
738 * semantics.c (force_paren_expr): Set it.
739 * pt.c (do_auto_deduction): Check it.
740 (tsubst) [COMPONENT_REF]: Copy it.
741 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
742
4f50e8b3 743 * decl.c (create_array_type_for_decl): Only warn about invalid
744 C++1y VLA if flag_iso or warn_vla>0.
745 (grokdeclarator): Likewise.
746 * pt.c (tsubst): Likewise.
747 * semantics.c (finish_decltype_type): Likewise.
748 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
749 (cp_build_addr_expr_1): Likewise.
750 * init.c (build_new_1): Improve diagnostics.
751
eb425395 7522014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
753
754 PR c++/58609
755 * decl.c (check_initializer): Return NULL_TREE after error;
756 consistently use inform.
757
7b1c5739 7582014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
759
760 * decl.c (check_initializer): Remove dead code.
761
3bfdc94f 7622014-03-06 Marek Polacek <polacek@redhat.com>
763
764 PR c/60197
765 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
766 of checking tree code.
767
7ae216c9 7682014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
769
770 * parser.c (cp_lexer_set_source_position): New.
771 (cp_parser_mem_initializer): Use it.
772 (cp_parser_postfix_open_square_expression): Likewise.
773 (cp_parser_parenthesized_expression_list): Likewise.
774 (cp_parser_new_initializer): Likewise.
775 (cp_parser_jump_statement): Likewise.
776 (cp_parser_initializer): Likewise.
777 (cp_parser_functional_cast): Likewise.
778
7acfa321 7792014-03-05 Jason Merrill <jason@redhat.com>
780
1ef668b7 781 PR c++/60409
782 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
783 dependent expression.
784
0e6d86f3 785 PR c++/60361
786 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
787 if re-parsing might succeed.
788 * semantics.c (finish_id_expression): Use of a parameter outside
789 the function body is a parse error.
790
7acfa321 791 * parser.c (cp_parser_mem_initializer): Set input_location
792 properly for init-list warning.
793 (cp_parser_postfix_open_square_expression): Likewise.
794 (cp_parser_parenthesized_expression_list): Likewise.
795 (cp_parser_new_initializer): Likewise.
796 (cp_parser_jump_statement): Likewise.
797 (cp_parser_initializer): Likewise.
798 (cp_parser_functional_cast): Likewise.
799
fb5c9fe1 8002014-03-04 Jason Merrill <jason@redhat.com>
801
38a7f884 802 PR c++/60417
803 * typeck2.c (process_init_constructor_record): Set
804 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
805
fb5c9fe1 806 PR c++/60415
807 PR c++/54359
808 * parser.c (cp_parser_direct_declarator): Set declarator to
809 cp_error_declarator on invalid qualified-id.
810
d3f82773 8112014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
812
813 PR c++/60376
814 * parser.c (cp_parser_using_declaration): Early return when
815 cp_parser_nested_name_specifier errors out.
816
f7b8dc7f 8172014-03-01 Adam Butcher <adam@jessamine.co.uk>
818
819 PR c++/60377
820 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
821 function scope on parse error in function parameter list.
822
2d791ea6 8232014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
824
825 * method.c (implicitly_declare_fn): Remove redundant
826 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
827 * semantics.c (is_instantiation_of_constexpr): Likewise.
828 * error.c (dump_function_decl): Likewise.
829
c0e2df1c 8302014-03-01 Jason Merrill <jason@redhat.com>
831
832 PR c++/60379
833 * semantics.c (begin_maybe_infinite_loop): Use
834 fold_non_dependent_expr_sfinae.
835
bad99c7d 8362014-02-28 Jason Merrill <jason@redhat.com>
837
838 PR c++/58845
839 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
840
ea17a80d 8412014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
842
843 PR c++/58610
844 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
845 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
846 * lambda.c (maybe_add_lambda_conv_op): Likewise.
847
87a02518 8482014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
849
850 PR c++/60253
851 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
852 error_at.
853
5e584863 8542014-02-27 Jason Merrill <jason@redhat.com>
855
856 PR c++/60353
857 PR c++/55877
858 * decl2.c (tentative_decl_linkage): Don't mess with functions that
859 are not yet defined.
860
a44a3cd2 8612014-02-26 Jason Merrill <jason@redhat.com>
862
6d579d92 863 PR c++/60347
864 PR lto/53808
865 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
866 * init.c (build_vtbl_address): Do it here.
867
734ec290 868 PR c++/59231
869 PR c++/11586
870 PR c++/14710
871 PR c++/57132
872 * pt.c (struct warning_sentinel): New.
873 (tsubst_copy_and_build): Use it instead of
874 c_inhibit_evaluation_warnings.
875 * typeck.c (maybe_warn_about_useless_cast): Remove
876 c_inhibit_evaluation_warnings check.
877
e5a3303f 878 PR c++/54440
879 * pt.c (get_template_parm_index): New.
880 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
881 (process_template_parm): Allow bare packs in template template
882 parm template parms.
883 (coerce_template_parameter_pack): Handle fixed template template
884 parm packs and fixed packs not at the end of the parm list.
885 (coerce_template_parms): Handle template parm packs not at the end
886 of the parm list.
887 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
888
bc20c6fa 889 PR c++/60182
890 * pt.c (unify): Ignore alias templates when deducing a template
891 template parameter.
892
a44a3cd2 893 PR c++/60345
894 Revert:
895 DR 1571
896 * call.c (reference_binding): Recurse on user-defined conversion.
897 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
898
1bb8a24a 8992014-02-25 Jason Merrill <jason@redhat.com>
900
bccd776e 901 DR 1571
902 * call.c (reference_binding): Recurse on user-defined conversion.
903 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
904
5ae35a01 905 * call.c (print_conversion_rejection): Handle n_arg of -2.
906 (build_user_type_conversion_1): Pass it.
907
2381bbfa 908 PR c++/55877
909 * decl2.c (no_linkage_error): Handle C++98 semantics.
910 (reset_type_linkage): Move from decl.c.
911 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
912 (bt_reset_linkage_2, reset_decl_linkage): New.
913 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
914 (cp_write_global_declarations): Move condition into no_linkage_error.
915 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
916 * semantics.c (expand_or_defer_fn_1): Factor out
917 tentative_decl_linkage.
918 * cp-tree.h: Adjust.
919
46e37d59 920 * decl2.c (finish_static_data_member_decl): Diagnose static data
921 member in unnamed class.
922 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
923
196adb3b 924 PR lto/53808
925 * class.c (clone_function_decl): Call note_vague_linkage_fn for
926 defaulted virtual dtor.
927
1bb8a24a 928 DR 1286
929 PR c++/60328
930 * pt.c (get_underlying_template): Fix equivalence calculation.
931
6175df17 9322014-02-25 Adam Butcher <adam@jessamine.co.uk>
933
bc699cc7 934 PR c++/60311
935 * parser.c (function_being_declared_is_template_p): Return false when
936 processing a template parameter list.
937 (cp_parser_parameter_declaration_clause): Don't set
938 auto_is_implicit_function_template_parm_p when processing a
939 template parameter list.
940
65466722 941 * parser.c (synthesize_implicit_template_parm): Inject new template
942 argument list appropriately when a generic member function
943 of a class template is declared out-of-line.
944
6175df17 945 PR c++/60065
946 * parser.c (cp_parser_direct_declarator): Don't save and
947 restore num_template_parameter_lists around call to
948 cp_parser_parameter_declaration_list.
949 (function_being_declared_is_template_p): New predicate.
950 (cp_parser_parameter_declaration_list): Use
951 function_being_declared_is_template_p as predicate for
952 inspecting current function template parameter list length
953 rather than num_template_parameter_lists.
954
3338d08f 9552014-02-24 Jason Merrill <jason@redhat.com>
956
53bafd50 957 PR c++/60146
958 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
959 DECL_EXPR initialize a non-class iterator.
960
3338d08f 961 PR c++/60312
962 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
963
32bfbd38 9642014-02-21 Jason Merrill <jason@redhat.com>
832e3993 965
1f62da87 966 PR c++/58170
967 * parser.c (cp_parser_type_name): Always check dependency.
968 (cp_parser_type_specifier_seq): Call
969 cp_parser_parse_and_diagnose_invalid_type_name.
970
3337ee1c 971 PR c++/60108
972 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
973
a051cbac 974 PR c++/60185
975 * parser.c (cp_parser_default_argument): Clear
976 current_class_ptr/current_class_ref like tsubst_default_argument.
977
855ff3cc 978 PR c++/60252
979 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
980 than current_binding_level.
981
0e65aeb6 982 PR c++/60186
983 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
984
f5ca01f6 985 PR c++/60187
986 * parser.c (cp_parser_enum_specifier): Call
987 check_for_bare_parameter_packs.
988
9f997878 989 PR c++/59347
990 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
991 erroneous typedef.
992
6648782a 993 PR c++/60241
994 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
995 of the partial instantiation, not the most general template.
996 (maybe_process_partial_specialization): Reassign everything on
997 that list.
998
f875f78b 999 PR c++/60216
1000 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1001 (check_explicit_specialization): Don't clone.
1002
7b67d674 1003 PR c++/60219
1004 * pt.c (coerce_template_parms): Bail if argument packing fails.
1005
9781e55e 1006 PR c++/60224
1007 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1008 Don't get confused by a CONSTRUCTOR that already has a type.
1009
5aaa6124 1010 PR c++/60227
7b92f819 1011 * call.c (build_array_conv): Don't crash on VLA.
1012
a1d8686f 1013 PR c++/60248
1014 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1015
832e3993 1016 PR c++/60252
1017 * lambda.c (maybe_resolve_dummy): Don't try to capture this
1018 in declaration context.
32bfbd38 1019
2ac1e8f7 1020 DR 1591
1021 PR c++/60051
1022 * pt.c (unify): Only unify if deducible. Handle 0-length list.
1023
3e7e1577 1024 PR c++/60250
1025 * parser.c (cp_parser_direct_declarator): Don't wrap a
1026 type-dependent expression in a NOP_EXPR.
1027
b9c9af4c 1028 PR c++/60251
1029 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1030
32bfbd38 1031 PR c++/60167
1032 PR c++/60222
1033 PR c++/58606
1034 * parser.c (cp_parser_template_argument): Restore dereference.
1035 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1036 (process_partial_specialization): Handle deref.
1037 (unify): Likewise.
1038
e966f4c3 10392014-02-21 Adam Butcher <adam@jessamine.co.uk>
1040
1041 PR c++/60052
1042 PR c++/60053
1043 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1044 implicit_template_scope upon leaving an out-of-line generic member
1045 function definition.
1046
591f4417 10472014-02-20 Kai Tietz <ktietz@redhat.com>
1048
c3d43267 1049 PR c++/58873
1050 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1051 valued type argument as error_mark_node.
1052
591f4417 1053 PR c++/58835
1054 * semantics.c (finish_fname): Handle error_mark_node.
1055
26350918 10562014-02-19 Jason Merrill <jason@redhat.com>
1057
1058 PR c++/60046
1059 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1060 spec from template context.
1061
0267943e 10622014-02-19 Jakub Jelinek <jakub@redhat.com>
1063
7cef2e5a 1064 PR debug/56563
1065 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1066 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1067
0267943e 1068 PR c++/60267
1069 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1070
d5c7b365 10712014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1072
1073 PR c++/60225
1074 * semantics.c (ensure_literal_type_for_constexpr_object): Use
1075 strip_array_types.
1076
10772014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1078
1079 PR c++/60215
1080 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1081 During error recovery allow_non_constant may be false.
1082
040882d0 10832014-02-18 Adam Butcher <adam@jessamine.co.uk>
1084
1085 PR c++/60190
1086 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1087 scope whenever a template parameter list has been started, independent
1088 of whether the function call operator was well-formed or not.
1089
9460e325 1090 PR c++/60064
1091 * parser.c (cp_parser_member_declaration): Pop fully implicit template
1092 scope for generic friend declarations as well as for non-friends.
1093
de782278 10942014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
1095
1096 PR c++/60047
1097 * method.c (implicitly_declare_fn): A constructor of a class with
1098 virtual base classes isn't constexpr (7.1.5p4).
1099
ea7d8c7a 11002014-02-05 Jan Hubicka <hubicka@ucw.cz
1101
1102 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1103
3fb71aed 11042014-02-05 Jakub Jelinek <jakub@redhat.com>
1105
1106 PR c++/58703
1107 * parser.c (cp_parser_omp_declare_reduction): Save and free
1108 declarator_obstack.
1109
caf62483 11102014-02-03 Marc Glisse <marc.glisse@inria.fr>
1111
1112 PR c++/53017
1113 PR c++/59211
1114 * tree.c (handle_init_priority_attribute): Call default_conversion on
1115 the attribute argument.
1116
d86e71c1 11172014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1118
1119 PR c++/58871
1120 * method.c (synthesized_method_walk): If vbases is non-null but
1121 is_empty is true, likewise don't worry about the virtual bases.
1122
3da3051d 11232014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1124
1125 PR c++/51219
1126 * typeck2.c (process_init_constructor_record): Just skip unnamed
1127 bit-fields.
1128
b81ddff2 11292014-01-31 Jason Merrill <jason@redhat.com>
1130
b7ba1ea4 1131 PR c++/59469
1132 * pt.c (mark_decl_instantiated): Call mark_needed.
1133
3d7d57de 1134 PR c++/58672
1135 * decl2.c (handle_tls_init): Handle null init fn.
1136
b81ddff2 1137 PR c++/55800
1138 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1139
7ed7b5b0 11402014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
1141
1142 PR c++/59082
1143 * class.c (build_vfield_ref): Early return error_mark_node if
1144 TYPE_VFIELD (type) is null.
1145 (build_base_path): Check return value of build_vfield_ref.
1146
5dee5323 11472014-01-31 Jason Merrill <jason@redhat.com>
1148
3fc9e843 1149 PR c++/59646
1150 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1151 [ck_list]: Check for error_mark_node.
1152 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1153
5dee5323 1154 PR c++/57043
1155 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1156 during partial ordering.
1157
ec761d5a 11582014-01-31 Marek Polacek <polacek@redhat.com>
1159
1160 PR c/59963
1161 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1162
79d65ad6 11632014-01-30 Jason Merrill <jason@redhat.com>
1164
1165 PR c++/57899
1166 * cp-tree.h (struct saved_scope): Add x_local_specializations.
1167 (local_specializations): New macro.
1168 * pt.c (local_specializations): Remove variable.
1169
229c9550 11702014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
1171
1172 PR c++/58708
1173 * parser.c (make_string_pack): Use double_int::from_buffer.
1174
22a75734 11752014-01-30 Marek Polacek <polacek@redhat.com>
1176
1177 PR c/59940
1178 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1179 input_location.
1180 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1181 with input_location.
1182 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1183 loc parameter.
1184
fcd59115 11852014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1186
1187 PR c++/58843
1188 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1189
aa005ede 11902014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1191
1192 PR c++/58649
1193 * pt.c (lookup_template_class_1): Check start_enum return value
1194 for error_mark_node.
1195
fbbaa325 11962014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1197
1198 * decl.c (duplicate_decls, typename_hash, typename_compare):
1199 Use TYPE_IDENTIFIER.
1200 * error.c (dump_type): Likewise.
1201 * mangle.c (dump_substitution_candidates): Likewise.
1202
53874764 12032014-01-30 Jason Merrill <jason@redhat.com>
1204
1205 PR c++/59633
1206 * decl2.c (attributes_naming_typedef_ok): New.
1207 * cp-tree.h: Declare it.
1208 * decl.c (grokdeclarator): Check it.
1209 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1210
35f711cd 12112014-01-29 Jason Merrill <jason@redhat.com>
1212
2a41b9a0 1213 PR c++/59707
1214 * call.c (add_builtin_candidate): Catch dependent types.
1215
dc0fdc54 1216 PR c++/59989
1217 * pt.c (expand_template_argument_pack): Correct
1218 non_default_args_count calculation.
1219
17dc58c1 1220 PR c++/58466
1221 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1222
35f711cd 1223 PR c++/59956
1224 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1225 have a friend template in a class template.
1226 * pt.c (tsubst_friend_function): Look through it.
1227 (push_template_decl_real): A friend member template is
1228 primary.
1229
55a18590 12302014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1231
1232 PR c++/58846
1233 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1234 == error_mark_node.
1235
9e31b03d 12362014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1237
1238 PR c++/58674
1239 * pt.c (instantiate_template_1): Check for error_mark_node the second
1240 argument too.
1241
4b136559 12422014-01-29 Jason Merrill <jason@redhat.com>
1243
7663e4b8 1244 PR c++/59916
1245 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1246 cdtor_returns_this case.
1247
4b136559 1248 PR c++/59315
1249 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1250
dac04683 12512014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1252
1253 PR c++/58702
1254 * semantics.c (finish_omp_reduction_clause): Check type for
1255 error_mark_node.
1256
18bb3b80 12572014-01-28 Jason Merrill <jason@redhat.com>
1258
bdd3ea90 1259 PR c++/59791
1260 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1261 (tsubst_copy): Use it if lookup fails.
1262
89bba5f0 1263 PR c++/59818
1264 * pt.c (tsubst_function_type): Make sure we keep the same function
1265 quals.
1266
2836a8df 1267 PR c++/58701
1268 * semantics.c (build_anon_member_initialization): Stop walking
1269 when we run out of COMPONENT_REFs.
1270
2c860859 1271 PR c++/58632
1272 * decl.c (lookup_and_check_tag): Ignore template parameters if
1273 scope == ts_current.
1274 * pt.c (check_template_shadow): Don't complain about the injected
1275 class name.
1276
bea27920 1277 * decl.c (duplicate_decls): Tweak.
1278
18bb3b80 1279 PR c++/53756
1280 * mangle.c (write_unqualified_name): Handle operator auto.
1281
5e5466e3 12822014-01-27 Jason Merrill <jason@redhat.com>
1283
237dc314 1284 PR c++/59823
1285 Core DR 1138
1286 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1287 list-initialization. A conversion to rvalue ref that involves
1288 an lvalue-rvalue conversion is bad.
1289 (convert_like_real): Give helpful error message.
1290
4144f6a4 1291 PR c++/54652
1292 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1293
db5aa3d0 1294 PR c++/58504
1295 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1296 types.
1297
dfd5506e 1298 PR c++/58606
1299 * pt.c (template_parm_to_arg): Call convert_from_reference.
1300 (tsubst_template_arg): Don't strip reference refs.
1301
956043e3 1302 PR c++/58639
1303 * call.c (build_aggr_conv): Reject value-initialization of reference.
1304
ee825f23 1305 PR c++/58812
1306 PR c++/58651
1307 * call.c (convert_like_real): Give helpful error about excess braces
1308 for ck_rvalue of scalar type.
1309
7e28650c 1310 Core DR 1288
1311 * call.c (reference_binding): Only elide braces if the single
1312 element is reference-related.
1313
caccde3c 1314 PR c++/58814
1315 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1316 stabilizing.
1317
b0d3b0d8 1318 PR c++/58837
1319 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1320 FUNCTION_DECL.
1321
5e5466e3 1322 PR c++/59097
1323 * decl.c (compute_array_index_type): Don't call
1324 maybe_constant_value for a non-integral expression.
1325
a89e6c15 13262014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1327
1328 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1329 flag_cilkplus.
1330 * cp-gimplify.c (cp_genericize): Likewise.
1331 * decl.c (grokfndecl): Likewise.
1332 * parser.c (cp_parser_postfix_expression): Likewise.
1333 (cp_parser_postfix_open_square_expression): Likewise.
1334 (cp_parser_direct_declarator): Likewise.
1335 (is_cilkplus_vector_p): Likewise.
1336 (cp_parser_omp_clause_name): Likewise.
1337 (cp_parser_omp_all_clauses): Likewise.
1338 * pt.c (apply_late_template_attributes): Likewise.
1339 * typeck.c (cp_build_array_ref): Likewise.
1340 (cp_build_compound_expr): Likewise.
1341 (check_return_expr): Likewise.
1342
8feda8f8 13432014-01-24 Jason Merrill <jason@redhat.com>
1344
460ea83e 1345 PR c++/58550
1346 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1347 c++11 into error.
1348
8feda8f8 1349 PR c++/59886
1350 PR c++/59659
1351 * typeck2.c (process_init_constructor_array): Don't create
1352 RANGE_EXPR yet.
1353
e5827c8e 13542014-01-24 Jakub Jelinek <jakub@redhat.com>
1355
1356 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1357 handling for RANGE_ARRAY case.
1358
34e387b0 13592014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1360
1361 PR c++/57524
1362 * name-lookup.c (push_using_directive): Use timevar_cond_start.
1363
2623625f 13642014-01-23 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/59846
1367 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1368
46da3601 13692014-01-23 Marek Polacek <polacek@redhat.com>
1370
1371 PR c/58346
1372 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1373 an empty aggregate.
1374
ba1dc756 13752014-01-23 Jason Merrill <jason@redhat.com>
1376
9ea3e924 1377 PR c++/55189
1378 * cp-tree.h (struct language_function): Add infinite_loop and
1379 infinite_loops.
1380 (current_function_infinite_loop): New.
1381 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1382 (break_maybe_infinite_loop): New.
1383 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1384 (finish_do_stmt, finish_for_cond, finish_for_stmt)
1385 (begin_range_for_stmt): Use them.
1386 * decl.c (finish_function): Don't warn about missing return
1387 if current_function_infinite_loop.
1388 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1389 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1390
ba1dc756 1391 * call.c (build_op_delete_call): Use make_tree_vector and
1392 release_tree_vector.
1393
199e0e60 13942014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1395
1396 PR c++/58980
1397 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1398 nested_name_specifier.
1399
7e005ab5 14002014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1401
1402 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1403 see if there is an attribute after function decl. If so, then
1404 parse them now.
1405 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1406 enabled function late parsing.
1407 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1408 attribute for a SIMD-enabled function.
1409 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1410 the function is used by SIMD-enabled function (indicated by NULL
1411 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1412 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1413 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1414 vectorlength clause in SIMD-enabled function and #pragma SIMD's
1415 vectorlength clause. Added a new bool parameter to differentiate
1416 between the two.
1417 (cp_parser_cilk_simd_fn_vector_attrs): New function.
1418 (is_cilkplus_vector_p): Likewise.
1419 (cp_parser_late_parsing_elem_fn_info): Likewise.
1420 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1421 and "vectorlength" clauses when Cilk Plus is enabled.
1422 (cp_parser_omp_clause_linear): Added a new parameter of type bool
1423 and emit a sorry message when step size is a parameter.
1424 * parser.h (cp_parser::cilk_simd_fn_info): New field.
1425 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1426 flag_openmp.
1427 * pt.c (apply_late_template_attributes): Likewise.
1428
d6779b5f 14292014-01-23 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR middle-end/58809
1432 * semantics.c (finish_omp_reduction_clause): Reject
1433 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1434
fae539a5 14352014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
1436
1437 PR c++/59482
1438 * parser.c (cp_parser_class_head): Push the class before parsing
1439 the base-clause, pop after it.
1440
c9743c6a 14412014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1442
1443 * decl2.c (cpp_check): Revert prototype change.
1444
06422b55 14452014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1446
1447 PR c++/59270
1448 PR c++/58811
1449 * init.c (build_value_init_noctor): Don't pass error_mark_node to
1450 build_value_init.
1451
60508649 14522014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1453
1454 PR c++/59269
1455 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1456 only when errorcount == 0.
1457
0116c9f8 14582014-01-17 Marek Polacek <polacek@redhat.com>
1459
1460 PR c++/59838
1461 * cvt.c (ocp_convert): Don't segfault on non-existing
1462 ENUM_UNDERLYING_TYPE.
1463
5b5af642 14642014-01-16 Jason Merrill <jason@redhat.com>
1465
1466 PR c++/59821
1467 * tree.c (bot_manip): Update the location of builtin_LINE and
1468 builtin_FILE calls.
1469
7e173c71 14702014-01-14 Jason Merrill <jason@redhat.com>
1471
1472 PR c++/59659
1473 * typeck2.c (massage_init_elt): New.
1474 (process_init_constructor_record)
1475 (process_init_constructor_union): Use it.
1476 (process_init_constructor_array): Use it. Use RANGE_EXPR.
1477 (split_nonconstant_init_1): Handle it.
1478 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1479
0bc789fc 14802014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1481
1482 PR c++/59631
1483 * parser.c (cp_parser_postfix_expression): Added a new if-statement
1484 and replaced an existing if-statement with else-if statement.
1485 Changed an existing error message wording to match the one from the C
1486 parser.
1487
9d78c80e 14882014-01-08 Jason Merrill <jason@redhat.com>
1489
1490 PR c++/59614
1491 * class.c (abi_tag_data): Add tags field.
1492 (check_abi_tags): Initialize it.
1493 (find_abi_tags_r): Support collecting missing tags.
1494 (mark_type_abi_tags): Don't look at template args.
1495 (inherit_targ_abi_tags): New.
1496 (check_bases_and_members): Use it.
1497 * cp-tree.h (ABI_TAG_IMPLICIT): New.
1498 * mangle.c (write_abi_tags): Check it.
1499
580d697f 15002014-01-07 Jason Merrill <jason@redhat.com>
1501
7196927b 1502 PR c++/58856
1503 * pt.c (num_innermost_template_parms): New.
1504 (get_underlying_template): Use it.
1505
580d697f 1506 PR c++/58965
1507 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1508
7664f7a0 15092014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
1510
1511 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
1512 the letter of 20.11.6 about Base and Derived naming the same
1513 class type modulo cv-qualifiers.
1514
93b82835 15152014-01-06 Adam Butcher <adam@jessamine.co.uk>
1516
1517 PR c++/59635
22d5a519 1518 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
93b82835 1519 function as unimplemented for generic lambdas with varargs.
1520
06e996cd 1521 PR c++/59636
22d5a519 1522 * parser.c (cp_parser_template_parameter): Early out with
06e996cd 1523 error_mark_node if parameter declaration was not parsed.
1524
4d901bc2 1525 PR c++/59629
22d5a519 1526 * parser.c (cp_parser_lambda_expression): Save/reset/restore
4d901bc2 1527 auto_is_implicit_function_template_parm_p around lambda body.
1528
5afc8ab4 1529 PR c++/59638
22d5a519 1530 * parser.c (cp_parser_init_declarator): Undo fully implicit
5afc8ab4 1531 template parameter list when declarator is not a function.
1532
9372a89d 15332014-01-03 Marc Glisse <marc.glisse@inria.fr>
1534
1535 PR c++/58950
1536 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
1537
04e0495a 15382014-01-03 Tobias Burnus <burnus@net-b.de>
1539
1540 PR c++/58567
1541 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
1542
4a7973e1 15432014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1544
1545 Core DR 1442
1546 PR c++/59165
1547 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
1548 as include_std to perform_koenig_lookup.
1549 (cp_parser_postfix_expression): Adjust.
1550 * pt.c (tsubst_copy_and_build): Likewise.
1551 * semantics.c (perform_koenig_lookup): Remove bool parameter.
1552 (omp_reduction_lookup): Adjust.
1553 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
1554 (lookup_arg_dependent): Likewise.
1555 (lookup_function_nonclass): Adjust.
1556 * name-lookup.h: Adjust declaration.
1557 * cp-tree.h: Likewise.
1558
7178d1ea 15592014-01-02 Marc Glisse <marc.glisse@inria.fr>
1560
1561 PR c++/59087
1562 * parser.c (cp_parser_userdef_numeric_literal): Mention
1563 -fext-numeric-literals in the message.
1564
37c19cb6 15652014-01-02 Marc Glisse <marc.glisse@inria.fr>
1566
1567 PR c++/59641
1568 * call.c (build_conditional_expr_1): Check the return value of
1569 force_rvalue.
1570
cdfa9d87 15712014-01-02 Marc Glisse <marc.glisse@inria.fr>
1572
1573 * call.c (convert_like_real): Check complain.
1574
5a5f1b48 15752014-01-02 Marc Glisse <marc.glisse@inria.fr>
1576
1577 PR c++/59378
1578 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
1579 in templates.
1580
3aea1f79 15812014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1582
1583 Update copyright years
1584
e4f22041 15852014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1586
1587 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
1588 the standard form for the copyright notice.
7dfbd804 1589\f
b671739d 1590Copyright (C) 2014 Free Software Foundation, Inc.
7dfbd804 1591
1592Copying and distribution of this file, with or without modification,
1593are permitted in any medium without royalty provided the copyright
1594notice and this notice are preserved.