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