1 2010-11-23 Jeffrey Yasskin <jyasskin@google.com>
4 * pt.c (instantiate_decl): Propagate the template's location to
7 2010-11-20 Joseph Myers <joseph@codesourcery.com>
9 * name-lookup.c (handle_namespace_attrs): Don't check
10 HANDLE_PRAGMA_VISIBILITY.
11 * parser.c (cp_parser_namespace_definition): Don't check
12 HANDLE_PRAGMA_VISIBILITY.
14 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
19 * parser.c (cp_lexer_set_token_position): New function.
20 (cp_lexer_previous_token_position): New function.
21 (cp_lexer_previous_token): Call it.
22 (cp_parser_class_specifier): Try to gracefully handle a missing
25 2010-11-20 Jakub Jelinek <jakub@redhat.com>
28 * decl.c (cp_make_fname_decl): Return error_mark_node if
29 current_binding_level has already sk_function_parms kind.
32 * semantics.c (cxx_eval_call_expression): Unshare the result.
34 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
36 * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
37 to objc_declare_protocols.
39 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
42 * typeck.c (cp_build_unary_op): Call build_real_imag_expr for
43 REALPART_EXPR and IMAGPART_EXPR.
45 2010-11-16 Jason Merrill <jason@redhat.com>
47 * call.c (convert_like_real): Don't make a temp for copy-list-init.
48 (build_over_call): Don't handle that here.
49 (build_new_method_call): Use COMPLETE_OR_OPEN_TYPE_P for error.
52 * call.c (build_over_call): Check for =delete even when trivial.
55 * decl.c (make_unbound_class_template): Handle using
56 injected-type-name as template.
58 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
60 * typeck.c (cp_build_unary_op): Use
61 objc_build_incr_expr_for_property_ref to build the pre/post
62 increment/decrement of an Objective-C property ref.
64 2010-11-13 Jason Merrill <jason@redhat.com>
66 * decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
67 * init.c (build_new): Likewise.
68 * pt.c (tsubst_decl): Likewise.
69 (do_auto_deduction): Likewise.
70 (resolve_nondeduced_context): Use build_offset_ref and
73 2010-11-12 Joseph Myers <joseph@codesourcery.com>
75 * Make-lang.in (g++spec.o): Use $(OPTS_H).
77 2010-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
79 Core 1135, 1136, 1145, 1149
80 * method.c (defaultable_fn_check): Do not disallow defaulting a
81 non-public or explicit special member function on its first
84 2010-11-12 James Dennett <jdennett@google.com>
87 * typeck.c (build_static_cast_1): Convert to the target type
88 when doing static_cast<cv Derived*>(Base*).
90 2010-11-10 Jason Merrill <jason@redhat.com>
93 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
94 [CONSTRUCTOR]: Use the tsubsted type.
97 * semantics.c (cxx_eval_bit_field_ref): New.
98 (cxx_eval_constant_expression): Call it.
100 2010-11-10 Joseph Myers <joseph@codesourcery.com>
102 * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
103 * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
104 Use %' in diagnostics.
105 * decl2.c (check_classfn): Use %' in diagnostic.
106 * init.c (build_java_class_ref): Use %' in diagnostic.
107 (build_delete): Remove trailing '.' from diagnostic.
108 * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
110 * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
111 * parser.c (cp_parser_exception_specification_opt): Remove
112 trailing '.' from diagnostic.
113 (cp_parser_objc_interstitial_code): Use %qs for quoting in
115 * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
117 * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
119 2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
122 * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
124 2010-11-09 Jakub Jelinek <jakub@redhat.com>
127 * tree.c (lvalue_kind): Don't crash if ref has NULL type.
129 2010-11-08 Jason Merrill <jason@redhat.com>
132 * semantics.c (check_constexpr_ctor_body): New fn.
133 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
134 * cp-tree.h: Declare it.
137 * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
139 Correct conversion/overflow behavior.
140 * cvt.c (ignore_overflows): Move here from typeck.c.
141 (ocp_convert): Use it.
142 (cp_fold_convert): Use it. Don't call rvalue.
143 * typeck.c (build_static_cast_1): Don't use it. Do call rvalue.
144 * error.c (location_of): Handle expressions, too.
145 * class.c (check_bitfield_decl): Set input_location around call to
147 * semantics.c (cxx_eval_outermost_constant_expr): Don't
148 print the expression if it already had TREE_OVERFLOW set.
149 (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
150 (verify_constant): Allow overflow with a permerror if we're
152 (cxx_eval_outermost_constant_expr): Use verify_constant.
153 (adjust_temp_type): Use cp_fold_convert.
154 * decl.c (build_enumerator): Don't call constant_expression_warning.
155 * decl2.c (grokbitfield): Likewise.
157 2010-11-06 Jason Merrill <jason@redhat.com>
160 * init.c (perform_member_init): Use build_vec_init_expr for
161 value-init of arrays, too.
162 * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
163 * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
164 (VEC_INIT_EXPR_VALUE_INIT): New macro.
165 * semantics.c (potential_constant_expression): No longer static.
166 Check VEC_INIT_EXPR_IS_CONSTEXPR.
167 * tree.c (build_vec_init_expr): Handle value-init. Set
168 VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
170 2010-11-06 Nathan Froyd <froydnj@codesourcery.com>
173 * parser.c (cp_lexer_previous_token): New function.
174 (cp_parser_member_declaration): Use previous token for error
175 messages. Assume semicolon presence rather than grovelling for
178 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
181 * method.c (make_alias_for_thunk):
182 Use targetm.asm_out.generate_internal_label.
184 2010-11-05 Jason Merrill <jason@redhat.com>
187 * search.c (look_for_overrides): A constructor is never virtual.
189 2010-11-05 Jakub Jelinek <jakub@redhat.com>
192 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
193 on the RHS to avoid infinite recursion with gimplify_expr.
195 2010-11-05 Jason Merrill <jason@redhat.com>
198 * pt.c (tsubst_copy): Handle COMPLEX_CST.
200 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
202 Fixed using the Objective-C 2.0 dot-syntax with class names.
203 * parser.c (cp_parser_primary_expression): Recognize Objective-C
204 2.0 dot-syntax with class names and process it.
205 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
207 (cp_parser_class_name): Same change.
208 (cp_parser_simple_type_specifier): Tidied comments.
210 2010-11-04 Jason Merrill <jason@redhat.com>
213 * semantics.c (build_constexpr_constructor_member_initializers):
214 Handle an enclosing STATEMENT_LIST.
216 * semantics.c (speculative_access_check): New.
217 * cp-tree.h: Declare it.
218 * call.c (build_over_call): Use it.
219 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
220 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
222 2010-11-03 Jason Merrill <jason@redhat.com>
225 * semantics.c (build_data_member_initialization): Handle
226 value-init of aggregate empty base.
229 * call.c (can_convert_array): New fn.
230 (build_aggr_conv): Use it.
233 * semantics.c (build_constexpr_constructor_member_initializers):
236 2010-11-02 Dodji Seketeli <dodji@redhat.com>
238 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
240 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
242 2010-11-03 Jason Merrill <jason@redhat.com>
245 * init.c (expand_default_init): Avoid ICE if we can't figure out
246 which function is being called.
248 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
250 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
251 instead of fold_convert.
252 * init.c (build_zero_init): Likewise.
253 * typeck.c (cp_build_binary_op): Likewise.
255 2010-11-02 Dodji Seketeli <dodji@redhat.com>
259 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
261 (convert_nontype_argument, convert_nontype_argument): Pass the
262 complain parameter down to check_valid_ptrmem_cst_expr.
264 2010-11-02 Dodji Seketeli <dodji@redhat.com>
267 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
268 (struct template_parm_index_s)<num_siblings>: New field.
269 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
270 (process_template_parm): Extend the API to accept the number of
271 template parms in argument.
272 (cp_set_underlying_type): Remove this.
273 * class.c (build_self_reference): Require canonical type equality
274 back on the self reference of class.
275 * decl2.c (grokfield): Require canonical type equality back on
276 typedef class fields.
277 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
278 equality back on typedefs.
279 * parser.c (cp_parser_template_parameter_list): Do not require
280 canonical type equality on dependent types created during template
282 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
283 (fixup_template_parm, fixup_template_parms): New private
285 (current_template_args): Declare this.
286 (process_template_parm): Pass the total number of template parms
287 to canonical_type_parameter.
288 (build_template_parm_index): Add a new argument to carry the total
289 number of template parms.
290 (reduce_template_parm_level, process_template_parm, make_auto):
292 (current_template_args): Fix this for template template
294 (tsubst_template_parm): Split out of ...
295 (tsubst_template_parms): ... this.
296 (reduce_template_parm_level): Don't loose
297 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
298 (template_parm_to_arg): Extracted this function from
299 current_template_args. Make it represent invalid template parms
300 with an error_mark_node instead of a LIST_TREE containing an
302 (current_template_args): Use template_parm_to_arg.
303 (dependent_template_arg_p): Consider an invalid template argument
305 (end_template_parm_list): Do not update template sibling parms
306 here anymore. Use fixup_template_parms instead.
307 (process_template_parm): Pass the number of template parms to
308 canonical_type_parameter.
309 (make_auto): Require structural equality on auto
310 TEMPLATE_TYPE_PARM for now.
311 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
312 using all the arguments deduced so far.
313 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
314 canonical_type_parameter.
315 * tree.c (cp_set_underlying_type): Remove.
316 * typeck.c (get_template_parms_of_dependent_type)
317 (incompatible_dependent_types_p): Remove.
318 (structural_comptypes): Do not call incompatible_dependent_types_p
320 (comp_template_parms_position): Re-organized. Take the length of
321 template parms list in account.
323 2010-11-01 Jason Merrill <jason@redhat.com>
325 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
326 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
327 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
328 of giving follow-on errors.
329 * error.c (maybe_print_constexpr_context): New.
330 (cp_diagnostic_starter): Call it.
331 * cp-tree.h: Declare cx_error_context.
333 * semantics.c (cxx_eval_constant_expression): Explain
334 unacceptable use of variable better.
336 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
337 Jason Merrill <jason@redhat.com>
339 * call.c (null_ptr_cst_p): Use maybe_constant_value.
340 (set_up_extended_ref_temp): Support constant initialization.
341 (initialize_reference): Adjust.
342 * class.c (check_bitfield_decl): Use cxx_constant_value.
343 * cvt.c (ocp_convert): Don't use integral_constant_value when
344 converting to class type.
345 * decl.c (finish_case_label): Use maybe_constant_value.
346 (build_init_list_var_init): Support constant initialization.
347 (check_initializer): Likewise. Reorganize.
348 (cp_finish_decl): Likewise.
349 (expand_static_init): Likewise.
350 (compute_array_index_type): Use maybe_constant_value.
352 (create_array_type_for_decl, grokdeclarator): Pass it.
353 (build_enumerator): Use cxx_constant_value.
354 * decl2.c (grokfield): Use maybe_constant_init.
355 * except.c (check_noexcept_r): Handle constexpr.
356 (build_noexcept_spec): Use maybe_constant_value.
357 * init.c (expand_default_init): Support constant initialization.
358 (build_vec_init): Likewise.
359 (constant_value_1): Adjust.
360 (build_new_1): Adjust.
361 * parser.c (cp_parser_constant_expression): Allow non-integral
363 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
364 (cp_parser_initializer_clause): Toss folded result if non-constant.
365 * pt.c (fold_decl_constant_value): Remove.
366 (convert_nontype_argument): Use maybe_constant_value. Give clearer
367 error about overflow.
368 (tsubst): Move array bounds handling into compute_array_index_type.
369 (value_dependent_expression_p): Handle constant CALL_EXPR.
370 (tsubst_decl): Don't set
371 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
372 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
373 (instantiate_decl): Here too.
374 * semantics.c (finish_static_assert): Use maybe_constant_value.
375 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
376 (potential_constant_expression): Use maybe_constant_value.
377 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
378 is potentially valid in C++0x.
379 * typeck2.c (store_init_value): Handle constant init.
380 (check_narrowing): Use maybe_constant_value.
381 (build_functional_cast): Set TREE_CONSTANT on literal T().
382 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
383 (LOOKUP_ALREADY_DIGESTED): New.
384 (compute_array_index_type): Adjust prototype.
386 * semantics.c (constexpr_call): New datatype.
387 (constexpr_call_table): New global table.
388 (constexpr_call_hash): New.
389 (constexpr_call_equal): Likewise.
390 (maybe_initialize_constexpr_call_table): Likewise.
391 (lookup_parameter_binding): Likewise.
392 (cxx_eval_builtin_function_call): Likewise.
393 (cxx_bind_parameters_in_call): Likewise.
394 (cxx_eval_call_expression): Likewise.
395 (cxx_eval_unary_expression): Likewise.
396 (cxx_eval_binary_expression): Likewise.
397 (cxx_eval_conditional_expression): Likewise.
398 (cxx_eval_array_reference): Likewise.
399 (cxx_eval_component_reference): Likewise.
400 (cxx_eval_logical_expression): Likewise.
401 (cxx_eval_object_construction): Likewise.
402 (cxx_eval_constant_expression): Likewise.
403 (cxx_eval_indirect_ref): Likewise.
404 (cxx_constant_value): Likewise.
405 (cxx_eval_bare_aggregate): Likewise.
406 (adjust_temp_type): New.
407 (reduced_constant_expression_p): New.
408 (verify_constant): New.
409 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
410 (cxx_eval_outermost_constant_expr): New.
411 (maybe_constant_value, maybe_constant_init): New.
412 (cxx_eval_constant_expression): Use them.
413 * pt.c (iterative_hash_template_arg): No longer static.
414 * cp-tree.h: Declare fns.
416 * cp-tree.h (register_constexpr_fundef): Declare.
417 * decl.c (maybe_save_function_definition): New.
418 (finish_function): Use it.
419 * semantics.c (constexpr_fundef): New datatype.
420 (constexpr_fundef_table): New global table.
421 (constexpr_fundef_equal): New.
422 (constexpr_fundef_hash): Likewise.
423 (retrieve_constexpr_fundef): Likewise.
424 (validate_constexpr_fundecl): Store in the table.
425 (build_data_member_initialization): New fn.
426 (build_constexpr_constructor_member_initializers): New.
427 (register_constexpr_fundef): Define.
428 (is_this_parameter): New.
429 (get_function_named_in_call): Likewise.
430 (get_nth_callarg): Likewise.
431 (check_automatic_or_tls): New.
432 (morally_constexpr_builtin_function_p): New.
433 (potential_constant_expression): New.
435 2010-11-01 Jason Merrill <jason@redhat.com>
437 * decl2.c (decl_constant_var_p): New fn.
438 (decl_maybe_constant_var_p): New fn.
439 (mark_used): Rework instantiation of things needed for constant
441 * cp-tree.h: Declare new fns.
442 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
443 (always_instantiate_p): Use decl_maybe_constant_var_p.
444 (instantiate_decl): Don't defer constexpr functions.
445 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
446 * semantics.c (finish_id_expression): Use decl_constant_var_p.
447 Check for valid name in constant expr after mark_used.
449 2010-10-31 Jason Merrill <jason@redhat.com>
451 * class.c (is_really_empty_class): Work when type is not complete.
452 (synthesized_default_constructor_is_constexpr): New.
453 (add_implicitly_declared_members): Use it.
454 (type_has_constexpr_default_constructor): Likewise.
455 * cp-tree.h: Declare it.
456 * method.c (synthesized_method_walk): Use it.
458 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
459 * typeck.c (convert_for_assignment): Likewise.
461 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
462 message about constexpr without -std=c++0x.
464 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
467 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
469 * class.c (layout_vtable_decl): Call build_array_of_n_type.
470 (build_vtt, build_ctor_vtabl_group): Likewise.
472 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
474 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
475 * parser.c (cp_parser_objc_at_property_declaration): Removed
476 parsing of RID_COPIES and RID_IVAR. Updated call to
477 objc_add_property_declaration.
478 * typecheck.c (finish_class_member_access_expr): Call
479 objc_maybe_build_component_ref instead of objc_build_setter_call.
480 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
481 of objc_build_getter_call.
483 2010-10-27 Jason Merrill <jason@redhat.com>
485 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
486 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
487 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
488 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
489 (cp_parser_trait_expr): Likewise.
491 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
492 Jason Merrill <jason@redhat.com>
494 * decl.c (finish_case_label): Use decl_constant_value.
496 * method.c (synthesized_method_walk): Track constexprness too.
497 (process_subob_fn, walk_field_subobs): Likewise.
498 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
499 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
500 * class.c (add_implicitly_declared_members): Handle
501 constexpr default ctor.
503 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
504 Make sure a constexpr ctor has an empty body.
505 * class.c (type_has_constexpr_default_constructor): New.
506 * cp-tree.h: Declare it.
507 * init.c (perform_member_init): Complain about uninitialized
508 member in constexpr ctor.
509 (emit_mem_initializers): And uninitialized base.
510 * decl.c (check_tag_decl): Fix typo.
512 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
513 (is_valid_constexpr_fn): New fn.
514 (validate_constexpr_fundecl): Use it.
515 * decl.c (validate_constexpr_redeclaration): New.
516 (duplicate_decls): Use it.
517 (cp_finish_decl): Call validate_constexpr_fundecl and
518 ensure_literal_type_for_constexpr_object here.
519 (start_decl): Not here. Don't ICE on constexpr reference.
520 (check_for_uninitialized_const_var): Don't handle constexpr specially.
521 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
522 (check_static_variable_definition): Give friendly message about
524 (grokdeclarator): Complain about typedef and volatile with constexpr.
525 Reorganize. Give sorry about non-static data members in C++0x mode.
526 (start_preparsed_function): Check validate_constexpr_fundecl here.
527 (check_function_type): Not here.
528 * decl2.c (finish_static_data_member_decl): Don't complain about
530 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
531 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
532 (cp_parser_decl_specifier_seq): Handle it.
533 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
535 * class.c (check_bases): Propagate non-literality.
536 (check_field_decls): Likewise.
537 (finalize_literal_type_property): New.
538 (check_bases_and_members): Call it.
539 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
540 (lang_type_class): Add has_constexpr_ctor field.
541 (DECL_DECLARED_CONSTEXPR_P): Strip template.
542 * decl.c (grok_special_member_properties): Set
543 TYPE_HAS_CONSTEXPR_CTOR.
545 2010-10-27 Jason Merrill <jason@redhat.com>
547 * call.c (build_integral_nontype_arg_conv): New.
548 * cp-tree.h: Declare it.
549 * pt.c (convert_nontype_argument): Use it.
551 * error.c (dump_simple_decl): Print constexpr.
553 * cvt.c (build_up_reference): Use target_type for the temporary var.
555 * except.c (build_throw): Set EXPR_LOCATION.
557 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
559 * semantics.c (finish_compound_stmt): Avoid creating an
560 unnecessary BIND_EXPR.
562 * call.c (convert_like_real): Don't check narrowing if the element
563 is also an initializer-list.
565 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
567 * parser.c (cp_parser_objc_at_property_declaration): Recognize
568 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
569 Do not use objc_set_property_attr, but use local variables
570 instead. Detect repeated usage of setter, getter and ivar
571 attributes. Improved error processing when a setter name does not
572 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
573 that the token is a keyword. Updated call to
574 objc_add_property_declaration.
576 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
578 * parser.c (cp_parser_objc_property_decl): Renamed to
579 cp_parser_objc_struct_declaration. Return the parsed trees
580 instead of calling objc_add_property_variable directly. Detect
581 missing or invalid declspecs. Implemented attributes. Do not eat
582 the ';' at the end. Exit loop whenever a non-comma is parsed, not
584 (cp_parser_objc_at_property): Renamed to
585 cp_parser_objc_at_property_declaration. Updated calls to
586 objc_add_property_variable, now objc_add_property_declaration, and
587 to cp_parser_objc_property_decl, now
588 cp_parser_objc_struct_declaration. Rewritten all code to be more
589 robust in dealing with syntax errors, and almost identical to the
590 one in c_parser_objc_at_property_declaration.
591 (cp_parser_objc_property_attrlist): Removed.
592 (cp_parser_objc_method_prototype_list): Updated call to
593 cp_parser_objc_at_property.
594 (cp_parser_objc_method_definition_list): Same change.
595 (cp_parser_objc_class_ivars): Detect a number of invalid
596 declarations of instance variables and produce errors when they
599 2010-10-26 Jason Merrill <jason@redhat.com>
601 * tree.c (build_vec_init_expr): Split out from...
602 (build_array_copy): ...here.
603 * init.c (perform_member_init): Use it.
604 * cp-tree.h: Declare it.
605 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
606 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
607 (cp_gimplify_expr): Handle array default-initialization via
610 * tree.c (stabilize_expr): Handle xvalues properly.
612 * call.c (build_over_call): Use argarray[0] for 'this' argument.
614 * decl.c (finish_function): Don't look at function_depth.
616 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
618 Implement opaque-enum-specifiers for C++0x.
619 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
620 (OPAQUE_ENUM_P): New.
621 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
622 (start_enum): Update prototype.
623 (finish_enum_value_list): New prototype.
624 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
625 "enum class" is used in an elaborated-type-specifier.
626 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
627 * decl.c (copy_type_enum): New.
628 (finish_enum_value_list): New, with code from finish_enum.
629 (finish_enum): A lot of code removed. Added a gcc_assert.
630 (start_enum): Add parameters enumtype and is_new.
631 Rewrite to work with opaque-enum-specifiers.
632 * pt.c (maybe_process_partial_specialization): Allow for template
633 specialization of enumerations, with a pedwarn.
634 (lookup_template_class): Update call to start_enum. Call to
636 (tsubst_enum): Call to begin_scope, finish_scope and
637 finish_enum_value_list.
639 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
641 Removed Objective-C++ specific replacement of cxx_printable_name.
642 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
643 to cxx_printable_name for both C++ and Objective-C++.
644 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
646 * error.c (dump_decl): For Objective-C++, call
647 objc_maybe_printable_name here ...
648 * tree.c (cxx_printable_name_internal): ... instead of here.
650 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
652 * tree.c (cxx_printable_name_internal): In Objective-C++, call
653 objc_maybe_printable_name.
655 2010-10-22 Jason Merrill <jason@redhat.com>
658 * pt.c (instantiate_class_template): Don't instantiate default
662 * init.c (build_vec_init): Handle memberwise move.
664 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
667 * call.c (add_function_candidate): Don't use TREE_VALUE on null
670 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
672 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
673 bool instead of calling objc_set_method_type.
674 (cp_parser_objc_method_signature): Updated calls to
675 cp_parser_objc_method_type and to objc_build_method_signature.
676 (cp_parser_objc_method_prototype_list): Updated calls to
677 objc_add_method_declaration. Use token->type to determine if it
678 is a class method or not.
679 (cp_parser_objc_method_definition_list): Same change.
681 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
684 * parser.c (cp_convert_range_for): Call cp_finish_decl
685 instead of finish_expr_stmt.
687 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
689 * cp-lang.c (finish_file): Removed.
690 * decl2.c (cp_write_global_declarations): Call
691 objc_write_global_declarations when compiling Objective-C++.
693 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
696 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
697 (coerce_template_parms): Likewise for args.
699 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
701 Implemented parsing @synthesize and @dynamic for Objective-C++.
702 * parser.c (cp_parser_objc_method_definition_list): Recognize
703 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
704 (cp_parser_objc_at_dynamic_declaration): New.
705 (cp_parser_objc_at_synthesize_declaration): New.
707 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
709 * parser.c (cp_parser_objc_identifier_list): Check the return
710 value of cp_parser_identifier and react if it is error_mark_node.
712 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
714 Merge from apple/trunk branch on FSF servers.
716 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
719 * call.c (standard_conversion, implicit_conversion): Ignore
720 'volatile' attribute of artificially volatized type in objc when
721 evaluating various conversion weights.
723 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
726 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
727 artiificially 'volatized' type before doing pointer comparison.
729 2010-10-18 Jakub Jelinek <jakub@redhat.com>
732 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
735 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
737 Merge from apple/trunk branch on FSF servers.
739 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
742 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
743 objc object types if type is scope qualified.
745 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
747 Merge from apple/trunk branch on FSF servers.
749 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
752 * lex.c (unqualified_name_lookup_error): Issue diagnostic
753 for private 'ivar' access.
755 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
757 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
758 enum, and handle @package.
760 2010-10-15 Jason Merrill <jason@redhat.com>
763 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
764 with a different typedef variant of the element type.
766 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
768 merge from FSF apple 'trunk' branch.
769 2006 Fariborz Jahanian <fjahanian@apple.com>
771 Radars 4436866, 4505126, 4506903, 4517826
772 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
774 (cp_build_modify_expr): Likewise.
775 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
776 (cp_parser_objc_method_definition_list): Likewise.
777 (cp_parser_objc_property_decl): New.
778 (cp_parser_objc_property_attrlist): New.
779 (cp_parser_objc_at_property): New.
781 2010-10-14 Richard Guenther <rguenther@suse.de>
784 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
785 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
787 * error.c (dump_type): Handle NULLPTR_TYPE.
788 (dump_type_prefix): Likewise.
789 (dump_type_suffix): Likewise.
790 * mangle.c (write_type): Likewise.
791 * name-lookup.c (arg_assoc_type): Likewise.
792 * rtti.c (typeinfo_in_lib_p): Likewise.
793 * pt.c (tsubst): Likewise.
795 2010-10-13 Jason Merrill <jason@redhat.com>
798 * class.c (fixup_attribute_variants): New fn.
799 * cp-tree.h: Declare it.
800 * pt.c (instantiate_class_template): Call it.
801 * semantics.c (begin_class_definition): Call it.
803 2010-10-13 Richard Henderson <rth@redhat.com>
805 * cp-lang.c (cp_eh_personality): Update call to
806 build_personality_function.
807 * except.c (choose_personality_routine): Update function comment.
809 2010-10-13 Richard Guenther <rguenther@suse.de>
811 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
812 clear DECL_CHAIN of NAMESPACE_DECLs.
814 2010-10-11 Martin Jambor <mjambor@suse.cz>
817 * cp-tree.h (current_class_ref): Check that cp_function_chain is
819 * call.c (build_cxx_call): Likewise.
821 2010-10-10 Jason Merrill <jason@redhat.com>
823 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
824 (tsubst_default_arguments): Only do this once for cloned fns.
825 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
827 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
828 (tsubst_copy_and_build): Likewise.
829 (tsubst_initializer_list): Likewise.
830 (tsubst_copy): Change default to gcc_unreachable. Handle
831 OVERLOAD and PTRMEM_CST.
833 2010-10-10 Jason Merrill <jason@redhat.com>
837 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
839 2010-10-07 Andi Kleen <ak@linux.intel.com>
841 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
842 (cc1plus-dummy): Remove.
843 (cc1plus-checksum): Change to run checksum over object files
846 2010-10-08 Joseph Myers <joseph@codesourcery.com>
848 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
850 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
852 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
854 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
856 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
857 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
858 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
859 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
860 * parser.c (cp_parser_objc_encode_expression): Updated comment.
862 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
864 Merge from apple/trunk branch on FSF servers.
866 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
869 * parser.c (cp_parser_objc_interstitial_code): Recognize
870 and parse RID_NAMESPACE keyword.
872 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
874 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
875 finding ellipsis, before checking for attributes.
877 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
879 Merge from apple/trunk branch on FSF servers.
880 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
881 longer existing gcc/c-common.def.
883 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
886 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
887 * parser.c (cp_parser_objc_encode_expression): Build a templatized
888 parse tree for @encode(T).
890 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
893 * c-common.def: Add new expression code AT_ENCODE_EXPR.
895 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
898 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
899 code folding offsetof-like computations.
901 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
904 * parser.c (cp_parser_objc_class_interface): If no identifier
905 follows an @interface token, stop parsing the interface after
907 (cp_parser_objc_class_implementation): If no identifier follows an
908 @implementation token, stop parsing the implementation after
911 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
914 * parser.c (cp_parser_objc_method_keyword_params): If the required
915 colon is not found while parsing parameters, stop parsing them.
917 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
920 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
921 @end after detecting it. Print an error if @end is found without
923 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
924 detecting it. Fixed reading the next token when continuing
925 because of an error in a method signature. Print an error if EOF
926 is found without an '@end'.
927 (cp_parser_objc_method_definition_list): Same change.
929 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
931 Merge from apple/trunk branch on FSF servers:
933 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
936 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
937 method parameters and issue error.
938 (cp_parser_objc_method_definition_list): Check for invalid tokens
939 which cannot start a function definition.
941 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
944 * parser.c (cp_parser_objc_message_args): Check for missing message
945 arguments and syntax error.
947 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
950 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
953 2005-08-15 Ziemowit Laski <zlaski@apple.com>
956 * parser.c (cp_parser_objc_interstitial_code): Catch stray
957 '{' and '}' tokens and issue appropriate errors.
959 2005-08-02 Ziemowit Laski <zlaski@apple.com>
962 (cp_parser_statement_seq_opt): In addition to '}' and
963 end-of-file, a statement sequence may also be terminated
966 2010-10-05 Joseph Myers <joseph@codesourcery.com>
968 * cp-tree.h (cxx_print_error_function,
969 cxx_initialize_diagnostics): Declare using diagnostic_context
972 2010-10-04 Andi Kleen <ak@linux.intel.com>
974 * Make-lang.in (g++, cc1plus): Add + to build rule.
976 2010-10-04 Jason Merrill <jason@redhat.com>
978 * tree.c (decl_storage_duration): New.
979 * cp-tree.h: Declare it.
980 (duration_kind): Return values.
982 2010-10-03 Jason Merrill <jason@redhat.com>
984 * typeck.c (require_complete_type_sfinae): Add complain parm to...
985 (require_complete_type): ...this function.
986 (cp_build_array_ref, convert_arguments): Use it.
987 (convert_for_initialization, cp_build_modify_expr): Likewise.
988 * cp-tree.h: Declare it.
989 * call.c (build_over_call): Use it.
991 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
993 merge from FSF 'apple/trunk' branch.
994 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
997 * cp/parser.c (cp_parser_objc_interstitial_code): For
998 @optional/@required set the optional/required flag.
1000 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
1002 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
1003 and indentation when finding an Objective-C++ CPP_AT_NAME token.
1005 2010-09-29 Richard Guenther <rguenther@suse.de>
1007 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
1008 (CP_TYPE_CONTEXT): Similar.
1009 (FROB_CONTEXT): Frob global_namespace to the global
1010 TRANSLATION_UNIT_DECL.
1011 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
1012 set DECL_CONTEXT of global_namespace to it.
1013 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
1014 instead of zeroing context.
1015 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
1016 (grokfndecl): Likewise.
1017 (start_preparsed_function): Likewise.
1018 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
1019 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
1020 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
1021 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
1022 (push_template_decl_real): Likewise.
1023 (tsubst_friend_class): Likewise. Adjust context comparisons.
1024 (instantiate_class_template): Use CP_TYPE_CONTEXT.
1025 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
1026 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
1029 2010-09-29 Yao Qi <yao@codesourcery.com>
1031 * decl.c (get_atexit_node): Fix typo.
1033 2010-09-28 Jason Merrill <jason@redhat.com>
1035 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
1036 (real_lvalue_p): Take const_tree.
1037 * cp-tree.h: Adjust.
1038 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
1039 (cp_build_addr_expr_1): Likewise.
1041 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1043 Partially merged from apple/trunk branch on FSF servers:
1044 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1045 Radar 3803157 (method attributes)
1047 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
1048 (cp_parser_objc_method_tail_params_opt): Likewise.
1049 (cp_parser_objc_method_signature): Likewise.
1050 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
1051 (cp_parser_objc_method_prototype_list): Handle attributes.
1052 (cp_parser_objc_method_definition_list): Likewise.
1054 2010-09-28 Richard Henderson <rth@redhat.com>
1056 * cp-lang.c: Include "target.h".
1057 (cp_eh_personality): Use targetm.except_unwind_info.
1058 * Make-lang.in (cp-lang.o): Update deps.
1060 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1062 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
1063 (cp_parser_declaration): Parse prefix attributes for ObjC++.
1064 (cp_parser_objc_protocol_declaration): Handle attributes.
1065 (cp_parser_objc_class_interface): Likewise.
1066 (cp_parser_objc_declaration): Likewise.
1068 2010-09-27 Jason Merrill <jason@redhat.com>
1070 Require lvalues as specified by the standard.
1071 * typeck.c (lvalue_or_else): Use real_lvalue_p.
1072 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
1073 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
1074 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
1075 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
1076 (build_const_cast_1): Adjust.
1077 * cp-tree.h: Declare new fns.
1078 * call.c (build_this, convert_like_real, build_over_call): Adjust.
1079 (initialize_reference): Adjust.
1080 * class.c (build_base_path, convert_to_base_statically): Adjust.
1081 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
1082 * cvt.c (build_up_reference, convert_to_reference): Adjust.
1083 * decl.c (register_dtor_fn): Adjust.
1084 * decl2.c (build_offset_ref_call_from_tree): Adjust.
1085 * except.c (initialize_handler_parm): Adjust.
1086 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
1087 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
1088 * tree.c (stabilize_expr): Adjust.
1090 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1092 Merge from apple/trunk branch on FSF servers:
1094 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1097 * typeck.c (composite_pointer_type): Call objc_have_common_type
1098 when comparing two objective-c pointer types.
1100 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1103 * call.c (standard_conversion): Do not issue warnings when
1104 comparing ObjC pointer types.
1106 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1109 * call.c (standard_conversion): Allow for a pointer conversion
1110 between any two ObjC pointer types.
1111 * typeck.c (composite_pointer_type): Determine common type
1112 for two ObjC pointer types.
1114 2010-09-24 Jan Hubicka <jh@suse.cz>
1116 * decl.c (finish_function): Use decl_replaceable_p
1117 * method.c (make_alias_for_thunk): Update call of
1118 cgraph_same_body_alias.
1120 2010-09-24 Jason Merrill <jason@redhat.com>
1122 * decl.c (compute_array_index_type): Remember type dependence of
1124 * pt.c (dependent_type_p_r): Don't recompute it here.
1126 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
1127 reference and pointer to the same type as "*" or "&".
1129 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
1131 * typeck.c (warn_args_num): Use warning 'too many arguments to
1132 method [methodname]' for an Objective-C method instead of the less
1133 satisfactory 'too many arguments to function' (with no method
1136 2010-09-21 Jason Merrill <jason@redhat.com>
1138 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
1139 special handling if we know the member.
1141 2010-09-18 Jason Merrill <jason@redhat.com>
1143 * call.c (compare_ics): Do lvalue/rvalue reference binding
1144 comparison for ck_list, too.
1146 2010-09-15 Jason Merrill <jason@redhat.com>
1148 * semantics.c (finish_id_expression): Diagnose use of function
1149 parms in evaluated context outside function body.
1151 * decl2.c (grokbitfield): Diagnose non-integral width.
1153 * call.c (convert_like_real): Use the underlying type of the
1154 reference for the temporary.
1156 2010-09-15 Jakub Jelinek <jakub@redhat.com>
1159 * class.c (build_vtbl_initializer): Use fn instead of init's operand
1160 as first argument to FDESC_EXPR.
1162 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
1165 * decl.c (grokdeclarator): Check build_memfn_type return value
1166 for error_mark_node.
1168 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1170 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
1171 (begin_range_for_stmt): Likewise.
1173 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
1175 Implement range-based for-statements.
1176 * cp-tree.def (RANGE_FOR_STMT): New.
1177 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
1178 (cp_convert_range_for): Declare.
1179 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
1180 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
1181 * semantics.c (begin_range_for_stmt): New.
1182 (finish_range_for_decl): New.
1183 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1184 (perform_koenig_lookup): Add extra argument include_std.
1185 * parser.c (cp_parser_c_for): New with code from
1186 cp_parser_iteration_statement().
1187 (cp_parser_range_for): New.
1188 (cp_convert_range_for): New.
1189 (cp_parser_iteration_statement): Add range-for support.
1190 (cp_parser_condition): Adjust comment.
1191 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1193 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1194 * cxx-pretty-print.c: Likewise.
1195 * lex.c (cxx_init): Likewise.
1196 * name-lookup.c (lookup_function_nonclass): Add extra argument
1198 (lookup_arg_dependent): Likewise.
1199 * name-lookup.h: Likewise.
1201 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1204 * error.c (maybe_warn_cpp0x): Add new warning
1205 CPP0X_INLINE_NAMESPACES.
1206 * parser.c (cp_parser_namespace_definition): Likewise.
1207 * cp-tree.h (cpp0x_warn_str): Likewise.
1209 2010-09-10 Richard Guenther <rguenther@suse.de>
1211 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1212 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1214 2010-09-10 Jan Hubicka <jh@suse.cz>
1216 PR tree-optimization/45605
1217 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1220 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1223 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1224 before calling fold_decl_constant_value.
1226 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1228 * cp-tree.h (build_enumerator): Add new location_t parameter.
1229 (build_lang_decl_loc): New function.
1230 * decl.c (build_enumerator): New parameter loc. Use it when calling
1231 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1232 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1233 * parser.c (cp_parser_enumerator_definition): Ditto.
1234 * lex.c (build_lang_decl_loc): New function.
1236 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1241 * tree.c (strip_typedefs): Strip typedefs from the context of
1244 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1246 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1247 * call.c (build_conditional_expr): Likewise.
1248 (convert_arg_to_ellipsis): Likewise.
1250 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1252 * parser.c (make_pointer_declarator, make_reference_declarator,
1253 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1254 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1256 2010-09-06 Jason Merrill <jason@redhat.com>
1258 * call.c (implicit_conversion): Fix value-init of enums.
1259 (convert_like_real): Likewise.
1261 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1263 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1264 (fold_non_dependent_expr): ...here.
1265 (convert_nontype_argument): Use it. Take complain parm.
1266 Use perform_implicit_conversion instead of ocp_convert.
1267 Allow cv-qual changes.
1268 (convert_template_argument): Pass complain down.
1269 (tsubst_template_arg): Suppress constant expression warnings.
1272 * method.c (synthesized_method_walk): In constructors, also check
1273 subobject destructors.
1275 * semantics.c (finish_compound_literal): Always build a
1278 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1281 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1283 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1286 * parser.c (cp_parser_omp_atomic): Handle boolean
1287 {PRE,POST}_INCREMENT.
1289 2010-08-29 Jason Merrill <jason@redhat.com>
1292 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1293 after tentative parsing.
1295 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1297 * Make-lang.in (g++spec.o): Update dependencies.
1298 * g++spec.c: Include opts.h
1299 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1300 (lang_specific_driver): Use cl_decoded_option structures.
1302 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1304 * call.c: Use FOR_EACH_VEC_ELT.
1305 * class.c: Likewise.
1307 * decl2.c: Likewise.
1308 * error.c: Likewise.
1309 * except.c: Likewise.
1310 * mangle.c: Likewise.
1311 * method.c: Likewise.
1312 * name-lookup.c: Likewise.
1313 * parser.c: Likewise.
1316 * semantics.c: Likewise.
1317 * typeck2.c: Likewise.
1319 2010-08-19 Jason Merrill <jason@redhat.com>
1321 * call.c (reference_related_p): Check for error_mark_node.
1322 (add_function_candidate): Check it instead of
1323 same_type_ignoring_top_level_qualifiers_p.
1326 * init.c (build_new_1): Don't use build_value_init in a template.
1327 (build_value_init): Make sure we don't.
1330 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1331 of empty class CONSTRUCTOR.
1333 * except.c (pending_noexcept, pending_noexcept_checks): New.
1334 (perform_deferred_noexcept_checks): New.
1335 (maybe_noexcept_warning): Split from...
1336 (finish_noexcept_expr): ...here. Adjust.
1337 * decl2.c (cp_write_global_declarations): Call
1338 perform_deferred_noexcept_checks.
1339 * cp-tree.h: And declare it.
1341 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1344 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1347 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1349 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1350 or if -fms-extensions is enabled check, check permissive.
1352 2010-08-09 Jason Merrill <jason@redhat.com>
1355 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1357 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1359 * call.c (add_builtin_candidates): Use VECs for local variable
1360 `types'. Adjust remainder of function accordingly.
1362 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1364 * name-lookup.c (is_associated_namespace): Convert local variables
1365 to be VECs instead of TREE_LISTs.
1367 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1369 * tree.c (varargs_function_p): Use stdarg_p.
1371 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1373 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1374 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1375 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1376 Change type to a VEC.
1377 (unparsed_funs_with_default_args): Define.
1378 (unparsed_funs_with_definitions): Define.
1379 (push_unparsed_function_queues): New function.
1380 (cp_parser_new): Call it.
1381 (pop_unparsed_function_queues): New function.
1382 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1383 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1384 (cp_parser_save_member_function_body): Likewise.
1385 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1386 and pop_unparsed_function_queues.
1387 (cp_parser_late_parsing_default_args): Likewise.
1388 (cp_parser_save_default_args): Use VEC_safe_push.
1390 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1392 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1394 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1396 * decl.c (poplevel): Adjust for type changes.
1397 (declare_local_label): Likewise.
1399 2010-08-06 Jason Merrill <jason@redhat.com>
1401 * typeck.c (complete_type_or_maybe_complain): Split out from...
1402 (complete_type_or_else): Here.
1403 (build_class_member_access_expr): Call it.
1404 (finish_class_member_access_expr): Likewise.
1405 * call.c (build_special_member_call): Likewise.
1406 * cvt.c (build_expr_type_conversion): Likewise.
1407 * init.c (build_new): Likewise.
1408 * typeck2.c (build_functional_cast): Likewise.
1409 * cp-tree.h: Declare it.
1411 * init.c (build_value_init): Add complain parm.
1412 (build_value_init_noctor): Likewise.
1413 (perform_member_init): Pass it.
1414 (expand_aggr_init_1): Likewise.
1415 (build_new_1): Likewise.
1416 (build_vec_init): Likewise.
1417 * pt.c (tsubst_expr): Likewise.
1418 * typeck2.c (build_functional_cast): Likewise.
1419 * cp-tree.h: Adjust.
1420 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1422 * typeck.c (decay_conversion): Any expression with type nullptr_t
1425 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1428 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1430 2010-07-27 Jason Merrill <jason@redhat.com>
1432 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1433 from build_value_init.
1434 * init.c (build_value_init_noctor): Give error for unknown array
1437 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1439 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1441 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1443 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1444 c_common_initialize_diagnostics.
1445 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1446 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1448 2010-07-21 Jason Merrill <jason@redhat.com>
1450 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1452 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1455 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1458 * pt.c (instantiate_class_template): Propagate the template's
1459 location to its instance.
1461 2010-07-20 Jason Merrill <jason@redhat.com>
1464 * pt.c (tsubst_copy_and_build): Rework last change.
1467 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1470 2010-07-19 Jason Merrill <jason@redhat.com>
1473 * semantics.c (finish_decltype_type): Correct decltype
1474 of parenthesized rvalue reference variable.
1477 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1478 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1480 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1483 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1485 * cp-tree.h: Adjust declaration.
1486 * init.c (perform_member_init): Adjust caller.
1487 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1488 * typeck2.c (store_init_value): Likewise.
1489 (build_functional_cast): Pass complain argument to
1490 build_x_compound_expr_from_list.
1492 2010-07-16 Jason Merrill <jason@redhat.com>
1495 * pt.c (process_partial_specialization): Diagnose partial
1496 specialization after instantiation.
1497 (most_specialized_class): Add complain parm.
1499 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1501 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1503 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1504 cp_build_function_call.
1506 2010-07-15 Jason Merrill <jason@redhat.com>
1509 * call.c (add_function_candidate): If we're working on an implicit
1510 declaration, don't consider candidates that won't match.
1511 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1512 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1515 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1516 (TYPE_HAS_USER_OPEQ): New.
1517 * decl.c (grok_special_member_properties): Set it.
1518 * class.c (add_implicitly_declared_members): Don't lazily declare
1519 constructors/operator= if a base or member has a user-declared one.
1520 (check_bases_and_members, check_bases): Adjust.
1521 (check_field_decls, check_field_decl): Adjust.
1523 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1525 * decl.c (integer_three_node): Remove.
1526 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1527 * cp-tree.h (integer_three_node): Remove.
1529 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1531 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1533 * class.c: Likewise.
1534 * cp-gimplify.c: Likewise.
1536 * decl2.c: Likewise.
1538 * mangle.c: Likewise.
1539 * name-lookup.c: Likewise.
1540 * optimize.c: Likewise.
1541 * parser.c: Likewise.
1544 * search.c: Likewise.
1545 * semantics.c: Likewise.
1546 * typeck.c: Likewise.
1547 * typeck2.c: Likewise.
1549 2010-07-14 Jason Merrill <jason@redhat.com>
1551 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1552 (build_field_list): Cache field type.
1554 Implement C++0x unrestricted unions (N2544)
1555 * class.c (check_field_decl): Loosen union handling in C++0x.
1556 * method.c (walk_field_subobs): Split out from...
1557 (synthesized_method_walk): ...here. Set msg before loops.
1558 (process_subob_fn): Check for triviality in union members.
1559 * init.c (sort_mem_initializers): Splice out uninitialized
1560 anonymous unions and union members.
1561 (push_base_cleanups): Don't automatically destroy anonymous unions
1564 2010-07-13 Jason Merrill <jason@redhat.com>
1567 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1568 (TYPE_HAS_USER_OPEQ): New.
1569 * decl.c (grok_special_member_properties): Set it.
1570 * class.c (add_implicitly_declared_members): Don't lazily declare
1571 constructors/operator= if a base or member has a user-declared one.
1572 (check_bases_and_members, check_bases): Adjust.
1573 (check_field_decls, check_field_decl): Adjust.
1574 * method.c (synthesized_method_walk): Initialize check_vdtor.
1577 * mangle.c (write_type): Canonicalize.
1578 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1579 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1581 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1584 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1586 * typeck.c (get_delta_difference): Update prototype, add a
1587 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1588 add checks for error_mark_node.
1589 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1590 parameter; update lookup_base call.
1591 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1592 parameter; update get_delta_difference call and add check for
1594 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1595 parameter; update get_delta_difference call and add check for
1596 error_mark_node; update build_ptrmemfunc call.
1597 (build_static_cast_1): Adjust convert_ptrmem call.
1598 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1599 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1600 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1601 and build_ptrmemfunc calls.
1602 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1604 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1607 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1608 adjust build_special_member_call call, pass complain.
1609 (convert_like_real): Adjust build_temp call, pass complain.
1611 2010-07-09 Jason Merrill <jason@redhat.com>
1614 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1615 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1616 Set BV_LOST_PRIMARY.
1617 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1619 2010-07-08 Jason Merrill <jason@redhat.com>
1622 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1623 virtual bases for covariant thunks.
1625 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1627 * cp-tree.h: Do not include toplev.h.
1629 2010-07-06 Jason Merrill <jason@redhat.com>
1632 * call.c (is_std_init_list): Look through typedefs.
1635 * init.c (build_offset_ref): If scope isn't dependent,
1636 don't exit early. Look at TYPE_MAIN_VARIANT.
1637 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1639 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1641 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1643 * cp-tree.h (impl_conv_void): New type.
1644 (convert_to_void): Adjust prototype.
1645 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1646 diagnostic for easy translation. Change caller.
1647 * typeck.c: Update call to convert_to_void.
1648 * semantics.c: Likewise.
1651 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1653 * decl.c (cp_finish_decl): Call add_local_decl.
1654 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1656 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1658 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1661 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1664 * parser.c (cp_parser_primary_expression): Error if local template is
1667 2010-07-02 Le-Chun Wu <lcwu@google.com>
1670 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1671 (variable or type) shadows another type.
1673 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1676 * typeck.c (convert_for_assignment): When converting a convertible
1677 vector type or objc++ types, call mark_rvalue_use.
1678 * typeck2.c (build_m_component_ref): Use return values from
1679 mark_rvalue_use or mark_lvalue_use.
1680 * class.c (build_base_path): Likewise.
1681 * call.c (build_conditional_expr): Likewise.
1683 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1686 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1689 2010-07-01 Richard Guenther <rguenther@suse.de>
1691 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1692 predicate we are looking for, allow non-gimplified
1695 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1698 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1699 arg is NULL_TREE too.
1700 * call.c (convert_class_to_reference): Return error_mark_node when
1703 2010-06-30 Michael Matz <matz@suse.de>
1705 * repo.c (finish_repo): Fix typo.
1707 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1709 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1711 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1713 * repo.c (pending_repo): Change type to a VEC.
1714 (finish_repo): Adjust for new type of pending_repo.
1715 (repo_emit_p): Likewise.
1717 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1719 * tree.c: Include gimple.h. Do not include tree-flow.h
1720 * decl.c: Do not include tree-flow.h
1721 * Make-lang.in: Adjust dependencies.
1723 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1725 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1726 (incomplete_vars): Adjust comment. Change type to a VEC.
1727 (maybe_register_incomplete_var): Adjust for new type.
1728 (complete_vars): Adjust iteration over incomplete_vars.
1730 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1732 * decl.c (struct named_label_entry): Change type of bad_decls field
1734 (poplevel_named_label_1): Adjust for new type of bad_decls.
1735 (check_goto): Likewise.
1737 2010-06-29 Jason Merrill <jason@redhat.com>
1739 Enable implicitly declared move constructor/operator= (N3053).
1740 * class.c (add_implicitly_declared_members): A class with no
1741 explicitly declared copy or move constructor gets both declared
1742 implicitly, and similarly for operator=.
1743 (check_bases): A type with no copy ctor does not inhibit
1744 a const copy ctor in a derived class. It does mean the derived
1746 (check_field_decl): Likewise.
1747 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1748 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1749 (trivially_copyable_p): Likewise.
1750 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1751 * class.c (finish_struct_bits): Likewise.
1752 * tree.c (build_target_expr_with_type): Likewise.
1753 * typeck2.c (store_init_value): Likewise.
1755 Enable implicitly deleted functions (N2346)
1756 * class.c (check_bases_and_members): Adjust lambda flags.
1757 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1759 * decl2.c (mark_used): Adjust error for use of deleted function.
1761 Machinery to support implicit delete/move.
1762 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1763 has_complex_move_ctor, has_complex_move_assign bitfields.
1764 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1765 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1766 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1767 (enum special_function_kind): Add sfk_move_assignment.
1768 (LOOKUP_SPECULATIVE): New.
1769 * call.c (build_over_call): Return early if it's set.
1770 (build_over_call): Use trivial_fn_p.
1771 * class.c (check_bases): If the base has no default constructor,
1772 the derived one is non-trivial. Handle move ctor/op=.
1773 (check_field_decl): Likewise.
1774 (check_bases_and_members): Handle move ctor/op=.
1775 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1776 (type_has_move_constructor, type_has_move_assign): New.
1777 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1778 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1779 (trivial_fn_p): New.
1780 (do_build_copy_constructor): Use it.
1781 (do_build_assign_ref): Likewise. Handle move assignment.
1782 (build_stub_type, build_stub_object, locate_fn_flags): New.
1783 (locate_ctor): Use locate_fn_flags.
1784 (locate_copy, locate_dtor): Remove.
1785 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1786 (process_subob_fn, synthesized_method_walk): New.
1787 (maybe_explain_implicit_delete): New.
1788 (implicitly_declare_fn): Use synthesized_method_walk,
1789 type_has_trivial_fn, and type_set_nontrivial_flag.
1790 (defaulted_late_check): Set DECL_DELETED_FN.
1791 (defaultable_fn_check): Handle sfk_move_assignment.
1792 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1793 implicitly deleted move ctor/op=.
1794 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1795 (lookup_fnfields_slot): New.
1796 * semantics.c (omp_clause_info_fndecl): Remove.
1797 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1798 get_copy_assign, trivial_fn_p.
1799 (trait_expr_value): Adjust call to locate_ctor.
1800 * tree.c (special_function_p): Handle sfk_move_assignment.
1802 * class.c (type_has_virtual_destructor): New.
1803 * cp-tree.h: Declare it.
1804 * semantics.c (trait_expr_value): Use it.
1806 * call.c (build_over_call): Only give warnings with tf_warning.
1808 * name-lookup.c (pop_scope): Handle NULL_TREE.
1810 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1811 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1812 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1813 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1814 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1815 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1816 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1817 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1818 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1819 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1820 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1821 * search.c, semantics.c, tree.c: Adjust.
1823 * pt.c (dependent_scope_ref_p): Remove.
1824 (value_dependent_expression_p): Don't call it.
1825 (type_dependent_expression_p): Here either.
1826 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1827 if the scope isn't dependent.
1829 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1833 * pt.c (has_value_dependent_address): New.
1834 (value_dependent_expression_p): Check it.
1835 (convert_nontype_argument): Likewise. Call decay_conversion before
1836 folding if we want a pointer.
1837 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1838 scope is the current instantiation.
1840 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1843 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1846 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1848 * init.c: Do not include except.h.
1851 * cp-lang.c: Likewise.
1853 * semantics.c: Likewise.
1854 * decl2.c: Likewise.
1855 * except.c: Likewise.
1856 (init_exception_processing): Do not set the removed
1857 lang_protect_cleanup_actions here.
1858 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1859 (doing_eh): New, moved from except.c but removed the do_warning flag.
1860 (expand_start_catch_block): Update doing_eh call.
1861 (expand_end_catch_block): Likewise.
1862 (build_throw): Likewise.
1863 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1864 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1865 cp_protect_cleanup_actions.
1866 * Make-lang.in: Update dependencies.
1868 2010-06-26 Jason Merrill <jason@redhat.com>
1870 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1871 constructor called with a single argument that takes a reference
1872 to the constructor's class.
1873 (BAD_CONVERSION_RANK): New.
1874 (compare_ics): Use it to compare bad ICSes.
1876 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1878 * lang-specs.h: Remove +e handling.
1880 2010-06-24 Andi Kleen <ak@linux.intel.com>
1882 * parser.c: (cp_parser_question_colon_clause):
1883 Switch to use cp_lexer_peek_token.
1884 Call warn_for_omitted_condop. Call pedwarn for omitted
1887 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1890 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1891 datum and mark_rvalue_use on component.
1894 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1895 the CALL_EXPR has no arguments.
1897 2010-06-21 Jason Merrill <jason@redhat.com>
1899 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1901 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1904 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1906 * name-lookup.c (struct arg_lookup): Convert namespaces and
1907 classes fields to VEC.
1908 (arg_assoc_namespace): Adjust for new type of namespaces.
1909 (arg_assoc_class): Adjust for new type of classes.
1910 (lookup_arg_dependent): Use make_tree_vector and
1911 release_tree_vector.
1912 * typeck2.c (build_x_arrow): Use vec_member.
1914 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1917 * error.c (dump_decl): Better wording for anonymous namespace.
1919 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1921 * class.c (build_vtbl_initializer): Adjust computation of new_position
1922 and which entry to add padding for.
1924 2010-06-16 Jason Merrill <jason@redhat.com>
1926 * except.c (check_noexcept_r): Return the problematic function.
1927 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1928 * pt.c (tsubst_copy_and_build): Pass it.
1929 * parser.c (cp_parser_unary_expression): Likewise.
1930 * cp-tree.h: Adjust prototype.
1932 * method.c (defaulted_late_check): Give the defaulted method
1933 the same exception specification as the implicit declaration.
1935 2010-06-15 Jason Merrill <jason@redhat.com>
1937 * class.c (add_implicitly_declared_members): Implicit assignment
1938 operators can also be virtual overriders.
1939 * method.c (lazily_declare_fn): Likewise.
1941 * call.c (convert_like_real): Give "initializing argument of"
1942 information for ambiguous conversion. Give source position
1945 * call.c (print_z_candidates): Do print viable deleted candidates.
1946 (joust): Don't choose a deleted function just because its worst
1947 conversion is better than another candidate's worst.
1949 * call.c (convert_like_real): Don't complain about
1950 list-value-initialization from an explicit constructor.
1952 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1953 DECL_SOURCE_LOCATION directly.
1955 * class.c (type_has_user_provided_default_constructor): Use
1958 * call.c (is_subseq): Handle ck_aggr, ck_list.
1959 (compare_ics): Treat an aggregate or ambiguous conversion to the
1960 same type as involving the same function.
1962 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1964 * typeck.c (convert_for_assignment): Fix comment. Change message
1965 format from %d to %qP.
1966 (convert_for_initialization): Fix comment.
1968 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1970 * cp-tree.h (expr_list_kind): New type.
1971 (impl_conv_rhs): New type.
1972 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1974 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1975 diagnostics for easy translation. Change caller.
1976 (convert_for_initialization): Use impl_conv_rhs and change caller.
1977 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1978 diagnostics for easy translation. Change caller.
1979 * decl.c (bad_spec_place): New enum.
1980 (bad_specifiers): Use it and emit the diagnostics for easy
1981 translation. Change caller.
1982 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1984 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1986 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1988 * decl2.c (cp_write_global_declarations): Adjust for new type of
1989 decl_namespace_list.
1990 * name-lookup.c (current_decl_namespace): Likewise.
1991 (push_decl_namespace): Likewise.
1992 (pop_decl_namespace): Likewise.
1994 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1996 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1997 instead of build_function_type.
1998 * decl.c (cxx_init_decl_processing): Likewise.
1999 (declare_global_var): Likewise.
2000 (get_atexit_node): Likewise.
2001 (expand_static_init): Likewise.
2002 * decl2.c (start_objects): Likewise.
2003 (start_static_storage_duration_function): Likewise.
2004 * except.c (init_exception_processing): Likewise.
2005 (build_exc_ptr): Likewise.
2006 (build_throw): Likewise.
2007 * rtti.c (throw_bad_cast): Likewise.
2008 (throw_bad_typeid): Likewise.
2009 (build_dynamic_cast_1): Likewise.
2011 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
2013 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
2014 (build_op_delete_call): Likewise.
2015 (build_over_call): Likewise.
2016 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
2017 * pt.c (process_partial_specialization): Likewise.
2018 (tsubst_template_args): Likewise.
2019 * semantics.c (finish_asm_stmt): Likewise.
2021 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
2023 * decl.c (record_key_method_defined): New, broken out of ...
2024 (finish_function): ... here. Call it.
2025 (start_decl): Treat aliases as definitions.
2027 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2029 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
2031 * pt.c (maybe_process_partial_specialization): Likewise.
2032 (register_specialization): Likewise.
2033 (add_pending_template): Likewise.
2034 (lookup_template_class): Likewise.
2035 (push_tinst_level): Likewise.
2037 * parser.c (cp_lexer_new_main): Likewise.
2038 (cp_lexer_new_from_tokens): Likewise.
2039 (cp_token_cache_new): Likewise.
2040 (cp_parser_context_new): Likewise.
2041 (cp_parser_new): Likewise.
2042 (cp_parser_nested_name_specifier_opt): Likewise.
2043 (cp_parser_template_id): Likewise.
2045 * name-lookup.c (binding_entry_make): Likewise.
2046 (binding_table_construct): Likewise.
2047 (binding_table_new): Likewise.
2048 (cxx_binding_make): Likewise.
2049 (pushdecl_maybe_friend): Likewise.
2050 (begin_scope): Likewise.
2051 (push_to_top_level): Likewise.
2053 * lex.c (init_reswords): Likewise.
2054 (retrofit_lang_decl): Likewise.
2055 (cxx_dup_lang_specific_decl): Likewise.
2056 (copy_lang_type): Likewise.
2057 (cxx_make_type): Likewise.
2059 * decl.c (make_label_decl): Likewise.
2060 (check_goto): Likewise.
2061 (start_preparsed_function): Likewise.
2062 (save_function_data): Likewise.
2064 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2066 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2068 * class.c (finish_struct_1): Likewise.
2070 * cp-tree.h (struct lang_type): Add variable_size GTY option.
2071 (struct lang_decl): Likewise.
2073 * parser.c (cp_parser_new): Update comment to not reference
2076 2010-06-07 Jason Merrill <jason@redhat.com>
2079 * error.c (dump_parameters): Mask out TFF_SCOPE.
2080 (dump_simple_decl): Don't print the scope of a PARM_DECL.
2081 (dump_scope): Remove no-op mask.
2084 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
2086 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
2087 * init.c (build_offset_ref): Use it.
2088 * pt.c (maybe_process_partial_specialization): Use it.
2089 (instantiate_class_template): Use it.
2090 * search.c (lookup_base): Use it.
2092 2010-06-07 Jakub Jelinek <jakub@redhat.com>
2095 * expr.c (mark_exp_read): Handle INDIRECT_REF.
2096 * cvt.c (convert_to_void): Handle INDIRECT_REF like
2097 handled_component_p.
2100 * decl.c (initialize_local_var): If TREE_USED is set on the type,
2101 set also DECL_READ_P on the decl.
2103 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2106 * cp-tree.h (typedef_variant_p): Move this declaration to
2108 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2109 * decl.c (grokdeclarator): Do not rename debug info of an
2110 anonymous tagged type named by a typedef.
2112 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
2115 * class.c (check_field_decls): Move the call to
2116 check_bitfield_decl before trying to set the
2117 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
2119 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2121 * typeck.c: Update include path for moved files.
2124 * cp-gimplify.c: Likewise.
2125 * cp-lang.c: Likewise.
2127 * semantics.c: Likewise.
2128 * cxx-pretty-print.h: Likewise.
2129 * decl2.c: Likewise.
2130 * parser.c: Likewise.
2131 * cp-objcp-common.c: Likewise.
2132 * cp-tree.h: Likewise.
2133 * name-lookup.c: Likewise.
2135 * name-lookup.h: Likewise.
2136 * config-lang.in: Update paths in gtfiles for files in c-family/.
2137 * Make-lang.in: Likewise.
2139 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
2141 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
2142 * typeck.c (build_ptrmemfunc): Likewise.
2144 2010-06-04 Jason Merrill <jason@redhat.com>
2146 * typeck2.c (merge_exception_specifiers): Adjust merging of
2147 throw() and noexcept(true).
2149 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
2150 using an uninitialized variable.
2152 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
2153 (pp_cxx_expression): Likewise.
2155 Implement noexcept-specification (15.4)
2156 * parser.c (cp_parser_exception_specification_opt): Parse it.
2157 Give -Wdeprecated warning about throw() specs.
2158 * pt.c (tsubst_exception_specification): Handle it.
2159 * error.c (dump_exception_spec): Handle it.
2160 (dump_expr): Handle NOEXCEPT_EXPR.
2161 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
2162 * typeck.c (comp_except_specs): Handle compatibility rules.
2163 Change exact parm to take an enum.
2164 * typeck2.c (merge_exception_specifiers): Handle noexcept.
2165 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
2166 (type_throw_all_p, build_noexcept_spec): New fns.
2167 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
2168 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
2169 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
2170 (noexcept_true_spec, noexcept_false_spec): New macros.
2171 * name-lookup.c (pushdecl_maybe_friend): Adjust.
2172 * search.c (check_final_overrider): Adjust.
2173 * decl.c (check_redeclaration_exception_specification): Adjust.
2174 (use_eh_spec_block): Use type_throw_all_p.
2175 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
2176 Give operator new a noexcept-specification in C++0x mode.
2177 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
2178 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
2180 Implement noexcept operator (5.3.7)
2181 * cp-tree.def (NOEXCEPT_EXPR): New.
2182 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2183 * cp-tree.h: Declare finish_noexcept_expr.
2184 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2185 * pt.c (tsubst_copy_and_build): And tsubst it.
2186 (type_dependent_expression_p): Handle it.
2187 (value_dependent_expression_p): Handle it.
2189 * call.c (build_conditional_expr): Never fold in unevaluated context.
2190 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2191 * semantics.c (simplify_aggr_init_expr): Likewise.
2192 * typeck.c (merge_types): Call merge_exception_specifiers.
2193 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2194 DECL_ANTICIPATED for preferring new type.
2196 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2198 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2201 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2204 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2205 on object for static data members.
2207 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2208 Jason Merrill <jason@redhat.com>
2211 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2212 with the same type, call mark_lvalue_use on both.
2214 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2216 * class.c (struct vtbl_init_data_s): Remove last_init field.
2217 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2219 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2221 (build_vtt): Likewise.
2222 (initialize_vtable): Take a VEC instead of a tree.
2223 (build_vtt_inits): Change return type to void. Take a VEC **
2224 instead of a tree *; accumulate results into said VEC.
2225 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2226 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2227 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2229 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2230 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2232 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2233 rather than tree_cons.
2234 (build_vbase_offset_vtbl_entries): Likewise.
2235 (add_vcall_offset): Likewise.
2236 (build_rtti_vtbl_entries): Likewise.
2237 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2238 * decl.c (initialize_artificial_var): Use build_constructor instead
2239 of build_constructor_from_list.
2241 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2244 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2247 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2249 * parser.c (cp_parser_mem_initializer_list): Change error text.
2251 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2253 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2254 tree_decl_map hashtab from tree_map.
2255 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2256 (init_shadowed_var_for_decl): Adjust initialization.
2259 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2260 instead of calling mark_exp_read only when not an assignment.
2263 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2264 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2265 Set DECL_VALUE_EXPR on var.
2267 2010-06-02 Jason Merrill <jason@redhat.com>
2269 * error.c (dump_type): Improve typedef handling.
2274 * name-lookup.c (same_entity_p): New.
2275 (ambiguous_decl): Multiple declarations of the same entity
2278 2010-06-01 Jason Merrill <jason@redhat.com>
2281 * call.c (add_list_candidates): Prefer the default constructor.
2282 (build_aggr_conv): Treat missing initializers like { }.
2283 * typeck2.c (process_init_constructor_record): Likewise.
2284 * init.c (expand_default_init): Use digest_init for
2285 direct aggregate initialization, too.
2287 * call.c (add_list_candidates): Split out...
2288 (build_user_type_conversion_1): ...from here.
2289 (build_new_method_call): And here.
2290 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2293 * call.c (build_list_conv): Set list-initialization flags properly.
2295 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2297 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2299 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2300 Matthew Gingell <gingell@adacore.com>
2302 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2303 * decl2.c: Include langhooks.h and c-ada-spec.h.
2304 (cpp_check, collect_source_refs, collect_ada_namespace,
2305 collect_all_refs): New functions.
2306 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2307 * lang-specs.h: Ditto.
2309 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2311 * cp-tree.h (cp_build_function_call_nary): Declare.
2312 * typeck.c (cp_build_function_call_nary): Define.
2313 * decl.c (register_dtor_fn): Use it instead of
2314 cp_build_function_call.
2315 (cxx_maybe_build_cleanup): Likewise.
2316 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2317 * except.c (do_get_exception_ptr): Likewise.
2318 (do_begin_catch): Likewise.
2319 (do_allocate_exception): Likewise.
2320 (do_free_exception): Likewise.
2321 (build_throw): Likewise. Use cp_build_function_call_vec instead
2322 of cp_build_function_call.
2323 (do_end_catch): Likewise.
2325 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2327 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2328 (struct cp_declarator): Move id_loc field up.
2330 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2332 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2333 this file is included before c-common.h. Define GCC_DIAG_STYLE
2334 before including diagnostic-core.h and toplev.h.
2335 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2336 * pt.c: Include cp-tree.h before c-common.h.
2338 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2340 * tree.c (c_register_addr_space): Add stub.
2342 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2344 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2347 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2349 Revert fix of PR c++/44188
2350 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2352 * tree.c (typedef_variant_p): Revert moving this definition to
2354 * decl.c (grokdeclarator): Revert naming typedef handling.
2356 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2358 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2359 * cp-lang.c: Don't include diagnostic.h
2360 * name-lookup.c: Include diagnostic-core.h instead of
2362 (cp_emit_debug_info_for_using): Use seen_error.
2363 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2364 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2365 * pt.c (iterative_hash_template_arg): Use seen_error.
2366 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2367 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2368 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2369 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2372 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2375 * cp-tree.h (typedef_variant_p): Move this declaration to
2377 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2378 * decl.c (grokdeclarator): Do not rename debug info of an
2379 anonymous tagged type named by a typedef.
2381 2010-05-27 Jason Merrill <jason@redhat.com>
2384 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2387 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2390 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2391 * class.c (layout_class_type): Likewise.
2392 * decl.c (finish_enum): Likewise.
2393 * mangle.c (write_builitin_type): Likewise.
2395 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2397 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2399 * decl.c (grokdeclarator): Handle __int128.
2400 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2401 (cp_parser_simple_type_specifier): Likewise.
2402 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2403 * typeck.c (cp_common_type): Handle __int128.
2404 * mangle.c (integer_type_codes): Add itk_int128 and
2405 itk_unsigned_int128.
2407 2010-05-26 Jason Merrill <jason@redhat.com>
2410 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2413 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2415 * cp-lang.c: Do not include expr.h.
2417 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2419 * decl.c: Do not include rtl.h
2420 * semantics.c: Likewise.
2422 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2424 * cp-tree.h: Do not include splay-tree.h.
2425 (struct prtmem_cst): Remove unused field and false comment.
2426 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2427 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2428 * init.c: Do not include rtl.h and expr.h.
2429 * class.c: Do not include rtl.h. Include splay-tree.h.
2430 (build_clone): Use plain NULL instead of NULL_RTX.
2431 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2432 included. Include splay-tree.h.
2433 * method.c: Do not include rtl.h and expr.h.
2434 (use_thunk): Use plain NULL instead of NULL_RTX.
2435 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2436 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2437 and target.h. Include splay-tree.h.
2438 * expr.c: Do not include rtl.h and expr.h.
2439 * pt.c: Do not include obstack.h and rtl.h.
2440 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2441 (tsubst_decl): Likewise.
2442 (instantiate_decl): Likewise.
2443 * semantics.c: Do not include exprt.h and debug.h. Explain why
2444 rtl.h has to be included.
2445 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2446 * call.c: Do not include rtl.h and expr.h.
2447 * search.c: Do not include obstack.h and rtl.h.
2448 * friend.c: Do not include rtl.h and expr.h.
2449 * Make-lang.in: Update dependencies.
2451 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2454 * parser.c (non_integral_constant): Add NIC_NONE.
2455 (required_token): Add RT_NONE.
2456 (cp_parser_unary_expression): Initialize non_constant_p
2458 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2459 (cp_parser_primary_expression, cp_parser_postfix_expression,
2460 cp_parser_cast_expression, cp_parser_binary_expression,
2461 cp_parser_functional_cast): Fix formatting.
2463 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2466 * parser.c: Remove inclusion of dyn-string.h.
2467 (non_integral_constant): New enum.
2468 (name_lookup_error): New enum.
2469 (required_token): New enum.
2470 (cp_parser_required_error): New function.
2471 (cp_parser_require): Change the type of variable token_desc to
2472 required_token and use cp_parser_required_error.
2473 (cp_parser_require_keyword): Likewise.
2474 (cp_parser_error): Use gmsgid as parameter.
2475 (cp_parser_name_lookup_error): Change the type of variable desired to
2476 name_lookup_error and put the diagnostic in the full sentences. Change
2478 (cp_parser_non_integral_constant_expression): Change the type of the
2479 variable thing to non_integral_constant and put the diagnostics in
2480 full sentences. Change caller.
2482 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2485 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2487 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2489 * error.c (cp_diagnostic_starter): Update call to
2490 diagnostic_build_prefix.
2491 (cp_print_error_function,
2492 print_instantiation_partial_context_line): Check show_column flag
2495 2010-05-24 Jason Merrill <jason@redhat.com>
2498 * decl.c (check_initializer): Don't wrap an init-list in a
2500 * init.c (build_aggr_init): Don't assume copy-initialization if
2501 init has CONSTRUCTOR_IS_DIRECT_INIT.
2502 * call.c (build_new_method_call): Sanity check.
2504 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2506 * rtti.c (tinfo_base_init): Use build_constructor instead of
2507 build_constructor_from_list. Don't cons a tree node for
2509 (generic_initializer): Use build_constructor_single instead of
2510 build_constructor_from_list.
2511 (ptr_initializer): Use build_constructor instead of
2512 build_constructor_from_list
2513 (ptm_initializer): Likewise.
2514 (class_initializer): Likewise. Take varargs instead of TRAIL.
2515 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2516 build_constructor instead of build_constructor_from_list.
2518 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2520 * semantics.c: Include bitmap.h.
2521 * Make-lang.in: Update dependencies.
2523 2010-05-22 Jan Hubicka <jh@suse.cz>
2525 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2527 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2529 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2531 * cxx-pretty-print.c: Correct merge error.
2533 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2535 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2536 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2537 (cp_printer): Handle %K here using percent_K_format.
2538 * cxx-pretty-print.c: Include tree-pretty-print.h.
2539 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2542 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2544 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2545 Clean up redundant includes.
2547 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2550 * decl.c (xref_basetypes): Return false in case of ill-formed
2553 2010-05-19 Jason Merrill <jason@redhat.com>
2555 * call.c (reference_binding): Use cp_build_qualified_type_real
2556 and cp_type_quals consistently.
2557 (add_function_candidate): Likewise.
2558 (build_conditional_expr): Likewise.
2559 (convert_like_real): Likewise.
2560 (type_passed_as): Likewise.
2561 * class.c (add_method): Likewise.
2562 (same_signature_p): Likewise.
2563 (layout_class_type): Likewise.
2564 * decl.c (cxx_init_decl_processing): Likewise.
2565 (cp_fname_init): Likewise.
2566 (grokdeclarator): Likewise.
2567 * decl2.c (cp_reconstruct_complex_type): Likewise.
2568 * init.c (build_new_1): Likewise.
2569 * method.c (do_build_copy_constructor): Likewise.
2570 (implicitly_declare_fn): Likewise.
2571 * pt.c (tsubst_aggr_type): Likewise.
2573 * rtti.c (init_rtti_processing): Likewise.
2574 (build_headof): Likewise.
2575 (build_dynamic_cast_1): Likewise.
2576 (tinfo_base_init): Likewise.
2577 (emit_support_tinfos): Likewise.
2578 * semantics.c (capture_decltype): Likewise.
2579 * tree.c (cv_unqualified): Likewise.
2580 * typeck.c (composite_pointer_type): Likewise.
2581 (string_conv_p): Likewise.
2583 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2585 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2586 * decl.c (start_decl): Likewise.
2587 * semantics.c (finish_compound_literal): Likewise.
2588 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2589 (cp_type_readonly): Remove.
2590 * cp-tree.h: Remove declaration.
2592 * typeck.c (merge_types): Preserve memfn quals.
2594 * decl.c (grokdeclarator): Don't check quals on fn type.
2595 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2596 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2599 * typeck.c (type_memfn_quals): New fn.
2600 (apply_memfn_quals): New fn.
2601 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2602 (cp_type_readonly): Use cp_type_quals.
2603 * cp-tree.h: Add declarations.
2604 * tree.c (cp_build_qualified_type_real): Don't set, but do
2605 preserve, quals on FUNCTION_TYPE.
2606 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2607 * decl.c (build_ptrmem_type): Likewise.
2608 (grokdeclarator): Likewise.
2609 (static_fn_type): Likewise.
2610 * decl2.c (change_return_type): Likewise.
2611 (cp_reconstruct_complex_type): Likewise.
2612 * pt.c (tsubst_function_type): Likewise.
2614 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2616 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2618 * tree.c (build_min_non_dep_call_vec): Update comment.
2620 2010-05-17 Jason Merrill <jason@redhat.com>
2622 * call.c (struct z_candidate): Add explicit_targs field.
2623 (add_template_candidate_real): Set it.
2624 (build_over_call): Use it to control init-list warning.
2627 * call.c (build_over_call): Limit init-list deduction warning to
2628 cases where the argument is actually an init-list.
2631 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2633 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2634 Jason Merrill <jason@redhat.com>
2637 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2639 2010-05-15 Jason Merrill <jason@redhat.com>
2641 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2642 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2644 (finish_eh_spec_block): Adjust.
2646 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2649 * pt.c (tsubst): Unshare template argument.
2651 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2653 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2654 * Make-lang.in: Fix dependencies accordingly.
2656 2010-05-14 Jason Merrill <jason@redhat.com>
2659 * except.c (build_throw): Simplify, adjust for DR 475.
2662 * except.c (dtor_nothrow): Return nonzero for type with
2666 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2667 gimple_build_eh_must_not_throw.
2669 2010-05-14 Martin Jambor <mjambor@suse.cz>
2671 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2674 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2676 * call.c (build_new_method_call): Change warning text.
2677 * typeck2.c (build_functional_cast): Change error text.
2679 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2682 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2683 shadowing the outer parameter or variables by the declaration of
2684 nested function in nested structure or class. Warn the shadowing by
2685 the declaration of nested lambda expression.
2687 2010-05-13 Jason Merrill <jason@redhat.com>
2689 * typeck.c (cp_build_array_ref): Factor out from...
2690 (build_array_ref): ...here. Drop complain parm.
2691 (build_new_op): Adjust.
2692 * class.c (build_vtbl_ref_1): Adjust.
2693 * decl2.c (grok_array_decl): Adjust.
2694 * cp-tree.h: Adjust prototypes.
2696 2010-05-13 Jan Hubicka <jh@suse.cz>
2698 * decl.c (cp_finish_decl): Do not worry about used attribute.
2700 2010-05-12 Jason Merrill <jason@redhat.com>
2702 * typeck.c (build_array_ref): Take complain parm.
2703 * cp-tree.h: Add it to prototype.
2704 * call.c (build_new_op): Pass it.
2705 * class.c (build_vtbl_ref): Pass it.
2706 * decl2.c (grok_array_decl): Pass it.
2710 * cp-tree.def (NULLPTR_TYPE): Remove.
2711 * cp-tree.h (NULLPTR_TYPE_P): New.
2712 (SCALAR_TYPE_P): Use it.
2713 (nullptr_type_node): New.
2714 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2715 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2717 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2718 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2719 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2720 * mangle.c (write_type): Likewise.
2721 * name-lookup.c (arg_assoc_type): Likewise.
2722 * typeck.c (build_reinterpret_cast_1): Likewise.
2723 * rtti.c (typeinfo_in_lib_p): Likewise.
2724 (emit_support_tinfos): Remove local nullptr_type_node.
2726 * cp-tree.h (UNKNOWN_TYPE): Remove.
2727 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2728 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2729 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2730 * class.c (instantiate_type): Check unknown_type_node rather than
2732 * name-lookup.c (maybe_push_decl): Likewise.
2733 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2734 (get_typeid): Likewise.
2735 * semantics.c (finish_offsetof): Likewise.
2738 * call.c (add_template_candidate_real): If deduction fails, still
2739 add the template as a non-viable candidate.
2740 (equal_functions): Handle template candidates.
2741 (print_z_candidate): Likewise.
2742 (print_z_candidates): Likewise.
2743 (build_new_function_call): Likewise.
2745 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2746 * call.c (add_candidates): Enforce it.
2747 (build_new_method_call): Try non-list ctor if no viable list ctor.
2748 (build_user_type_conversion_1): Likewise.
2750 * call.c (add_candidates): Distinguish between type(x) and
2752 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2753 (build_new_method_call): Give better error for conversion op.
2755 * call.c (add_candidates): Add first_arg and return_type parms.
2756 Add special constructor/conversion op handling.
2757 (convert_class_to_reference): Use it.
2758 (build_user_type_conversion_1): Likewise.
2759 (build_op_call): Likewise.
2760 (build_new_method_call): Likewise.
2761 (build_new_op): Adjust.
2762 (perform_overload_resolution): Adjust.
2764 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2769 * pt.c (process_partial_specialization): Return error_mark_node
2770 in case of unused template parameters in partial specialization.
2772 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2775 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2776 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2777 look at its second operand.
2779 2010-05-10 Jason Merrill <jason@redhat.com>
2782 * semantics.c (baselink_for_fns): Revert earlier change.
2785 * typeck.c (cp_build_modify_expr): Complain about assignment to
2786 array from init list.
2788 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2791 * decl.c (check_initializer): strip array type before checking for
2792 uninitialized const or ref members.
2794 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2797 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2798 error count. Emit errors only if compain is true.
2799 (build_new_1): Do not return error_mark_node if
2800 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2801 errors. Delay the check for user-provided constructor.
2802 (perform_member_init): Adjust.
2803 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2806 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2807 Jason Merrill <jason@redhat.com>
2809 Add support for C++0x nullptr.
2810 * cp-tree.def: Add NULLPTR_TYPE.
2811 * cp-tree.h: Add nullptr_node.
2812 (cp_tree_index): Add CPTI_NULLPTR.
2813 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2814 * call.c (null_ptr_cst_p): Handle nullptr.
2815 (standard_conversion): Likewise.
2816 (convert_arg_to_ellipsis): Likewise.
2817 * mangle.c (write_type): Likewise.
2818 * name-lookup.c (arg_assoc_type): Likewise.
2819 * parser.c (cp_parser_primary_expression): Likewise.
2820 * typeck.c (cp_build_binary_op): Likewise.
2821 (build_reinterpret_cast_1): Likewise.
2822 * error.c (dump_type): Likewise.
2823 (dump_type_prefix, dump_type_suffix): Likewise.
2824 * decl.c (cxx_init_decl_processing): Likewise.
2825 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2826 * cvt.c (ocp_convert): Likewise.
2827 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2828 nullptr_t tinfo in libsupc++.
2830 2010-05-06 Jason Merrill <jason@redhat.com>
2832 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2834 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2835 Dodji Seketeli <dodji@redhat.com>
2838 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2840 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2841 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2842 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2843 (cp_build_unary_op): Call lvalue_use.
2844 * decl.c (unused_but_set_errorcount): New variable.
2845 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2846 (duplicate_decls): Merge DECL_READ_P flags.
2847 (start_cleanup_fn): Set DECL_READ_P flag.
2848 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2849 * tree.c (rvalue): Call rvalue_use.
2850 * pt.c (convert_nontype_argument): Likewise.
2851 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2852 finish_decltype_type): Likewise.
2853 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2854 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2855 or rvalue_use depending on the expr.
2856 * init.c (build_new, build_delete): Likewise.
2857 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2859 2010-05-05 Jason Merrill <jason@redhat.com>
2862 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2863 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2865 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2868 * pt.c (unify): Check each elt for error_mark_node.
2870 2010-05-04 Jason Merrill <jason@redhat.com>
2873 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2875 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2878 * call.c (build_new_method_call): Return error_mark_node if fns is
2881 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2884 * pt.c (most_specialized_class): Pretend we are processing
2885 a template decl during the call to coerce_template_parms.
2887 2010-05-03 Jason Merrill <jason@redhat.com>
2891 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2892 from the selected underlying type unless -fstrict-enums. Set
2893 ENUM_UNDERLYING_TYPE to have the restricted range.
2894 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2895 * class.c (check_bitfield_decl): Likewise.
2897 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2900 * init.c (build_new_1): Revert the accidental checkin in
2903 2010-04-30 Jason Merrill <jason@redhat.com>
2906 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2907 (pp_cxx_type_specifier_seq): ...here.
2909 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2911 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2912 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2914 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2917 * typeck.c (warn_args_num): New function.
2918 (convert_arguments): Use warn_args_num to print the diagnostic
2921 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2924 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2925 user-provided constructor while recursing.
2927 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2930 * error.c (print_instantiation_partial_context_line): Handle
2931 recursive instantiation.
2932 (print_instantiation_partial_context): Likewise.
2934 2010-04-27 Jason Merrill <jason@redhat.com>
2936 * init.c (perform_member_init): Check CLASS_TYPE_P.
2938 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2941 * init.c (perform_member_init): check for uninitialized const or
2942 reference members, including array types.
2944 2010-04-24 Jason Merrill <jason@redhat.com>
2946 * tree.c (get_fns): Split out from get_first_fn.
2947 * cp-tree.h: Declare it.
2948 * search.c (shared_member_p): Use it.
2949 * semantics.c (finish_qualified_id_expr): Simplify.
2950 (finish_id_expression): Simplify.
2952 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2953 whenever object is NULL_TREE. Don't do 'this' capture here.
2954 (finish_qualified_id_expr): Pass NULL_TREE.
2955 (finish_id_expression): Likewise.
2956 (lambda_expr_this_capture): Likewise.
2958 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2959 rather than checking current_class_ref directly.
2960 (finish_call_expr): Likewise.
2963 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2964 * class.c (current_nonlambda_class_type): New fn.
2965 * semantics.c (nonlambda_method_basetype): New.
2966 * cp-tree.h: Declare them.
2967 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2969 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2972 * semantics.c (lambda_return_type): Complain about
2976 * tree.c (cv_unqualified): Handle error_mark_node.
2979 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2980 if we don't want errors.
2983 * class.c (convert_to_base): Add complain parameter. Pass
2984 ba_quiet to lookup_base if we don't want errors.
2985 (build_vfield_ref): Pass complain to convert_to_base.
2986 * call.c (convert_like_real): Likewise.
2987 (initialize_reference): Likewise.
2988 (perform_direct_initialization_if_possible): Pass complain to
2990 * cp-tree.h: Adjust.
2992 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2993 Jason Merrill <jason@redhat.com>
2996 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2998 (check_initializer): Call it for classes that need constructing, too.
2999 * class.c (in_class_defaulted_default_constructor): New.
3000 * cp-tree.h: Declare it.
3002 2010-04-20 Jason Merrill <jason@redhat.com>
3005 * init.c (constant_value_1): Treat error_mark_node as a constant
3006 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
3007 * cvt.c (ocp_convert): Handle getting error_mark_node from
3008 integral_constant_value.
3009 * decl.c (compute_array_index_type): Likewise.
3011 2010-04-20 Dodji Seketeli <dodji@redhat.com>
3015 * typeck.c (incompatible_dependent_types_p): If one of the
3016 compared types if not a typedef then honour their main variant
3019 2010-04-20 Jakub Jelinek <jakub@redhat.com>
3021 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
3023 2010-04-19 Dodji Seketeli <dodji@redhat.com>
3026 * typeck.c (structural_comptypes): Test dependent typedefs
3027 incompatibility before testing for their main variant based
3030 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3032 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
3033 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
3035 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3037 * decl.c (cxx_init_decl_processing): Remove second argument in call to
3038 build_common_tree_nodes.
3040 2010-04-14 Jason Merrill <jason@redhat.com>
3043 * parser.c (cp_parser_parenthesized_expression_list): Change
3044 is_attribute_list parm to int to indicate whether or not to
3045 handle initial identifier specially.
3046 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
3048 2010-04-13 Jason Merrill <jason@redhat.com>
3050 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
3052 * parser.c (cp_parser_lambda_expression): Complain about lambda in
3053 unevaluated context.
3054 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
3056 2010-04-12 Jason Merrill <jason@redhat.com>
3059 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
3060 return value directly.
3062 * call.c (type_decays_to): Call cv_unqualified for non-class type.
3064 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
3067 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
3068 * init.c (build_new_1): Check for uninitialized const members and
3069 uninitialized reference members, when using new without
3070 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
3071 (diagnose_uninitialized_cst_or_ref_member): Define, call
3072 diagnose_uninitialized_cst_or_ref_member_1.
3073 (diagnose_uninitialized_cst_or_ref_member_1): New function.
3075 2010-04-12 Richard Guenther <rguenther@suse.de>
3078 * semantics.c (expand_or_defer_fn_1): Do not keep extern
3079 template inline functions.
3081 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3084 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
3087 2010-04-07 Jason Merrill <jason@redhat.com>
3090 * decl.c (start_preparsed_function): Do defer nested functions.
3092 PR c++/11094, DR 408
3093 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
3094 * decl2.c (finish_static_data_member_decl): Set it.
3095 * decl.c (duplicate_decls): Propagate it.
3096 * pt.c (tsubst_decl): Don't substitute the domain of an array
3097 VAR_DECL if it's set.
3098 (regenerate_decl_from_template): Substitute it here.
3099 (type_dependent_expression_p): Return true if it's set.
3100 * semantics.c (finish_decltype_type): Instantiate such a variable.
3101 * typeck.c (cxx_sizeof_expr): Likewise.
3102 (strip_array_domain): New.
3105 * name-lookup.c (current_decl_namespace): Non-static.
3106 (pop_nested_namespace): Sanity check.
3107 * cp-tree.h: Declare current_decl_namespace.
3108 * decl.c (grokvardecl): Use it instead of current_namespace.
3109 (grokfndecl): Likewise.
3112 * pt.c (tsubst_friend_function): Instatiate a friend that has already
3115 * pt.c (print_template_statistics): New.
3116 * cp-tree.h: Declare it.
3117 * tree.c (cxx_print_statistics): Call it.
3120 * decl.c (grokvardecl): Tweak warning message.
3121 (grokfndecl): Likewise.
3123 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3126 *pt.c (tsubst_decl): Get the arguments of a specialization from
3127 the specialization template, not from the most general template.
3129 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3132 * typeck2.c (process_init_constructor_record):
3133 value-initialize members that are are not explicitely
3136 2010-04-07 Jie Zhang <jie@codesourcery.com>
3139 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
3140 when all of its elements are non-constant and have been split out.
3142 2010-04-06 Taras Glek <taras@mozilla.com>
3143 Jason Merrill <jason@redhat.com>
3145 * parser.c (cp_parser_class_specifier): Set class location to that
3146 of IDENTIFIER_NODE instead of '{' when possible.
3147 * semantics.c (begin_class_definition): Do not overide locations
3148 with less precise ones.
3150 2010-04-06 Jason Merrill <jason@redhat.com>
3153 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
3156 * pt.c (maybe_update_decl_type): Check the return value from
3159 2010-04-01 Jason Merrill <jason@redhat.com>
3161 * decl.c (next_initializable_field): No longer static.
3162 * cp-tree.h: Declare it.
3163 * call.c (build_aggr_conv): Fail if there are more initializers
3164 than initializable fields.
3166 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
3167 instead of void_zero_node.
3169 2010-03-31 Dodji Seketeli <dodji@redhat.com>
3172 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
3173 * pt.c (end_template_parm_list): Store sibling template parms of
3174 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3175 (push_template_decl_real): Don't store the containing template decl
3176 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
3177 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
3178 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3181 2010-03-30 Jason Merrill <jason@redhat.com>
3184 * pt.c (push_template_decl_real): Deal better with running out of
3185 scopes before running out of template parms.
3189 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3190 function parameter context. Don't print an error if parsing
3194 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3197 2010-03-26 Jason Merrill <jason@redhat.com>
3200 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3201 c++0x mode, but not other type-names.
3203 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3206 * pt.c (add_to_template_args): Support NULL ARGS;
3207 (most_specialized_class): call coerce_template_parms on
3208 template arguments passed to get_class_bindings. Use
3209 add_to_template_args.
3210 (unify): Handle VAR_DECLs.
3212 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3214 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3216 * pt.c (get_template_parms_at_level): Adjust.
3218 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3221 * cp-tree.h (get_template_parms_at_level): Declare ...
3222 * pt.c (get_template_parms_at_level): ... new function.
3223 * typeck.c (get_template_parms_of_dependent_type): If a template
3224 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3225 current_template_parms. Use get_template_parms_at_level. Remove
3227 (incompatible_dependent_types_p): If we get empty parms from just one
3228 of the template type parms we are comparing then the template parms are
3231 2010-03-24 Jason Merrill <jason@redhat.com>
3234 * parser.c (make_declarator): Initialize id_loc.
3235 (cp_parser_lambda_declarator_opt): And set it.
3237 2010-03-23 Jason Merrill <jason@redhat.com>
3239 Make lambda conversion op and op() non-static.
3240 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3241 Also add the thunk function returned by the conversion op.
3242 Mark the conversion deleted if the op() is variadic.
3243 * decl2.c (mark_used): Give helpful message about deleted conversion.
3244 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3245 * semantics.c (finish_this_expr): Adjust.
3246 * mangle.c (write_closure_type_name): Adjust.
3247 * decl.c (grok_op_properties): Don't allow it.
3248 * call.c (build_user_type_conversion_1): No static conversion ops.
3249 (build_op_call): Or op().
3251 * decl2.c (change_return_type): Fix 'this' quals.
3253 2010-03-22 Jason Merrill <jason@redhat.com>
3256 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3259 * pt.c (contains_auto_r): New fn.
3260 (do_auto_deduction): Use it.
3261 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3263 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3266 * decl2.c (grokfield): Handle invalid initializers for member
3269 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3272 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3274 * decl2.c (vague_linkage_p): Likewise.
3276 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3279 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3280 false, in the cp_parser_expression_statement call.
3282 2010-03-05 Jason Merrill <jason@redhat.com>
3284 * mangle.c (mangle_decl): Give name collision error even without
3287 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3289 * pt.c (process_partial_specialization): Use error_n instead of
3292 2010-03-03 Jason Merrill <jason@redhat.com>
3295 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3297 2010-03-03 Jason Merrill <jason@redhat.com>
3300 * mangle.c: Include cgraph.h.
3301 (mangle_decl): If the mangled name will change in a later
3302 ABI version, make the later mangled name an alias.
3303 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3304 * Make-lang.in (mangle.o): Depend on cgraph.h.
3305 * method.c (make_alias_for): Handle VAR_DECL, too.
3306 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3307 * tree.c (no_linkage_check): Adjust.
3308 * decl.c (maybe_commonize_var): Adjust.
3309 * cp-tree.h: Adjust.
3311 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3313 * pt.c (redeclare_class_template): Use error_n and inform_n.
3315 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3318 * cp-tree.h (push_tinst_level): Declare.
3319 (pop_tinst_level): Likewise.
3320 * pt.c (push_tinst_level): Give it external linkage.
3321 (pop_tinst_level): Likewise.
3322 * mangle.c (mangle_decl_string): Set the source location to that
3323 of the decl while mangling.
3325 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3328 * pt.c (redeclare_class_template): Return false if there are erroneous
3329 template parameters.
3331 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3333 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3336 2010-02-24 Jason Merrill <jason@redhat.com>
3339 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3341 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3342 in a previous ABI version.
3344 2010-02-23 Jason Merrill <jason@redhat.com>
3347 * typeck2.c (digest_init_r): Accept value init of array.
3349 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3352 * typeck.c (convert_arguments): Update error message.
3354 2010-02-22 Mike Stump <mikestump@comcast.net>
3357 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3359 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3362 * error.c (print_instantiation_partial_context_line): New.
3363 (print_instantiation_partial_context): Print at most 12 contexts,
3364 skip the rest with a message.
3366 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3369 * pt.c (lookup_template_class): Better support of specialization
3370 of member of class template implicit instantiation.
3372 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3375 * call.c (conversion_null_warnings): Replace -Wconversion with
3377 * cvt.c (build_expr_type_conversion): Likewise.
3379 2010-02-18 Jason Merrill <jason@redhat.com>
3382 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3385 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3387 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3388 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3391 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3395 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3396 (maybe_update_decl_type): New fn.
3397 * parser.c (cp_parser_init_declarator): Use it.
3400 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3402 2010-02-17 Jason Merrill <jason@redhat.com>
3405 * call.c (build_over_call): Don't create zero-sized assignments.
3406 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3407 * cp-objcp-common.c (cp_expr_size): Remove.
3408 * cp-tree.h: Remove prototype.
3411 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3412 decl we looked up doesn't match.
3415 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3416 have an INIT_EXPR anymore.
3419 * pt.c (convert_nontype_argument): Change assert to test.
3421 2010-02-16 Jason Merrill <jason@redhat.com>
3423 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3426 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3427 VIEW_CONVERT_EXPR for conversions between structural equality types
3428 that the back end can't tell are the same.
3431 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3432 cv-quals from element here.
3433 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3435 2010-02-14 Jason Merrill <jason@redhat.com>
3438 * semantics.c (finish_compound_literal): Use
3439 cp_apply_type_quals_to_decl when creating a static variable.
3441 2010-02-12 Jason Merrill <jason@redhat.com>
3444 * name-lookup.h (current_binding_level): Check for null
3447 2010-02-12 Jason Merrill <jason@redhat.com>
3450 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3452 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3455 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3458 2010-02-10 Jason Merrill <jason@redhat.com>
3461 * semantics.c (outer_lambda_capture_p): Revert.
3462 (add_capture): Only finish_member_declaration if
3463 we're in the lambda class.
3464 (register_capture_members): New.
3465 * cp-tree.h: Declare it.
3466 * parser.c (cp_parser_lambda_expression): Call it.
3468 2010-02-10 Jason Merrill <jason@redhat.com>
3471 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3472 instead of current_class_type.
3474 2010-02-10 Jason Merrill <jason@redhat.com>
3476 PR c++/42983, core issue 906
3477 * method.c (defaultable_fn_check): Check virtualness.
3479 2010-02-10 Jason Merrill <jason@redhat.com>
3482 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3484 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3486 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3487 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3489 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3490 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3491 (cp_parser_parameter_declaration)
3492 (cp_parser_exception_specification_opt)
3493 (cp_parser_exception_declaration): Likewise.
3494 * pt.c (check_default_tmpl_args): Likewise.
3495 * search.c (lookup_field_r): Likewise.
3497 2010-02-09 Jason Merrill <jason@redhat.com>
3500 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3502 2010-02-09 Jason Merrill <jason@redhat.com>
3505 * decl2.c (change_return_type): New fn.
3506 * semantics.c (apply_lambda_return_type): Use it.
3507 * cp-tree.h: Declare it.
3509 2010-02-05 Richard Guenther <rguenther@suse.de>
3511 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3512 * cp-lang.c: Include gt-cp-cp-lang.h.
3513 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3515 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3518 * typeck.c (get_template_parms_of_dependent_type): Try getting
3519 the template parameters fromt the type itself first.
3521 2010-02-03 Jason Merrill <jason@redhat.com>
3525 * mangle.c (write_unqualified_id): Split out from write_expression.
3526 (write_unqualified_name): Call it.
3527 (write_member_name): Likewise.
3528 (write_expression): Support TEMPLATE_ID_EXPR.
3529 Disambiguate operator names.
3532 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3535 2010-02-02 Jason Merrill <jason@redhat.com>
3538 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3539 * optimize.c (clone_body): Remap their initializers when making base
3541 (maybe_clone_body): Complain if multiple clones aren't safe.
3543 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3550 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3551 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3552 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3553 * pt.c (coerce_template_parms, type_unification_real,
3554 expand_template_argument_pack, coerce_template_parameter_pack):
3555 Set the non default template args count.
3556 (current_template_args): Always set non defaulted
3557 template args count when compiled with --enable-checking
3558 (tsubst_template_args, type_unification_real): Propagate the non
3559 defaulted template args count.
3560 * error.c (get_non_default_template_args_count): Renamed
3561 count_non_default_template_args into this. Don't calculate the
3562 non default template argument count anymore. Use the new
3563 accessor macros above to get it.
3564 (dump_template_argument_list, dump_type, dump_decl,
3565 dump_template_parms): Adjust.
3566 * parser.c (cp_parser_template_argument_list): Always set defaulted
3567 template args count when compiled with --enable-checking.
3569 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3571 * decl.c (redeclaration_error_message): Wrap the return messages into
3572 G_() for easy translation.
3574 2010-01-28 Jason Merrill <jason@redhat.com>
3577 * semantics.c (begin_class_definition): Don't use type_as_string.
3579 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3583 * typeck.c (get_template_parms_of_dependent_type): Factorized
3584 this out of incompatible_template_type_parms_p
3585 (incompatible_dependent_types_p): Renamed
3586 incompatible_template_type_parms_p into this. Make it detect
3587 two incompatible dependent typedefs too.
3588 (structural_comptypes): Use incompatible_dependent_types_p.
3589 * pt.c (get_template_info):
3590 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3592 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3593 Jason Merrill <jason@redhat.com>
3595 * mangle.c (write_type): Mangle transparent record as member type.
3596 * semantics.c (begin_class_definition): Recognize decimal classes
3597 and set TYPE_TRANSPARENT_AGGR.
3599 2010-01-20 Jason Merrill <jason@redhat.com>
3602 * mangle.c (write_expression): Handle tree codes that have extra
3603 arguments in the middle-end.
3605 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3608 * except.c (expand_start_catch_block): Deal correctly with
3609 do_begin_catch returning error_mark_node.
3611 2010-01-20 Jason Merrill <jason@redhat.com>
3614 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3618 * semantics.c (build_lambda_object): Call mark_used on captured
3622 * decl.c (grokdeclarator): Clear type_quals for a member function
3623 declared using a typedef. Don't complain about adding cv-quals
3624 to a function typedef in C++0x mode.
3626 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3628 * decl.c (create_array_type_for_decl): Remove set but not used
3629 variable error_msg. Remove break stmts after return stmts.
3631 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3633 * error.c (dump_template_parms, count_non_default_template_args):
3634 Revert fix of PR c++/42634.
3636 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3639 * error.c (dump_template_parms): Use innermost template
3640 arguments before calling count_non_default_template_args.
3641 (count_non_default_template_args): We are being called with
3642 template innermost arguments now. There is no need to ensure
3645 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3648 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3650 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3653 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3655 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3658 *pt.c (tsubst_decl): Get the arguments of a specialization from
3659 the specialization template, not from the most general template.
3661 2010-01-16 Jason Merrill <jason@redhat.com>
3664 * semantics.c (finish_decltype_type): Within a template, treat
3665 unresolved CALL_EXPR as dependent.
3667 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3669 * error.c (dump_template_parms,count_non_default_template_args):
3670 Revert changes of PR c++/42634.
3672 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3675 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3676 functions with noreturn attribute.
3678 2010-01-14 Jason Merrill <jason@redhat.com>
3681 * call.c (build_new_method_call): Don't free the vec here.
3684 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3686 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3689 * error.c (dump_template_parms): Use innermost template
3690 arguments before calling count_non_default_template_args.
3691 (count_non_default_template_args): We are being called with
3692 template innermost arguments now. There is no need to ensure
3695 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3698 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3699 arguments that were previously deduced.
3701 2010-01-05 Jason Merrill <jason@redhat.com>
3703 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3704 * call.c (build_over_call): Don't complain about it.
3706 2010-01-04 Jason Merrill <jason@redhat.com>
3709 * pt.c (tsubst_decl): Don't apply type attributes in place.
3712 * semantics.c (describable_type): Remove decltype comment and
3717 Copyright (C) 2010 Free Software Foundation, Inc.
3719 Copying and distribution of this file, with or without modification,
3720 are permitted in any medium without royalty provided the copyright
3721 notice and this notice are preserved.