]> 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
766090c2
TS
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
54674a35
PC
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
8fa53379
JM
452014-05-15 Jason Merrill <jason@redhat.com>
46
47 * call.c (print_conversion_rejection): Use loc consistently.
48
014397c2
PC
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
89606913
JM
592014-05-14 Jason Merrill <jason@redhat.com>
60
d02f620d
JM
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
89606913
JM
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.
c4622c2b 78 (print_z_candidates): Say "candidate:" before each candidate.
89606913
JM
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
6626c52e
JM
852014-05-13 Jason Merrill <jason@redhat.com>
86
c29f393f
JM
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
6626c52e
JM
91 PR c++/61151
92 * semantics.c (is_this_parameter): Allow capture proxies too.
93
83afe9ef
JM
942014-05-12 Jason Merrill <jason@redhat.com>
95
3f55e16a
JM
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
83afe9ef
JM
101 * call.c (convert_like_real): Use inform for identifying the
102 declaration point.
103
bc51de9c
PC
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
0b360a07
MV
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
ad31c32a
PC
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
bb8b1f69
JM
1342014-05-09 Jason Merrill <jason@redhat.com>
135
e8ee694a
JM
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
bfa58951
JM
141 DR 5
142 PR c++/60019
143 * call.c (build_user_type_conversion_1): The copy-init temporary
144 is cv-unqualified.
145
fc2bfea1
JM
146 PR c++/58714
147 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
148
5f901ccf
JM
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
bb8b1f69
JM
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
7e422c4f
PC
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
04e5eb5f
PC
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
ef2662bf
PC
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
895a5cc0
PC
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
1d60af08
KZ
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
32314c38
PC
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
43b781fa
JM
2212014-05-02 Jason Merrill <jason@redhat.com>
222
c4fa3572
JM
223 * decl2.c (vague_linkage_p): Local statics have vague linkage.
224
43b781fa
JM
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
19fc9faa
MP
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
32e00768
MP
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
4f419f8c
JM
2462014-04-30 Jason Merrill <jason@redhat.com>
247
60ff8e16
JM
248 PR c++/60980
249 * init.c (build_value_init): Don't try to call an array constructor.
250
4f419f8c
JM
251 PR c++/60951
252 * typeck2.c (massage_init_elt): Use maybe_constant_init.
253
f8ed5150
MP
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
b15ea309
JM
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
a3879fa1
PC
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
42056eac
JJ
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
b911b50d
MG
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
3734964f
DT
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
793c625f
MG
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
e162a134
JJ
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
c663bc6a
JM
3272014-04-18 Jason Merrill <jason@redhat.com>
328
fc45aeee
JM
329 DR 1571
330 * call.c (reference_binding): Recurse on user-defined conversion.
331
c663bc6a
JM
332 PR c++/60872
333 * call.c (standard_conversion): Don't try to apply restrict to void.
334
fcde53d0
MG
3352014-04-16 Marc Glisse <marc.glisse@inria.fr>
336
337 * decl.c (reshape_init_r): Handle a single element of vector type.
338
1dbdb756
PP
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
23b0af0a
PP
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
fe9208ef
PC
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
4f0ddb6f
JJ
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
9dba4b55
PC
3742014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
375
376 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
377
8095617b
PC
3782014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
379
380 * pt.c (mark_template_parm): Use template_parm_level_and_index.
381
7d0039a6
JM
3822014-04-11 Jason Merrill <jason@redhat.com>
383
63620197
JM
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
1c982d13
JM
389 DR 1467
390 PR c++/51747
391 * decl.c (reshape_init_r): Handle a single element of class type.
392
7d0039a6
JM
393 DR 1338
394 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
395 built-in operator new.
396
1b255e8f
PC
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
4561285b
JM
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
8aa1cce6
RB
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
51970b3e
FC
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
a7c3f276
PC
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
38f09da3
NS
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
090ec702
FC
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
9119c7fa
PC
4532014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
454
455 PR c++/58207
456 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
457
822cc906
PP
4582014-04-04 Patrick Palka <patrick@parcs.ath.cx>
459
0450fc0b
PP
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
822cc906
PP
465 PR c++/21113
466 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
467
3fe99aa5
FC
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
d4a69ff4
FC
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
880a467b
NS
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
cd8a9d6d
JM
4872014-04-01 Jason Merrill <jason@redhat.com>
488
52710d27
JM
489 * pt.c (process_partial_specialization): Say "not deducible"
490 rather than "not used". Use inform.
491
cd8a9d6d
JM
492 PR c++/60374
493 * pt.c (coerce_template_parms): Check that the pack expansion
494 pattern works with the first matching parameter.
495
0df9da03
FC
4962014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
497
9ffac481 498 * init.c (perform_member_init): Homogenize uninitialized
0df9da03
FC
499 diagnostics.
500
2982147e
JM
5012014-04-01 Jason Merrill <jason@redhat.com>
502
24991604
JM
503 PR c++/60708
504 * call.c (build_array_conv): Call complete_type.
505
dd5593fc
JM
506 PR c++/60713
507 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
508 (picflag_from_initializer): Return it.
509 (process_init_constructor): Handle it.
510
2982147e
JM
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
9ffac481 5192014-03-31 Patrick Palka <patrick@parcs.ath.cx>
75d850f3
PP
520
521 PR c++/44859
522 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
523 COMPONENT_REFs and ARRAY_REFs sooner.
524
4b0040a6
AB
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
5294e4c3
AB
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
816551fe 5442014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
5294e4c3
AB
545
546 PR c++/52369
d4a69ff4 547 * method.c (walk_field_subobs): Improve the diagnostic
816551fe 548 locations for both REFERENCE_TYPEs and non-static const members.
d4a69ff4 549 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
816551fe
FC
550 instead of %qD to be consistent with the c++11 diagnostic.
551
45156f14
JM
5522014-03-25 Jason Merrill <jason@redhat.com>
553
d74db8ff
JM
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
1cbba79d
JM
559 PR c++/60375
560 * parser.c (cp_parser_lambda_expression): Don't parse the body of
561 a lambda in unevaluated context.
562
45156f14
JM
563 PR c++/60628
564 * decl.c (create_array_type_for_decl): Complain about array of auto.
565
8bcc90b0
JJ
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
21554a3e
AB
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
d0f27fb6
JM
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
279d3eb8
PC
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
7614d42c
JJ
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
7d092805
PC
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
c66f2ba1
AB
6032014-03-17 Adam Butcher <adam@jessamine.co.uk>
604
e0672441
AB
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
c66f2ba1
AB
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
50e4d1ec
PC
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
7e343703
JM
6222014-03-14 Jason Merrill <jason@redhat.com>
623
47b5d284
JM
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
7e343703
JM
629 PR c++/58678
630 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
631 abstract class as pure.
632
b0a87402
PC
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
9299bde0
PC
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
5af1876c
PC
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
4d3f2fa6
JM
6522014-03-10 Jason Merrill <jason@redhat.com>
653
4a4e80cb
JM
654 PR c++/60367
655 * call.c (convert_default_arg): Remove special handling for
656 CONSTRUCTOR.
657
4d3f2fa6
JM
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
14e62702
AB
6632014-03-08 Adam Butcher <adam@jessamine.co.uk>
664
1c74dc2a
AB
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
14e62702
AB
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
b75bf8b1
JM
6752014-03-07 Jason Merrill <jason@redhat.com>
676
c93a4be5
JM
677 * Make-lang.in (check_g++_parallelize): Split dg.exp.
678
968b3503
JM
679 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
680 we're in a trailing return type.
681
d08a068b
JM
682 * typeck.c (comp_template_parms_position): 'auto' and
683 'decltype(auto)' are different from real template parms.
684
94151520
JM
685 * parser.c (cp_parser_using_declaration): Consume the semicolon
686 after bare parameter pack error.
687
0e4cf887
JM
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
b75bf8b1
JM
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
c12b3bd3
PC
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
bc65bdd5
PC
7092014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
710
711 * decl.c (check_initializer): Remove dead code.
712
3af9c5e9
MP
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
d9d8f6b1
PC
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
04702386
JM
7302014-03-05 Jason Merrill <jason@redhat.com>
731
f9b381b8
JM
732 PR c++/60409
733 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
734 dependent expression.
735
5d264d62
JM
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
04702386
JM
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
201fe4c6
JM
7512014-03-04 Jason Merrill <jason@redhat.com>
752
ca982b1c
JM
753 PR c++/60417
754 * typeck2.c (process_init_constructor_record): Set
755 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
756
201fe4c6
JM
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
064fd5a8
PC
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
234b1504
AB
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
c582aac9
PC
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
fe96264f
JM
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
abb839ec
JM
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
f1ee5eaf
PC
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
ae9b3eb9
PC
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
7fce82f5
JM
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
2f75f515
JM
8122014-02-26 Jason Merrill <jason@redhat.com>
813
c3439626
JM
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
ca7e759d
JM
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
b0ff7fe1
JM
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
f3417723
JM
840 PR c++/60182
841 * pt.c (unify): Ignore alias templates when deducing a template
842 template parameter.
843
2f75f515
JM
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
d808e92e
JM
8502014-02-25 Jason Merrill <jason@redhat.com>
851
be9e97bd
JM
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
241172a5
JM
856 * call.c (print_conversion_rejection): Handle n_arg of -2.
857 (build_user_type_conversion_1): Pass it.
858
944b63db
JM
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
a6659b55
JM
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
6e6eaecc
JM
875 PR lto/53808
876 * class.c (clone_function_decl): Call note_vague_linkage_fn for
877 defaulted virtual dtor.
878
d808e92e
JM
879 DR 1286
880 PR c++/60328
881 * pt.c (get_underlying_template): Fix equivalence calculation.
882
81493f78
AB
8832014-02-25 Adam Butcher <adam@jessamine.co.uk>
884
adbdb8c7
AB
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
1b859733
AB
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
81493f78
AB
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
01689517
JM
9062014-02-24 Jason Merrill <jason@redhat.com>
907
2105f1a7
JM
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
01689517
JM
912 PR c++/60312
913 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
914
a866509a 9152014-02-21 Jason Merrill <jason@redhat.com>
1c195d2a 916
7eae5d36
JM
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
d723358d
JM
922 PR c++/60108
923 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
924
c754ffcc
JM
925 PR c++/60185
926 * parser.c (cp_parser_default_argument): Clear
927 current_class_ptr/current_class_ref like tsubst_default_argument.
928
e7b67047
JM
929 PR c++/60252
930 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
931 than current_binding_level.
932
b98fb363
JM
933 PR c++/60186
934 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
935
3e9e24ab
JM
936 PR c++/60187
937 * parser.c (cp_parser_enum_specifier): Call
938 check_for_bare_parameter_packs.
939
71b735a5
JM
940 PR c++/59347
941 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
942 erroneous typedef.
943
2671a8ef
JM
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
0d4af074
JM
950 PR c++/60216
951 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
952 (check_explicit_specialization): Don't clone.
953
07874b24
JM
954 PR c++/60219
955 * pt.c (coerce_template_parms): Bail if argument packing fails.
956
843633f8
JM
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
f611c78a 961 PR c++/60227
cd3ef6f7
JM
962 * call.c (build_array_conv): Don't crash on VLA.
963
1ea32974
JM
964 PR c++/60248
965 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
966
1c195d2a
JM
967 PR c++/60252
968 * lambda.c (maybe_resolve_dummy): Don't try to capture this
969 in declaration context.
a866509a 970
e9cd6551
JM
971 DR 1591
972 PR c++/60051
973 * pt.c (unify): Only unify if deducible. Handle 0-length list.
974
9e01a71f
JM
975 PR c++/60250
976 * parser.c (cp_parser_direct_declarator): Don't wrap a
977 type-dependent expression in a NOP_EXPR.
978
e429bc35
JM
979 PR c++/60251
980 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
981
a866509a
JM
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
2807d5d2
AB
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
f2381074
KT
9982014-02-20 Kai Tietz <ktietz@redhat.com>
999
f1dbbe42
KT
1000 PR c++/58873
1001 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1002 valued type argument as error_mark_node.
1003
f2381074
KT
1004 PR c++/58835
1005 * semantics.c (finish_fname): Handle error_mark_node.
1006
55694175
JM
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
4998d666
JJ
10132014-02-19 Jakub Jelinek <jakub@redhat.com>
1014
128ed090
JJ
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
4998d666
JJ
1019 PR c++/60267
1020 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1021
a1535f52
PC
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
b19fd0fd
AB
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
75e9d9a0
AB
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
6cfbc023
PC
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
b3bb0eb9
JH
10512014-02-05 Jan Hubicka <hubicka@ucw.cz
1052
1053 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1054
54e19c00
JJ
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
5d77fb19
MG
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
f344f525
PC
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
4244ec23
PC
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
99a82a1e
JM
10802014-01-31 Jason Merrill <jason@redhat.com>
1081
3d27e066
JM
1082 PR c++/59469
1083 * pt.c (mark_decl_instantiated): Call mark_needed.
1084
6962711f
JM
1085 PR c++/58672
1086 * decl2.c (handle_tls_init): Handle null init fn.
1087
99a82a1e
JM
1088 PR c++/55800
1089 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1090
f1f82a37
PC
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
4b55a782
JM
10982014-01-31 Jason Merrill <jason@redhat.com>
1099
408249b2
JM
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
4b55a782
JM
1105 PR c++/57043
1106 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1107 during partial ordering.
1108
81e5eca8
MP
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
f221dc81
JM
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
35e519c4
RS
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
68fca595
MP
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
9ca57929
PC
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
e1b317ae
PC
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
cc27b5cd
PC
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
404c2aea
JM
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
7651c656
JM
11622014-01-29 Jason Merrill <jason@redhat.com>
1163
3c4e06c2
JM
1164 PR c++/59707
1165 * call.c (add_builtin_candidate): Catch dependent types.
1166
0429e064
JM
1167 PR c++/59989
1168 * pt.c (expand_template_argument_pack): Correct
1169 non_default_args_count calculation.
1170
434e6c8a
JM
1171 PR c++/58466
1172 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1173
7651c656
JM
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
e8902891
PC
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
e1e30986
PC
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
dc9e1b86
JM
11932014-01-29 Jason Merrill <jason@redhat.com>
1194
8ae90330
JM
1195 PR c++/59916
1196 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1197 cdtor_returns_this case.
1198
dc9e1b86
JM
1199 PR c++/59315
1200 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1201
4ca56230
PC
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
2e5e7103
JM
12082014-01-28 Jason Merrill <jason@redhat.com>
1209
15b31f8c
JM
1210 PR c++/59791
1211 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1212 (tsubst_copy): Use it if lookup fails.
1213
4c690cea
JM
1214 PR c++/59818
1215 * pt.c (tsubst_function_type): Make sure we keep the same function
1216 quals.
1217
0f59a31d
JM
1218 PR c++/58701
1219 * semantics.c (build_anon_member_initialization): Stop walking
1220 when we run out of COMPONENT_REFs.
1221
3807059e
JM
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
1377eb9a
JM
1228 * decl.c (duplicate_decls): Tweak.
1229
2e5e7103
JM
1230 PR c++/53756
1231 * mangle.c (write_unqualified_name): Handle operator auto.
1232
64d34897
JM
12332014-01-27 Jason Merrill <jason@redhat.com>
1234
63a18c8e
JM
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
b89cc12b
JM
1242 PR c++/54652
1243 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1244
9e73c3f3
JM
1245 PR c++/58504
1246 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1247 types.
1248
b25c2a2f
JM
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
1b87c991
JM
1253 PR c++/58639
1254 * call.c (build_aggr_conv): Reject value-initialization of reference.
1255
11074000
JM
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
f235ad11
JM
1261 Core DR 1288
1262 * call.c (reference_binding): Only elide braces if the single
1263 element is reference-related.
1264
30f6b784
JM
1265 PR c++/58814
1266 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1267 stabilizing.
1268
9cca4e3d
JM
1269 PR c++/58837
1270 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1271 FUNCTION_DECL.
1272
64d34897
JM
1273 PR c++/59097
1274 * decl.c (compute_array_index_type): Don't call
1275 maybe_constant_value for a non-integral expression.
1276
b72271b9
BI
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
114bf260
JM
12942014-01-24 Jason Merrill <jason@redhat.com>
1295
233aedf4
JM
1296 PR c++/58550
1297 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1298 c++11 into error.
1299
114bf260
JM
1300 PR c++/59886
1301 PR c++/59659
1302 * typeck2.c (process_init_constructor_array): Don't create
1303 RANGE_EXPR yet.
1304
2cbf3dd7
JJ
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
f9e2a506
PC
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
393e8e8b
MP
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
f04dda30
MP
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
928d850f
JM
13262014-01-23 Jason Merrill <jason@redhat.com>
1327
20f18c3c
JM
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
928d850f
JM
1342 * call.c (build_op_delete_call): Use make_tree_vector and
1343 release_tree_vector.
1344
ea15e254
PC
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
74558dd9
BI
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
652fea39
JJ
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
32ab58b2
VV
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
621955cb
EB
13922014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1393
1394 * decl2.c (cpp_check): Revert prototype change.
1395
a95aef3c
PC
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
12185846
PC
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
0ffc4683
MP
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
cfb1582c
JM
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
41852027
JM
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
9a74f20c
BI
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
f585f02f
JM
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
5a5e7deb
JM
14512014-01-07 Jason Merrill <jason@redhat.com>
1452
1b7ac922
JM
1453 PR c++/58856
1454 * pt.c (num_innermost_template_parms): New.
1455 (get_underlying_template): Use it.
1456
5a5e7deb
JM
1457 PR c++/58965
1458 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1459
1f872df7
PC
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
2c8c6273
AB
14662014-01-06 Adam Butcher <adam@jessamine.co.uk>
1467
1468 PR c++/59635
529a6471 1469 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
2c8c6273
AB
1470 function as unimplemented for generic lambdas with varargs.
1471
81fdaa17 1472 PR c++/59636
529a6471 1473 * parser.c (cp_parser_template_parameter): Early out with
81fdaa17
AB
1474 error_mark_node if parameter declaration was not parsed.
1475
2418d7da 1476 PR c++/59629
529a6471 1477 * parser.c (cp_parser_lambda_expression): Save/reset/restore
2418d7da
AB
1478 auto_is_implicit_function_template_parm_p around lambda body.
1479
aaa15a0d 1480 PR c++/59638
529a6471 1481 * parser.c (cp_parser_init_declarator): Undo fully implicit
aaa15a0d
AB
1482 template parameter list when declarator is not a function.
1483
5c67ba02
MG
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
54a990d3
TB
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
cdc23b1b
PC
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
33270bf6
MG
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
25c541b4
MG
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
1a763062
MG
15222014-01-02 Marc Glisse <marc.glisse@inria.fr>
1523
1524 * call.c (convert_like_real): Check complain.
1525
4939c5f3
MG
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
23a5b65a
RS
15322014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1533
1534 Update copyright years
1535
f9030485
RS
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.
ad41bd84 1540\f
2eed95b0 1541Copyright (C) 2014 Free Software Foundation, Inc.
ad41bd84
JM
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.