1 2014-06-05 Marek Polacek <polacek@redhat.com>
4 * parser.c (cp_parser_binary_expression): Warn when logical not is
5 used on the left hand side operand of a comparison.
7 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
10 * typeck.c (cp_build_modify_expr): Handle array of characters
11 initialized by a string literal.
12 * decl.c (check_initializer): Handle parenthesized string literal
14 * typeck2.c (store_init_value): Remove redundant check.
16 2014-06-04 Jason Merrill <jason@redhat.com>
20 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
21 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
23 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
26 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
29 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
33 * call.c (standard_conversion): Convert nullptr to bool only
34 in case of direct-initialization.
35 (convert_like_real): Provide informative error message.
37 2014-06-03 Marek Polacek <polacek@redhat.com>
40 * semantics.c (finish_switch_cond): Warn if switch condition has
43 2014-06-03 Jason Merrill <jason@redhat.com>
46 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
47 variable to local_specializations.
50 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
52 2014-06-02 Jason Merrill <jason@redhat.com>
55 * decl.c (reshape_init_class): Handle un-folded
59 * pt.c (pack_deducible_p): Handle canonicalization.
61 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
63 * pt.c (tsubst_function_type): Initialize arg_types.
65 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
68 * class.c (handle_using_decl): Pass the correct scope to
69 cp_emit_debug_info_for_using.
71 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
75 * search.c (accessible_p): Use current_nonlambda_class_type.
76 * semantics.c (check_accessibility_of_qualified_id): Likewise.
78 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
80 * decl.c: Include builtins.h.
81 * semantics.c: Likewise.
83 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
87 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
88 * pt.c (tsubst_function_type): Inject the this parameter; do the
89 substitutions in the order mandated by the DR.
90 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
91 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
92 (static_fn_type): Copy it.
93 * decl2.c (build_memfn_type, change_return_type,
94 cp_reconstruct_complex_type): Likewise.
95 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
96 * tree.c (strip_typedefs): Likewise.
97 * typeck.c (merge_types): Likewise.
99 2014-05-30 Jason Merrill <jason@redhat.com>
102 * pt.c (instantiate_decl): Check that defer_ok is not set for
106 * pt.c (tsubst_init): Split out from...
107 (tsubst_expr) [DECL_EXPR]: Here.
108 (tsubst_copy) [VAR_DECL]: Use it.
109 * semantics.c (finish_id_expression): Return the decl for static/const.
111 2014-05-28 Jason Merrill <jason@redhat.com>
114 * decl.c (cxx_comdat_group): Return a decl.
115 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
117 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
121 * call.c (build_aggr_conv): Ignore passed in flags.
122 (build_array_conv, build_complex_conv): Likewise.
124 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
126 * optimize.c (maybe_thunk_body): Use set_comdat_group.
127 (maybe_clone_body): Likewise.
128 * decl.c (duplicate_decls): Update code duplicating comdat group;
129 do not copy symtab pointer; before freeing newdecl remove it
131 * decl2.c (constrain_visibility): Use set_comdat_group.
133 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
135 * rtti.c: Include tm_p.h
136 (emit_tinfo_decl): Force RTTI data to be aligned to required
139 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
141 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
142 ignoring other target adjustments.
144 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
146 * semantics.c (finish_omp_clauses): Remove duplicated variable
149 * parser.c (cp_parser_omp_target): Return bool values.
151 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
154 * lambda.c (add_capture): Enforce that capture by value requires
156 * typeck2.c (cxx_incomplete_type_inform): Early return if
157 TYPE_MAIN_DECL is null.
159 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
162 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
164 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
167 * lambda.c (build_capture_proxy, add_capture): Treat normal
168 captures and init-captures identically.
170 2014-05-21 Mark Wielaard <mjw@redhat.com>
173 * cp-lang.c (cxx_enum_underlying_base_type): New function.
174 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
176 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
178 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
179 * cp-array-notation.c (replace_invariant_exprs): Likewise.
180 (expand_array_notation): Handle VOID_CST.
181 * error.c (dump_expr): Likewise.
182 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
183 (cxx_pretty_printer::expression): Likewise.
184 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
185 * decl.c (register_dtor_fn): Likewise.
186 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
187 (build_delete, push_base_cleanups): Likewise.
188 * mangle.c (write_expression): Likewise.
189 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
190 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
191 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
192 * tree.c (cp_tree_equal): Likewise.
193 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
194 instead of void_zero_node.
195 * typeck.c (check_return_expr): Likewise.
196 * typeck2.c (build_functional_cast): Likewise.
198 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
201 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
203 (cp_parser_statement): ...here. Make sure only semicolon can go after
206 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
211 * typeck2.c (digest_nsdmi_init): New.
212 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
213 * init.c (get_nsdmi): Likewise.
214 * cp-tree.h (digest_nsdmi_init): Declare.
216 2014-05-20 Jason Merrill <jason@redhat.com>
218 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
219 up a virtual function in a dummy object.
221 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
224 * decl.c (duplicate_decls): Replace pair of warning_at with
226 (maybe_commonize_var): Likewise.
228 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
231 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
232 (tsubst_copy_and_build): Perform recursive substitutions in a
235 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
238 * typeck2.c (cxx_incomplete_type_inform): New.
239 (cxx_incomplete_type_diagnostic): Use it.
240 * decl.c (grokdeclarator): Check the element type of an
241 incomplete array type; call the above.
242 * cp-tree.h (cxx_incomplete_type_inform): Declare.
244 2014-05-19 Jason Merrill <jason@redhat.com>
247 * pt.c (tsubst_copy): Don't check at_function_scope_p.
248 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
250 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
252 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
253 * parser.c (cp_parser_enum_specifier): Likewise.
255 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
257 * class.c (sorted_fields_type_new): Adjust.
258 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
259 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
260 * cp-tree.h: Remove usage of variable_size gty attribute.
261 * decl.c (make_label_decl): Adjust.
262 (check_goto): Likewise.
263 (start_preparsed_function): Likewise.
264 (save_function_data): Likewise.
265 * lex.c (init_reswords): Likewise.
266 (retrofit_lang_decl): Likewise.
267 (cxx_dup_lang_specific_decl): Likewise.
268 (copy_lang_type): Likewise.
269 (cxx_make_type): Likewise.
270 * name-lookup.c (binding_entry_make): Likewise.
271 (binding_table_construct): Likewise.
272 (binding_table_new): Likewise.
273 (cxx_binding_make): Likewise.
274 (pushdecl_maybe_friend_1): Likewise.
275 (begin_scope): Likewise.
276 (push_to_top_level): Likewise.
277 * parser.c (cp_lexer_alloc): Likewise.
278 (cp_lexer_new_from_tokens): Likewise.
279 (cp_token_cache_new): Likewise.
280 (cp_parser_context_new): Likewise.
281 (cp_parser_new): Likewise.
282 (cp_parser_nested_name_specifier_opt): Likewise.
283 (cp_parser_template_id): Likewise.
284 * pt.c (maybe_process_partial_specialization): Likewise.
285 (register_specialization): Likewise.
286 (add_pending_template): Likewise.
287 (lookup_template_class_1): Likewise.
288 (push_tinst_level): Likewise.
289 * semantics.c (register_constexpr_fundef): Likewise.
290 (cxx_eval_call_expression): Likewise.
291 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
293 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
296 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
297 when cp_parser_lookup_name sets ambiguous_decls.
299 2014-05-15 Jason Merrill <jason@redhat.com>
301 * call.c (print_conversion_rejection): Use loc consistently.
303 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
305 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
306 * call.c (convert_like_real, build_new_method_call_1): Use it.
307 * decl2.c (grokfield): Likewise.
308 * init.c (perform_member_init, build_aggr_init, expand_default_init,
309 build_new_1): Likewise.
310 * mangle.c (write_expression): Likewise.
311 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
313 2014-05-14 Jason Merrill <jason@redhat.com>
317 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
318 dropped cv-quals as a bad conversion.
319 (convert_like_real) [ck_ref_bind]: Explain them.
320 (compare_ics): Check badness before stripping reference
321 bindings. Handle comparing bad reference bindings.
322 * typeck.c (comp_cv_qualification): Add overload that just takes
324 * cp-tree.h: Declare it.
326 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
327 (arg_conversion_rejection, bad_arg_conversion_rejection)
328 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
329 (add_function_candidate): Pass actual argument, rather than type, to
330 bad_arg_conversion_rejection.
331 (print_conversion_rejection): Explain what's wrong with the conversion.
332 (print_z_candidates): Say "candidate:" before each candidate.
333 (splice_viable): Be strict if we see a viable or template candidate.
334 (build_user_type_conversion_1): Pass false to strict parameter.
335 (perform_overload_resolution, build_conditional_expr_1): Likewise.
336 (build_new_op_1, build_new_method_call_1): Likewise.
337 (build_op_call_1): Pass true to strict parameter.
339 2014-05-13 Jason Merrill <jason@redhat.com>
341 * call.c (print_error_for_call_failure): Say "no match" rather
342 than "ambiguous" if there were no strict matches.
343 (build_new_method_call_1): Likewise.
346 * semantics.c (is_this_parameter): Allow capture proxies too.
348 2014-05-12 Jason Merrill <jason@redhat.com>
350 * call.c (maybe_print_user_conv_context): New.
351 (convert_like_real): Use it. Print call context for bad
352 user-defined conversion.
353 (build_over_call): Print call context for bad 'this' conversion.
355 * call.c (convert_like_real): Use inform for identifying the
358 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
360 * cvt.c (cp_convert_to_pointer): Don't call error_at if
361 complain & tf_error is false.
363 * decl.c (make_unbound_class_template): Prefer inform for
364 "declared here"-type message.
366 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
370 * lambda.c (lambda_expr_this_capture): Add new parameter
371 add_capture_p controlling whether the functions will try to
372 capture 'this' via the default capture.
373 (maybe_resolve_dummy): Likewise.
374 * cp-tree.h: Adjust prototypes.
375 * call.c, semantics.c: Change callers of these functions.
376 * call.c (build_new_method_call_1): Use the actual 'this' that
377 would be potentially captured for the overload resolution, instead
380 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
382 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
384 (convert_nontype_argument): Adjust calls.
385 (coerce_template_parameter_pack): Add missing complain & tf_error
388 2014-05-09 Jason Merrill <jason@redhat.com>
392 * call.c (build_conditional_expr_1, conditional_conversion): Handle
393 non-class lvalues and xvalues that differ only in cv-qualifiers.
397 * call.c (build_user_type_conversion_1): The copy-init temporary
401 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
404 * call.c (build_conditional_expr_1): If overload resolution finds
405 no match, just say "different types".
408 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
411 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
412 if we didn't find a conversion.
413 Don't accept a bad conversion too early.
415 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
418 * typeck.c (convert_for_assignment): Provide an inform for pointers
419 to incomplete class types.
421 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
424 * pt.c (convert_nontype_argument): Protect all the error calls
425 with complain & tf_error.
427 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
430 * pt.c (instantiate_decl): Avoid generating the body of a
433 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
436 * pt.c (maybe_begin_member_template_processing): Use
439 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
440 Mike Stump <mikestump@comcast.net>
441 Richard Sandiford <rdsandiford@googlemail.com>
443 * call.c: Include wide-int.h.
444 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
445 (convert_for_arg_passing): Likewise.
446 * class.c: Include wide-int.h.
447 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
448 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
449 (include_empty_classes): Likewise
450 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
451 * cvt.c: Include wide-int.h.
452 (ignore_overflows): Use wide_int_to_tree.
453 * decl.c: Include wide-int.h.
454 (check_array_designated_initializer): Use wide-int interfaces.
455 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
456 (finish_enum_value_list): Use signop.
457 (build_enumerator): Use wide-int interfaces.
458 * init.c: Include wide-int.h.
459 (build_new_1): Use wide-int interfaces.
460 * mangle.c: Include wide-int.h.
461 (write_integer_cst): Use wide-int interfaces.
462 (write_array_type): Likewise.
463 * tree.c: Include wide-int.h.
464 (cp_tree_equal): Use tree_int_cst_equal.
465 * typeck2.c: Include wide-int.h.
466 (process_init_constructor_array): Use wide-int interfaces.
468 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
471 * decl.c (grokfndecl): Check duplicate_decls return value for
473 * pt.c (instantiate_decl): A deleted function is defined.
475 2014-05-02 Jason Merrill <jason@redhat.com>
477 * decl2.c (vague_linkage_p): Local statics have vague linkage.
480 * lambda.c (lambda_capture_field_type): Wrap anything dependent
482 (add_capture): Check for VLA before calling it.
483 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
484 just the current one. Make non-static.
485 * cp-tree.h: Declare it.
486 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
487 the operand was static or constant.
489 2014-05-02 Marek Polacek <polacek@redhat.com>
491 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
494 2014-05-01 Marek Polacek <polacek@redhat.com>
497 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
498 between label and variable when warning about returning local address.
500 2014-04-30 Jason Merrill <jason@redhat.com>
503 * init.c (build_value_init): Don't try to call an array constructor.
506 * typeck2.c (massage_init_elt): Use maybe_constant_init.
508 2014-04-30 Marek Polacek <polacek@redhat.com>
510 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
511 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
512 for non-integer types.
514 2014-04-29 Jason Merrill <jason@redhat.com>
517 Represent the unevaluated exception specification of an implicitly
518 declared or deleted function with a simple placeholder, not a list
520 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
521 * except.c (unevaluated_noexcept_spec): New.
522 * class.c (deduce_noexcept_on_destructor): Use it.
523 * decl.c (check_redeclaration_exception_specification): Call
524 maybe_instantiate_noexcept.
525 (duplicate_decls): Call it before merge_types.
526 (start_preparsed_function): Call maybe_instantiate_noexcept.
527 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
528 * init.c (get_nsdmi): Factor out of perform_member_init.
529 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
530 (walk_field_subobs): Consider NSDMI for EH spec.
531 (get_defaulted_eh_spec): New.
532 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
533 (defaulted_late_check): Defer EH checking in non-template classes.
534 (after_nsdmi_defaulted_late_checks): New.
535 * parser.c (cp_parser_class_specifier_1): Use it.
536 (unparsed_classes): New macro.
537 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
538 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
539 Remove list-of-functions handling.
540 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
541 handling and FN parameter.
542 * typeck.c (merge_types): Adjust.
544 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
547 * parser.c (cp_parser_alias_declaration): Check return value of
550 2014-04-24 Jakub Jelinek <jakub@redhat.com>
552 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
553 atomic-clause, allow comma in between atomic-clause and
556 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
559 * rtti.c (emit_support_tinfos): Do not iterate on
560 registered_builtin_types (partial revert).
562 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
565 * semantics.c (apply_deduced_return_type): Complete non-void type
566 before estimating whether the type is aggregate.
568 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
571 * rtti.c (emit_support_tinfo_1): New function, extracted from
573 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
575 2014-04-22 Jakub Jelinek <jakub@redhat.com>
578 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
579 fails, don't set OM_PARALLEL_COMBINED and return NULL.
581 2014-04-18 Jason Merrill <jason@redhat.com>
584 * call.c (reference_binding): Recurse on user-defined conversion.
587 * call.c (standard_conversion): Don't try to apply restrict to void.
589 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
591 * decl.c (reshape_init_r): Handle a single element of vector type.
593 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
596 * decl2.c (cplus_decl_attributes): Handle
597 pointer-to-member-function declarations.
599 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
602 * call.c (build_user_type_coversion): Use build_dummy_object
603 to create the placeholder object for a constructor method call.
604 (build_special_member_call): Likewise.
605 (build_over_call): Check for the placeholder object with
607 (build_new_method_call_1): Likewise. Don't attempt to resolve
608 a dummy object for a constructor method call.
610 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
613 * friend.c (add_friend, make_friend_class): Move repeated friend
614 warning under Wredundant_decls.
616 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
618 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
619 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
620 (do_class_using_decl): Likewise.
621 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
623 2014-04-15 Jakub Jelinek <jakub@redhat.com>
626 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
628 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
630 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
632 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
634 * pt.c (mark_template_parm): Use template_parm_level_and_index.
636 2014-04-11 Jason Merrill <jason@redhat.com>
638 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
640 (cp_lexer_get_preprocessor_token): Always clear it.
641 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
645 * decl.c (reshape_init_r): Handle a single element of class type.
648 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
649 built-in operator new.
651 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
654 * name-lookup.c (parse_using_directive): Return early if the
655 attribs argument is error_mark_node; use get_attribute_name.
657 2014-04-11 Jason Merrill <jason@redhat.com>
661 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
662 * call.c (struct z_candidate): Add flags field.
663 (add_candidate): Add flags parm.
664 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
665 (add_template_candidate_real): Pass it.
666 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
667 * tree.c (build_aggr_init_expr): Copy it.
668 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
670 2014-04-10 Richard Biener <rguenther@suse.de>
671 Jakub Jelinek <jakub@redhat.com>
674 * error.c (dump_decl) <case FUNCTION_DECL>: If
675 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
676 recurse on DECL_ABSTRACT_ORIGIN instead of printing
679 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
681 * pt.c (check_template_variable): Check for the return of pedwarn
682 before emitting a note.
683 * parser.c (cp_parser_lambda_introducer): Likewise.
685 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
688 * pt.c (process_template_parm): For an invalid non-type parameter
689 only set TREE_TYPE to error_mark_node.
690 (push_inline_template_parms_recursive, comp_template_parms,
691 redeclare_class_template, coerce_template_template_parm,
692 coerce_template_template_parms, unify): Use error_operand_p.
694 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
696 * class.c (check_bases_and_members): Warn about non-virtual dtors
697 in public bases only. Check warn_ecpp before complaining about
698 non-polymorphic bases.
700 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
702 * decl.c (duplicate_decls): Check for the return of warning_at
703 before emitting a note.
704 (warn_misplaced_attr_for_class_type): Likewise.
705 (check_tag_decl): Likewise.
707 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
710 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
712 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
715 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
716 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
717 instantiating a variable-sized type.
720 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
722 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
724 * class.c (find_abi_tags_r): Check for the return of warning
725 before emitting a note.
726 (one_inherited_ctor): Likewise.
728 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
730 * decl.c (duplicate_decls): Check for the return of permerror
731 before emitting a note.
733 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
735 * class.c (accessible_nvdtor_p): New.
736 (check_bases): Don't check base destructor here ...
737 (check_bases_and_members): ... check them here. Trigger on
738 Wnon-virtual-dtor flag.
739 (finish_struct_1): Use accessible_nvdtor_p.
741 2014-04-01 Jason Merrill <jason@redhat.com>
743 * pt.c (process_partial_specialization): Say "not deducible"
744 rather than "not used". Use inform.
747 * pt.c (coerce_template_parms): Check that the pack expansion
748 pattern works with the first matching parameter.
750 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
752 * init.c (perform_member_init): Homogenize uninitialized
755 2014-04-01 Jason Merrill <jason@redhat.com>
758 * call.c (build_array_conv): Call complete_type.
761 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
762 (picflag_from_initializer): Return it.
763 (process_init_constructor): Handle it.
766 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
767 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
768 * pt.c (get_template_info): Handle NAMESPACE_DECL.
769 (most_general_template): Handle more kinds of template.
770 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
771 instantiations and specializations.
773 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
776 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
777 COMPONENT_REFs and ARRAY_REFs sooner.
779 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
782 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
783 usage in non-functions with pushed scope.
785 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
788 * name-lookup.h (cp_binding_level): New transient field defining_class_p
789 to indicate whether a scope is in the process of defining a class.
790 * semantics.c (begin_class_definition): Set defining_class_p.
791 * name-lookup.c (leave_scope): Reset defining_class_p.
792 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
793 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
794 unwinding to class-defining scope to handle the erroneous definition of
795 a generic function of an arbitrarily nested class within an enclosing
798 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
801 * method.c (walk_field_subobs): Improve the diagnostic
802 locations for both REFERENCE_TYPEs and non-static const members.
803 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
804 instead of %qD to be consistent with the c++11 diagnostic.
806 2014-03-25 Jason Merrill <jason@redhat.com>
810 * class.c (build_vtbl_initializer): Handle abstract dtors here.
811 * search.c (get_pure_virtuals): Not here.
814 * parser.c (cp_parser_lambda_expression): Don't parse the body of
815 a lambda in unevaluated context.
818 * decl.c (create_array_type_for_decl): Complain about array of auto.
820 2014-03-25 Jakub Jelinek <jakub@redhat.com>
823 * semantics.c (potential_constant_expression_1): Handle
826 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
829 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
830 introducing an implicit function template parameter within an explicit
833 2014-03-22 Jason Merrill <jason@redhat.com>
836 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
839 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
842 * name-lookup.c (push_class_level_binding_1): Check identifier_p
843 on the name argument.
845 2014-03-20 Jakub Jelinek <jakub@redhat.com>
848 * init.c (build_zero_init_1): Ignore fields with error_mark_node
851 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
854 * call.c (build_new_method_call_1): Handle pure virtuals called by
857 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
860 * parser.c (cp_parser_member_declaration): Don't allow
861 finish_fully_implicit_template to consider friend declarations to be
862 class member templates.
863 (synthesize_implicit_template_parm): Handling winding back through class
864 scope to the class being defined in order to inject a template argument
868 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
869 function scope as per cp_parser_skip_to_end_of_statement.
871 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
874 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
876 2014-03-14 Jason Merrill <jason@redhat.com>
880 * search.c (get_pure_virtuals): Handle abstract dtor here.
881 (dfs_get_pure_virtuals): Not here.
884 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
885 abstract class as pure.
887 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
890 * pt.c (maybe_process_partial_specialization): Check return value
891 of check_specialization_namespace.
893 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
896 * semantics.c (finish_static_assert): Call cxx_constant_value only
897 if require_potential_rvalue_constant_expression returns true.
899 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
902 * method.c (get_inherited_ctor): New.
903 * cp-tree.h (get_inherited_ctor): Declare it.
904 * semantics.c (is_valid_constexpr_fn): Use it.
906 2014-03-10 Jason Merrill <jason@redhat.com>
909 * call.c (convert_default_arg): Remove special handling for
913 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
914 when deciding whether to call push_template_decl for a member class.
915 * pt.c (push_template_decl_real): Return after wrong levels error.
917 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
920 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
921 lambda, remove the lambda's own template argument list prior to fetching
925 * parser.c (cp_parser_parameter_declaration_clause): Move generic
926 function template unwinding on error into a more general location, ...
927 (cp_parser_skip_to_end_of_statement): ... here.
929 2014-03-07 Jason Merrill <jason@redhat.com>
931 * Make-lang.in (check_g++_parallelize): Split dg.exp.
933 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
934 we're in a trailing return type.
936 * typeck.c (comp_template_parms_position): 'auto' and
937 'decltype(auto)' are different from real template parms.
939 * parser.c (cp_parser_using_declaration): Consume the semicolon
940 after bare parameter pack error.
942 * cp-tree.h (REF_PARENTHESIZED_P): New.
943 * semantics.c (force_paren_expr): Set it.
944 * pt.c (do_auto_deduction): Check it.
945 (tsubst) [COMPONENT_REF]: Copy it.
946 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
948 * decl.c (create_array_type_for_decl): Only warn about invalid
949 C++1y VLA if flag_iso or warn_vla>0.
950 (grokdeclarator): Likewise.
951 * pt.c (tsubst): Likewise.
952 * semantics.c (finish_decltype_type): Likewise.
953 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
954 (cp_build_addr_expr_1): Likewise.
955 * init.c (build_new_1): Improve diagnostics.
957 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
960 * decl.c (check_initializer): Return NULL_TREE after error;
961 consistently use inform.
963 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
965 * decl.c (check_initializer): Remove dead code.
967 2014-03-06 Marek Polacek <polacek@redhat.com>
970 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
971 of checking tree code.
973 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
975 * parser.c (cp_lexer_set_source_position): New.
976 (cp_parser_mem_initializer): Use it.
977 (cp_parser_postfix_open_square_expression): Likewise.
978 (cp_parser_parenthesized_expression_list): Likewise.
979 (cp_parser_new_initializer): Likewise.
980 (cp_parser_jump_statement): Likewise.
981 (cp_parser_initializer): Likewise.
982 (cp_parser_functional_cast): Likewise.
984 2014-03-05 Jason Merrill <jason@redhat.com>
987 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
988 dependent expression.
991 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
992 if re-parsing might succeed.
993 * semantics.c (finish_id_expression): Use of a parameter outside
994 the function body is a parse error.
996 * parser.c (cp_parser_mem_initializer): Set input_location
997 properly for init-list warning.
998 (cp_parser_postfix_open_square_expression): Likewise.
999 (cp_parser_parenthesized_expression_list): Likewise.
1000 (cp_parser_new_initializer): Likewise.
1001 (cp_parser_jump_statement): Likewise.
1002 (cp_parser_initializer): Likewise.
1003 (cp_parser_functional_cast): Likewise.
1005 2014-03-04 Jason Merrill <jason@redhat.com>
1008 * typeck2.c (process_init_constructor_record): Set
1009 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
1013 * parser.c (cp_parser_direct_declarator): Set declarator to
1014 cp_error_declarator on invalid qualified-id.
1016 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1019 * parser.c (cp_parser_using_declaration): Early return when
1020 cp_parser_nested_name_specifier errors out.
1022 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
1025 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
1026 function scope on parse error in function parameter list.
1028 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
1030 * method.c (implicitly_declare_fn): Remove redundant
1031 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
1032 * semantics.c (is_instantiation_of_constexpr): Likewise.
1033 * error.c (dump_function_decl): Likewise.
1035 2014-03-01 Jason Merrill <jason@redhat.com>
1038 * semantics.c (begin_maybe_infinite_loop): Use
1039 fold_non_dependent_expr_sfinae.
1041 2014-02-28 Jason Merrill <jason@redhat.com>
1044 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
1046 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
1049 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
1050 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
1051 * lambda.c (maybe_add_lambda_conv_op): Likewise.
1053 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1056 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
1059 2014-02-27 Jason Merrill <jason@redhat.com>
1063 * decl2.c (tentative_decl_linkage): Don't mess with functions that
1064 are not yet defined.
1066 2014-02-26 Jason Merrill <jason@redhat.com>
1070 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
1071 * init.c (build_vtbl_address): Do it here.
1077 * pt.c (struct warning_sentinel): New.
1078 (tsubst_copy_and_build): Use it instead of
1079 c_inhibit_evaluation_warnings.
1080 * typeck.c (maybe_warn_about_useless_cast): Remove
1081 c_inhibit_evaluation_warnings check.
1084 * pt.c (get_template_parm_index): New.
1085 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
1086 (process_template_parm): Allow bare packs in template template
1087 parm template parms.
1088 (coerce_template_parameter_pack): Handle fixed template template
1089 parm packs and fixed packs not at the end of the parm list.
1090 (coerce_template_parms): Handle template parm packs not at the end
1092 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
1095 * pt.c (unify): Ignore alias templates when deducing a template
1101 * call.c (reference_binding): Recurse on user-defined conversion.
1102 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1104 2014-02-25 Jason Merrill <jason@redhat.com>
1107 * call.c (reference_binding): Recurse on user-defined conversion.
1108 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1110 * call.c (print_conversion_rejection): Handle n_arg of -2.
1111 (build_user_type_conversion_1): Pass it.
1114 * decl2.c (no_linkage_error): Handle C++98 semantics.
1115 (reset_type_linkage): Move from decl.c.
1116 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
1117 (bt_reset_linkage_2, reset_decl_linkage): New.
1118 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
1119 (cp_write_global_declarations): Move condition into no_linkage_error.
1120 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
1121 * semantics.c (expand_or_defer_fn_1): Factor out
1122 tentative_decl_linkage.
1123 * cp-tree.h: Adjust.
1125 * decl2.c (finish_static_data_member_decl): Diagnose static data
1126 member in unnamed class.
1127 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
1130 * class.c (clone_function_decl): Call note_vague_linkage_fn for
1131 defaulted virtual dtor.
1135 * pt.c (get_underlying_template): Fix equivalence calculation.
1137 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
1140 * parser.c (function_being_declared_is_template_p): Return false when
1141 processing a template parameter list.
1142 (cp_parser_parameter_declaration_clause): Don't set
1143 auto_is_implicit_function_template_parm_p when processing a
1144 template parameter list.
1146 * parser.c (synthesize_implicit_template_parm): Inject new template
1147 argument list appropriately when a generic member function
1148 of a class template is declared out-of-line.
1151 * parser.c (cp_parser_direct_declarator): Don't save and
1152 restore num_template_parameter_lists around call to
1153 cp_parser_parameter_declaration_list.
1154 (function_being_declared_is_template_p): New predicate.
1155 (cp_parser_parameter_declaration_list): Use
1156 function_being_declared_is_template_p as predicate for
1157 inspecting current function template parameter list length
1158 rather than num_template_parameter_lists.
1160 2014-02-24 Jason Merrill <jason@redhat.com>
1163 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
1164 DECL_EXPR initialize a non-class iterator.
1167 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
1169 2014-02-21 Jason Merrill <jason@redhat.com>
1172 * parser.c (cp_parser_type_name): Always check dependency.
1173 (cp_parser_type_specifier_seq): Call
1174 cp_parser_parse_and_diagnose_invalid_type_name.
1177 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
1180 * parser.c (cp_parser_default_argument): Clear
1181 current_class_ptr/current_class_ref like tsubst_default_argument.
1184 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1185 than current_binding_level.
1188 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1191 * parser.c (cp_parser_enum_specifier): Call
1192 check_for_bare_parameter_packs.
1195 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1199 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1200 of the partial instantiation, not the most general template.
1201 (maybe_process_partial_specialization): Reassign everything on
1205 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1206 (check_explicit_specialization): Don't clone.
1209 * pt.c (coerce_template_parms): Bail if argument packing fails.
1212 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1213 Don't get confused by a CONSTRUCTOR that already has a type.
1216 * call.c (build_array_conv): Don't crash on VLA.
1219 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1222 * lambda.c (maybe_resolve_dummy): Don't try to capture this
1223 in declaration context.
1227 * pt.c (unify): Only unify if deducible. Handle 0-length list.
1230 * parser.c (cp_parser_direct_declarator): Don't wrap a
1231 type-dependent expression in a NOP_EXPR.
1234 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1239 * parser.c (cp_parser_template_argument): Restore dereference.
1240 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1241 (process_partial_specialization): Handle deref.
1244 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
1248 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1249 implicit_template_scope upon leaving an out-of-line generic member
1250 function definition.
1252 2014-02-20 Kai Tietz <ktietz@redhat.com>
1255 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1256 valued type argument as error_mark_node.
1259 * semantics.c (finish_fname): Handle error_mark_node.
1261 2014-02-19 Jason Merrill <jason@redhat.com>
1264 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1265 spec from template context.
1267 2014-02-19 Jakub Jelinek <jakub@redhat.com>
1270 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1271 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1274 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1276 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1279 * semantics.c (ensure_literal_type_for_constexpr_object): Use
1282 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1285 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1286 During error recovery allow_non_constant may be false.
1288 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
1291 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1292 scope whenever a template parameter list has been started, independent
1293 of whether the function call operator was well-formed or not.
1296 * parser.c (cp_parser_member_declaration): Pop fully implicit template
1297 scope for generic friend declarations as well as for non-friends.
1299 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
1302 * method.c (implicitly_declare_fn): A constructor of a class with
1303 virtual base classes isn't constexpr (7.1.5p4).
1305 2014-02-05 Jan Hubicka <hubicka@ucw.cz
1307 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1309 2014-02-05 Jakub Jelinek <jakub@redhat.com>
1312 * parser.c (cp_parser_omp_declare_reduction): Save and free
1315 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
1319 * tree.c (handle_init_priority_attribute): Call default_conversion on
1320 the attribute argument.
1322 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1325 * method.c (synthesized_method_walk): If vbases is non-null but
1326 is_empty is true, likewise don't worry about the virtual bases.
1328 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1331 * typeck2.c (process_init_constructor_record): Just skip unnamed
1334 2014-01-31 Jason Merrill <jason@redhat.com>
1337 * pt.c (mark_decl_instantiated): Call mark_needed.
1340 * decl2.c (handle_tls_init): Handle null init fn.
1343 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1345 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
1348 * class.c (build_vfield_ref): Early return error_mark_node if
1349 TYPE_VFIELD (type) is null.
1350 (build_base_path): Check return value of build_vfield_ref.
1352 2014-01-31 Jason Merrill <jason@redhat.com>
1355 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1356 [ck_list]: Check for error_mark_node.
1357 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1360 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1361 during partial ordering.
1363 2014-01-31 Marek Polacek <polacek@redhat.com>
1366 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1368 2014-01-30 Jason Merrill <jason@redhat.com>
1371 * cp-tree.h (struct saved_scope): Add x_local_specializations.
1372 (local_specializations): New macro.
1373 * pt.c (local_specializations): Remove variable.
1375 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
1378 * parser.c (make_string_pack): Use double_int::from_buffer.
1380 2014-01-30 Marek Polacek <polacek@redhat.com>
1383 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1385 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1386 with input_location.
1387 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1390 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1393 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1395 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1398 * pt.c (lookup_template_class_1): Check start_enum return value
1399 for error_mark_node.
1401 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1403 * decl.c (duplicate_decls, typename_hash, typename_compare):
1404 Use TYPE_IDENTIFIER.
1405 * error.c (dump_type): Likewise.
1406 * mangle.c (dump_substitution_candidates): Likewise.
1408 2014-01-30 Jason Merrill <jason@redhat.com>
1411 * decl2.c (attributes_naming_typedef_ok): New.
1412 * cp-tree.h: Declare it.
1413 * decl.c (grokdeclarator): Check it.
1414 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1416 2014-01-29 Jason Merrill <jason@redhat.com>
1419 * call.c (add_builtin_candidate): Catch dependent types.
1422 * pt.c (expand_template_argument_pack): Correct
1423 non_default_args_count calculation.
1426 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1429 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1430 have a friend template in a class template.
1431 * pt.c (tsubst_friend_function): Look through it.
1432 (push_template_decl_real): A friend member template is
1435 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1438 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1441 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1444 * pt.c (instantiate_template_1): Check for error_mark_node the second
1447 2014-01-29 Jason Merrill <jason@redhat.com>
1450 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1451 cdtor_returns_this case.
1454 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1456 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1459 * semantics.c (finish_omp_reduction_clause): Check type for
1462 2014-01-28 Jason Merrill <jason@redhat.com>
1465 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1466 (tsubst_copy): Use it if lookup fails.
1469 * pt.c (tsubst_function_type): Make sure we keep the same function
1473 * semantics.c (build_anon_member_initialization): Stop walking
1474 when we run out of COMPONENT_REFs.
1477 * decl.c (lookup_and_check_tag): Ignore template parameters if
1478 scope == ts_current.
1479 * pt.c (check_template_shadow): Don't complain about the injected
1482 * decl.c (duplicate_decls): Tweak.
1485 * mangle.c (write_unqualified_name): Handle operator auto.
1487 2014-01-27 Jason Merrill <jason@redhat.com>
1491 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1492 list-initialization. A conversion to rvalue ref that involves
1493 an lvalue-rvalue conversion is bad.
1494 (convert_like_real): Give helpful error message.
1497 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1500 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1504 * pt.c (template_parm_to_arg): Call convert_from_reference.
1505 (tsubst_template_arg): Don't strip reference refs.
1508 * call.c (build_aggr_conv): Reject value-initialization of reference.
1512 * call.c (convert_like_real): Give helpful error about excess braces
1513 for ck_rvalue of scalar type.
1516 * call.c (reference_binding): Only elide braces if the single
1517 element is reference-related.
1520 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1524 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1528 * decl.c (compute_array_index_type): Don't call
1529 maybe_constant_value for a non-integral expression.
1531 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1533 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1535 * cp-gimplify.c (cp_genericize): Likewise.
1536 * decl.c (grokfndecl): Likewise.
1537 * parser.c (cp_parser_postfix_expression): Likewise.
1538 (cp_parser_postfix_open_square_expression): Likewise.
1539 (cp_parser_direct_declarator): Likewise.
1540 (is_cilkplus_vector_p): Likewise.
1541 (cp_parser_omp_clause_name): Likewise.
1542 (cp_parser_omp_all_clauses): Likewise.
1543 * pt.c (apply_late_template_attributes): Likewise.
1544 * typeck.c (cp_build_array_ref): Likewise.
1545 (cp_build_compound_expr): Likewise.
1546 (check_return_expr): Likewise.
1548 2014-01-24 Jason Merrill <jason@redhat.com>
1551 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1556 * typeck2.c (process_init_constructor_array): Don't create
1559 2014-01-24 Jakub Jelinek <jakub@redhat.com>
1561 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1562 handling for RANGE_ARRAY case.
1564 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1567 * name-lookup.c (push_using_directive): Use timevar_cond_start.
1569 2014-01-23 Marek Polacek <polacek@redhat.com>
1572 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1574 2014-01-23 Marek Polacek <polacek@redhat.com>
1577 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1580 2014-01-23 Jason Merrill <jason@redhat.com>
1583 * cp-tree.h (struct language_function): Add infinite_loop and
1585 (current_function_infinite_loop): New.
1586 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1587 (break_maybe_infinite_loop): New.
1588 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1589 (finish_do_stmt, finish_for_cond, finish_for_stmt)
1590 (begin_range_for_stmt): Use them.
1591 * decl.c (finish_function): Don't warn about missing return
1592 if current_function_infinite_loop.
1593 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1594 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1596 * call.c (build_op_delete_call): Use make_tree_vector and
1597 release_tree_vector.
1599 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1602 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1603 nested_name_specifier.
1605 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1607 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1608 see if there is an attribute after function decl. If so, then
1610 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1611 enabled function late parsing.
1612 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1613 attribute for a SIMD-enabled function.
1614 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1615 the function is used by SIMD-enabled function (indicated by NULL
1616 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1617 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1618 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1619 vectorlength clause in SIMD-enabled function and #pragma SIMD's
1620 vectorlength clause. Added a new bool parameter to differentiate
1622 (cp_parser_cilk_simd_fn_vector_attrs): New function.
1623 (is_cilkplus_vector_p): Likewise.
1624 (cp_parser_late_parsing_elem_fn_info): Likewise.
1625 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1626 and "vectorlength" clauses when Cilk Plus is enabled.
1627 (cp_parser_omp_clause_linear): Added a new parameter of type bool
1628 and emit a sorry message when step size is a parameter.
1629 * parser.h (cp_parser::cilk_simd_fn_info): New field.
1630 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1632 * pt.c (apply_late_template_attributes): Likewise.
1634 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1637 * semantics.c (finish_omp_reduction_clause): Reject
1638 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1640 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
1643 * parser.c (cp_parser_class_head): Push the class before parsing
1644 the base-clause, pop after it.
1646 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1648 * decl2.c (cpp_check): Revert prototype change.
1650 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1654 * init.c (build_value_init_noctor): Don't pass error_mark_node to
1657 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1660 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1661 only when errorcount == 0.
1663 2014-01-17 Marek Polacek <polacek@redhat.com>
1666 * cvt.c (ocp_convert): Don't segfault on non-existing
1667 ENUM_UNDERLYING_TYPE.
1669 2014-01-16 Jason Merrill <jason@redhat.com>
1672 * tree.c (bot_manip): Update the location of builtin_LINE and
1675 2014-01-14 Jason Merrill <jason@redhat.com>
1678 * typeck2.c (massage_init_elt): New.
1679 (process_init_constructor_record)
1680 (process_init_constructor_union): Use it.
1681 (process_init_constructor_array): Use it. Use RANGE_EXPR.
1682 (split_nonconstant_init_1): Handle it.
1683 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1685 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1688 * parser.c (cp_parser_postfix_expression): Added a new if-statement
1689 and replaced an existing if-statement with else-if statement.
1690 Changed an existing error message wording to match the one from the C
1693 2014-01-08 Jason Merrill <jason@redhat.com>
1696 * class.c (abi_tag_data): Add tags field.
1697 (check_abi_tags): Initialize it.
1698 (find_abi_tags_r): Support collecting missing tags.
1699 (mark_type_abi_tags): Don't look at template args.
1700 (inherit_targ_abi_tags): New.
1701 (check_bases_and_members): Use it.
1702 * cp-tree.h (ABI_TAG_IMPLICIT): New.
1703 * mangle.c (write_abi_tags): Check it.
1705 2014-01-07 Jason Merrill <jason@redhat.com>
1708 * pt.c (num_innermost_template_parms): New.
1709 (get_underlying_template): Use it.
1712 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1714 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
1716 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
1717 the letter of 20.11.6 about Base and Derived naming the same
1718 class type modulo cv-qualifiers.
1720 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
1723 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
1724 function as unimplemented for generic lambdas with varargs.
1727 * parser.c (cp_parser_template_parameter): Early out with
1728 error_mark_node if parameter declaration was not parsed.
1731 * parser.c (cp_parser_lambda_expression): Save/reset/restore
1732 auto_is_implicit_function_template_parm_p around lambda body.
1735 * parser.c (cp_parser_init_declarator): Undo fully implicit
1736 template parameter list when declarator is not a function.
1738 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
1741 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
1743 2014-01-03 Tobias Burnus <burnus@net-b.de>
1746 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
1748 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1752 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
1753 as include_std to perform_koenig_lookup.
1754 (cp_parser_postfix_expression): Adjust.
1755 * pt.c (tsubst_copy_and_build): Likewise.
1756 * semantics.c (perform_koenig_lookup): Remove bool parameter.
1757 (omp_reduction_lookup): Adjust.
1758 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
1759 (lookup_arg_dependent): Likewise.
1760 (lookup_function_nonclass): Adjust.
1761 * name-lookup.h: Adjust declaration.
1762 * cp-tree.h: Likewise.
1764 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1767 * parser.c (cp_parser_userdef_numeric_literal): Mention
1768 -fext-numeric-literals in the message.
1770 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1773 * call.c (build_conditional_expr_1): Check the return value of
1776 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1778 * call.c (convert_like_real): Check complain.
1780 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1783 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
1786 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1788 Update copyright years
1790 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1792 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
1793 the standard form for the copyright notice.
1795 Copyright (C) 2014 Free Software Foundation, Inc.
1797 Copying and distribution of this file, with or without modification,
1798 are permitted in any medium without royalty provided the copyright
1799 notice and this notice are preserved.