re PR c++/60992 (ICE in tsubst_copy, at cp/pt.c:12637)
[gcc.git] / gcc / cp / ChangeLog
1 2014-05-30 Jason Merrill <jason@redhat.com>
2
3 PR c++/60992
4 * pt.c (tsubst_init): Split out from...
5 (tsubst_expr) [DECL_EXPR]: Here.
6 (tsubst_copy) [VAR_DECL]: Use it.
7 * semantics.c (finish_id_expression): Return the decl for static/const.
8
9 2014-05-28 Jason Merrill <jason@redhat.com>
10
11 PR c++/47202
12 * decl.c (cxx_comdat_group): Return a decl.
13 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
14
15 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
16 bound.
17
18 PR c++/61242
19 * call.c (build_aggr_conv): Ignore passed in flags.
20 (build_array_conv, build_complex_conv): Likewise.
21
22 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
23
24 * optimize.c (maybe_thunk_body): Use set_comdat_group.
25 (maybe_clone_body): Likewise.
26 * decl.c (duplicate_decls): Update code duplicating comdat group;
27 do not copy symtab pointer; before freeing newdecl remove it
28 from symtab.
29 * decl2.c (constrain_visibility): Use set_comdat_group.
30
31 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
32
33 * rtti.c: Include tm_p.h
34 (emit_tinfo_decl): Force RTTI data to be aligned to required
35 ABI alignment only.
36
37 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
38
39 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
40 ignoring other target adjustments.
41
42 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
43
44 * semantics.c (finish_omp_clauses): Remove duplicated variable
45 initialization.
46
47 * parser.c (cp_parser_omp_target): Return bool values.
48
49 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
50
51 PR c++/61088
52 * lambda.c (add_capture): Enforce that capture by value requires
53 complete type.
54 * typeck2.c (cxx_incomplete_type_inform): Early return if
55 TYPE_MAIN_DECL is null.
56
57 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
58
59 PR c/61271
60 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
61
62 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
63
64 PR c++/61133
65 * lambda.c (build_capture_proxy, add_capture): Treat normal
66 captures and init-captures identically.
67
68 2014-05-21 Mark Wielaard <mjw@redhat.com>
69
70 PR debug/16063
71 * cp-lang.c (cxx_enum_underlying_base_type): New function.
72 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
73
74 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
75
76 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
77 * cp-array-notation.c (replace_invariant_exprs): Likewise.
78 (expand_array_notation): Handle VOID_CST.
79 * error.c (dump_expr): Likewise.
80 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
81 (cxx_pretty_printer::expression): Likewise.
82 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
83 * decl.c (register_dtor_fn): Likewise.
84 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
85 (build_delete, push_base_cleanups): Likewise.
86 * mangle.c (write_expression): Likewise.
87 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
88 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
89 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
90 * tree.c (cp_tree_equal): Likewise.
91 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
92 instead of void_zero_node.
93 * typeck.c (check_return_expr): Likewise.
94 * typeck2.c (build_functional_cast): Likewise.
95
96 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
97
98 PR c/60189
99 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
100 from here to...
101 (cp_parser_statement): ...here. Make sure only semicolon can go after
102 Cilk_sync.
103
104 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
105
106 PR c++/58753
107 PR c++/58930
108 PR c++/58704
109 * typeck2.c (digest_nsdmi_init): New.
110 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
111 * init.c (get_nsdmi): Likewise.
112 * cp-tree.h (digest_nsdmi_init): Declare.
113
114 2014-05-20 Jason Merrill <jason@redhat.com>
115
116 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
117 up a virtual function in a dummy object.
118
119 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
120
121 PR c++/60373
122 * decl.c (duplicate_decls): Replace pair of warning_at with
123 warning_at + inform.
124 (maybe_commonize_var): Likewise.
125
126 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
127
128 PR bootstrap/61210
129 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
130 (tsubst_copy_and_build): Perform recursive substitutions in a
131 deterministic order.
132
133 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
134
135 PR c++/58664
136 * typeck2.c (cxx_incomplete_type_inform): New.
137 (cxx_incomplete_type_diagnostic): Use it.
138 * decl.c (grokdeclarator): Check the element type of an
139 incomplete array type; call the above.
140 * cp-tree.h (cxx_incomplete_type_inform): Declare.
141
142 2014-05-19 Jason Merrill <jason@redhat.com>
143
144 PR c++/58761
145 * pt.c (tsubst_copy): Don't check at_function_scope_p.
146 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
147
148 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
149
150 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
151 * parser.c (cp_parser_enum_specifier): Likewise.
152
153 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
154
155 * class.c (sorted_fields_type_new): Adjust.
156 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
157 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
158 * cp-tree.h: Remove usage of variable_size gty attribute.
159 * decl.c (make_label_decl): Adjust.
160 (check_goto): Likewise.
161 (start_preparsed_function): Likewise.
162 (save_function_data): Likewise.
163 * lex.c (init_reswords): Likewise.
164 (retrofit_lang_decl): Likewise.
165 (cxx_dup_lang_specific_decl): Likewise.
166 (copy_lang_type): Likewise.
167 (cxx_make_type): Likewise.
168 * name-lookup.c (binding_entry_make): Likewise.
169 (binding_table_construct): Likewise.
170 (binding_table_new): Likewise.
171 (cxx_binding_make): Likewise.
172 (pushdecl_maybe_friend_1): Likewise.
173 (begin_scope): Likewise.
174 (push_to_top_level): Likewise.
175 * parser.c (cp_lexer_alloc): Likewise.
176 (cp_lexer_new_from_tokens): Likewise.
177 (cp_token_cache_new): Likewise.
178 (cp_parser_context_new): Likewise.
179 (cp_parser_new): Likewise.
180 (cp_parser_nested_name_specifier_opt): Likewise.
181 (cp_parser_template_id): Likewise.
182 * pt.c (maybe_process_partial_specialization): Likewise.
183 (register_specialization): Likewise.
184 (add_pending_template): Likewise.
185 (lookup_template_class_1): Likewise.
186 (push_tinst_level): Likewise.
187 * semantics.c (register_constexpr_fundef): Likewise.
188 (cxx_eval_call_expression): Likewise.
189 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
190
191 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
192
193 PR c++/51640
194 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
195 when cp_parser_lookup_name sets ambiguous_decls.
196
197 2014-05-15 Jason Merrill <jason@redhat.com>
198
199 * call.c (print_conversion_rejection): Use loc consistently.
200
201 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
202
203 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
204 * call.c (convert_like_real, build_new_method_call_1): Use it.
205 * decl2.c (grokfield): Likewise.
206 * init.c (perform_member_init, build_aggr_init, expand_default_init,
207 build_new_1): Likewise.
208 * mangle.c (write_expression): Likewise.
209 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
210
211 2014-05-14 Jason Merrill <jason@redhat.com>
212
213 PR c++/20332
214 PR c++/21631
215 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
216 dropped cv-quals as a bad conversion.
217 (convert_like_real) [ck_ref_bind]: Explain them.
218 (compare_ics): Check badness before stripping reference
219 bindings. Handle comparing bad reference bindings.
220 * typeck.c (comp_cv_qualification): Add overload that just takes
221 integers.
222 * cp-tree.h: Declare it.
223
224 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
225 (arg_conversion_rejection, bad_arg_conversion_rejection)
226 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
227 (add_function_candidate): Pass actual argument, rather than type, to
228 bad_arg_conversion_rejection.
229 (print_conversion_rejection): Explain what's wrong with the conversion.
230 (print_z_candidates): Say "candidate:" before each candidate.
231 (splice_viable): Be strict if we see a viable or template candidate.
232 (build_user_type_conversion_1): Pass false to strict parameter.
233 (perform_overload_resolution, build_conditional_expr_1): Likewise.
234 (build_new_op_1, build_new_method_call_1): Likewise.
235 (build_op_call_1): Pass true to strict parameter.
236
237 2014-05-13 Jason Merrill <jason@redhat.com>
238
239 * call.c (print_error_for_call_failure): Say "no match" rather
240 than "ambiguous" if there were no strict matches.
241 (build_new_method_call_1): Likewise.
242
243 PR c++/61151
244 * semantics.c (is_this_parameter): Allow capture proxies too.
245
246 2014-05-12 Jason Merrill <jason@redhat.com>
247
248 * call.c (maybe_print_user_conv_context): New.
249 (convert_like_real): Use it. Print call context for bad
250 user-defined conversion.
251 (build_over_call): Print call context for bad 'this' conversion.
252
253 * call.c (convert_like_real): Use inform for identifying the
254 declaration point.
255
256 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
257
258 * cvt.c (cp_convert_to_pointer): Don't call error_at if
259 complain & tf_error is false.
260
261 * decl.c (make_unbound_class_template): Prefer inform for
262 "declared here"-type message.
263
264 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
265
266 PR c++/60463
267 PR c++/60755
268 * lambda.c (lambda_expr_this_capture): Add new parameter
269 add_capture_p controlling whether the functions will try to
270 capture 'this' via the default capture.
271 (maybe_resolve_dummy): Likewise.
272 * cp-tree.h: Adjust prototypes.
273 * call.c, semantics.c: Change callers of these functions.
274 * call.c (build_new_method_call_1): Use the actual 'this' that
275 would be potentially captured for the overload resolution, instead
276 of the dummy object.
277
278 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
279
280 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
281 parameter.
282 (convert_nontype_argument): Adjust calls.
283 (coerce_template_parameter_pack): Add missing complain & tf_error
284 check.
285
286 2014-05-09 Jason Merrill <jason@redhat.com>
287
288 DR 587
289 PR c++/51317
290 * call.c (build_conditional_expr_1, conditional_conversion): Handle
291 non-class lvalues and xvalues that differ only in cv-qualifiers.
292
293 DR 5
294 PR c++/60019
295 * call.c (build_user_type_conversion_1): The copy-init temporary
296 is cv-unqualified.
297
298 PR c++/58714
299 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
300
301 PR c++/54348
302 * call.c (build_conditional_expr_1): If overload resolution finds
303 no match, just say "different types".
304
305 PR c++/32019
306 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
307
308 PR c++/22434
309 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
310 if we didn't find a conversion.
311 Don't accept a bad conversion too early.
312
313 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
314
315 PR c++/13981
316 * typeck.c (convert_for_assignment): Provide an inform for pointers
317 to incomplete class types.
318
319 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
320
321 PR c++/61083
322 * pt.c (convert_nontype_argument): Protect all the error calls
323 with complain & tf_error.
324
325 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
326
327 PR c++/61080
328 * pt.c (instantiate_decl): Avoid generating the body of a
329 deleted function.
330
331 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
332
333 PR c++/60999
334 * pt.c (maybe_begin_member_template_processing): Use
335 uses_template_parms.
336
337 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
338 Mike Stump <mikestump@comcast.net>
339 Richard Sandiford <rdsandiford@googlemail.com>
340
341 * call.c: Include wide-int.h.
342 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
343 (convert_for_arg_passing): Likewise.
344 * class.c: Include wide-int.h.
345 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
346 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
347 (include_empty_classes): Likewise
348 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
349 * cvt.c: Include wide-int.h.
350 (ignore_overflows): Use wide_int_to_tree.
351 * decl.c: Include wide-int.h.
352 (check_array_designated_initializer): Use wide-int interfaces.
353 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
354 (finish_enum_value_list): Use signop.
355 (build_enumerator): Use wide-int interfaces.
356 * init.c: Include wide-int.h.
357 (build_new_1): Use wide-int interfaces.
358 * mangle.c: Include wide-int.h.
359 (write_integer_cst): Use wide-int interfaces.
360 (write_array_type): Likewise.
361 * tree.c: Include wide-int.h.
362 (cp_tree_equal): Use tree_int_cst_equal.
363 * typeck2.c: Include wide-int.h.
364 (process_init_constructor_array): Use wide-int interfaces.
365
366 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
367
368 PR c++/58582
369 * decl.c (grokfndecl): Check duplicate_decls return value for
370 error_mark_node.
371 * pt.c (instantiate_decl): A deleted function is defined.
372
373 2014-05-02 Jason Merrill <jason@redhat.com>
374
375 * decl2.c (vague_linkage_p): Local statics have vague linkage.
376
377 PR c++/60992
378 * lambda.c (lambda_capture_field_type): Wrap anything dependent
379 other than 'this'.
380 (add_capture): Check for VLA before calling it.
381 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
382 just the current one. Make non-static.
383 * cp-tree.h: Declare it.
384 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
385 the operand was static or constant.
386
387 2014-05-02 Marek Polacek <polacek@redhat.com>
388
389 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
390 warning_at calls.
391
392 2014-05-01 Marek Polacek <polacek@redhat.com>
393
394 PR c/43395
395 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
396 between label and variable when warning about returning local address.
397
398 2014-04-30 Jason Merrill <jason@redhat.com>
399
400 PR c++/60980
401 * init.c (build_value_init): Don't try to call an array constructor.
402
403 PR c++/60951
404 * typeck2.c (massage_init_elt): Use maybe_constant_init.
405
406 2014-04-30 Marek Polacek <polacek@redhat.com>
407
408 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
409 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
410 for non-integer types.
411
412 2014-04-29 Jason Merrill <jason@redhat.com>
413
414 DR 1351
415 Represent the unevaluated exception specification of an implicitly
416 declared or deleted function with a simple placeholder, not a list
417 of functions.
418 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
419 * except.c (unevaluated_noexcept_spec): New.
420 * class.c (deduce_noexcept_on_destructor): Use it.
421 * decl.c (check_redeclaration_exception_specification): Call
422 maybe_instantiate_noexcept.
423 (duplicate_decls): Call it before merge_types.
424 (start_preparsed_function): Call maybe_instantiate_noexcept.
425 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
426 * init.c (get_nsdmi): Factor out of perform_member_init.
427 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
428 (walk_field_subobs): Consider NSDMI for EH spec.
429 (get_defaulted_eh_spec): New.
430 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
431 (defaulted_late_check): Defer EH checking in non-template classes.
432 (after_nsdmi_defaulted_late_checks): New.
433 * parser.c (cp_parser_class_specifier_1): Use it.
434 (unparsed_classes): New macro.
435 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
436 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
437 Remove list-of-functions handling.
438 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
439 handling and FN parameter.
440 * typeck.c (merge_types): Adjust.
441
442 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
443
444 PR c++/59120
445 * parser.c (cp_parser_alias_declaration): Check return value of
446 cp_parser_require.
447
448 2014-04-24 Jakub Jelinek <jakub@redhat.com>
449
450 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
451 atomic-clause, allow comma in between atomic-clause and
452 seq_cst.
453
454 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
455
456 PR libstdc++/43622
457 * rtti.c (emit_support_tinfos): Do not iterate on
458 registered_builtin_types (partial revert).
459
460 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
461
462 PR c++/57958
463 * semantics.c (apply_deduced_return_type): Complete non-void type
464 before estimating whether the type is aggregate.
465
466 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
467
468 PR libstdc++/43622
469 * rtti.c (emit_support_tinfo_1): New function, extracted from
470 emit_support_tinfos.
471 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
472
473 2014-04-22 Jakub Jelinek <jakub@redhat.com>
474
475 PR c/59073
476 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
477 fails, don't set OM_PARALLEL_COMBINED and return NULL.
478
479 2014-04-18 Jason Merrill <jason@redhat.com>
480
481 DR 1571
482 * call.c (reference_binding): Recurse on user-defined conversion.
483
484 PR c++/60872
485 * call.c (standard_conversion): Don't try to apply restrict to void.
486
487 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
488
489 * decl.c (reshape_init_r): Handle a single element of vector type.
490
491 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
492
493 PR c++/60765
494 * decl2.c (cplus_decl_attributes): Handle
495 pointer-to-member-function declarations.
496
497 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
498
499 PR c++/60764
500 * call.c (build_user_type_coversion): Use build_dummy_object
501 to create the placeholder object for a constructor method call.
502 (build_special_member_call): Likewise.
503 (build_over_call): Check for the placeholder object with
504 is_dummy_object.
505 (build_new_method_call_1): Likewise. Don't attempt to resolve
506 a dummy object for a constructor method call.
507
508 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
509
510 PR c++/59295
511 * friend.c (add_friend, make_friend_class): Move repeated friend
512 warning under Wredundant_decls.
513
514 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
515
516 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
517 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
518 (do_class_using_decl): Likewise.
519 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
520
521 2014-04-15 Jakub Jelinek <jakub@redhat.com>
522
523 PR plugins/59335
524 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
525
526 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
527
528 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
529
530 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
531
532 * pt.c (mark_template_parm): Use template_parm_level_and_index.
533
534 2014-04-11 Jason Merrill <jason@redhat.com>
535
536 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
537 * parser.c: Adjust.
538 (cp_lexer_get_preprocessor_token): Always clear it.
539 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
540
541 DR 1467
542 PR c++/51747
543 * decl.c (reshape_init_r): Handle a single element of class type.
544
545 DR 1338
546 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
547 built-in operator new.
548
549 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
550
551 PR c++/58600
552 * name-lookup.c (parse_using_directive): Return early if the
553 attribs argument is error_mark_node; use get_attribute_name.
554
555 2014-04-11 Jason Merrill <jason@redhat.com>
556
557 DR 1030
558 PR c++/51253
559 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
560 * call.c (struct z_candidate): Add flags field.
561 (add_candidate): Add flags parm.
562 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
563 (add_template_candidate_real): Pass it.
564 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
565 * tree.c (build_aggr_init_expr): Copy it.
566 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
567
568 2014-04-10 Richard Biener <rguenther@suse.de>
569 Jakub Jelinek <jakub@redhat.com>
570
571 PR ipa/60761
572 * error.c (dump_decl) <case FUNCTION_DECL>: If
573 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
574 recurse on DECL_ABSTRACT_ORIGIN instead of printing
575 <built-in>.
576
577 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
578
579 * pt.c (check_template_variable): Check for the return of pedwarn
580 before emitting a note.
581 * parser.c (cp_parser_lambda_introducer): Likewise.
582
583 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
584
585 PR c++/59115
586 * pt.c (process_template_parm): For an invalid non-type parameter
587 only set TREE_TYPE to error_mark_node.
588 (push_inline_template_parms_recursive, comp_template_parms,
589 redeclare_class_template, coerce_template_template_parm,
590 coerce_template_template_parms, unify): Use error_operand_p.
591
592 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
593
594 * class.c (check_bases_and_members): Warn about non-virtual dtors
595 in public bases only. Check warn_ecpp before complaining about
596 non-polymorphic bases.
597
598 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
599
600 * decl.c (duplicate_decls): Check for the return of warning_at
601 before emitting a note.
602 (warn_misplaced_attr_for_class_type): Likewise.
603 (check_tag_decl): Likewise.
604
605 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
606
607 PR c++/58207
608 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
609
610 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
611
612 PR c++/44613
613 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
614 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
615 instantiating a variable-sized type.
616
617 PR c++/21113
618 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
619
620 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
621
622 * class.c (find_abi_tags_r): Check for the return of warning
623 before emitting a note.
624 (one_inherited_ctor): Likewise.
625
626 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
627
628 * decl.c (duplicate_decls): Check for the return of permerror
629 before emitting a note.
630
631 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
632
633 * class.c (accessible_nvdtor_p): New.
634 (check_bases): Don't check base destructor here ...
635 (check_bases_and_members): ... check them here. Trigger on
636 Wnon-virtual-dtor flag.
637 (finish_struct_1): Use accessible_nvdtor_p.
638
639 2014-04-01 Jason Merrill <jason@redhat.com>
640
641 * pt.c (process_partial_specialization): Say "not deducible"
642 rather than "not used". Use inform.
643
644 PR c++/60374
645 * pt.c (coerce_template_parms): Check that the pack expansion
646 pattern works with the first matching parameter.
647
648 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
649
650 * init.c (perform_member_init): Homogenize uninitialized
651 diagnostics.
652
653 2014-04-01 Jason Merrill <jason@redhat.com>
654
655 PR c++/60708
656 * call.c (build_array_conv): Call complete_type.
657
658 PR c++/60713
659 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
660 (picflag_from_initializer): Return it.
661 (process_init_constructor): Handle it.
662
663 PR c++/60642
664 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
665 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
666 * pt.c (get_template_info): Handle NAMESPACE_DECL.
667 (most_general_template): Handle more kinds of template.
668 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
669 instantiations and specializations.
670
671 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
672
673 PR c++/44859
674 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
675 COMPONENT_REFs and ARRAY_REFs sooner.
676
677 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
678
679 PR c++/60626
680 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
681 usage in non-functions with pushed scope.
682
683 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
684
685 PR c++/60573
686 * name-lookup.h (cp_binding_level): New transient field defining_class_p
687 to indicate whether a scope is in the process of defining a class.
688 * semantics.c (begin_class_definition): Set defining_class_p.
689 * name-lookup.c (leave_scope): Reset defining_class_p.
690 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
691 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
692 unwinding to class-defining scope to handle the erroneous definition of
693 a generic function of an arbitrarily nested class within an enclosing
694 class.
695
696 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
697
698 PR c++/52369
699 * method.c (walk_field_subobs): Improve the diagnostic
700 locations for both REFERENCE_TYPEs and non-static const members.
701 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
702 instead of %qD to be consistent with the c++11 diagnostic.
703
704 2014-03-25 Jason Merrill <jason@redhat.com>
705
706 PR c++/60566
707 PR c++/58678
708 * class.c (build_vtbl_initializer): Handle abstract dtors here.
709 * search.c (get_pure_virtuals): Not here.
710
711 PR c++/60375
712 * parser.c (cp_parser_lambda_expression): Don't parse the body of
713 a lambda in unevaluated context.
714
715 PR c++/60628
716 * decl.c (create_array_type_for_decl): Complain about array of auto.
717
718 2014-03-25 Jakub Jelinek <jakub@redhat.com>
719
720 PR c++/60331
721 * semantics.c (potential_constant_expression_1): Handle
722 DECL_EXPR.
723
724 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
725
726 PR c++/60627
727 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
728 introducing an implicit function template parameter within an explicit
729 instantiation.
730
731 2014-03-22 Jason Merrill <jason@redhat.com>
732
733 PR c++/60574
734 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
735 to error.
736
737 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
738
739 PR c++/60384
740 * name-lookup.c (push_class_level_binding_1): Check identifier_p
741 on the name argument.
742
743 2014-03-20 Jakub Jelinek <jakub@redhat.com>
744
745 PR c++/60572
746 * init.c (build_zero_init_1): Ignore fields with error_mark_node
747 type.
748
749 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
750
751 PR c++/51474
752 * call.c (build_new_method_call_1): Handle pure virtuals called by
753 NSDMIs too.
754
755 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
756
757 PR c++/60390
758 * parser.c (cp_parser_member_declaration): Don't allow
759 finish_fully_implicit_template to consider friend declarations to be
760 class member templates.
761 (synthesize_implicit_template_parm): Handling winding back through class
762 scope to the class being defined in order to inject a template argument
763 list.
764
765 PR c++/60391
766 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
767 function scope as per cp_parser_skip_to_end_of_statement.
768
769 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
770
771 PR c++/59571
772 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
773
774 2014-03-14 Jason Merrill <jason@redhat.com>
775
776 PR c++/60532
777 PR c++/58678
778 * search.c (get_pure_virtuals): Handle abstract dtor here.
779 (dfs_get_pure_virtuals): Not here.
780
781 PR c++/58678
782 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
783 abstract class as pure.
784
785 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
786
787 PR c++/60383
788 * pt.c (maybe_process_partial_specialization): Check return value
789 of check_specialization_namespace.
790
791 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
792
793 PR c++/60254
794 * semantics.c (finish_static_assert): Call cxx_constant_value only
795 if require_potential_rvalue_constant_expression returns true.
796
797 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
798
799 PR c++/60389
800 * method.c (get_inherited_ctor): New.
801 * cp-tree.h (get_inherited_ctor): Declare it.
802 * semantics.c (is_valid_constexpr_fn): Use it.
803
804 2014-03-10 Jason Merrill <jason@redhat.com>
805
806 PR c++/60367
807 * call.c (convert_default_arg): Remove special handling for
808 CONSTRUCTOR.
809
810 PR c++/53492
811 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
812 when deciding whether to call push_template_decl for a member class.
813 * pt.c (push_template_decl_real): Return after wrong levels error.
814
815 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
816
817 PR c++/60033
818 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
819 lambda, remove the lambda's own template argument list prior to fetching
820 the specialization.
821
822 PR c++/60393
823 * parser.c (cp_parser_parameter_declaration_clause): Move generic
824 function template unwinding on error into a more general location, ...
825 (cp_parser_skip_to_end_of_statement): ... here.
826
827 2014-03-07 Jason Merrill <jason@redhat.com>
828
829 * Make-lang.in (check_g++_parallelize): Split dg.exp.
830
831 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
832 we're in a trailing return type.
833
834 * typeck.c (comp_template_parms_position): 'auto' and
835 'decltype(auto)' are different from real template parms.
836
837 * parser.c (cp_parser_using_declaration): Consume the semicolon
838 after bare parameter pack error.
839
840 * cp-tree.h (REF_PARENTHESIZED_P): New.
841 * semantics.c (force_paren_expr): Set it.
842 * pt.c (do_auto_deduction): Check it.
843 (tsubst) [COMPONENT_REF]: Copy it.
844 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
845
846 * decl.c (create_array_type_for_decl): Only warn about invalid
847 C++1y VLA if flag_iso or warn_vla>0.
848 (grokdeclarator): Likewise.
849 * pt.c (tsubst): Likewise.
850 * semantics.c (finish_decltype_type): Likewise.
851 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
852 (cp_build_addr_expr_1): Likewise.
853 * init.c (build_new_1): Improve diagnostics.
854
855 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
856
857 PR c++/58609
858 * decl.c (check_initializer): Return NULL_TREE after error;
859 consistently use inform.
860
861 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
862
863 * decl.c (check_initializer): Remove dead code.
864
865 2014-03-06 Marek Polacek <polacek@redhat.com>
866
867 PR c/60197
868 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
869 of checking tree code.
870
871 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
872
873 * parser.c (cp_lexer_set_source_position): New.
874 (cp_parser_mem_initializer): Use it.
875 (cp_parser_postfix_open_square_expression): Likewise.
876 (cp_parser_parenthesized_expression_list): Likewise.
877 (cp_parser_new_initializer): Likewise.
878 (cp_parser_jump_statement): Likewise.
879 (cp_parser_initializer): Likewise.
880 (cp_parser_functional_cast): Likewise.
881
882 2014-03-05 Jason Merrill <jason@redhat.com>
883
884 PR c++/60409
885 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
886 dependent expression.
887
888 PR c++/60361
889 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
890 if re-parsing might succeed.
891 * semantics.c (finish_id_expression): Use of a parameter outside
892 the function body is a parse error.
893
894 * parser.c (cp_parser_mem_initializer): Set input_location
895 properly for init-list warning.
896 (cp_parser_postfix_open_square_expression): Likewise.
897 (cp_parser_parenthesized_expression_list): Likewise.
898 (cp_parser_new_initializer): Likewise.
899 (cp_parser_jump_statement): Likewise.
900 (cp_parser_initializer): Likewise.
901 (cp_parser_functional_cast): Likewise.
902
903 2014-03-04 Jason Merrill <jason@redhat.com>
904
905 PR c++/60417
906 * typeck2.c (process_init_constructor_record): Set
907 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
908
909 PR c++/60415
910 PR c++/54359
911 * parser.c (cp_parser_direct_declarator): Set declarator to
912 cp_error_declarator on invalid qualified-id.
913
914 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
915
916 PR c++/60376
917 * parser.c (cp_parser_using_declaration): Early return when
918 cp_parser_nested_name_specifier errors out.
919
920 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
921
922 PR c++/60377
923 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
924 function scope on parse error in function parameter list.
925
926 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
927
928 * method.c (implicitly_declare_fn): Remove redundant
929 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
930 * semantics.c (is_instantiation_of_constexpr): Likewise.
931 * error.c (dump_function_decl): Likewise.
932
933 2014-03-01 Jason Merrill <jason@redhat.com>
934
935 PR c++/60379
936 * semantics.c (begin_maybe_infinite_loop): Use
937 fold_non_dependent_expr_sfinae.
938
939 2014-02-28 Jason Merrill <jason@redhat.com>
940
941 PR c++/58845
942 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
943
944 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
945
946 PR c++/58610
947 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
948 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
949 * lambda.c (maybe_add_lambda_conv_op): Likewise.
950
951 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
952
953 PR c++/60253
954 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
955 error_at.
956
957 2014-02-27 Jason Merrill <jason@redhat.com>
958
959 PR c++/60353
960 PR c++/55877
961 * decl2.c (tentative_decl_linkage): Don't mess with functions that
962 are not yet defined.
963
964 2014-02-26 Jason Merrill <jason@redhat.com>
965
966 PR c++/60347
967 PR lto/53808
968 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
969 * init.c (build_vtbl_address): Do it here.
970
971 PR c++/59231
972 PR c++/11586
973 PR c++/14710
974 PR c++/57132
975 * pt.c (struct warning_sentinel): New.
976 (tsubst_copy_and_build): Use it instead of
977 c_inhibit_evaluation_warnings.
978 * typeck.c (maybe_warn_about_useless_cast): Remove
979 c_inhibit_evaluation_warnings check.
980
981 PR c++/54440
982 * pt.c (get_template_parm_index): New.
983 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
984 (process_template_parm): Allow bare packs in template template
985 parm template parms.
986 (coerce_template_parameter_pack): Handle fixed template template
987 parm packs and fixed packs not at the end of the parm list.
988 (coerce_template_parms): Handle template parm packs not at the end
989 of the parm list.
990 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
991
992 PR c++/60182
993 * pt.c (unify): Ignore alias templates when deducing a template
994 template parameter.
995
996 PR c++/60345
997 Revert:
998 DR 1571
999 * call.c (reference_binding): Recurse on user-defined conversion.
1000 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1001
1002 2014-02-25 Jason Merrill <jason@redhat.com>
1003
1004 DR 1571
1005 * call.c (reference_binding): Recurse on user-defined conversion.
1006 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1007
1008 * call.c (print_conversion_rejection): Handle n_arg of -2.
1009 (build_user_type_conversion_1): Pass it.
1010
1011 PR c++/55877
1012 * decl2.c (no_linkage_error): Handle C++98 semantics.
1013 (reset_type_linkage): Move from decl.c.
1014 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
1015 (bt_reset_linkage_2, reset_decl_linkage): New.
1016 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
1017 (cp_write_global_declarations): Move condition into no_linkage_error.
1018 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
1019 * semantics.c (expand_or_defer_fn_1): Factor out
1020 tentative_decl_linkage.
1021 * cp-tree.h: Adjust.
1022
1023 * decl2.c (finish_static_data_member_decl): Diagnose static data
1024 member in unnamed class.
1025 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
1026
1027 PR lto/53808
1028 * class.c (clone_function_decl): Call note_vague_linkage_fn for
1029 defaulted virtual dtor.
1030
1031 DR 1286
1032 PR c++/60328
1033 * pt.c (get_underlying_template): Fix equivalence calculation.
1034
1035 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
1036
1037 PR c++/60311
1038 * parser.c (function_being_declared_is_template_p): Return false when
1039 processing a template parameter list.
1040 (cp_parser_parameter_declaration_clause): Don't set
1041 auto_is_implicit_function_template_parm_p when processing a
1042 template parameter list.
1043
1044 * parser.c (synthesize_implicit_template_parm): Inject new template
1045 argument list appropriately when a generic member function
1046 of a class template is declared out-of-line.
1047
1048 PR c++/60065
1049 * parser.c (cp_parser_direct_declarator): Don't save and
1050 restore num_template_parameter_lists around call to
1051 cp_parser_parameter_declaration_list.
1052 (function_being_declared_is_template_p): New predicate.
1053 (cp_parser_parameter_declaration_list): Use
1054 function_being_declared_is_template_p as predicate for
1055 inspecting current function template parameter list length
1056 rather than num_template_parameter_lists.
1057
1058 2014-02-24 Jason Merrill <jason@redhat.com>
1059
1060 PR c++/60146
1061 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
1062 DECL_EXPR initialize a non-class iterator.
1063
1064 PR c++/60312
1065 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
1066
1067 2014-02-21 Jason Merrill <jason@redhat.com>
1068
1069 PR c++/58170
1070 * parser.c (cp_parser_type_name): Always check dependency.
1071 (cp_parser_type_specifier_seq): Call
1072 cp_parser_parse_and_diagnose_invalid_type_name.
1073
1074 PR c++/60108
1075 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
1076
1077 PR c++/60185
1078 * parser.c (cp_parser_default_argument): Clear
1079 current_class_ptr/current_class_ref like tsubst_default_argument.
1080
1081 PR c++/60252
1082 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1083 than current_binding_level.
1084
1085 PR c++/60186
1086 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1087
1088 PR c++/60187
1089 * parser.c (cp_parser_enum_specifier): Call
1090 check_for_bare_parameter_packs.
1091
1092 PR c++/59347
1093 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1094 erroneous typedef.
1095
1096 PR c++/60241
1097 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1098 of the partial instantiation, not the most general template.
1099 (maybe_process_partial_specialization): Reassign everything on
1100 that list.
1101
1102 PR c++/60216
1103 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1104 (check_explicit_specialization): Don't clone.
1105
1106 PR c++/60219
1107 * pt.c (coerce_template_parms): Bail if argument packing fails.
1108
1109 PR c++/60224
1110 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1111 Don't get confused by a CONSTRUCTOR that already has a type.
1112
1113 PR c++/60227
1114 * call.c (build_array_conv): Don't crash on VLA.
1115
1116 PR c++/60248
1117 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1118
1119 PR c++/60252
1120 * lambda.c (maybe_resolve_dummy): Don't try to capture this
1121 in declaration context.
1122
1123 DR 1591
1124 PR c++/60051
1125 * pt.c (unify): Only unify if deducible. Handle 0-length list.
1126
1127 PR c++/60250
1128 * parser.c (cp_parser_direct_declarator): Don't wrap a
1129 type-dependent expression in a NOP_EXPR.
1130
1131 PR c++/60251
1132 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1133
1134 PR c++/60167
1135 PR c++/60222
1136 PR c++/58606
1137 * parser.c (cp_parser_template_argument): Restore dereference.
1138 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1139 (process_partial_specialization): Handle deref.
1140 (unify): Likewise.
1141
1142 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
1143
1144 PR c++/60052
1145 PR c++/60053
1146 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1147 implicit_template_scope upon leaving an out-of-line generic member
1148 function definition.
1149
1150 2014-02-20 Kai Tietz <ktietz@redhat.com>
1151
1152 PR c++/58873
1153 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1154 valued type argument as error_mark_node.
1155
1156 PR c++/58835
1157 * semantics.c (finish_fname): Handle error_mark_node.
1158
1159 2014-02-19 Jason Merrill <jason@redhat.com>
1160
1161 PR c++/60046
1162 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1163 spec from template context.
1164
1165 2014-02-19 Jakub Jelinek <jakub@redhat.com>
1166
1167 PR debug/56563
1168 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1169 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1170
1171 PR c++/60267
1172 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1173
1174 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1175
1176 PR c++/60225
1177 * semantics.c (ensure_literal_type_for_constexpr_object): Use
1178 strip_array_types.
1179
1180 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1181
1182 PR c++/60215
1183 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1184 During error recovery allow_non_constant may be false.
1185
1186 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
1187
1188 PR c++/60190
1189 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1190 scope whenever a template parameter list has been started, independent
1191 of whether the function call operator was well-formed or not.
1192
1193 PR c++/60064
1194 * parser.c (cp_parser_member_declaration): Pop fully implicit template
1195 scope for generic friend declarations as well as for non-friends.
1196
1197 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
1198
1199 PR c++/60047
1200 * method.c (implicitly_declare_fn): A constructor of a class with
1201 virtual base classes isn't constexpr (7.1.5p4).
1202
1203 2014-02-05 Jan Hubicka <hubicka@ucw.cz
1204
1205 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1206
1207 2014-02-05 Jakub Jelinek <jakub@redhat.com>
1208
1209 PR c++/58703
1210 * parser.c (cp_parser_omp_declare_reduction): Save and free
1211 declarator_obstack.
1212
1213 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
1214
1215 PR c++/53017
1216 PR c++/59211
1217 * tree.c (handle_init_priority_attribute): Call default_conversion on
1218 the attribute argument.
1219
1220 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1221
1222 PR c++/58871
1223 * method.c (synthesized_method_walk): If vbases is non-null but
1224 is_empty is true, likewise don't worry about the virtual bases.
1225
1226 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1227
1228 PR c++/51219
1229 * typeck2.c (process_init_constructor_record): Just skip unnamed
1230 bit-fields.
1231
1232 2014-01-31 Jason Merrill <jason@redhat.com>
1233
1234 PR c++/59469
1235 * pt.c (mark_decl_instantiated): Call mark_needed.
1236
1237 PR c++/58672
1238 * decl2.c (handle_tls_init): Handle null init fn.
1239
1240 PR c++/55800
1241 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1242
1243 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
1244
1245 PR c++/59082
1246 * class.c (build_vfield_ref): Early return error_mark_node if
1247 TYPE_VFIELD (type) is null.
1248 (build_base_path): Check return value of build_vfield_ref.
1249
1250 2014-01-31 Jason Merrill <jason@redhat.com>
1251
1252 PR c++/59646
1253 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1254 [ck_list]: Check for error_mark_node.
1255 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1256
1257 PR c++/57043
1258 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1259 during partial ordering.
1260
1261 2014-01-31 Marek Polacek <polacek@redhat.com>
1262
1263 PR c/59963
1264 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1265
1266 2014-01-30 Jason Merrill <jason@redhat.com>
1267
1268 PR c++/57899
1269 * cp-tree.h (struct saved_scope): Add x_local_specializations.
1270 (local_specializations): New macro.
1271 * pt.c (local_specializations): Remove variable.
1272
1273 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
1274
1275 PR c++/58708
1276 * parser.c (make_string_pack): Use double_int::from_buffer.
1277
1278 2014-01-30 Marek Polacek <polacek@redhat.com>
1279
1280 PR c/59940
1281 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1282 input_location.
1283 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1284 with input_location.
1285 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1286 loc parameter.
1287
1288 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1289
1290 PR c++/58843
1291 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1292
1293 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1294
1295 PR c++/58649
1296 * pt.c (lookup_template_class_1): Check start_enum return value
1297 for error_mark_node.
1298
1299 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1300
1301 * decl.c (duplicate_decls, typename_hash, typename_compare):
1302 Use TYPE_IDENTIFIER.
1303 * error.c (dump_type): Likewise.
1304 * mangle.c (dump_substitution_candidates): Likewise.
1305
1306 2014-01-30 Jason Merrill <jason@redhat.com>
1307
1308 PR c++/59633
1309 * decl2.c (attributes_naming_typedef_ok): New.
1310 * cp-tree.h: Declare it.
1311 * decl.c (grokdeclarator): Check it.
1312 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1313
1314 2014-01-29 Jason Merrill <jason@redhat.com>
1315
1316 PR c++/59707
1317 * call.c (add_builtin_candidate): Catch dependent types.
1318
1319 PR c++/59989
1320 * pt.c (expand_template_argument_pack): Correct
1321 non_default_args_count calculation.
1322
1323 PR c++/58466
1324 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1325
1326 PR c++/59956
1327 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1328 have a friend template in a class template.
1329 * pt.c (tsubst_friend_function): Look through it.
1330 (push_template_decl_real): A friend member template is
1331 primary.
1332
1333 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1334
1335 PR c++/58846
1336 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1337 == error_mark_node.
1338
1339 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1340
1341 PR c++/58674
1342 * pt.c (instantiate_template_1): Check for error_mark_node the second
1343 argument too.
1344
1345 2014-01-29 Jason Merrill <jason@redhat.com>
1346
1347 PR c++/59916
1348 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1349 cdtor_returns_this case.
1350
1351 PR c++/59315
1352 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1353
1354 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1355
1356 PR c++/58702
1357 * semantics.c (finish_omp_reduction_clause): Check type for
1358 error_mark_node.
1359
1360 2014-01-28 Jason Merrill <jason@redhat.com>
1361
1362 PR c++/59791
1363 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1364 (tsubst_copy): Use it if lookup fails.
1365
1366 PR c++/59818
1367 * pt.c (tsubst_function_type): Make sure we keep the same function
1368 quals.
1369
1370 PR c++/58701
1371 * semantics.c (build_anon_member_initialization): Stop walking
1372 when we run out of COMPONENT_REFs.
1373
1374 PR c++/58632
1375 * decl.c (lookup_and_check_tag): Ignore template parameters if
1376 scope == ts_current.
1377 * pt.c (check_template_shadow): Don't complain about the injected
1378 class name.
1379
1380 * decl.c (duplicate_decls): Tweak.
1381
1382 PR c++/53756
1383 * mangle.c (write_unqualified_name): Handle operator auto.
1384
1385 2014-01-27 Jason Merrill <jason@redhat.com>
1386
1387 PR c++/59823
1388 Core DR 1138
1389 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1390 list-initialization. A conversion to rvalue ref that involves
1391 an lvalue-rvalue conversion is bad.
1392 (convert_like_real): Give helpful error message.
1393
1394 PR c++/54652
1395 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1396
1397 PR c++/58504
1398 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1399 types.
1400
1401 PR c++/58606
1402 * pt.c (template_parm_to_arg): Call convert_from_reference.
1403 (tsubst_template_arg): Don't strip reference refs.
1404
1405 PR c++/58639
1406 * call.c (build_aggr_conv): Reject value-initialization of reference.
1407
1408 PR c++/58812
1409 PR c++/58651
1410 * call.c (convert_like_real): Give helpful error about excess braces
1411 for ck_rvalue of scalar type.
1412
1413 Core DR 1288
1414 * call.c (reference_binding): Only elide braces if the single
1415 element is reference-related.
1416
1417 PR c++/58814
1418 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1419 stabilizing.
1420
1421 PR c++/58837
1422 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1423 FUNCTION_DECL.
1424
1425 PR c++/59097
1426 * decl.c (compute_array_index_type): Don't call
1427 maybe_constant_value for a non-integral expression.
1428
1429 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1430
1431 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1432 flag_cilkplus.
1433 * cp-gimplify.c (cp_genericize): Likewise.
1434 * decl.c (grokfndecl): Likewise.
1435 * parser.c (cp_parser_postfix_expression): Likewise.
1436 (cp_parser_postfix_open_square_expression): Likewise.
1437 (cp_parser_direct_declarator): Likewise.
1438 (is_cilkplus_vector_p): Likewise.
1439 (cp_parser_omp_clause_name): Likewise.
1440 (cp_parser_omp_all_clauses): Likewise.
1441 * pt.c (apply_late_template_attributes): Likewise.
1442 * typeck.c (cp_build_array_ref): Likewise.
1443 (cp_build_compound_expr): Likewise.
1444 (check_return_expr): Likewise.
1445
1446 2014-01-24 Jason Merrill <jason@redhat.com>
1447
1448 PR c++/58550
1449 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1450 c++11 into error.
1451
1452 PR c++/59886
1453 PR c++/59659
1454 * typeck2.c (process_init_constructor_array): Don't create
1455 RANGE_EXPR yet.
1456
1457 2014-01-24 Jakub Jelinek <jakub@redhat.com>
1458
1459 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1460 handling for RANGE_ARRAY case.
1461
1462 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1463
1464 PR c++/57524
1465 * name-lookup.c (push_using_directive): Use timevar_cond_start.
1466
1467 2014-01-23 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/59846
1470 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1471
1472 2014-01-23 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/58346
1475 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1476 an empty aggregate.
1477
1478 2014-01-23 Jason Merrill <jason@redhat.com>
1479
1480 PR c++/55189
1481 * cp-tree.h (struct language_function): Add infinite_loop and
1482 infinite_loops.
1483 (current_function_infinite_loop): New.
1484 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1485 (break_maybe_infinite_loop): New.
1486 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1487 (finish_do_stmt, finish_for_cond, finish_for_stmt)
1488 (begin_range_for_stmt): Use them.
1489 * decl.c (finish_function): Don't warn about missing return
1490 if current_function_infinite_loop.
1491 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1492 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1493
1494 * call.c (build_op_delete_call): Use make_tree_vector and
1495 release_tree_vector.
1496
1497 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1498
1499 PR c++/58980
1500 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1501 nested_name_specifier.
1502
1503 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1504
1505 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1506 see if there is an attribute after function decl. If so, then
1507 parse them now.
1508 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1509 enabled function late parsing.
1510 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1511 attribute for a SIMD-enabled function.
1512 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1513 the function is used by SIMD-enabled function (indicated by NULL
1514 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1515 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1516 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1517 vectorlength clause in SIMD-enabled function and #pragma SIMD's
1518 vectorlength clause. Added a new bool parameter to differentiate
1519 between the two.
1520 (cp_parser_cilk_simd_fn_vector_attrs): New function.
1521 (is_cilkplus_vector_p): Likewise.
1522 (cp_parser_late_parsing_elem_fn_info): Likewise.
1523 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1524 and "vectorlength" clauses when Cilk Plus is enabled.
1525 (cp_parser_omp_clause_linear): Added a new parameter of type bool
1526 and emit a sorry message when step size is a parameter.
1527 * parser.h (cp_parser::cilk_simd_fn_info): New field.
1528 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1529 flag_openmp.
1530 * pt.c (apply_late_template_attributes): Likewise.
1531
1532 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR middle-end/58809
1535 * semantics.c (finish_omp_reduction_clause): Reject
1536 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1537
1538 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
1539
1540 PR c++/59482
1541 * parser.c (cp_parser_class_head): Push the class before parsing
1542 the base-clause, pop after it.
1543
1544 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1545
1546 * decl2.c (cpp_check): Revert prototype change.
1547
1548 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1549
1550 PR c++/59270
1551 PR c++/58811
1552 * init.c (build_value_init_noctor): Don't pass error_mark_node to
1553 build_value_init.
1554
1555 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1556
1557 PR c++/59269
1558 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1559 only when errorcount == 0.
1560
1561 2014-01-17 Marek Polacek <polacek@redhat.com>
1562
1563 PR c++/59838
1564 * cvt.c (ocp_convert): Don't segfault on non-existing
1565 ENUM_UNDERLYING_TYPE.
1566
1567 2014-01-16 Jason Merrill <jason@redhat.com>
1568
1569 PR c++/59821
1570 * tree.c (bot_manip): Update the location of builtin_LINE and
1571 builtin_FILE calls.
1572
1573 2014-01-14 Jason Merrill <jason@redhat.com>
1574
1575 PR c++/59659
1576 * typeck2.c (massage_init_elt): New.
1577 (process_init_constructor_record)
1578 (process_init_constructor_union): Use it.
1579 (process_init_constructor_array): Use it. Use RANGE_EXPR.
1580 (split_nonconstant_init_1): Handle it.
1581 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1582
1583 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1584
1585 PR c++/59631
1586 * parser.c (cp_parser_postfix_expression): Added a new if-statement
1587 and replaced an existing if-statement with else-if statement.
1588 Changed an existing error message wording to match the one from the C
1589 parser.
1590
1591 2014-01-08 Jason Merrill <jason@redhat.com>
1592
1593 PR c++/59614
1594 * class.c (abi_tag_data): Add tags field.
1595 (check_abi_tags): Initialize it.
1596 (find_abi_tags_r): Support collecting missing tags.
1597 (mark_type_abi_tags): Don't look at template args.
1598 (inherit_targ_abi_tags): New.
1599 (check_bases_and_members): Use it.
1600 * cp-tree.h (ABI_TAG_IMPLICIT): New.
1601 * mangle.c (write_abi_tags): Check it.
1602
1603 2014-01-07 Jason Merrill <jason@redhat.com>
1604
1605 PR c++/58856
1606 * pt.c (num_innermost_template_parms): New.
1607 (get_underlying_template): Use it.
1608
1609 PR c++/58965
1610 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1611
1612 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
1613
1614 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
1615 the letter of 20.11.6 about Base and Derived naming the same
1616 class type modulo cv-qualifiers.
1617
1618 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
1619
1620 PR c++/59635
1621 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
1622 function as unimplemented for generic lambdas with varargs.
1623
1624 PR c++/59636
1625 * parser.c (cp_parser_template_parameter): Early out with
1626 error_mark_node if parameter declaration was not parsed.
1627
1628 PR c++/59629
1629 * parser.c (cp_parser_lambda_expression): Save/reset/restore
1630 auto_is_implicit_function_template_parm_p around lambda body.
1631
1632 PR c++/59638
1633 * parser.c (cp_parser_init_declarator): Undo fully implicit
1634 template parameter list when declarator is not a function.
1635
1636 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
1637
1638 PR c++/58950
1639 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
1640
1641 2014-01-03 Tobias Burnus <burnus@net-b.de>
1642
1643 PR c++/58567
1644 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
1645
1646 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1647
1648 Core DR 1442
1649 PR c++/59165
1650 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
1651 as include_std to perform_koenig_lookup.
1652 (cp_parser_postfix_expression): Adjust.
1653 * pt.c (tsubst_copy_and_build): Likewise.
1654 * semantics.c (perform_koenig_lookup): Remove bool parameter.
1655 (omp_reduction_lookup): Adjust.
1656 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
1657 (lookup_arg_dependent): Likewise.
1658 (lookup_function_nonclass): Adjust.
1659 * name-lookup.h: Adjust declaration.
1660 * cp-tree.h: Likewise.
1661
1662 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1663
1664 PR c++/59087
1665 * parser.c (cp_parser_userdef_numeric_literal): Mention
1666 -fext-numeric-literals in the message.
1667
1668 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1669
1670 PR c++/59641
1671 * call.c (build_conditional_expr_1): Check the return value of
1672 force_rvalue.
1673
1674 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1675
1676 * call.c (convert_like_real): Check complain.
1677
1678 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1679
1680 PR c++/59378
1681 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
1682 in templates.
1683
1684 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1685
1686 Update copyright years
1687
1688 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1689
1690 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
1691 the standard form for the copyright notice.
1692 \f
1693 Copyright (C) 2014 Free Software Foundation, Inc.
1694
1695 Copying and distribution of this file, with or without modification,
1696 are permitted in any medium without royalty provided the copyright
1697 notice and this notice are preserved.