1 2010-11-20 Jakub Jelinek <jakub@redhat.com>
4 * decl.c (cp_make_fname_decl): Return error_mark_node if
5 current_binding_level has already sk_function_parms kind.
8 * semantics.c (cxx_eval_call_expression): Unshare the result.
10 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12 * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
13 to objc_declare_protocols.
15 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
18 * typeck.c (cp_build_unary_op): Call build_real_imag_expr for
19 REALPART_EXPR and IMAGPART_EXPR.
21 2010-11-16 Jason Merrill <jason@redhat.com>
23 * call.c (convert_like_real): Don't make a temp for copy-list-init.
24 (build_over_call): Don't handle that here.
25 (build_new_method_call): Use COMPLETE_OR_OPEN_TYPE_P for error.
28 * call.c (build_over_call): Check for =delete even when trivial.
31 * decl.c (make_unbound_class_template): Handle using
32 injected-type-name as template.
34 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
36 * typeck.c (cp_build_unary_op): Use
37 objc_build_incr_expr_for_property_ref to build the pre/post
38 increment/decrement of an Objective-C property ref.
40 2010-11-13 Jason Merrill <jason@redhat.com>
42 * decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
43 * init.c (build_new): Likewise.
44 * pt.c (tsubst_decl): Likewise.
45 (do_auto_deduction): Likewise.
46 (resolve_nondeduced_context): Use build_offset_ref and
49 2010-11-12 Joseph Myers <joseph@codesourcery.com>
51 * Make-lang.in (g++spec.o): Use $(OPTS_H).
53 2010-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
55 Core 1135, 1136, 1145, 1149
56 * method.c (defaultable_fn_check): Do not disallow defaulting a
57 non-public or explicit special member function on its first
60 2010-11-12 James Dennett <jdennett@google.com>
63 * typeck.c (build_static_cast_1): Convert to the target type
64 when doing static_cast<cv Derived*>(Base*).
66 2010-11-10 Jason Merrill <jason@redhat.com>
69 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
70 [CONSTRUCTOR]: Use the tsubsted type.
73 * semantics.c (cxx_eval_bit_field_ref): New.
74 (cxx_eval_constant_expression): Call it.
76 2010-11-10 Joseph Myers <joseph@codesourcery.com>
78 * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
79 * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
80 Use %' in diagnostics.
81 * decl2.c (check_classfn): Use %' in diagnostic.
82 * init.c (build_java_class_ref): Use %' in diagnostic.
83 (build_delete): Remove trailing '.' from diagnostic.
84 * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
86 * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
87 * parser.c (cp_parser_exception_specification_opt): Remove
88 trailing '.' from diagnostic.
89 (cp_parser_objc_interstitial_code): Use %qs for quoting in
91 * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
93 * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
95 2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
98 * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
100 2010-11-09 Jakub Jelinek <jakub@redhat.com>
103 * tree.c (lvalue_kind): Don't crash if ref has NULL type.
105 2010-11-08 Jason Merrill <jason@redhat.com>
108 * semantics.c (check_constexpr_ctor_body): New fn.
109 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
110 * cp-tree.h: Declare it.
113 * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
115 Correct conversion/overflow behavior.
116 * cvt.c (ignore_overflows): Move here from typeck.c.
117 (ocp_convert): Use it.
118 (cp_fold_convert): Use it. Don't call rvalue.
119 * typeck.c (build_static_cast_1): Don't use it. Do call rvalue.
120 * error.c (location_of): Handle expressions, too.
121 * class.c (check_bitfield_decl): Set input_location around call to
123 * semantics.c (cxx_eval_outermost_constant_expr): Don't
124 print the expression if it already had TREE_OVERFLOW set.
125 (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
126 (verify_constant): Allow overflow with a permerror if we're
128 (cxx_eval_outermost_constant_expr): Use verify_constant.
129 (adjust_temp_type): Use cp_fold_convert.
130 * decl.c (build_enumerator): Don't call constant_expression_warning.
131 * decl2.c (grokbitfield): Likewise.
133 2010-11-06 Jason Merrill <jason@redhat.com>
136 * init.c (perform_member_init): Use build_vec_init_expr for
137 value-init of arrays, too.
138 * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
139 * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
140 (VEC_INIT_EXPR_VALUE_INIT): New macro.
141 * semantics.c (potential_constant_expression): No longer static.
142 Check VEC_INIT_EXPR_IS_CONSTEXPR.
143 * tree.c (build_vec_init_expr): Handle value-init. Set
144 VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
146 2010-11-06 Nathan Froyd <froydnj@codesourcery.com>
149 * parser.c (cp_lexer_previous_token): New function.
150 (cp_parser_member_declaration): Use previous token for error
151 messages. Assume semicolon presence rather than grovelling for
154 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
157 * method.c (make_alias_for_thunk):
158 Use targetm.asm_out.generate_internal_label.
160 2010-11-05 Jason Merrill <jason@redhat.com>
163 * search.c (look_for_overrides): A constructor is never virtual.
165 2010-11-05 Jakub Jelinek <jakub@redhat.com>
168 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
169 on the RHS to avoid infinite recursion with gimplify_expr.
171 2010-11-05 Jason Merrill <jason@redhat.com>
174 * pt.c (tsubst_copy): Handle COMPLEX_CST.
176 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
178 Fixed using the Objective-C 2.0 dot-syntax with class names.
179 * parser.c (cp_parser_primary_expression): Recognize Objective-C
180 2.0 dot-syntax with class names and process it.
181 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
183 (cp_parser_class_name): Same change.
184 (cp_parser_simple_type_specifier): Tidied comments.
186 2010-11-04 Jason Merrill <jason@redhat.com>
189 * semantics.c (build_constexpr_constructor_member_initializers):
190 Handle an enclosing STATEMENT_LIST.
192 * semantics.c (speculative_access_check): New.
193 * cp-tree.h: Declare it.
194 * call.c (build_over_call): Use it.
195 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
196 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
198 2010-11-03 Jason Merrill <jason@redhat.com>
201 * semantics.c (build_data_member_initialization): Handle
202 value-init of aggregate empty base.
205 * call.c (can_convert_array): New fn.
206 (build_aggr_conv): Use it.
209 * semantics.c (build_constexpr_constructor_member_initializers):
212 2010-11-02 Dodji Seketeli <dodji@redhat.com>
214 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
216 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
218 2010-11-03 Jason Merrill <jason@redhat.com>
221 * init.c (expand_default_init): Avoid ICE if we can't figure out
222 which function is being called.
224 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
226 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
227 instead of fold_convert.
228 * init.c (build_zero_init): Likewise.
229 * typeck.c (cp_build_binary_op): Likewise.
231 2010-11-02 Dodji Seketeli <dodji@redhat.com>
235 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
237 (convert_nontype_argument, convert_nontype_argument): Pass the
238 complain parameter down to check_valid_ptrmem_cst_expr.
240 2010-11-02 Dodji Seketeli <dodji@redhat.com>
243 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
244 (struct template_parm_index_s)<num_siblings>: New field.
245 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
246 (process_template_parm): Extend the API to accept the number of
247 template parms in argument.
248 (cp_set_underlying_type): Remove this.
249 * class.c (build_self_reference): Require canonical type equality
250 back on the self reference of class.
251 * decl2.c (grokfield): Require canonical type equality back on
252 typedef class fields.
253 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
254 equality back on typedefs.
255 * parser.c (cp_parser_template_parameter_list): Do not require
256 canonical type equality on dependent types created during template
258 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
259 (fixup_template_parm, fixup_template_parms): New private
261 (current_template_args): Declare this.
262 (process_template_parm): Pass the total number of template parms
263 to canonical_type_parameter.
264 (build_template_parm_index): Add a new argument to carry the total
265 number of template parms.
266 (reduce_template_parm_level, process_template_parm, make_auto):
268 (current_template_args): Fix this for template template
270 (tsubst_template_parm): Split out of ...
271 (tsubst_template_parms): ... this.
272 (reduce_template_parm_level): Don't loose
273 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
274 (template_parm_to_arg): Extracted this function from
275 current_template_args. Make it represent invalid template parms
276 with an error_mark_node instead of a LIST_TREE containing an
278 (current_template_args): Use template_parm_to_arg.
279 (dependent_template_arg_p): Consider an invalid template argument
281 (end_template_parm_list): Do not update template sibling parms
282 here anymore. Use fixup_template_parms instead.
283 (process_template_parm): Pass the number of template parms to
284 canonical_type_parameter.
285 (make_auto): Require structural equality on auto
286 TEMPLATE_TYPE_PARM for now.
287 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
288 using all the arguments deduced so far.
289 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
290 canonical_type_parameter.
291 * tree.c (cp_set_underlying_type): Remove.
292 * typeck.c (get_template_parms_of_dependent_type)
293 (incompatible_dependent_types_p): Remove.
294 (structural_comptypes): Do not call incompatible_dependent_types_p
296 (comp_template_parms_position): Re-organized. Take the length of
297 template parms list in account.
299 2010-11-01 Jason Merrill <jason@redhat.com>
301 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
302 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
303 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
304 of giving follow-on errors.
305 * error.c (maybe_print_constexpr_context): New.
306 (cp_diagnostic_starter): Call it.
307 * cp-tree.h: Declare cx_error_context.
309 * semantics.c (cxx_eval_constant_expression): Explain
310 unacceptable use of variable better.
312 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
313 Jason Merrill <jason@redhat.com>
315 * call.c (null_ptr_cst_p): Use maybe_constant_value.
316 (set_up_extended_ref_temp): Support constant initialization.
317 (initialize_reference): Adjust.
318 * class.c (check_bitfield_decl): Use cxx_constant_value.
319 * cvt.c (ocp_convert): Don't use integral_constant_value when
320 converting to class type.
321 * decl.c (finish_case_label): Use maybe_constant_value.
322 (build_init_list_var_init): Support constant initialization.
323 (check_initializer): Likewise. Reorganize.
324 (cp_finish_decl): Likewise.
325 (expand_static_init): Likewise.
326 (compute_array_index_type): Use maybe_constant_value.
328 (create_array_type_for_decl, grokdeclarator): Pass it.
329 (build_enumerator): Use cxx_constant_value.
330 * decl2.c (grokfield): Use maybe_constant_init.
331 * except.c (check_noexcept_r): Handle constexpr.
332 (build_noexcept_spec): Use maybe_constant_value.
333 * init.c (expand_default_init): Support constant initialization.
334 (build_vec_init): Likewise.
335 (constant_value_1): Adjust.
336 (build_new_1): Adjust.
337 * parser.c (cp_parser_constant_expression): Allow non-integral
339 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
340 (cp_parser_initializer_clause): Toss folded result if non-constant.
341 * pt.c (fold_decl_constant_value): Remove.
342 (convert_nontype_argument): Use maybe_constant_value. Give clearer
343 error about overflow.
344 (tsubst): Move array bounds handling into compute_array_index_type.
345 (value_dependent_expression_p): Handle constant CALL_EXPR.
346 (tsubst_decl): Don't set
347 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
348 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
349 (instantiate_decl): Here too.
350 * semantics.c (finish_static_assert): Use maybe_constant_value.
351 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
352 (potential_constant_expression): Use maybe_constant_value.
353 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
354 is potentially valid in C++0x.
355 * typeck2.c (store_init_value): Handle constant init.
356 (check_narrowing): Use maybe_constant_value.
357 (build_functional_cast): Set TREE_CONSTANT on literal T().
358 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
359 (LOOKUP_ALREADY_DIGESTED): New.
360 (compute_array_index_type): Adjust prototype.
362 * semantics.c (constexpr_call): New datatype.
363 (constexpr_call_table): New global table.
364 (constexpr_call_hash): New.
365 (constexpr_call_equal): Likewise.
366 (maybe_initialize_constexpr_call_table): Likewise.
367 (lookup_parameter_binding): Likewise.
368 (cxx_eval_builtin_function_call): Likewise.
369 (cxx_bind_parameters_in_call): Likewise.
370 (cxx_eval_call_expression): Likewise.
371 (cxx_eval_unary_expression): Likewise.
372 (cxx_eval_binary_expression): Likewise.
373 (cxx_eval_conditional_expression): Likewise.
374 (cxx_eval_array_reference): Likewise.
375 (cxx_eval_component_reference): Likewise.
376 (cxx_eval_logical_expression): Likewise.
377 (cxx_eval_object_construction): Likewise.
378 (cxx_eval_constant_expression): Likewise.
379 (cxx_eval_indirect_ref): Likewise.
380 (cxx_constant_value): Likewise.
381 (cxx_eval_bare_aggregate): Likewise.
382 (adjust_temp_type): New.
383 (reduced_constant_expression_p): New.
384 (verify_constant): New.
385 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
386 (cxx_eval_outermost_constant_expr): New.
387 (maybe_constant_value, maybe_constant_init): New.
388 (cxx_eval_constant_expression): Use them.
389 * pt.c (iterative_hash_template_arg): No longer static.
390 * cp-tree.h: Declare fns.
392 * cp-tree.h (register_constexpr_fundef): Declare.
393 * decl.c (maybe_save_function_definition): New.
394 (finish_function): Use it.
395 * semantics.c (constexpr_fundef): New datatype.
396 (constexpr_fundef_table): New global table.
397 (constexpr_fundef_equal): New.
398 (constexpr_fundef_hash): Likewise.
399 (retrieve_constexpr_fundef): Likewise.
400 (validate_constexpr_fundecl): Store in the table.
401 (build_data_member_initialization): New fn.
402 (build_constexpr_constructor_member_initializers): New.
403 (register_constexpr_fundef): Define.
404 (is_this_parameter): New.
405 (get_function_named_in_call): Likewise.
406 (get_nth_callarg): Likewise.
407 (check_automatic_or_tls): New.
408 (morally_constexpr_builtin_function_p): New.
409 (potential_constant_expression): New.
411 2010-11-01 Jason Merrill <jason@redhat.com>
413 * decl2.c (decl_constant_var_p): New fn.
414 (decl_maybe_constant_var_p): New fn.
415 (mark_used): Rework instantiation of things needed for constant
417 * cp-tree.h: Declare new fns.
418 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
419 (always_instantiate_p): Use decl_maybe_constant_var_p.
420 (instantiate_decl): Don't defer constexpr functions.
421 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
422 * semantics.c (finish_id_expression): Use decl_constant_var_p.
423 Check for valid name in constant expr after mark_used.
425 2010-10-31 Jason Merrill <jason@redhat.com>
427 * class.c (is_really_empty_class): Work when type is not complete.
428 (synthesized_default_constructor_is_constexpr): New.
429 (add_implicitly_declared_members): Use it.
430 (type_has_constexpr_default_constructor): Likewise.
431 * cp-tree.h: Declare it.
432 * method.c (synthesized_method_walk): Use it.
434 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
435 * typeck.c (convert_for_assignment): Likewise.
437 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
438 message about constexpr without -std=c++0x.
440 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
443 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
445 * class.c (layout_vtable_decl): Call build_array_of_n_type.
446 (build_vtt, build_ctor_vtabl_group): Likewise.
448 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
450 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
451 * parser.c (cp_parser_objc_at_property_declaration): Removed
452 parsing of RID_COPIES and RID_IVAR. Updated call to
453 objc_add_property_declaration.
454 * typecheck.c (finish_class_member_access_expr): Call
455 objc_maybe_build_component_ref instead of objc_build_setter_call.
456 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
457 of objc_build_getter_call.
459 2010-10-27 Jason Merrill <jason@redhat.com>
461 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
462 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
463 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
464 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
465 (cp_parser_trait_expr): Likewise.
467 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
468 Jason Merrill <jason@redhat.com>
470 * decl.c (finish_case_label): Use decl_constant_value.
472 * method.c (synthesized_method_walk): Track constexprness too.
473 (process_subob_fn, walk_field_subobs): Likewise.
474 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
475 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
476 * class.c (add_implicitly_declared_members): Handle
477 constexpr default ctor.
479 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
480 Make sure a constexpr ctor has an empty body.
481 * class.c (type_has_constexpr_default_constructor): New.
482 * cp-tree.h: Declare it.
483 * init.c (perform_member_init): Complain about uninitialized
484 member in constexpr ctor.
485 (emit_mem_initializers): And uninitialized base.
486 * decl.c (check_tag_decl): Fix typo.
488 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
489 (is_valid_constexpr_fn): New fn.
490 (validate_constexpr_fundecl): Use it.
491 * decl.c (validate_constexpr_redeclaration): New.
492 (duplicate_decls): Use it.
493 (cp_finish_decl): Call validate_constexpr_fundecl and
494 ensure_literal_type_for_constexpr_object here.
495 (start_decl): Not here. Don't ICE on constexpr reference.
496 (check_for_uninitialized_const_var): Don't handle constexpr specially.
497 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
498 (check_static_variable_definition): Give friendly message about
500 (grokdeclarator): Complain about typedef and volatile with constexpr.
501 Reorganize. Give sorry about non-static data members in C++0x mode.
502 (start_preparsed_function): Check validate_constexpr_fundecl here.
503 (check_function_type): Not here.
504 * decl2.c (finish_static_data_member_decl): Don't complain about
506 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
507 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
508 (cp_parser_decl_specifier_seq): Handle it.
509 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
511 * class.c (check_bases): Propagate non-literality.
512 (check_field_decls): Likewise.
513 (finalize_literal_type_property): New.
514 (check_bases_and_members): Call it.
515 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
516 (lang_type_class): Add has_constexpr_ctor field.
517 (DECL_DECLARED_CONSTEXPR_P): Strip template.
518 * decl.c (grok_special_member_properties): Set
519 TYPE_HAS_CONSTEXPR_CTOR.
521 2010-10-27 Jason Merrill <jason@redhat.com>
523 * call.c (build_integral_nontype_arg_conv): New.
524 * cp-tree.h: Declare it.
525 * pt.c (convert_nontype_argument): Use it.
527 * error.c (dump_simple_decl): Print constexpr.
529 * cvt.c (build_up_reference): Use target_type for the temporary var.
531 * except.c (build_throw): Set EXPR_LOCATION.
533 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
535 * semantics.c (finish_compound_stmt): Avoid creating an
536 unnecessary BIND_EXPR.
538 * call.c (convert_like_real): Don't check narrowing if the element
539 is also an initializer-list.
541 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
543 * parser.c (cp_parser_objc_at_property_declaration): Recognize
544 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
545 Do not use objc_set_property_attr, but use local variables
546 instead. Detect repeated usage of setter, getter and ivar
547 attributes. Improved error processing when a setter name does not
548 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
549 that the token is a keyword. Updated call to
550 objc_add_property_declaration.
552 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
554 * parser.c (cp_parser_objc_property_decl): Renamed to
555 cp_parser_objc_struct_declaration. Return the parsed trees
556 instead of calling objc_add_property_variable directly. Detect
557 missing or invalid declspecs. Implemented attributes. Do not eat
558 the ';' at the end. Exit loop whenever a non-comma is parsed, not
560 (cp_parser_objc_at_property): Renamed to
561 cp_parser_objc_at_property_declaration. Updated calls to
562 objc_add_property_variable, now objc_add_property_declaration, and
563 to cp_parser_objc_property_decl, now
564 cp_parser_objc_struct_declaration. Rewritten all code to be more
565 robust in dealing with syntax errors, and almost identical to the
566 one in c_parser_objc_at_property_declaration.
567 (cp_parser_objc_property_attrlist): Removed.
568 (cp_parser_objc_method_prototype_list): Updated call to
569 cp_parser_objc_at_property.
570 (cp_parser_objc_method_definition_list): Same change.
571 (cp_parser_objc_class_ivars): Detect a number of invalid
572 declarations of instance variables and produce errors when they
575 2010-10-26 Jason Merrill <jason@redhat.com>
577 * tree.c (build_vec_init_expr): Split out from...
578 (build_array_copy): ...here.
579 * init.c (perform_member_init): Use it.
580 * cp-tree.h: Declare it.
581 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
582 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
583 (cp_gimplify_expr): Handle array default-initialization via
586 * tree.c (stabilize_expr): Handle xvalues properly.
588 * call.c (build_over_call): Use argarray[0] for 'this' argument.
590 * decl.c (finish_function): Don't look at function_depth.
592 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
594 Implement opaque-enum-specifiers for C++0x.
595 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
596 (OPAQUE_ENUM_P): New.
597 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
598 (start_enum): Update prototype.
599 (finish_enum_value_list): New prototype.
600 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
601 "enum class" is used in an elaborated-type-specifier.
602 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
603 * decl.c (copy_type_enum): New.
604 (finish_enum_value_list): New, with code from finish_enum.
605 (finish_enum): A lot of code removed. Added a gcc_assert.
606 (start_enum): Add parameters enumtype and is_new.
607 Rewrite to work with opaque-enum-specifiers.
608 * pt.c (maybe_process_partial_specialization): Allow for template
609 specialization of enumerations, with a pedwarn.
610 (lookup_template_class): Update call to start_enum. Call to
612 (tsubst_enum): Call to begin_scope, finish_scope and
613 finish_enum_value_list.
615 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
617 Removed Objective-C++ specific replacement of cxx_printable_name.
618 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
619 to cxx_printable_name for both C++ and Objective-C++.
620 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
622 * error.c (dump_decl): For Objective-C++, call
623 objc_maybe_printable_name here ...
624 * tree.c (cxx_printable_name_internal): ... instead of here.
626 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
628 * tree.c (cxx_printable_name_internal): In Objective-C++, call
629 objc_maybe_printable_name.
631 2010-10-22 Jason Merrill <jason@redhat.com>
634 * pt.c (instantiate_class_template): Don't instantiate default
638 * init.c (build_vec_init): Handle memberwise move.
640 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
643 * call.c (add_function_candidate): Don't use TREE_VALUE on null
646 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
648 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
649 bool instead of calling objc_set_method_type.
650 (cp_parser_objc_method_signature): Updated calls to
651 cp_parser_objc_method_type and to objc_build_method_signature.
652 (cp_parser_objc_method_prototype_list): Updated calls to
653 objc_add_method_declaration. Use token->type to determine if it
654 is a class method or not.
655 (cp_parser_objc_method_definition_list): Same change.
657 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
660 * parser.c (cp_convert_range_for): Call cp_finish_decl
661 instead of finish_expr_stmt.
663 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
665 * cp-lang.c (finish_file): Removed.
666 * decl2.c (cp_write_global_declarations): Call
667 objc_write_global_declarations when compiling Objective-C++.
669 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
672 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
673 (coerce_template_parms): Likewise for args.
675 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
677 Implemented parsing @synthesize and @dynamic for Objective-C++.
678 * parser.c (cp_parser_objc_method_definition_list): Recognize
679 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
680 (cp_parser_objc_at_dynamic_declaration): New.
681 (cp_parser_objc_at_synthesize_declaration): New.
683 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
685 * parser.c (cp_parser_objc_identifier_list): Check the return
686 value of cp_parser_identifier and react if it is error_mark_node.
688 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
690 Merge from apple/trunk branch on FSF servers.
692 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
695 * call.c (standard_conversion, implicit_conversion): Ignore
696 'volatile' attribute of artificially volatized type in objc when
697 evaluating various conversion weights.
699 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
702 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
703 artiificially 'volatized' type before doing pointer comparison.
705 2010-10-18 Jakub Jelinek <jakub@redhat.com>
708 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
711 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
713 Merge from apple/trunk branch on FSF servers.
715 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
718 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
719 objc object types if type is scope qualified.
721 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
723 Merge from apple/trunk branch on FSF servers.
725 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
728 * lex.c (unqualified_name_lookup_error): Issue diagnostic
729 for private 'ivar' access.
731 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
733 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
734 enum, and handle @package.
736 2010-10-15 Jason Merrill <jason@redhat.com>
739 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
740 with a different typedef variant of the element type.
742 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
744 merge from FSF apple 'trunk' branch.
745 2006 Fariborz Jahanian <fjahanian@apple.com>
747 Radars 4436866, 4505126, 4506903, 4517826
748 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
750 (cp_build_modify_expr): Likewise.
751 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
752 (cp_parser_objc_method_definition_list): Likewise.
753 (cp_parser_objc_property_decl): New.
754 (cp_parser_objc_property_attrlist): New.
755 (cp_parser_objc_at_property): New.
757 2010-10-14 Richard Guenther <rguenther@suse.de>
760 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
761 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
763 * error.c (dump_type): Handle NULLPTR_TYPE.
764 (dump_type_prefix): Likewise.
765 (dump_type_suffix): Likewise.
766 * mangle.c (write_type): Likewise.
767 * name-lookup.c (arg_assoc_type): Likewise.
768 * rtti.c (typeinfo_in_lib_p): Likewise.
769 * pt.c (tsubst): Likewise.
771 2010-10-13 Jason Merrill <jason@redhat.com>
774 * class.c (fixup_attribute_variants): New fn.
775 * cp-tree.h: Declare it.
776 * pt.c (instantiate_class_template): Call it.
777 * semantics.c (begin_class_definition): Call it.
779 2010-10-13 Richard Henderson <rth@redhat.com>
781 * cp-lang.c (cp_eh_personality): Update call to
782 build_personality_function.
783 * except.c (choose_personality_routine): Update function comment.
785 2010-10-13 Richard Guenther <rguenther@suse.de>
787 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
788 clear DECL_CHAIN of NAMESPACE_DECLs.
790 2010-10-11 Martin Jambor <mjambor@suse.cz>
793 * cp-tree.h (current_class_ref): Check that cp_function_chain is
795 * call.c (build_cxx_call): Likewise.
797 2010-10-10 Jason Merrill <jason@redhat.com>
799 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
800 (tsubst_default_arguments): Only do this once for cloned fns.
801 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
803 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
804 (tsubst_copy_and_build): Likewise.
805 (tsubst_initializer_list): Likewise.
806 (tsubst_copy): Change default to gcc_unreachable. Handle
807 OVERLOAD and PTRMEM_CST.
809 2010-10-10 Jason Merrill <jason@redhat.com>
813 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
815 2010-10-07 Andi Kleen <ak@linux.intel.com>
817 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
818 (cc1plus-dummy): Remove.
819 (cc1plus-checksum): Change to run checksum over object files
822 2010-10-08 Joseph Myers <joseph@codesourcery.com>
824 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
826 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
828 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
830 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
832 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
833 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
834 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
835 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
836 * parser.c (cp_parser_objc_encode_expression): Updated comment.
838 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
840 Merge from apple/trunk branch on FSF servers.
842 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
845 * parser.c (cp_parser_objc_interstitial_code): Recognize
846 and parse RID_NAMESPACE keyword.
848 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
850 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
851 finding ellipsis, before checking for attributes.
853 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
855 Merge from apple/trunk branch on FSF servers.
856 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
857 longer existing gcc/c-common.def.
859 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
862 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
863 * parser.c (cp_parser_objc_encode_expression): Build a templatized
864 parse tree for @encode(T).
866 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
869 * c-common.def: Add new expression code AT_ENCODE_EXPR.
871 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
874 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
875 code folding offsetof-like computations.
877 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
880 * parser.c (cp_parser_objc_class_interface): If no identifier
881 follows an @interface token, stop parsing the interface after
883 (cp_parser_objc_class_implementation): If no identifier follows an
884 @implementation token, stop parsing the implementation after
887 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
890 * parser.c (cp_parser_objc_method_keyword_params): If the required
891 colon is not found while parsing parameters, stop parsing them.
893 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
896 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
897 @end after detecting it. Print an error if @end is found without
899 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
900 detecting it. Fixed reading the next token when continuing
901 because of an error in a method signature. Print an error if EOF
902 is found without an '@end'.
903 (cp_parser_objc_method_definition_list): Same change.
905 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
907 Merge from apple/trunk branch on FSF servers:
909 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
912 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
913 method parameters and issue error.
914 (cp_parser_objc_method_definition_list): Check for invalid tokens
915 which cannot start a function definition.
917 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
920 * parser.c (cp_parser_objc_message_args): Check for missing message
921 arguments and syntax error.
923 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
926 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
929 2005-08-15 Ziemowit Laski <zlaski@apple.com>
932 * parser.c (cp_parser_objc_interstitial_code): Catch stray
933 '{' and '}' tokens and issue appropriate errors.
935 2005-08-02 Ziemowit Laski <zlaski@apple.com>
938 (cp_parser_statement_seq_opt): In addition to '}' and
939 end-of-file, a statement sequence may also be terminated
942 2010-10-05 Joseph Myers <joseph@codesourcery.com>
944 * cp-tree.h (cxx_print_error_function,
945 cxx_initialize_diagnostics): Declare using diagnostic_context
948 2010-10-04 Andi Kleen <ak@linux.intel.com>
950 * Make-lang.in (g++, cc1plus): Add + to build rule.
952 2010-10-04 Jason Merrill <jason@redhat.com>
954 * tree.c (decl_storage_duration): New.
955 * cp-tree.h: Declare it.
956 (duration_kind): Return values.
958 2010-10-03 Jason Merrill <jason@redhat.com>
960 * typeck.c (require_complete_type_sfinae): Add complain parm to...
961 (require_complete_type): ...this function.
962 (cp_build_array_ref, convert_arguments): Use it.
963 (convert_for_initialization, cp_build_modify_expr): Likewise.
964 * cp-tree.h: Declare it.
965 * call.c (build_over_call): Use it.
967 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
969 merge from FSF 'apple/trunk' branch.
970 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
973 * cp/parser.c (cp_parser_objc_interstitial_code): For
974 @optional/@required set the optional/required flag.
976 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
978 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
979 and indentation when finding an Objective-C++ CPP_AT_NAME token.
981 2010-09-29 Richard Guenther <rguenther@suse.de>
983 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
984 (CP_TYPE_CONTEXT): Similar.
985 (FROB_CONTEXT): Frob global_namespace to the global
986 TRANSLATION_UNIT_DECL.
987 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
988 set DECL_CONTEXT of global_namespace to it.
989 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
990 instead of zeroing context.
991 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
992 (grokfndecl): Likewise.
993 (start_preparsed_function): Likewise.
994 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
995 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
996 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
997 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
998 (push_template_decl_real): Likewise.
999 (tsubst_friend_class): Likewise. Adjust context comparisons.
1000 (instantiate_class_template): Use CP_TYPE_CONTEXT.
1001 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
1002 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
1005 2010-09-29 Yao Qi <yao@codesourcery.com>
1007 * decl.c (get_atexit_node): Fix typo.
1009 2010-09-28 Jason Merrill <jason@redhat.com>
1011 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
1012 (real_lvalue_p): Take const_tree.
1013 * cp-tree.h: Adjust.
1014 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
1015 (cp_build_addr_expr_1): Likewise.
1017 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1019 Partially merged from apple/trunk branch on FSF servers:
1020 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1021 Radar 3803157 (method attributes)
1023 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
1024 (cp_parser_objc_method_tail_params_opt): Likewise.
1025 (cp_parser_objc_method_signature): Likewise.
1026 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
1027 (cp_parser_objc_method_prototype_list): Handle attributes.
1028 (cp_parser_objc_method_definition_list): Likewise.
1030 2010-09-28 Richard Henderson <rth@redhat.com>
1032 * cp-lang.c: Include "target.h".
1033 (cp_eh_personality): Use targetm.except_unwind_info.
1034 * Make-lang.in (cp-lang.o): Update deps.
1036 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1038 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
1039 (cp_parser_declaration): Parse prefix attributes for ObjC++.
1040 (cp_parser_objc_protocol_declaration): Handle attributes.
1041 (cp_parser_objc_class_interface): Likewise.
1042 (cp_parser_objc_declaration): Likewise.
1044 2010-09-27 Jason Merrill <jason@redhat.com>
1046 Require lvalues as specified by the standard.
1047 * typeck.c (lvalue_or_else): Use real_lvalue_p.
1048 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
1049 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
1050 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
1051 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
1052 (build_const_cast_1): Adjust.
1053 * cp-tree.h: Declare new fns.
1054 * call.c (build_this, convert_like_real, build_over_call): Adjust.
1055 (initialize_reference): Adjust.
1056 * class.c (build_base_path, convert_to_base_statically): Adjust.
1057 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
1058 * cvt.c (build_up_reference, convert_to_reference): Adjust.
1059 * decl.c (register_dtor_fn): Adjust.
1060 * decl2.c (build_offset_ref_call_from_tree): Adjust.
1061 * except.c (initialize_handler_parm): Adjust.
1062 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
1063 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
1064 * tree.c (stabilize_expr): Adjust.
1066 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1068 Merge from apple/trunk branch on FSF servers:
1070 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1073 * typeck.c (composite_pointer_type): Call objc_have_common_type
1074 when comparing two objective-c pointer types.
1076 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1079 * call.c (standard_conversion): Do not issue warnings when
1080 comparing ObjC pointer types.
1082 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1085 * call.c (standard_conversion): Allow for a pointer conversion
1086 between any two ObjC pointer types.
1087 * typeck.c (composite_pointer_type): Determine common type
1088 for two ObjC pointer types.
1090 2010-09-24 Jan Hubicka <jh@suse.cz>
1092 * decl.c (finish_function): Use decl_replaceable_p
1093 * method.c (make_alias_for_thunk): Update call of
1094 cgraph_same_body_alias.
1096 2010-09-24 Jason Merrill <jason@redhat.com>
1098 * decl.c (compute_array_index_type): Remember type dependence of
1100 * pt.c (dependent_type_p_r): Don't recompute it here.
1102 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
1103 reference and pointer to the same type as "*" or "&".
1105 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
1107 * typeck.c (warn_args_num): Use warning 'too many arguments to
1108 method [methodname]' for an Objective-C method instead of the less
1109 satisfactory 'too many arguments to function' (with no method
1112 2010-09-21 Jason Merrill <jason@redhat.com>
1114 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
1115 special handling if we know the member.
1117 2010-09-18 Jason Merrill <jason@redhat.com>
1119 * call.c (compare_ics): Do lvalue/rvalue reference binding
1120 comparison for ck_list, too.
1122 2010-09-15 Jason Merrill <jason@redhat.com>
1124 * semantics.c (finish_id_expression): Diagnose use of function
1125 parms in evaluated context outside function body.
1127 * decl2.c (grokbitfield): Diagnose non-integral width.
1129 * call.c (convert_like_real): Use the underlying type of the
1130 reference for the temporary.
1132 2010-09-15 Jakub Jelinek <jakub@redhat.com>
1135 * class.c (build_vtbl_initializer): Use fn instead of init's operand
1136 as first argument to FDESC_EXPR.
1138 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
1141 * decl.c (grokdeclarator): Check build_memfn_type return value
1142 for error_mark_node.
1144 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1146 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
1147 (begin_range_for_stmt): Likewise.
1149 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
1151 Implement range-based for-statements.
1152 * cp-tree.def (RANGE_FOR_STMT): New.
1153 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
1154 (cp_convert_range_for): Declare.
1155 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
1156 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
1157 * semantics.c (begin_range_for_stmt): New.
1158 (finish_range_for_decl): New.
1159 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1160 (perform_koenig_lookup): Add extra argument include_std.
1161 * parser.c (cp_parser_c_for): New with code from
1162 cp_parser_iteration_statement().
1163 (cp_parser_range_for): New.
1164 (cp_convert_range_for): New.
1165 (cp_parser_iteration_statement): Add range-for support.
1166 (cp_parser_condition): Adjust comment.
1167 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1169 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1170 * cxx-pretty-print.c: Likewise.
1171 * lex.c (cxx_init): Likewise.
1172 * name-lookup.c (lookup_function_nonclass): Add extra argument
1174 (lookup_arg_dependent): Likewise.
1175 * name-lookup.h: Likewise.
1177 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1180 * error.c (maybe_warn_cpp0x): Add new warning
1181 CPP0X_INLINE_NAMESPACES.
1182 * parser.c (cp_parser_namespace_definition): Likewise.
1183 * cp-tree.h (cpp0x_warn_str): Likewise.
1185 2010-09-10 Richard Guenther <rguenther@suse.de>
1187 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1188 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1190 2010-09-10 Jan Hubicka <jh@suse.cz>
1192 PR tree-optimization/45605
1193 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1196 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1199 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1200 before calling fold_decl_constant_value.
1202 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1204 * cp-tree.h (build_enumerator): Add new location_t parameter.
1205 (build_lang_decl_loc): New function.
1206 * decl.c (build_enumerator): New parameter loc. Use it when calling
1207 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1208 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1209 * parser.c (cp_parser_enumerator_definition): Ditto.
1210 * lex.c (build_lang_decl_loc): New function.
1212 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1217 * tree.c (strip_typedefs): Strip typedefs from the context of
1220 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1222 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1223 * call.c (build_conditional_expr): Likewise.
1224 (convert_arg_to_ellipsis): Likewise.
1226 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1228 * parser.c (make_pointer_declarator, make_reference_declarator,
1229 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1230 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1232 2010-09-06 Jason Merrill <jason@redhat.com>
1234 * call.c (implicit_conversion): Fix value-init of enums.
1235 (convert_like_real): Likewise.
1237 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1239 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1240 (fold_non_dependent_expr): ...here.
1241 (convert_nontype_argument): Use it. Take complain parm.
1242 Use perform_implicit_conversion instead of ocp_convert.
1243 Allow cv-qual changes.
1244 (convert_template_argument): Pass complain down.
1245 (tsubst_template_arg): Suppress constant expression warnings.
1248 * method.c (synthesized_method_walk): In constructors, also check
1249 subobject destructors.
1251 * semantics.c (finish_compound_literal): Always build a
1254 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1257 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1259 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1262 * parser.c (cp_parser_omp_atomic): Handle boolean
1263 {PRE,POST}_INCREMENT.
1265 2010-08-29 Jason Merrill <jason@redhat.com>
1268 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1269 after tentative parsing.
1271 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1273 * Make-lang.in (g++spec.o): Update dependencies.
1274 * g++spec.c: Include opts.h
1275 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1276 (lang_specific_driver): Use cl_decoded_option structures.
1278 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1280 * call.c: Use FOR_EACH_VEC_ELT.
1281 * class.c: Likewise.
1283 * decl2.c: Likewise.
1284 * error.c: Likewise.
1285 * except.c: Likewise.
1286 * mangle.c: Likewise.
1287 * method.c: Likewise.
1288 * name-lookup.c: Likewise.
1289 * parser.c: Likewise.
1292 * semantics.c: Likewise.
1293 * typeck2.c: Likewise.
1295 2010-08-19 Jason Merrill <jason@redhat.com>
1297 * call.c (reference_related_p): Check for error_mark_node.
1298 (add_function_candidate): Check it instead of
1299 same_type_ignoring_top_level_qualifiers_p.
1302 * init.c (build_new_1): Don't use build_value_init in a template.
1303 (build_value_init): Make sure we don't.
1306 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1307 of empty class CONSTRUCTOR.
1309 * except.c (pending_noexcept, pending_noexcept_checks): New.
1310 (perform_deferred_noexcept_checks): New.
1311 (maybe_noexcept_warning): Split from...
1312 (finish_noexcept_expr): ...here. Adjust.
1313 * decl2.c (cp_write_global_declarations): Call
1314 perform_deferred_noexcept_checks.
1315 * cp-tree.h: And declare it.
1317 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1320 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1323 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1325 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1326 or if -fms-extensions is enabled check, check permissive.
1328 2010-08-09 Jason Merrill <jason@redhat.com>
1331 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1333 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1335 * call.c (add_builtin_candidates): Use VECs for local variable
1336 `types'. Adjust remainder of function accordingly.
1338 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1340 * name-lookup.c (is_associated_namespace): Convert local variables
1341 to be VECs instead of TREE_LISTs.
1343 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1345 * tree.c (varargs_function_p): Use stdarg_p.
1347 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1349 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1350 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1351 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1352 Change type to a VEC.
1353 (unparsed_funs_with_default_args): Define.
1354 (unparsed_funs_with_definitions): Define.
1355 (push_unparsed_function_queues): New function.
1356 (cp_parser_new): Call it.
1357 (pop_unparsed_function_queues): New function.
1358 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1359 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1360 (cp_parser_save_member_function_body): Likewise.
1361 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1362 and pop_unparsed_function_queues.
1363 (cp_parser_late_parsing_default_args): Likewise.
1364 (cp_parser_save_default_args): Use VEC_safe_push.
1366 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1368 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1370 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1372 * decl.c (poplevel): Adjust for type changes.
1373 (declare_local_label): Likewise.
1375 2010-08-06 Jason Merrill <jason@redhat.com>
1377 * typeck.c (complete_type_or_maybe_complain): Split out from...
1378 (complete_type_or_else): Here.
1379 (build_class_member_access_expr): Call it.
1380 (finish_class_member_access_expr): Likewise.
1381 * call.c (build_special_member_call): Likewise.
1382 * cvt.c (build_expr_type_conversion): Likewise.
1383 * init.c (build_new): Likewise.
1384 * typeck2.c (build_functional_cast): Likewise.
1385 * cp-tree.h: Declare it.
1387 * init.c (build_value_init): Add complain parm.
1388 (build_value_init_noctor): Likewise.
1389 (perform_member_init): Pass it.
1390 (expand_aggr_init_1): Likewise.
1391 (build_new_1): Likewise.
1392 (build_vec_init): Likewise.
1393 * pt.c (tsubst_expr): Likewise.
1394 * typeck2.c (build_functional_cast): Likewise.
1395 * cp-tree.h: Adjust.
1396 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1398 * typeck.c (decay_conversion): Any expression with type nullptr_t
1401 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1404 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1406 2010-07-27 Jason Merrill <jason@redhat.com>
1408 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1409 from build_value_init.
1410 * init.c (build_value_init_noctor): Give error for unknown array
1413 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1415 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1417 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1419 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1420 c_common_initialize_diagnostics.
1421 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1422 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1424 2010-07-21 Jason Merrill <jason@redhat.com>
1426 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1428 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1431 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1434 * pt.c (instantiate_class_template): Propagate the template's
1435 location to its instance.
1437 2010-07-20 Jason Merrill <jason@redhat.com>
1440 * pt.c (tsubst_copy_and_build): Rework last change.
1443 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1446 2010-07-19 Jason Merrill <jason@redhat.com>
1449 * semantics.c (finish_decltype_type): Correct decltype
1450 of parenthesized rvalue reference variable.
1453 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1454 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1456 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1459 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1461 * cp-tree.h: Adjust declaration.
1462 * init.c (perform_member_init): Adjust caller.
1463 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1464 * typeck2.c (store_init_value): Likewise.
1465 (build_functional_cast): Pass complain argument to
1466 build_x_compound_expr_from_list.
1468 2010-07-16 Jason Merrill <jason@redhat.com>
1471 * pt.c (process_partial_specialization): Diagnose partial
1472 specialization after instantiation.
1473 (most_specialized_class): Add complain parm.
1475 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1477 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1479 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1480 cp_build_function_call.
1482 2010-07-15 Jason Merrill <jason@redhat.com>
1485 * call.c (add_function_candidate): If we're working on an implicit
1486 declaration, don't consider candidates that won't match.
1487 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1488 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1491 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1492 (TYPE_HAS_USER_OPEQ): New.
1493 * decl.c (grok_special_member_properties): Set it.
1494 * class.c (add_implicitly_declared_members): Don't lazily declare
1495 constructors/operator= if a base or member has a user-declared one.
1496 (check_bases_and_members, check_bases): Adjust.
1497 (check_field_decls, check_field_decl): Adjust.
1499 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1501 * decl.c (integer_three_node): Remove.
1502 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1503 * cp-tree.h (integer_three_node): Remove.
1505 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1507 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1509 * class.c: Likewise.
1510 * cp-gimplify.c: Likewise.
1512 * decl2.c: Likewise.
1514 * mangle.c: Likewise.
1515 * name-lookup.c: Likewise.
1516 * optimize.c: Likewise.
1517 * parser.c: Likewise.
1520 * search.c: Likewise.
1521 * semantics.c: Likewise.
1522 * typeck.c: Likewise.
1523 * typeck2.c: Likewise.
1525 2010-07-14 Jason Merrill <jason@redhat.com>
1527 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1528 (build_field_list): Cache field type.
1530 Implement C++0x unrestricted unions (N2544)
1531 * class.c (check_field_decl): Loosen union handling in C++0x.
1532 * method.c (walk_field_subobs): Split out from...
1533 (synthesized_method_walk): ...here. Set msg before loops.
1534 (process_subob_fn): Check for triviality in union members.
1535 * init.c (sort_mem_initializers): Splice out uninitialized
1536 anonymous unions and union members.
1537 (push_base_cleanups): Don't automatically destroy anonymous unions
1540 2010-07-13 Jason Merrill <jason@redhat.com>
1543 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1544 (TYPE_HAS_USER_OPEQ): New.
1545 * decl.c (grok_special_member_properties): Set it.
1546 * class.c (add_implicitly_declared_members): Don't lazily declare
1547 constructors/operator= if a base or member has a user-declared one.
1548 (check_bases_and_members, check_bases): Adjust.
1549 (check_field_decls, check_field_decl): Adjust.
1550 * method.c (synthesized_method_walk): Initialize check_vdtor.
1553 * mangle.c (write_type): Canonicalize.
1554 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1555 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1557 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1560 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1562 * typeck.c (get_delta_difference): Update prototype, add a
1563 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1564 add checks for error_mark_node.
1565 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1566 parameter; update lookup_base call.
1567 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1568 parameter; update get_delta_difference call and add check for
1570 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1571 parameter; update get_delta_difference call and add check for
1572 error_mark_node; update build_ptrmemfunc call.
1573 (build_static_cast_1): Adjust convert_ptrmem call.
1574 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1575 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1576 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1577 and build_ptrmemfunc calls.
1578 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1580 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1583 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1584 adjust build_special_member_call call, pass complain.
1585 (convert_like_real): Adjust build_temp call, pass complain.
1587 2010-07-09 Jason Merrill <jason@redhat.com>
1590 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1591 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1592 Set BV_LOST_PRIMARY.
1593 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1595 2010-07-08 Jason Merrill <jason@redhat.com>
1598 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1599 virtual bases for covariant thunks.
1601 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1603 * cp-tree.h: Do not include toplev.h.
1605 2010-07-06 Jason Merrill <jason@redhat.com>
1608 * call.c (is_std_init_list): Look through typedefs.
1611 * init.c (build_offset_ref): If scope isn't dependent,
1612 don't exit early. Look at TYPE_MAIN_VARIANT.
1613 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1615 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1617 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1619 * cp-tree.h (impl_conv_void): New type.
1620 (convert_to_void): Adjust prototype.
1621 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1622 diagnostic for easy translation. Change caller.
1623 * typeck.c: Update call to convert_to_void.
1624 * semantics.c: Likewise.
1627 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1629 * decl.c (cp_finish_decl): Call add_local_decl.
1630 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1632 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1634 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1637 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1640 * parser.c (cp_parser_primary_expression): Error if local template is
1643 2010-07-02 Le-Chun Wu <lcwu@google.com>
1646 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1647 (variable or type) shadows another type.
1649 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1652 * typeck.c (convert_for_assignment): When converting a convertible
1653 vector type or objc++ types, call mark_rvalue_use.
1654 * typeck2.c (build_m_component_ref): Use return values from
1655 mark_rvalue_use or mark_lvalue_use.
1656 * class.c (build_base_path): Likewise.
1657 * call.c (build_conditional_expr): Likewise.
1659 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1662 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1665 2010-07-01 Richard Guenther <rguenther@suse.de>
1667 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1668 predicate we are looking for, allow non-gimplified
1671 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1674 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1675 arg is NULL_TREE too.
1676 * call.c (convert_class_to_reference): Return error_mark_node when
1679 2010-06-30 Michael Matz <matz@suse.de>
1681 * repo.c (finish_repo): Fix typo.
1683 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1685 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1687 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1689 * repo.c (pending_repo): Change type to a VEC.
1690 (finish_repo): Adjust for new type of pending_repo.
1691 (repo_emit_p): Likewise.
1693 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1695 * tree.c: Include gimple.h. Do not include tree-flow.h
1696 * decl.c: Do not include tree-flow.h
1697 * Make-lang.in: Adjust dependencies.
1699 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1701 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1702 (incomplete_vars): Adjust comment. Change type to a VEC.
1703 (maybe_register_incomplete_var): Adjust for new type.
1704 (complete_vars): Adjust iteration over incomplete_vars.
1706 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1708 * decl.c (struct named_label_entry): Change type of bad_decls field
1710 (poplevel_named_label_1): Adjust for new type of bad_decls.
1711 (check_goto): Likewise.
1713 2010-06-29 Jason Merrill <jason@redhat.com>
1715 Enable implicitly declared move constructor/operator= (N3053).
1716 * class.c (add_implicitly_declared_members): A class with no
1717 explicitly declared copy or move constructor gets both declared
1718 implicitly, and similarly for operator=.
1719 (check_bases): A type with no copy ctor does not inhibit
1720 a const copy ctor in a derived class. It does mean the derived
1722 (check_field_decl): Likewise.
1723 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1724 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1725 (trivially_copyable_p): Likewise.
1726 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1727 * class.c (finish_struct_bits): Likewise.
1728 * tree.c (build_target_expr_with_type): Likewise.
1729 * typeck2.c (store_init_value): Likewise.
1731 Enable implicitly deleted functions (N2346)
1732 * class.c (check_bases_and_members): Adjust lambda flags.
1733 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1735 * decl2.c (mark_used): Adjust error for use of deleted function.
1737 Machinery to support implicit delete/move.
1738 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1739 has_complex_move_ctor, has_complex_move_assign bitfields.
1740 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1741 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1742 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1743 (enum special_function_kind): Add sfk_move_assignment.
1744 (LOOKUP_SPECULATIVE): New.
1745 * call.c (build_over_call): Return early if it's set.
1746 (build_over_call): Use trivial_fn_p.
1747 * class.c (check_bases): If the base has no default constructor,
1748 the derived one is non-trivial. Handle move ctor/op=.
1749 (check_field_decl): Likewise.
1750 (check_bases_and_members): Handle move ctor/op=.
1751 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1752 (type_has_move_constructor, type_has_move_assign): New.
1753 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1754 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1755 (trivial_fn_p): New.
1756 (do_build_copy_constructor): Use it.
1757 (do_build_assign_ref): Likewise. Handle move assignment.
1758 (build_stub_type, build_stub_object, locate_fn_flags): New.
1759 (locate_ctor): Use locate_fn_flags.
1760 (locate_copy, locate_dtor): Remove.
1761 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1762 (process_subob_fn, synthesized_method_walk): New.
1763 (maybe_explain_implicit_delete): New.
1764 (implicitly_declare_fn): Use synthesized_method_walk,
1765 type_has_trivial_fn, and type_set_nontrivial_flag.
1766 (defaulted_late_check): Set DECL_DELETED_FN.
1767 (defaultable_fn_check): Handle sfk_move_assignment.
1768 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1769 implicitly deleted move ctor/op=.
1770 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1771 (lookup_fnfields_slot): New.
1772 * semantics.c (omp_clause_info_fndecl): Remove.
1773 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1774 get_copy_assign, trivial_fn_p.
1775 (trait_expr_value): Adjust call to locate_ctor.
1776 * tree.c (special_function_p): Handle sfk_move_assignment.
1778 * class.c (type_has_virtual_destructor): New.
1779 * cp-tree.h: Declare it.
1780 * semantics.c (trait_expr_value): Use it.
1782 * call.c (build_over_call): Only give warnings with tf_warning.
1784 * name-lookup.c (pop_scope): Handle NULL_TREE.
1786 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1787 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1788 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1789 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1790 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1791 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1792 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1793 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1794 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1795 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1796 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1797 * search.c, semantics.c, tree.c: Adjust.
1799 * pt.c (dependent_scope_ref_p): Remove.
1800 (value_dependent_expression_p): Don't call it.
1801 (type_dependent_expression_p): Here either.
1802 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1803 if the scope isn't dependent.
1805 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1809 * pt.c (has_value_dependent_address): New.
1810 (value_dependent_expression_p): Check it.
1811 (convert_nontype_argument): Likewise. Call decay_conversion before
1812 folding if we want a pointer.
1813 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1814 scope is the current instantiation.
1816 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1819 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1822 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1824 * init.c: Do not include except.h.
1827 * cp-lang.c: Likewise.
1829 * semantics.c: Likewise.
1830 * decl2.c: Likewise.
1831 * except.c: Likewise.
1832 (init_exception_processing): Do not set the removed
1833 lang_protect_cleanup_actions here.
1834 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1835 (doing_eh): New, moved from except.c but removed the do_warning flag.
1836 (expand_start_catch_block): Update doing_eh call.
1837 (expand_end_catch_block): Likewise.
1838 (build_throw): Likewise.
1839 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1840 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1841 cp_protect_cleanup_actions.
1842 * Make-lang.in: Update dependencies.
1844 2010-06-26 Jason Merrill <jason@redhat.com>
1846 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1847 constructor called with a single argument that takes a reference
1848 to the constructor's class.
1849 (BAD_CONVERSION_RANK): New.
1850 (compare_ics): Use it to compare bad ICSes.
1852 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1854 * lang-specs.h: Remove +e handling.
1856 2010-06-24 Andi Kleen <ak@linux.intel.com>
1858 * parser.c: (cp_parser_question_colon_clause):
1859 Switch to use cp_lexer_peek_token.
1860 Call warn_for_omitted_condop. Call pedwarn for omitted
1863 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1866 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1867 datum and mark_rvalue_use on component.
1870 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1871 the CALL_EXPR has no arguments.
1873 2010-06-21 Jason Merrill <jason@redhat.com>
1875 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1877 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1880 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1882 * name-lookup.c (struct arg_lookup): Convert namespaces and
1883 classes fields to VEC.
1884 (arg_assoc_namespace): Adjust for new type of namespaces.
1885 (arg_assoc_class): Adjust for new type of classes.
1886 (lookup_arg_dependent): Use make_tree_vector and
1887 release_tree_vector.
1888 * typeck2.c (build_x_arrow): Use vec_member.
1890 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1893 * error.c (dump_decl): Better wording for anonymous namespace.
1895 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1897 * class.c (build_vtbl_initializer): Adjust computation of new_position
1898 and which entry to add padding for.
1900 2010-06-16 Jason Merrill <jason@redhat.com>
1902 * except.c (check_noexcept_r): Return the problematic function.
1903 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1904 * pt.c (tsubst_copy_and_build): Pass it.
1905 * parser.c (cp_parser_unary_expression): Likewise.
1906 * cp-tree.h: Adjust prototype.
1908 * method.c (defaulted_late_check): Give the defaulted method
1909 the same exception specification as the implicit declaration.
1911 2010-06-15 Jason Merrill <jason@redhat.com>
1913 * class.c (add_implicitly_declared_members): Implicit assignment
1914 operators can also be virtual overriders.
1915 * method.c (lazily_declare_fn): Likewise.
1917 * call.c (convert_like_real): Give "initializing argument of"
1918 information for ambiguous conversion. Give source position
1921 * call.c (print_z_candidates): Do print viable deleted candidates.
1922 (joust): Don't choose a deleted function just because its worst
1923 conversion is better than another candidate's worst.
1925 * call.c (convert_like_real): Don't complain about
1926 list-value-initialization from an explicit constructor.
1928 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1929 DECL_SOURCE_LOCATION directly.
1931 * class.c (type_has_user_provided_default_constructor): Use
1934 * call.c (is_subseq): Handle ck_aggr, ck_list.
1935 (compare_ics): Treat an aggregate or ambiguous conversion to the
1936 same type as involving the same function.
1938 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1940 * typeck.c (convert_for_assignment): Fix comment. Change message
1941 format from %d to %qP.
1942 (convert_for_initialization): Fix comment.
1944 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1946 * cp-tree.h (expr_list_kind): New type.
1947 (impl_conv_rhs): New type.
1948 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1950 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1951 diagnostics for easy translation. Change caller.
1952 (convert_for_initialization): Use impl_conv_rhs and change caller.
1953 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1954 diagnostics for easy translation. Change caller.
1955 * decl.c (bad_spec_place): New enum.
1956 (bad_specifiers): Use it and emit the diagnostics for easy
1957 translation. Change caller.
1958 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1960 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1962 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1964 * decl2.c (cp_write_global_declarations): Adjust for new type of
1965 decl_namespace_list.
1966 * name-lookup.c (current_decl_namespace): Likewise.
1967 (push_decl_namespace): Likewise.
1968 (pop_decl_namespace): Likewise.
1970 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1972 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1973 instead of build_function_type.
1974 * decl.c (cxx_init_decl_processing): Likewise.
1975 (declare_global_var): Likewise.
1976 (get_atexit_node): Likewise.
1977 (expand_static_init): Likewise.
1978 * decl2.c (start_objects): Likewise.
1979 (start_static_storage_duration_function): Likewise.
1980 * except.c (init_exception_processing): Likewise.
1981 (build_exc_ptr): Likewise.
1982 (build_throw): Likewise.
1983 * rtti.c (throw_bad_cast): Likewise.
1984 (throw_bad_typeid): Likewise.
1985 (build_dynamic_cast_1): Likewise.
1987 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1989 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1990 (build_op_delete_call): Likewise.
1991 (build_over_call): Likewise.
1992 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1993 * pt.c (process_partial_specialization): Likewise.
1994 (tsubst_template_args): Likewise.
1995 * semantics.c (finish_asm_stmt): Likewise.
1997 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1999 * decl.c (record_key_method_defined): New, broken out of ...
2000 (finish_function): ... here. Call it.
2001 (start_decl): Treat aliases as definitions.
2003 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2005 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
2007 * pt.c (maybe_process_partial_specialization): Likewise.
2008 (register_specialization): Likewise.
2009 (add_pending_template): Likewise.
2010 (lookup_template_class): Likewise.
2011 (push_tinst_level): Likewise.
2013 * parser.c (cp_lexer_new_main): Likewise.
2014 (cp_lexer_new_from_tokens): Likewise.
2015 (cp_token_cache_new): Likewise.
2016 (cp_parser_context_new): Likewise.
2017 (cp_parser_new): Likewise.
2018 (cp_parser_nested_name_specifier_opt): Likewise.
2019 (cp_parser_template_id): Likewise.
2021 * name-lookup.c (binding_entry_make): Likewise.
2022 (binding_table_construct): Likewise.
2023 (binding_table_new): Likewise.
2024 (cxx_binding_make): Likewise.
2025 (pushdecl_maybe_friend): Likewise.
2026 (begin_scope): Likewise.
2027 (push_to_top_level): Likewise.
2029 * lex.c (init_reswords): Likewise.
2030 (retrofit_lang_decl): Likewise.
2031 (cxx_dup_lang_specific_decl): Likewise.
2032 (copy_lang_type): Likewise.
2033 (cxx_make_type): Likewise.
2035 * decl.c (make_label_decl): Likewise.
2036 (check_goto): Likewise.
2037 (start_preparsed_function): Likewise.
2038 (save_function_data): Likewise.
2040 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2042 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2044 * class.c (finish_struct_1): Likewise.
2046 * cp-tree.h (struct lang_type): Add variable_size GTY option.
2047 (struct lang_decl): Likewise.
2049 * parser.c (cp_parser_new): Update comment to not reference
2052 2010-06-07 Jason Merrill <jason@redhat.com>
2055 * error.c (dump_parameters): Mask out TFF_SCOPE.
2056 (dump_simple_decl): Don't print the scope of a PARM_DECL.
2057 (dump_scope): Remove no-op mask.
2060 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
2062 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
2063 * init.c (build_offset_ref): Use it.
2064 * pt.c (maybe_process_partial_specialization): Use it.
2065 (instantiate_class_template): Use it.
2066 * search.c (lookup_base): Use it.
2068 2010-06-07 Jakub Jelinek <jakub@redhat.com>
2071 * expr.c (mark_exp_read): Handle INDIRECT_REF.
2072 * cvt.c (convert_to_void): Handle INDIRECT_REF like
2073 handled_component_p.
2076 * decl.c (initialize_local_var): If TREE_USED is set on the type,
2077 set also DECL_READ_P on the decl.
2079 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2082 * cp-tree.h (typedef_variant_p): Move this declaration to
2084 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2085 * decl.c (grokdeclarator): Do not rename debug info of an
2086 anonymous tagged type named by a typedef.
2088 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
2091 * class.c (check_field_decls): Move the call to
2092 check_bitfield_decl before trying to set the
2093 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
2095 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2097 * typeck.c: Update include path for moved files.
2100 * cp-gimplify.c: Likewise.
2101 * cp-lang.c: Likewise.
2103 * semantics.c: Likewise.
2104 * cxx-pretty-print.h: Likewise.
2105 * decl2.c: Likewise.
2106 * parser.c: Likewise.
2107 * cp-objcp-common.c: Likewise.
2108 * cp-tree.h: Likewise.
2109 * name-lookup.c: Likewise.
2111 * name-lookup.h: Likewise.
2112 * config-lang.in: Update paths in gtfiles for files in c-family/.
2113 * Make-lang.in: Likewise.
2115 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
2117 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
2118 * typeck.c (build_ptrmemfunc): Likewise.
2120 2010-06-04 Jason Merrill <jason@redhat.com>
2122 * typeck2.c (merge_exception_specifiers): Adjust merging of
2123 throw() and noexcept(true).
2125 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
2126 using an uninitialized variable.
2128 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
2129 (pp_cxx_expression): Likewise.
2131 Implement noexcept-specification (15.4)
2132 * parser.c (cp_parser_exception_specification_opt): Parse it.
2133 Give -Wdeprecated warning about throw() specs.
2134 * pt.c (tsubst_exception_specification): Handle it.
2135 * error.c (dump_exception_spec): Handle it.
2136 (dump_expr): Handle NOEXCEPT_EXPR.
2137 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
2138 * typeck.c (comp_except_specs): Handle compatibility rules.
2139 Change exact parm to take an enum.
2140 * typeck2.c (merge_exception_specifiers): Handle noexcept.
2141 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
2142 (type_throw_all_p, build_noexcept_spec): New fns.
2143 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
2144 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
2145 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
2146 (noexcept_true_spec, noexcept_false_spec): New macros.
2147 * name-lookup.c (pushdecl_maybe_friend): Adjust.
2148 * search.c (check_final_overrider): Adjust.
2149 * decl.c (check_redeclaration_exception_specification): Adjust.
2150 (use_eh_spec_block): Use type_throw_all_p.
2151 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
2152 Give operator new a noexcept-specification in C++0x mode.
2153 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
2154 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
2156 Implement noexcept operator (5.3.7)
2157 * cp-tree.def (NOEXCEPT_EXPR): New.
2158 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2159 * cp-tree.h: Declare finish_noexcept_expr.
2160 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2161 * pt.c (tsubst_copy_and_build): And tsubst it.
2162 (type_dependent_expression_p): Handle it.
2163 (value_dependent_expression_p): Handle it.
2165 * call.c (build_conditional_expr): Never fold in unevaluated context.
2166 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2167 * semantics.c (simplify_aggr_init_expr): Likewise.
2168 * typeck.c (merge_types): Call merge_exception_specifiers.
2169 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2170 DECL_ANTICIPATED for preferring new type.
2172 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2174 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2177 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2180 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2181 on object for static data members.
2183 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2184 Jason Merrill <jason@redhat.com>
2187 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2188 with the same type, call mark_lvalue_use on both.
2190 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2192 * class.c (struct vtbl_init_data_s): Remove last_init field.
2193 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2195 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2197 (build_vtt): Likewise.
2198 (initialize_vtable): Take a VEC instead of a tree.
2199 (build_vtt_inits): Change return type to void. Take a VEC **
2200 instead of a tree *; accumulate results into said VEC.
2201 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2202 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2203 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2205 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2206 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2208 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2209 rather than tree_cons.
2210 (build_vbase_offset_vtbl_entries): Likewise.
2211 (add_vcall_offset): Likewise.
2212 (build_rtti_vtbl_entries): Likewise.
2213 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2214 * decl.c (initialize_artificial_var): Use build_constructor instead
2215 of build_constructor_from_list.
2217 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2220 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2223 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2225 * parser.c (cp_parser_mem_initializer_list): Change error text.
2227 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2229 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2230 tree_decl_map hashtab from tree_map.
2231 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2232 (init_shadowed_var_for_decl): Adjust initialization.
2235 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2236 instead of calling mark_exp_read only when not an assignment.
2239 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2240 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2241 Set DECL_VALUE_EXPR on var.
2243 2010-06-02 Jason Merrill <jason@redhat.com>
2245 * error.c (dump_type): Improve typedef handling.
2250 * name-lookup.c (same_entity_p): New.
2251 (ambiguous_decl): Multiple declarations of the same entity
2254 2010-06-01 Jason Merrill <jason@redhat.com>
2257 * call.c (add_list_candidates): Prefer the default constructor.
2258 (build_aggr_conv): Treat missing initializers like { }.
2259 * typeck2.c (process_init_constructor_record): Likewise.
2260 * init.c (expand_default_init): Use digest_init for
2261 direct aggregate initialization, too.
2263 * call.c (add_list_candidates): Split out...
2264 (build_user_type_conversion_1): ...from here.
2265 (build_new_method_call): And here.
2266 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2269 * call.c (build_list_conv): Set list-initialization flags properly.
2271 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2273 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2275 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2276 Matthew Gingell <gingell@adacore.com>
2278 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2279 * decl2.c: Include langhooks.h and c-ada-spec.h.
2280 (cpp_check, collect_source_refs, collect_ada_namespace,
2281 collect_all_refs): New functions.
2282 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2283 * lang-specs.h: Ditto.
2285 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2287 * cp-tree.h (cp_build_function_call_nary): Declare.
2288 * typeck.c (cp_build_function_call_nary): Define.
2289 * decl.c (register_dtor_fn): Use it instead of
2290 cp_build_function_call.
2291 (cxx_maybe_build_cleanup): Likewise.
2292 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2293 * except.c (do_get_exception_ptr): Likewise.
2294 (do_begin_catch): Likewise.
2295 (do_allocate_exception): Likewise.
2296 (do_free_exception): Likewise.
2297 (build_throw): Likewise. Use cp_build_function_call_vec instead
2298 of cp_build_function_call.
2299 (do_end_catch): Likewise.
2301 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2303 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2304 (struct cp_declarator): Move id_loc field up.
2306 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2308 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2309 this file is included before c-common.h. Define GCC_DIAG_STYLE
2310 before including diagnostic-core.h and toplev.h.
2311 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2312 * pt.c: Include cp-tree.h before c-common.h.
2314 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2316 * tree.c (c_register_addr_space): Add stub.
2318 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2320 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2323 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2325 Revert fix of PR c++/44188
2326 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2328 * tree.c (typedef_variant_p): Revert moving this definition to
2330 * decl.c (grokdeclarator): Revert naming typedef handling.
2332 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2334 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2335 * cp-lang.c: Don't include diagnostic.h
2336 * name-lookup.c: Include diagnostic-core.h instead of
2338 (cp_emit_debug_info_for_using): Use seen_error.
2339 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2340 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2341 * pt.c (iterative_hash_template_arg): Use seen_error.
2342 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2343 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2344 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2345 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2348 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2351 * cp-tree.h (typedef_variant_p): Move this declaration to
2353 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2354 * decl.c (grokdeclarator): Do not rename debug info of an
2355 anonymous tagged type named by a typedef.
2357 2010-05-27 Jason Merrill <jason@redhat.com>
2360 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2363 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2366 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2367 * class.c (layout_class_type): Likewise.
2368 * decl.c (finish_enum): Likewise.
2369 * mangle.c (write_builitin_type): Likewise.
2371 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2373 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2375 * decl.c (grokdeclarator): Handle __int128.
2376 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2377 (cp_parser_simple_type_specifier): Likewise.
2378 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2379 * typeck.c (cp_common_type): Handle __int128.
2380 * mangle.c (integer_type_codes): Add itk_int128 and
2381 itk_unsigned_int128.
2383 2010-05-26 Jason Merrill <jason@redhat.com>
2386 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2389 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2391 * cp-lang.c: Do not include expr.h.
2393 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2395 * decl.c: Do not include rtl.h
2396 * semantics.c: Likewise.
2398 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2400 * cp-tree.h: Do not include splay-tree.h.
2401 (struct prtmem_cst): Remove unused field and false comment.
2402 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2403 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2404 * init.c: Do not include rtl.h and expr.h.
2405 * class.c: Do not include rtl.h. Include splay-tree.h.
2406 (build_clone): Use plain NULL instead of NULL_RTX.
2407 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2408 included. Include splay-tree.h.
2409 * method.c: Do not include rtl.h and expr.h.
2410 (use_thunk): Use plain NULL instead of NULL_RTX.
2411 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2412 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2413 and target.h. Include splay-tree.h.
2414 * expr.c: Do not include rtl.h and expr.h.
2415 * pt.c: Do not include obstack.h and rtl.h.
2416 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2417 (tsubst_decl): Likewise.
2418 (instantiate_decl): Likewise.
2419 * semantics.c: Do not include exprt.h and debug.h. Explain why
2420 rtl.h has to be included.
2421 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2422 * call.c: Do not include rtl.h and expr.h.
2423 * search.c: Do not include obstack.h and rtl.h.
2424 * friend.c: Do not include rtl.h and expr.h.
2425 * Make-lang.in: Update dependencies.
2427 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2430 * parser.c (non_integral_constant): Add NIC_NONE.
2431 (required_token): Add RT_NONE.
2432 (cp_parser_unary_expression): Initialize non_constant_p
2434 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2435 (cp_parser_primary_expression, cp_parser_postfix_expression,
2436 cp_parser_cast_expression, cp_parser_binary_expression,
2437 cp_parser_functional_cast): Fix formatting.
2439 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2442 * parser.c: Remove inclusion of dyn-string.h.
2443 (non_integral_constant): New enum.
2444 (name_lookup_error): New enum.
2445 (required_token): New enum.
2446 (cp_parser_required_error): New function.
2447 (cp_parser_require): Change the type of variable token_desc to
2448 required_token and use cp_parser_required_error.
2449 (cp_parser_require_keyword): Likewise.
2450 (cp_parser_error): Use gmsgid as parameter.
2451 (cp_parser_name_lookup_error): Change the type of variable desired to
2452 name_lookup_error and put the diagnostic in the full sentences. Change
2454 (cp_parser_non_integral_constant_expression): Change the type of the
2455 variable thing to non_integral_constant and put the diagnostics in
2456 full sentences. Change caller.
2458 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2461 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2463 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2465 * error.c (cp_diagnostic_starter): Update call to
2466 diagnostic_build_prefix.
2467 (cp_print_error_function,
2468 print_instantiation_partial_context_line): Check show_column flag
2471 2010-05-24 Jason Merrill <jason@redhat.com>
2474 * decl.c (check_initializer): Don't wrap an init-list in a
2476 * init.c (build_aggr_init): Don't assume copy-initialization if
2477 init has CONSTRUCTOR_IS_DIRECT_INIT.
2478 * call.c (build_new_method_call): Sanity check.
2480 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2482 * rtti.c (tinfo_base_init): Use build_constructor instead of
2483 build_constructor_from_list. Don't cons a tree node for
2485 (generic_initializer): Use build_constructor_single instead of
2486 build_constructor_from_list.
2487 (ptr_initializer): Use build_constructor instead of
2488 build_constructor_from_list
2489 (ptm_initializer): Likewise.
2490 (class_initializer): Likewise. Take varargs instead of TRAIL.
2491 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2492 build_constructor instead of build_constructor_from_list.
2494 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2496 * semantics.c: Include bitmap.h.
2497 * Make-lang.in: Update dependencies.
2499 2010-05-22 Jan Hubicka <jh@suse.cz>
2501 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2503 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2505 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2507 * cxx-pretty-print.c: Correct merge error.
2509 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2511 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2512 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2513 (cp_printer): Handle %K here using percent_K_format.
2514 * cxx-pretty-print.c: Include tree-pretty-print.h.
2515 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2518 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2520 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2521 Clean up redundant includes.
2523 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2526 * decl.c (xref_basetypes): Return false in case of ill-formed
2529 2010-05-19 Jason Merrill <jason@redhat.com>
2531 * call.c (reference_binding): Use cp_build_qualified_type_real
2532 and cp_type_quals consistently.
2533 (add_function_candidate): Likewise.
2534 (build_conditional_expr): Likewise.
2535 (convert_like_real): Likewise.
2536 (type_passed_as): Likewise.
2537 * class.c (add_method): Likewise.
2538 (same_signature_p): Likewise.
2539 (layout_class_type): Likewise.
2540 * decl.c (cxx_init_decl_processing): Likewise.
2541 (cp_fname_init): Likewise.
2542 (grokdeclarator): Likewise.
2543 * decl2.c (cp_reconstruct_complex_type): Likewise.
2544 * init.c (build_new_1): Likewise.
2545 * method.c (do_build_copy_constructor): Likewise.
2546 (implicitly_declare_fn): Likewise.
2547 * pt.c (tsubst_aggr_type): Likewise.
2549 * rtti.c (init_rtti_processing): Likewise.
2550 (build_headof): Likewise.
2551 (build_dynamic_cast_1): Likewise.
2552 (tinfo_base_init): Likewise.
2553 (emit_support_tinfos): Likewise.
2554 * semantics.c (capture_decltype): Likewise.
2555 * tree.c (cv_unqualified): Likewise.
2556 * typeck.c (composite_pointer_type): Likewise.
2557 (string_conv_p): Likewise.
2559 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2561 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2562 * decl.c (start_decl): Likewise.
2563 * semantics.c (finish_compound_literal): Likewise.
2564 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2565 (cp_type_readonly): Remove.
2566 * cp-tree.h: Remove declaration.
2568 * typeck.c (merge_types): Preserve memfn quals.
2570 * decl.c (grokdeclarator): Don't check quals on fn type.
2571 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2572 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2575 * typeck.c (type_memfn_quals): New fn.
2576 (apply_memfn_quals): New fn.
2577 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2578 (cp_type_readonly): Use cp_type_quals.
2579 * cp-tree.h: Add declarations.
2580 * tree.c (cp_build_qualified_type_real): Don't set, but do
2581 preserve, quals on FUNCTION_TYPE.
2582 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2583 * decl.c (build_ptrmem_type): Likewise.
2584 (grokdeclarator): Likewise.
2585 (static_fn_type): Likewise.
2586 * decl2.c (change_return_type): Likewise.
2587 (cp_reconstruct_complex_type): Likewise.
2588 * pt.c (tsubst_function_type): Likewise.
2590 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2592 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2594 * tree.c (build_min_non_dep_call_vec): Update comment.
2596 2010-05-17 Jason Merrill <jason@redhat.com>
2598 * call.c (struct z_candidate): Add explicit_targs field.
2599 (add_template_candidate_real): Set it.
2600 (build_over_call): Use it to control init-list warning.
2603 * call.c (build_over_call): Limit init-list deduction warning to
2604 cases where the argument is actually an init-list.
2607 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2609 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2610 Jason Merrill <jason@redhat.com>
2613 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2615 2010-05-15 Jason Merrill <jason@redhat.com>
2617 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2618 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2620 (finish_eh_spec_block): Adjust.
2622 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2625 * pt.c (tsubst): Unshare template argument.
2627 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2629 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2630 * Make-lang.in: Fix dependencies accordingly.
2632 2010-05-14 Jason Merrill <jason@redhat.com>
2635 * except.c (build_throw): Simplify, adjust for DR 475.
2638 * except.c (dtor_nothrow): Return nonzero for type with
2642 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2643 gimple_build_eh_must_not_throw.
2645 2010-05-14 Martin Jambor <mjambor@suse.cz>
2647 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2650 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2652 * call.c (build_new_method_call): Change warning text.
2653 * typeck2.c (build_functional_cast): Change error text.
2655 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2658 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2659 shadowing the outer parameter or variables by the declaration of
2660 nested function in nested structure or class. Warn the shadowing by
2661 the declaration of nested lambda expression.
2663 2010-05-13 Jason Merrill <jason@redhat.com>
2665 * typeck.c (cp_build_array_ref): Factor out from...
2666 (build_array_ref): ...here. Drop complain parm.
2667 (build_new_op): Adjust.
2668 * class.c (build_vtbl_ref_1): Adjust.
2669 * decl2.c (grok_array_decl): Adjust.
2670 * cp-tree.h: Adjust prototypes.
2672 2010-05-13 Jan Hubicka <jh@suse.cz>
2674 * decl.c (cp_finish_decl): Do not worry about used attribute.
2676 2010-05-12 Jason Merrill <jason@redhat.com>
2678 * typeck.c (build_array_ref): Take complain parm.
2679 * cp-tree.h: Add it to prototype.
2680 * call.c (build_new_op): Pass it.
2681 * class.c (build_vtbl_ref): Pass it.
2682 * decl2.c (grok_array_decl): Pass it.
2686 * cp-tree.def (NULLPTR_TYPE): Remove.
2687 * cp-tree.h (NULLPTR_TYPE_P): New.
2688 (SCALAR_TYPE_P): Use it.
2689 (nullptr_type_node): New.
2690 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2691 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2693 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2694 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2695 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2696 * mangle.c (write_type): Likewise.
2697 * name-lookup.c (arg_assoc_type): Likewise.
2698 * typeck.c (build_reinterpret_cast_1): Likewise.
2699 * rtti.c (typeinfo_in_lib_p): Likewise.
2700 (emit_support_tinfos): Remove local nullptr_type_node.
2702 * cp-tree.h (UNKNOWN_TYPE): Remove.
2703 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2704 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2705 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2706 * class.c (instantiate_type): Check unknown_type_node rather than
2708 * name-lookup.c (maybe_push_decl): Likewise.
2709 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2710 (get_typeid): Likewise.
2711 * semantics.c (finish_offsetof): Likewise.
2714 * call.c (add_template_candidate_real): If deduction fails, still
2715 add the template as a non-viable candidate.
2716 (equal_functions): Handle template candidates.
2717 (print_z_candidate): Likewise.
2718 (print_z_candidates): Likewise.
2719 (build_new_function_call): Likewise.
2721 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2722 * call.c (add_candidates): Enforce it.
2723 (build_new_method_call): Try non-list ctor if no viable list ctor.
2724 (build_user_type_conversion_1): Likewise.
2726 * call.c (add_candidates): Distinguish between type(x) and
2728 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2729 (build_new_method_call): Give better error for conversion op.
2731 * call.c (add_candidates): Add first_arg and return_type parms.
2732 Add special constructor/conversion op handling.
2733 (convert_class_to_reference): Use it.
2734 (build_user_type_conversion_1): Likewise.
2735 (build_op_call): Likewise.
2736 (build_new_method_call): Likewise.
2737 (build_new_op): Adjust.
2738 (perform_overload_resolution): Adjust.
2740 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2745 * pt.c (process_partial_specialization): Return error_mark_node
2746 in case of unused template parameters in partial specialization.
2748 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2751 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2752 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2753 look at its second operand.
2755 2010-05-10 Jason Merrill <jason@redhat.com>
2758 * semantics.c (baselink_for_fns): Revert earlier change.
2761 * typeck.c (cp_build_modify_expr): Complain about assignment to
2762 array from init list.
2764 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2767 * decl.c (check_initializer): strip array type before checking for
2768 uninitialized const or ref members.
2770 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2773 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2774 error count. Emit errors only if compain is true.
2775 (build_new_1): Do not return error_mark_node if
2776 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2777 errors. Delay the check for user-provided constructor.
2778 (perform_member_init): Adjust.
2779 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2782 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2783 Jason Merrill <jason@redhat.com>
2785 Add support for C++0x nullptr.
2786 * cp-tree.def: Add NULLPTR_TYPE.
2787 * cp-tree.h: Add nullptr_node.
2788 (cp_tree_index): Add CPTI_NULLPTR.
2789 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2790 * call.c (null_ptr_cst_p): Handle nullptr.
2791 (standard_conversion): Likewise.
2792 (convert_arg_to_ellipsis): Likewise.
2793 * mangle.c (write_type): Likewise.
2794 * name-lookup.c (arg_assoc_type): Likewise.
2795 * parser.c (cp_parser_primary_expression): Likewise.
2796 * typeck.c (cp_build_binary_op): Likewise.
2797 (build_reinterpret_cast_1): Likewise.
2798 * error.c (dump_type): Likewise.
2799 (dump_type_prefix, dump_type_suffix): Likewise.
2800 * decl.c (cxx_init_decl_processing): Likewise.
2801 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2802 * cvt.c (ocp_convert): Likewise.
2803 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2804 nullptr_t tinfo in libsupc++.
2806 2010-05-06 Jason Merrill <jason@redhat.com>
2808 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2810 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2811 Dodji Seketeli <dodji@redhat.com>
2814 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2816 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2817 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2818 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2819 (cp_build_unary_op): Call lvalue_use.
2820 * decl.c (unused_but_set_errorcount): New variable.
2821 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2822 (duplicate_decls): Merge DECL_READ_P flags.
2823 (start_cleanup_fn): Set DECL_READ_P flag.
2824 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2825 * tree.c (rvalue): Call rvalue_use.
2826 * pt.c (convert_nontype_argument): Likewise.
2827 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2828 finish_decltype_type): Likewise.
2829 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2830 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2831 or rvalue_use depending on the expr.
2832 * init.c (build_new, build_delete): Likewise.
2833 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2835 2010-05-05 Jason Merrill <jason@redhat.com>
2838 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2839 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2841 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2844 * pt.c (unify): Check each elt for error_mark_node.
2846 2010-05-04 Jason Merrill <jason@redhat.com>
2849 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2851 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2854 * call.c (build_new_method_call): Return error_mark_node if fns is
2857 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2860 * pt.c (most_specialized_class): Pretend we are processing
2861 a template decl during the call to coerce_template_parms.
2863 2010-05-03 Jason Merrill <jason@redhat.com>
2867 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2868 from the selected underlying type unless -fstrict-enums. Set
2869 ENUM_UNDERLYING_TYPE to have the restricted range.
2870 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2871 * class.c (check_bitfield_decl): Likewise.
2873 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2876 * init.c (build_new_1): Revert the accidental checkin in
2879 2010-04-30 Jason Merrill <jason@redhat.com>
2882 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2883 (pp_cxx_type_specifier_seq): ...here.
2885 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2887 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2888 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2890 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2893 * typeck.c (warn_args_num): New function.
2894 (convert_arguments): Use warn_args_num to print the diagnostic
2897 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2900 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2901 user-provided constructor while recursing.
2903 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2906 * error.c (print_instantiation_partial_context_line): Handle
2907 recursive instantiation.
2908 (print_instantiation_partial_context): Likewise.
2910 2010-04-27 Jason Merrill <jason@redhat.com>
2912 * init.c (perform_member_init): Check CLASS_TYPE_P.
2914 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2917 * init.c (perform_member_init): check for uninitialized const or
2918 reference members, including array types.
2920 2010-04-24 Jason Merrill <jason@redhat.com>
2922 * tree.c (get_fns): Split out from get_first_fn.
2923 * cp-tree.h: Declare it.
2924 * search.c (shared_member_p): Use it.
2925 * semantics.c (finish_qualified_id_expr): Simplify.
2926 (finish_id_expression): Simplify.
2928 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2929 whenever object is NULL_TREE. Don't do 'this' capture here.
2930 (finish_qualified_id_expr): Pass NULL_TREE.
2931 (finish_id_expression): Likewise.
2932 (lambda_expr_this_capture): Likewise.
2934 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2935 rather than checking current_class_ref directly.
2936 (finish_call_expr): Likewise.
2939 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2940 * class.c (current_nonlambda_class_type): New fn.
2941 * semantics.c (nonlambda_method_basetype): New.
2942 * cp-tree.h: Declare them.
2943 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2945 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2948 * semantics.c (lambda_return_type): Complain about
2952 * tree.c (cv_unqualified): Handle error_mark_node.
2955 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2956 if we don't want errors.
2959 * class.c (convert_to_base): Add complain parameter. Pass
2960 ba_quiet to lookup_base if we don't want errors.
2961 (build_vfield_ref): Pass complain to convert_to_base.
2962 * call.c (convert_like_real): Likewise.
2963 (initialize_reference): Likewise.
2964 (perform_direct_initialization_if_possible): Pass complain to
2966 * cp-tree.h: Adjust.
2968 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2969 Jason Merrill <jason@redhat.com>
2972 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2974 (check_initializer): Call it for classes that need constructing, too.
2975 * class.c (in_class_defaulted_default_constructor): New.
2976 * cp-tree.h: Declare it.
2978 2010-04-20 Jason Merrill <jason@redhat.com>
2981 * init.c (constant_value_1): Treat error_mark_node as a constant
2982 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2983 * cvt.c (ocp_convert): Handle getting error_mark_node from
2984 integral_constant_value.
2985 * decl.c (compute_array_index_type): Likewise.
2987 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2991 * typeck.c (incompatible_dependent_types_p): If one of the
2992 compared types if not a typedef then honour their main variant
2995 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2997 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2999 2010-04-19 Dodji Seketeli <dodji@redhat.com>
3002 * typeck.c (structural_comptypes): Test dependent typedefs
3003 incompatibility before testing for their main variant based
3006 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3008 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
3009 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
3011 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3013 * decl.c (cxx_init_decl_processing): Remove second argument in call to
3014 build_common_tree_nodes.
3016 2010-04-14 Jason Merrill <jason@redhat.com>
3019 * parser.c (cp_parser_parenthesized_expression_list): Change
3020 is_attribute_list parm to int to indicate whether or not to
3021 handle initial identifier specially.
3022 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
3024 2010-04-13 Jason Merrill <jason@redhat.com>
3026 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
3028 * parser.c (cp_parser_lambda_expression): Complain about lambda in
3029 unevaluated context.
3030 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
3032 2010-04-12 Jason Merrill <jason@redhat.com>
3035 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
3036 return value directly.
3038 * call.c (type_decays_to): Call cv_unqualified for non-class type.
3040 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
3043 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
3044 * init.c (build_new_1): Check for uninitialized const members and
3045 uninitialized reference members, when using new without
3046 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
3047 (diagnose_uninitialized_cst_or_ref_member): Define, call
3048 diagnose_uninitialized_cst_or_ref_member_1.
3049 (diagnose_uninitialized_cst_or_ref_member_1): New function.
3051 2010-04-12 Richard Guenther <rguenther@suse.de>
3054 * semantics.c (expand_or_defer_fn_1): Do not keep extern
3055 template inline functions.
3057 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3060 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
3063 2010-04-07 Jason Merrill <jason@redhat.com>
3066 * decl.c (start_preparsed_function): Do defer nested functions.
3068 PR c++/11094, DR 408
3069 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
3070 * decl2.c (finish_static_data_member_decl): Set it.
3071 * decl.c (duplicate_decls): Propagate it.
3072 * pt.c (tsubst_decl): Don't substitute the domain of an array
3073 VAR_DECL if it's set.
3074 (regenerate_decl_from_template): Substitute it here.
3075 (type_dependent_expression_p): Return true if it's set.
3076 * semantics.c (finish_decltype_type): Instantiate such a variable.
3077 * typeck.c (cxx_sizeof_expr): Likewise.
3078 (strip_array_domain): New.
3081 * name-lookup.c (current_decl_namespace): Non-static.
3082 (pop_nested_namespace): Sanity check.
3083 * cp-tree.h: Declare current_decl_namespace.
3084 * decl.c (grokvardecl): Use it instead of current_namespace.
3085 (grokfndecl): Likewise.
3088 * pt.c (tsubst_friend_function): Instatiate a friend that has already
3091 * pt.c (print_template_statistics): New.
3092 * cp-tree.h: Declare it.
3093 * tree.c (cxx_print_statistics): Call it.
3096 * decl.c (grokvardecl): Tweak warning message.
3097 (grokfndecl): Likewise.
3099 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3102 *pt.c (tsubst_decl): Get the arguments of a specialization from
3103 the specialization template, not from the most general template.
3105 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3108 * typeck2.c (process_init_constructor_record):
3109 value-initialize members that are are not explicitely
3112 2010-04-07 Jie Zhang <jie@codesourcery.com>
3115 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
3116 when all of its elements are non-constant and have been split out.
3118 2010-04-06 Taras Glek <taras@mozilla.com>
3119 Jason Merrill <jason@redhat.com>
3121 * parser.c (cp_parser_class_specifier): Set class location to that
3122 of IDENTIFIER_NODE instead of '{' when possible.
3123 * semantics.c (begin_class_definition): Do not overide locations
3124 with less precise ones.
3126 2010-04-06 Jason Merrill <jason@redhat.com>
3129 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
3132 * pt.c (maybe_update_decl_type): Check the return value from
3135 2010-04-01 Jason Merrill <jason@redhat.com>
3137 * decl.c (next_initializable_field): No longer static.
3138 * cp-tree.h: Declare it.
3139 * call.c (build_aggr_conv): Fail if there are more initializers
3140 than initializable fields.
3142 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
3143 instead of void_zero_node.
3145 2010-03-31 Dodji Seketeli <dodji@redhat.com>
3148 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
3149 * pt.c (end_template_parm_list): Store sibling template parms of
3150 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3151 (push_template_decl_real): Don't store the containing template decl
3152 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
3153 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
3154 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3157 2010-03-30 Jason Merrill <jason@redhat.com>
3160 * pt.c (push_template_decl_real): Deal better with running out of
3161 scopes before running out of template parms.
3165 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3166 function parameter context. Don't print an error if parsing
3170 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3173 2010-03-26 Jason Merrill <jason@redhat.com>
3176 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3177 c++0x mode, but not other type-names.
3179 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3182 * pt.c (add_to_template_args): Support NULL ARGS;
3183 (most_specialized_class): call coerce_template_parms on
3184 template arguments passed to get_class_bindings. Use
3185 add_to_template_args.
3186 (unify): Handle VAR_DECLs.
3188 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3190 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3192 * pt.c (get_template_parms_at_level): Adjust.
3194 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3197 * cp-tree.h (get_template_parms_at_level): Declare ...
3198 * pt.c (get_template_parms_at_level): ... new function.
3199 * typeck.c (get_template_parms_of_dependent_type): If a template
3200 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3201 current_template_parms. Use get_template_parms_at_level. Remove
3203 (incompatible_dependent_types_p): If we get empty parms from just one
3204 of the template type parms we are comparing then the template parms are
3207 2010-03-24 Jason Merrill <jason@redhat.com>
3210 * parser.c (make_declarator): Initialize id_loc.
3211 (cp_parser_lambda_declarator_opt): And set it.
3213 2010-03-23 Jason Merrill <jason@redhat.com>
3215 Make lambda conversion op and op() non-static.
3216 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3217 Also add the thunk function returned by the conversion op.
3218 Mark the conversion deleted if the op() is variadic.
3219 * decl2.c (mark_used): Give helpful message about deleted conversion.
3220 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3221 * semantics.c (finish_this_expr): Adjust.
3222 * mangle.c (write_closure_type_name): Adjust.
3223 * decl.c (grok_op_properties): Don't allow it.
3224 * call.c (build_user_type_conversion_1): No static conversion ops.
3225 (build_op_call): Or op().
3227 * decl2.c (change_return_type): Fix 'this' quals.
3229 2010-03-22 Jason Merrill <jason@redhat.com>
3232 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3235 * pt.c (contains_auto_r): New fn.
3236 (do_auto_deduction): Use it.
3237 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3239 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3242 * decl2.c (grokfield): Handle invalid initializers for member
3245 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3248 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3250 * decl2.c (vague_linkage_p): Likewise.
3252 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3255 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3256 false, in the cp_parser_expression_statement call.
3258 2010-03-05 Jason Merrill <jason@redhat.com>
3260 * mangle.c (mangle_decl): Give name collision error even without
3263 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3265 * pt.c (process_partial_specialization): Use error_n instead of
3268 2010-03-03 Jason Merrill <jason@redhat.com>
3271 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3273 2010-03-03 Jason Merrill <jason@redhat.com>
3276 * mangle.c: Include cgraph.h.
3277 (mangle_decl): If the mangled name will change in a later
3278 ABI version, make the later mangled name an alias.
3279 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3280 * Make-lang.in (mangle.o): Depend on cgraph.h.
3281 * method.c (make_alias_for): Handle VAR_DECL, too.
3282 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3283 * tree.c (no_linkage_check): Adjust.
3284 * decl.c (maybe_commonize_var): Adjust.
3285 * cp-tree.h: Adjust.
3287 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3289 * pt.c (redeclare_class_template): Use error_n and inform_n.
3291 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3294 * cp-tree.h (push_tinst_level): Declare.
3295 (pop_tinst_level): Likewise.
3296 * pt.c (push_tinst_level): Give it external linkage.
3297 (pop_tinst_level): Likewise.
3298 * mangle.c (mangle_decl_string): Set the source location to that
3299 of the decl while mangling.
3301 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3304 * pt.c (redeclare_class_template): Return false if there are erroneous
3305 template parameters.
3307 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3309 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3312 2010-02-24 Jason Merrill <jason@redhat.com>
3315 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3317 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3318 in a previous ABI version.
3320 2010-02-23 Jason Merrill <jason@redhat.com>
3323 * typeck2.c (digest_init_r): Accept value init of array.
3325 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3328 * typeck.c (convert_arguments): Update error message.
3330 2010-02-22 Mike Stump <mikestump@comcast.net>
3333 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3335 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3338 * error.c (print_instantiation_partial_context_line): New.
3339 (print_instantiation_partial_context): Print at most 12 contexts,
3340 skip the rest with a message.
3342 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3345 * pt.c (lookup_template_class): Better support of specialization
3346 of member of class template implicit instantiation.
3348 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3351 * call.c (conversion_null_warnings): Replace -Wconversion with
3353 * cvt.c (build_expr_type_conversion): Likewise.
3355 2010-02-18 Jason Merrill <jason@redhat.com>
3358 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3361 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3363 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3364 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3367 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3371 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3372 (maybe_update_decl_type): New fn.
3373 * parser.c (cp_parser_init_declarator): Use it.
3376 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3378 2010-02-17 Jason Merrill <jason@redhat.com>
3381 * call.c (build_over_call): Don't create zero-sized assignments.
3382 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3383 * cp-objcp-common.c (cp_expr_size): Remove.
3384 * cp-tree.h: Remove prototype.
3387 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3388 decl we looked up doesn't match.
3391 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3392 have an INIT_EXPR anymore.
3395 * pt.c (convert_nontype_argument): Change assert to test.
3397 2010-02-16 Jason Merrill <jason@redhat.com>
3399 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3402 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3403 VIEW_CONVERT_EXPR for conversions between structural equality types
3404 that the back end can't tell are the same.
3407 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3408 cv-quals from element here.
3409 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3411 2010-02-14 Jason Merrill <jason@redhat.com>
3414 * semantics.c (finish_compound_literal): Use
3415 cp_apply_type_quals_to_decl when creating a static variable.
3417 2010-02-12 Jason Merrill <jason@redhat.com>
3420 * name-lookup.h (current_binding_level): Check for null
3423 2010-02-12 Jason Merrill <jason@redhat.com>
3426 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3428 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3431 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3434 2010-02-10 Jason Merrill <jason@redhat.com>
3437 * semantics.c (outer_lambda_capture_p): Revert.
3438 (add_capture): Only finish_member_declaration if
3439 we're in the lambda class.
3440 (register_capture_members): New.
3441 * cp-tree.h: Declare it.
3442 * parser.c (cp_parser_lambda_expression): Call it.
3444 2010-02-10 Jason Merrill <jason@redhat.com>
3447 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3448 instead of current_class_type.
3450 2010-02-10 Jason Merrill <jason@redhat.com>
3452 PR c++/42983, core issue 906
3453 * method.c (defaultable_fn_check): Check virtualness.
3455 2010-02-10 Jason Merrill <jason@redhat.com>
3458 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3460 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3462 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3463 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3465 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3466 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3467 (cp_parser_parameter_declaration)
3468 (cp_parser_exception_specification_opt)
3469 (cp_parser_exception_declaration): Likewise.
3470 * pt.c (check_default_tmpl_args): Likewise.
3471 * search.c (lookup_field_r): Likewise.
3473 2010-02-09 Jason Merrill <jason@redhat.com>
3476 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3478 2010-02-09 Jason Merrill <jason@redhat.com>
3481 * decl2.c (change_return_type): New fn.
3482 * semantics.c (apply_lambda_return_type): Use it.
3483 * cp-tree.h: Declare it.
3485 2010-02-05 Richard Guenther <rguenther@suse.de>
3487 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3488 * cp-lang.c: Include gt-cp-cp-lang.h.
3489 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3491 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3494 * typeck.c (get_template_parms_of_dependent_type): Try getting
3495 the template parameters fromt the type itself first.
3497 2010-02-03 Jason Merrill <jason@redhat.com>
3501 * mangle.c (write_unqualified_id): Split out from write_expression.
3502 (write_unqualified_name): Call it.
3503 (write_member_name): Likewise.
3504 (write_expression): Support TEMPLATE_ID_EXPR.
3505 Disambiguate operator names.
3508 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3511 2010-02-02 Jason Merrill <jason@redhat.com>
3514 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3515 * optimize.c (clone_body): Remap their initializers when making base
3517 (maybe_clone_body): Complain if multiple clones aren't safe.
3519 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3526 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3527 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3528 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3529 * pt.c (coerce_template_parms, type_unification_real,
3530 expand_template_argument_pack, coerce_template_parameter_pack):
3531 Set the non default template args count.
3532 (current_template_args): Always set non defaulted
3533 template args count when compiled with --enable-checking
3534 (tsubst_template_args, type_unification_real): Propagate the non
3535 defaulted template args count.
3536 * error.c (get_non_default_template_args_count): Renamed
3537 count_non_default_template_args into this. Don't calculate the
3538 non default template argument count anymore. Use the new
3539 accessor macros above to get it.
3540 (dump_template_argument_list, dump_type, dump_decl,
3541 dump_template_parms): Adjust.
3542 * parser.c (cp_parser_template_argument_list): Always set defaulted
3543 template args count when compiled with --enable-checking.
3545 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3547 * decl.c (redeclaration_error_message): Wrap the return messages into
3548 G_() for easy translation.
3550 2010-01-28 Jason Merrill <jason@redhat.com>
3553 * semantics.c (begin_class_definition): Don't use type_as_string.
3555 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3559 * typeck.c (get_template_parms_of_dependent_type): Factorized
3560 this out of incompatible_template_type_parms_p
3561 (incompatible_dependent_types_p): Renamed
3562 incompatible_template_type_parms_p into this. Make it detect
3563 two incompatible dependent typedefs too.
3564 (structural_comptypes): Use incompatible_dependent_types_p.
3565 * pt.c (get_template_info):
3566 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3568 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3569 Jason Merrill <jason@redhat.com>
3571 * mangle.c (write_type): Mangle transparent record as member type.
3572 * semantics.c (begin_class_definition): Recognize decimal classes
3573 and set TYPE_TRANSPARENT_AGGR.
3575 2010-01-20 Jason Merrill <jason@redhat.com>
3578 * mangle.c (write_expression): Handle tree codes that have extra
3579 arguments in the middle-end.
3581 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3584 * except.c (expand_start_catch_block): Deal correctly with
3585 do_begin_catch returning error_mark_node.
3587 2010-01-20 Jason Merrill <jason@redhat.com>
3590 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3594 * semantics.c (build_lambda_object): Call mark_used on captured
3598 * decl.c (grokdeclarator): Clear type_quals for a member function
3599 declared using a typedef. Don't complain about adding cv-quals
3600 to a function typedef in C++0x mode.
3602 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3604 * decl.c (create_array_type_for_decl): Remove set but not used
3605 variable error_msg. Remove break stmts after return stmts.
3607 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3609 * error.c (dump_template_parms, count_non_default_template_args):
3610 Revert fix of PR c++/42634.
3612 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3615 * error.c (dump_template_parms): Use innermost template
3616 arguments before calling count_non_default_template_args.
3617 (count_non_default_template_args): We are being called with
3618 template innermost arguments now. There is no need to ensure
3621 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3624 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3626 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3629 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3631 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3634 *pt.c (tsubst_decl): Get the arguments of a specialization from
3635 the specialization template, not from the most general template.
3637 2010-01-16 Jason Merrill <jason@redhat.com>
3640 * semantics.c (finish_decltype_type): Within a template, treat
3641 unresolved CALL_EXPR as dependent.
3643 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3645 * error.c (dump_template_parms,count_non_default_template_args):
3646 Revert changes of PR c++/42634.
3648 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3651 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3652 functions with noreturn attribute.
3654 2010-01-14 Jason Merrill <jason@redhat.com>
3657 * call.c (build_new_method_call): Don't free the vec here.
3660 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3662 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3665 * error.c (dump_template_parms): Use innermost template
3666 arguments before calling count_non_default_template_args.
3667 (count_non_default_template_args): We are being called with
3668 template innermost arguments now. There is no need to ensure
3671 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3674 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3675 arguments that were previously deduced.
3677 2010-01-05 Jason Merrill <jason@redhat.com>
3679 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3680 * call.c (build_over_call): Don't complain about it.
3682 2010-01-04 Jason Merrill <jason@redhat.com>
3685 * pt.c (tsubst_decl): Don't apply type attributes in place.
3688 * semantics.c (describable_type): Remove decltype comment and
3693 Copyright (C) 2010 Free Software Foundation, Inc.
3695 Copying and distribution of this file, with or without modification,
3696 are permitted in any medium without royalty provided the copyright
3697 notice and this notice are preserved.