1 2010-11-16 Jason Merrill <jason@redhat.com>
4 * decl.c (make_unbound_class_template): Handle using
5 injected-type-name as template.
7 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9 * typeck.c (cp_build_unary_op): Use
10 objc_build_incr_expr_for_property_ref to build the pre/post
11 increment/decrement of an Objective-C property ref.
13 2010-11-13 Jason Merrill <jason@redhat.com>
15 * decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
16 * init.c (build_new): Likewise.
17 * pt.c (tsubst_decl): Likewise.
18 (do_auto_deduction): Likewise.
19 (resolve_nondeduced_context): Use build_offset_ref and
22 2010-11-12 Joseph Myers <joseph@codesourcery.com>
24 * Make-lang.in (g++spec.o): Use $(OPTS_H).
26 2010-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
28 Core 1135, 1136, 1145, 1149
29 * method.c (defaultable_fn_check): Do not disallow defaulting a
30 non-public or explicit special member function on its first
33 2010-11-12 James Dennett <jdennett@google.com>
36 * typeck.c (build_static_cast_1): Convert to the target type
37 when doing static_cast<cv Derived*>(Base*).
39 2010-11-10 Jason Merrill <jason@redhat.com>
42 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
43 [CONSTRUCTOR]: Use the tsubsted type.
46 * semantics.c (cxx_eval_bit_field_ref): New.
47 (cxx_eval_constant_expression): Call it.
49 2010-11-10 Joseph Myers <joseph@codesourcery.com>
51 * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
52 * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
53 Use %' in diagnostics.
54 * decl2.c (check_classfn): Use %' in diagnostic.
55 * init.c (build_java_class_ref): Use %' in diagnostic.
56 (build_delete): Remove trailing '.' from diagnostic.
57 * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
59 * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
60 * parser.c (cp_parser_exception_specification_opt): Remove
61 trailing '.' from diagnostic.
62 (cp_parser_objc_interstitial_code): Use %qs for quoting in
64 * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
66 * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
68 2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
71 * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
73 2010-11-09 Jakub Jelinek <jakub@redhat.com>
76 * tree.c (lvalue_kind): Don't crash if ref has NULL type.
78 2010-11-08 Jason Merrill <jason@redhat.com>
81 * semantics.c (check_constexpr_ctor_body): New fn.
82 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
83 * cp-tree.h: Declare it.
86 * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
88 Correct conversion/overflow behavior.
89 * cvt.c (ignore_overflows): Move here from typeck.c.
90 (ocp_convert): Use it.
91 (cp_fold_convert): Use it. Don't call rvalue.
92 * typeck.c (build_static_cast_1): Don't use it. Do call rvalue.
93 * error.c (location_of): Handle expressions, too.
94 * class.c (check_bitfield_decl): Set input_location around call to
96 * semantics.c (cxx_eval_outermost_constant_expr): Don't
97 print the expression if it already had TREE_OVERFLOW set.
98 (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
99 (verify_constant): Allow overflow with a permerror if we're
101 (cxx_eval_outermost_constant_expr): Use verify_constant.
102 (adjust_temp_type): Use cp_fold_convert.
103 * decl.c (build_enumerator): Don't call constant_expression_warning.
104 * decl2.c (grokbitfield): Likewise.
106 2010-11-06 Jason Merrill <jason@redhat.com>
109 * init.c (perform_member_init): Use build_vec_init_expr for
110 value-init of arrays, too.
111 * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
112 * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
113 (VEC_INIT_EXPR_VALUE_INIT): New macro.
114 * semantics.c (potential_constant_expression): No longer static.
115 Check VEC_INIT_EXPR_IS_CONSTEXPR.
116 * tree.c (build_vec_init_expr): Handle value-init. Set
117 VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
119 2010-11-06 Nathan Froyd <froydnj@codesourcery.com>
122 * parser.c (cp_lexer_previous_token): New function.
123 (cp_parser_member_declaration): Use previous token for error
124 messages. Assume semicolon presence rather than grovelling for
127 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
130 * method.c (make_alias_for_thunk):
131 Use targetm.asm_out.generate_internal_label.
133 2010-11-05 Jason Merrill <jason@redhat.com>
136 * search.c (look_for_overrides): A constructor is never virtual.
138 2010-11-05 Jakub Jelinek <jakub@redhat.com>
141 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
142 on the RHS to avoid infinite recursion with gimplify_expr.
144 2010-11-05 Jason Merrill <jason@redhat.com>
147 * pt.c (tsubst_copy): Handle COMPLEX_CST.
149 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
151 Fixed using the Objective-C 2.0 dot-syntax with class names.
152 * parser.c (cp_parser_primary_expression): Recognize Objective-C
153 2.0 dot-syntax with class names and process it.
154 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
156 (cp_parser_class_name): Same change.
157 (cp_parser_simple_type_specifier): Tidied comments.
159 2010-11-04 Jason Merrill <jason@redhat.com>
162 * semantics.c (build_constexpr_constructor_member_initializers):
163 Handle an enclosing STATEMENT_LIST.
165 * semantics.c (speculative_access_check): New.
166 * cp-tree.h: Declare it.
167 * call.c (build_over_call): Use it.
168 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
169 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
171 2010-11-03 Jason Merrill <jason@redhat.com>
174 * semantics.c (build_data_member_initialization): Handle
175 value-init of aggregate empty base.
178 * call.c (can_convert_array): New fn.
179 (build_aggr_conv): Use it.
182 * semantics.c (build_constexpr_constructor_member_initializers):
185 2010-11-02 Dodji Seketeli <dodji@redhat.com>
187 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
189 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
191 2010-11-03 Jason Merrill <jason@redhat.com>
194 * init.c (expand_default_init): Avoid ICE if we can't figure out
195 which function is being called.
197 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
199 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
200 instead of fold_convert.
201 * init.c (build_zero_init): Likewise.
202 * typeck.c (cp_build_binary_op): Likewise.
204 2010-11-02 Dodji Seketeli <dodji@redhat.com>
208 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
210 (convert_nontype_argument, convert_nontype_argument): Pass the
211 complain parameter down to check_valid_ptrmem_cst_expr.
213 2010-11-02 Dodji Seketeli <dodji@redhat.com>
216 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
217 (struct template_parm_index_s)<num_siblings>: New field.
218 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
219 (process_template_parm): Extend the API to accept the number of
220 template parms in argument.
221 (cp_set_underlying_type): Remove this.
222 * class.c (build_self_reference): Require canonical type equality
223 back on the self reference of class.
224 * decl2.c (grokfield): Require canonical type equality back on
225 typedef class fields.
226 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
227 equality back on typedefs.
228 * parser.c (cp_parser_template_parameter_list): Do not require
229 canonical type equality on dependent types created during template
231 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
232 (fixup_template_parm, fixup_template_parms): New private
234 (current_template_args): Declare this.
235 (process_template_parm): Pass the total number of template parms
236 to canonical_type_parameter.
237 (build_template_parm_index): Add a new argument to carry the total
238 number of template parms.
239 (reduce_template_parm_level, process_template_parm, make_auto):
241 (current_template_args): Fix this for template template
243 (tsubst_template_parm): Split out of ...
244 (tsubst_template_parms): ... this.
245 (reduce_template_parm_level): Don't loose
246 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
247 (template_parm_to_arg): Extracted this function from
248 current_template_args. Make it represent invalid template parms
249 with an error_mark_node instead of a LIST_TREE containing an
251 (current_template_args): Use template_parm_to_arg.
252 (dependent_template_arg_p): Consider an invalid template argument
254 (end_template_parm_list): Do not update template sibling parms
255 here anymore. Use fixup_template_parms instead.
256 (process_template_parm): Pass the number of template parms to
257 canonical_type_parameter.
258 (make_auto): Require structural equality on auto
259 TEMPLATE_TYPE_PARM for now.
260 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
261 using all the arguments deduced so far.
262 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
263 canonical_type_parameter.
264 * tree.c (cp_set_underlying_type): Remove.
265 * typeck.c (get_template_parms_of_dependent_type)
266 (incompatible_dependent_types_p): Remove.
267 (structural_comptypes): Do not call incompatible_dependent_types_p
269 (comp_template_parms_position): Re-organized. Take the length of
270 template parms list in account.
272 2010-11-01 Jason Merrill <jason@redhat.com>
274 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
275 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
276 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
277 of giving follow-on errors.
278 * error.c (maybe_print_constexpr_context): New.
279 (cp_diagnostic_starter): Call it.
280 * cp-tree.h: Declare cx_error_context.
282 * semantics.c (cxx_eval_constant_expression): Explain
283 unacceptable use of variable better.
285 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
286 Jason Merrill <jason@redhat.com>
288 * call.c (null_ptr_cst_p): Use maybe_constant_value.
289 (set_up_extended_ref_temp): Support constant initialization.
290 (initialize_reference): Adjust.
291 * class.c (check_bitfield_decl): Use cxx_constant_value.
292 * cvt.c (ocp_convert): Don't use integral_constant_value when
293 converting to class type.
294 * decl.c (finish_case_label): Use maybe_constant_value.
295 (build_init_list_var_init): Support constant initialization.
296 (check_initializer): Likewise. Reorganize.
297 (cp_finish_decl): Likewise.
298 (expand_static_init): Likewise.
299 (compute_array_index_type): Use maybe_constant_value.
301 (create_array_type_for_decl, grokdeclarator): Pass it.
302 (build_enumerator): Use cxx_constant_value.
303 * decl2.c (grokfield): Use maybe_constant_init.
304 * except.c (check_noexcept_r): Handle constexpr.
305 (build_noexcept_spec): Use maybe_constant_value.
306 * init.c (expand_default_init): Support constant initialization.
307 (build_vec_init): Likewise.
308 (constant_value_1): Adjust.
309 (build_new_1): Adjust.
310 * parser.c (cp_parser_constant_expression): Allow non-integral
312 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
313 (cp_parser_initializer_clause): Toss folded result if non-constant.
314 * pt.c (fold_decl_constant_value): Remove.
315 (convert_nontype_argument): Use maybe_constant_value. Give clearer
316 error about overflow.
317 (tsubst): Move array bounds handling into compute_array_index_type.
318 (value_dependent_expression_p): Handle constant CALL_EXPR.
319 (tsubst_decl): Don't set
320 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
321 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
322 (instantiate_decl): Here too.
323 * semantics.c (finish_static_assert): Use maybe_constant_value.
324 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
325 (potential_constant_expression): Use maybe_constant_value.
326 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
327 is potentially valid in C++0x.
328 * typeck2.c (store_init_value): Handle constant init.
329 (check_narrowing): Use maybe_constant_value.
330 (build_functional_cast): Set TREE_CONSTANT on literal T().
331 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
332 (LOOKUP_ALREADY_DIGESTED): New.
333 (compute_array_index_type): Adjust prototype.
335 * semantics.c (constexpr_call): New datatype.
336 (constexpr_call_table): New global table.
337 (constexpr_call_hash): New.
338 (constexpr_call_equal): Likewise.
339 (maybe_initialize_constexpr_call_table): Likewise.
340 (lookup_parameter_binding): Likewise.
341 (cxx_eval_builtin_function_call): Likewise.
342 (cxx_bind_parameters_in_call): Likewise.
343 (cxx_eval_call_expression): Likewise.
344 (cxx_eval_unary_expression): Likewise.
345 (cxx_eval_binary_expression): Likewise.
346 (cxx_eval_conditional_expression): Likewise.
347 (cxx_eval_array_reference): Likewise.
348 (cxx_eval_component_reference): Likewise.
349 (cxx_eval_logical_expression): Likewise.
350 (cxx_eval_object_construction): Likewise.
351 (cxx_eval_constant_expression): Likewise.
352 (cxx_eval_indirect_ref): Likewise.
353 (cxx_constant_value): Likewise.
354 (cxx_eval_bare_aggregate): Likewise.
355 (adjust_temp_type): New.
356 (reduced_constant_expression_p): New.
357 (verify_constant): New.
358 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
359 (cxx_eval_outermost_constant_expr): New.
360 (maybe_constant_value, maybe_constant_init): New.
361 (cxx_eval_constant_expression): Use them.
362 * pt.c (iterative_hash_template_arg): No longer static.
363 * cp-tree.h: Declare fns.
365 * cp-tree.h (register_constexpr_fundef): Declare.
366 * decl.c (maybe_save_function_definition): New.
367 (finish_function): Use it.
368 * semantics.c (constexpr_fundef): New datatype.
369 (constexpr_fundef_table): New global table.
370 (constexpr_fundef_equal): New.
371 (constexpr_fundef_hash): Likewise.
372 (retrieve_constexpr_fundef): Likewise.
373 (validate_constexpr_fundecl): Store in the table.
374 (build_data_member_initialization): New fn.
375 (build_constexpr_constructor_member_initializers): New.
376 (register_constexpr_fundef): Define.
377 (is_this_parameter): New.
378 (get_function_named_in_call): Likewise.
379 (get_nth_callarg): Likewise.
380 (check_automatic_or_tls): New.
381 (morally_constexpr_builtin_function_p): New.
382 (potential_constant_expression): New.
384 2010-11-01 Jason Merrill <jason@redhat.com>
386 * decl2.c (decl_constant_var_p): New fn.
387 (decl_maybe_constant_var_p): New fn.
388 (mark_used): Rework instantiation of things needed for constant
390 * cp-tree.h: Declare new fns.
391 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
392 (always_instantiate_p): Use decl_maybe_constant_var_p.
393 (instantiate_decl): Don't defer constexpr functions.
394 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
395 * semantics.c (finish_id_expression): Use decl_constant_var_p.
396 Check for valid name in constant expr after mark_used.
398 2010-10-31 Jason Merrill <jason@redhat.com>
400 * class.c (is_really_empty_class): Work when type is not complete.
401 (synthesized_default_constructor_is_constexpr): New.
402 (add_implicitly_declared_members): Use it.
403 (type_has_constexpr_default_constructor): Likewise.
404 * cp-tree.h: Declare it.
405 * method.c (synthesized_method_walk): Use it.
407 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
408 * typeck.c (convert_for_assignment): Likewise.
410 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
411 message about constexpr without -std=c++0x.
413 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
416 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
418 * class.c (layout_vtable_decl): Call build_array_of_n_type.
419 (build_vtt, build_ctor_vtabl_group): Likewise.
421 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
423 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
424 * parser.c (cp_parser_objc_at_property_declaration): Removed
425 parsing of RID_COPIES and RID_IVAR. Updated call to
426 objc_add_property_declaration.
427 * typecheck.c (finish_class_member_access_expr): Call
428 objc_maybe_build_component_ref instead of objc_build_setter_call.
429 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
430 of objc_build_getter_call.
432 2010-10-27 Jason Merrill <jason@redhat.com>
434 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
435 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
436 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
437 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
438 (cp_parser_trait_expr): Likewise.
440 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
441 Jason Merrill <jason@redhat.com>
443 * decl.c (finish_case_label): Use decl_constant_value.
445 * method.c (synthesized_method_walk): Track constexprness too.
446 (process_subob_fn, walk_field_subobs): Likewise.
447 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
448 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
449 * class.c (add_implicitly_declared_members): Handle
450 constexpr default ctor.
452 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
453 Make sure a constexpr ctor has an empty body.
454 * class.c (type_has_constexpr_default_constructor): New.
455 * cp-tree.h: Declare it.
456 * init.c (perform_member_init): Complain about uninitialized
457 member in constexpr ctor.
458 (emit_mem_initializers): And uninitialized base.
459 * decl.c (check_tag_decl): Fix typo.
461 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
462 (is_valid_constexpr_fn): New fn.
463 (validate_constexpr_fundecl): Use it.
464 * decl.c (validate_constexpr_redeclaration): New.
465 (duplicate_decls): Use it.
466 (cp_finish_decl): Call validate_constexpr_fundecl and
467 ensure_literal_type_for_constexpr_object here.
468 (start_decl): Not here. Don't ICE on constexpr reference.
469 (check_for_uninitialized_const_var): Don't handle constexpr specially.
470 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
471 (check_static_variable_definition): Give friendly message about
473 (grokdeclarator): Complain about typedef and volatile with constexpr.
474 Reorganize. Give sorry about non-static data members in C++0x mode.
475 (start_preparsed_function): Check validate_constexpr_fundecl here.
476 (check_function_type): Not here.
477 * decl2.c (finish_static_data_member_decl): Don't complain about
479 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
480 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
481 (cp_parser_decl_specifier_seq): Handle it.
482 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
484 * class.c (check_bases): Propagate non-literality.
485 (check_field_decls): Likewise.
486 (finalize_literal_type_property): New.
487 (check_bases_and_members): Call it.
488 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
489 (lang_type_class): Add has_constexpr_ctor field.
490 (DECL_DECLARED_CONSTEXPR_P): Strip template.
491 * decl.c (grok_special_member_properties): Set
492 TYPE_HAS_CONSTEXPR_CTOR.
494 2010-10-27 Jason Merrill <jason@redhat.com>
496 * call.c (build_integral_nontype_arg_conv): New.
497 * cp-tree.h: Declare it.
498 * pt.c (convert_nontype_argument): Use it.
500 * error.c (dump_simple_decl): Print constexpr.
502 * cvt.c (build_up_reference): Use target_type for the temporary var.
504 * except.c (build_throw): Set EXPR_LOCATION.
506 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
508 * semantics.c (finish_compound_stmt): Avoid creating an
509 unnecessary BIND_EXPR.
511 * call.c (convert_like_real): Don't check narrowing if the element
512 is also an initializer-list.
514 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
516 * parser.c (cp_parser_objc_at_property_declaration): Recognize
517 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
518 Do not use objc_set_property_attr, but use local variables
519 instead. Detect repeated usage of setter, getter and ivar
520 attributes. Improved error processing when a setter name does not
521 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
522 that the token is a keyword. Updated call to
523 objc_add_property_declaration.
525 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
527 * parser.c (cp_parser_objc_property_decl): Renamed to
528 cp_parser_objc_struct_declaration. Return the parsed trees
529 instead of calling objc_add_property_variable directly. Detect
530 missing or invalid declspecs. Implemented attributes. Do not eat
531 the ';' at the end. Exit loop whenever a non-comma is parsed, not
533 (cp_parser_objc_at_property): Renamed to
534 cp_parser_objc_at_property_declaration. Updated calls to
535 objc_add_property_variable, now objc_add_property_declaration, and
536 to cp_parser_objc_property_decl, now
537 cp_parser_objc_struct_declaration. Rewritten all code to be more
538 robust in dealing with syntax errors, and almost identical to the
539 one in c_parser_objc_at_property_declaration.
540 (cp_parser_objc_property_attrlist): Removed.
541 (cp_parser_objc_method_prototype_list): Updated call to
542 cp_parser_objc_at_property.
543 (cp_parser_objc_method_definition_list): Same change.
544 (cp_parser_objc_class_ivars): Detect a number of invalid
545 declarations of instance variables and produce errors when they
548 2010-10-26 Jason Merrill <jason@redhat.com>
550 * tree.c (build_vec_init_expr): Split out from...
551 (build_array_copy): ...here.
552 * init.c (perform_member_init): Use it.
553 * cp-tree.h: Declare it.
554 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
555 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
556 (cp_gimplify_expr): Handle array default-initialization via
559 * tree.c (stabilize_expr): Handle xvalues properly.
561 * call.c (build_over_call): Use argarray[0] for 'this' argument.
563 * decl.c (finish_function): Don't look at function_depth.
565 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
567 Implement opaque-enum-specifiers for C++0x.
568 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
569 (OPAQUE_ENUM_P): New.
570 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
571 (start_enum): Update prototype.
572 (finish_enum_value_list): New prototype.
573 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
574 "enum class" is used in an elaborated-type-specifier.
575 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
576 * decl.c (copy_type_enum): New.
577 (finish_enum_value_list): New, with code from finish_enum.
578 (finish_enum): A lot of code removed. Added a gcc_assert.
579 (start_enum): Add parameters enumtype and is_new.
580 Rewrite to work with opaque-enum-specifiers.
581 * pt.c (maybe_process_partial_specialization): Allow for template
582 specialization of enumerations, with a pedwarn.
583 (lookup_template_class): Update call to start_enum. Call to
585 (tsubst_enum): Call to begin_scope, finish_scope and
586 finish_enum_value_list.
588 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
590 Removed Objective-C++ specific replacement of cxx_printable_name.
591 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
592 to cxx_printable_name for both C++ and Objective-C++.
593 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
595 * error.c (dump_decl): For Objective-C++, call
596 objc_maybe_printable_name here ...
597 * tree.c (cxx_printable_name_internal): ... instead of here.
599 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
601 * tree.c (cxx_printable_name_internal): In Objective-C++, call
602 objc_maybe_printable_name.
604 2010-10-22 Jason Merrill <jason@redhat.com>
607 * pt.c (instantiate_class_template): Don't instantiate default
611 * init.c (build_vec_init): Handle memberwise move.
613 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
616 * call.c (add_function_candidate): Don't use TREE_VALUE on null
619 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
621 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
622 bool instead of calling objc_set_method_type.
623 (cp_parser_objc_method_signature): Updated calls to
624 cp_parser_objc_method_type and to objc_build_method_signature.
625 (cp_parser_objc_method_prototype_list): Updated calls to
626 objc_add_method_declaration. Use token->type to determine if it
627 is a class method or not.
628 (cp_parser_objc_method_definition_list): Same change.
630 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
633 * parser.c (cp_convert_range_for): Call cp_finish_decl
634 instead of finish_expr_stmt.
636 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
638 * cp-lang.c (finish_file): Removed.
639 * decl2.c (cp_write_global_declarations): Call
640 objc_write_global_declarations when compiling Objective-C++.
642 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
645 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
646 (coerce_template_parms): Likewise for args.
648 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
650 Implemented parsing @synthesize and @dynamic for Objective-C++.
651 * parser.c (cp_parser_objc_method_definition_list): Recognize
652 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
653 (cp_parser_objc_at_dynamic_declaration): New.
654 (cp_parser_objc_at_synthesize_declaration): New.
656 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
658 * parser.c (cp_parser_objc_identifier_list): Check the return
659 value of cp_parser_identifier and react if it is error_mark_node.
661 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
663 Merge from apple/trunk branch on FSF servers.
665 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
668 * call.c (standard_conversion, implicit_conversion): Ignore
669 'volatile' attribute of artificially volatized type in objc when
670 evaluating various conversion weights.
672 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
675 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
676 artiificially 'volatized' type before doing pointer comparison.
678 2010-10-18 Jakub Jelinek <jakub@redhat.com>
681 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
684 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
686 Merge from apple/trunk branch on FSF servers.
688 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
691 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
692 objc object types if type is scope qualified.
694 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
696 Merge from apple/trunk branch on FSF servers.
698 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
701 * lex.c (unqualified_name_lookup_error): Issue diagnostic
702 for private 'ivar' access.
704 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
706 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
707 enum, and handle @package.
709 2010-10-15 Jason Merrill <jason@redhat.com>
712 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
713 with a different typedef variant of the element type.
715 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
717 merge from FSF apple 'trunk' branch.
718 2006 Fariborz Jahanian <fjahanian@apple.com>
720 Radars 4436866, 4505126, 4506903, 4517826
721 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
723 (cp_build_modify_expr): Likewise.
724 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
725 (cp_parser_objc_method_definition_list): Likewise.
726 (cp_parser_objc_property_decl): New.
727 (cp_parser_objc_property_attrlist): New.
728 (cp_parser_objc_at_property): New.
730 2010-10-14 Richard Guenther <rguenther@suse.de>
733 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
734 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
736 * error.c (dump_type): Handle NULLPTR_TYPE.
737 (dump_type_prefix): Likewise.
738 (dump_type_suffix): Likewise.
739 * mangle.c (write_type): Likewise.
740 * name-lookup.c (arg_assoc_type): Likewise.
741 * rtti.c (typeinfo_in_lib_p): Likewise.
742 * pt.c (tsubst): Likewise.
744 2010-10-13 Jason Merrill <jason@redhat.com>
747 * class.c (fixup_attribute_variants): New fn.
748 * cp-tree.h: Declare it.
749 * pt.c (instantiate_class_template): Call it.
750 * semantics.c (begin_class_definition): Call it.
752 2010-10-13 Richard Henderson <rth@redhat.com>
754 * cp-lang.c (cp_eh_personality): Update call to
755 build_personality_function.
756 * except.c (choose_personality_routine): Update function comment.
758 2010-10-13 Richard Guenther <rguenther@suse.de>
760 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
761 clear DECL_CHAIN of NAMESPACE_DECLs.
763 2010-10-11 Martin Jambor <mjambor@suse.cz>
766 * cp-tree.h (current_class_ref): Check that cp_function_chain is
768 * call.c (build_cxx_call): Likewise.
770 2010-10-10 Jason Merrill <jason@redhat.com>
772 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
773 (tsubst_default_arguments): Only do this once for cloned fns.
774 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
776 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
777 (tsubst_copy_and_build): Likewise.
778 (tsubst_initializer_list): Likewise.
779 (tsubst_copy): Change default to gcc_unreachable. Handle
780 OVERLOAD and PTRMEM_CST.
782 2010-10-10 Jason Merrill <jason@redhat.com>
786 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
788 2010-10-07 Andi Kleen <ak@linux.intel.com>
790 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
791 (cc1plus-dummy): Remove.
792 (cc1plus-checksum): Change to run checksum over object files
795 2010-10-08 Joseph Myers <joseph@codesourcery.com>
797 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
799 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
801 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
803 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
805 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
806 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
807 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
808 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
809 * parser.c (cp_parser_objc_encode_expression): Updated comment.
811 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
813 Merge from apple/trunk branch on FSF servers.
815 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
818 * parser.c (cp_parser_objc_interstitial_code): Recognize
819 and parse RID_NAMESPACE keyword.
821 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
823 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
824 finding ellipsis, before checking for attributes.
826 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
828 Merge from apple/trunk branch on FSF servers.
829 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
830 longer existing gcc/c-common.def.
832 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
835 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
836 * parser.c (cp_parser_objc_encode_expression): Build a templatized
837 parse tree for @encode(T).
839 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
842 * c-common.def: Add new expression code AT_ENCODE_EXPR.
844 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
847 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
848 code folding offsetof-like computations.
850 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
853 * parser.c (cp_parser_objc_class_interface): If no identifier
854 follows an @interface token, stop parsing the interface after
856 (cp_parser_objc_class_implementation): If no identifier follows an
857 @implementation token, stop parsing the implementation after
860 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
863 * parser.c (cp_parser_objc_method_keyword_params): If the required
864 colon is not found while parsing parameters, stop parsing them.
866 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
869 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
870 @end after detecting it. Print an error if @end is found without
872 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
873 detecting it. Fixed reading the next token when continuing
874 because of an error in a method signature. Print an error if EOF
875 is found without an '@end'.
876 (cp_parser_objc_method_definition_list): Same change.
878 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
880 Merge from apple/trunk branch on FSF servers:
882 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
885 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
886 method parameters and issue error.
887 (cp_parser_objc_method_definition_list): Check for invalid tokens
888 which cannot start a function definition.
890 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
893 * parser.c (cp_parser_objc_message_args): Check for missing message
894 arguments and syntax error.
896 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
899 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
902 2005-08-15 Ziemowit Laski <zlaski@apple.com>
905 * parser.c (cp_parser_objc_interstitial_code): Catch stray
906 '{' and '}' tokens and issue appropriate errors.
908 2005-08-02 Ziemowit Laski <zlaski@apple.com>
911 (cp_parser_statement_seq_opt): In addition to '}' and
912 end-of-file, a statement sequence may also be terminated
915 2010-10-05 Joseph Myers <joseph@codesourcery.com>
917 * cp-tree.h (cxx_print_error_function,
918 cxx_initialize_diagnostics): Declare using diagnostic_context
921 2010-10-04 Andi Kleen <ak@linux.intel.com>
923 * Make-lang.in (g++, cc1plus): Add + to build rule.
925 2010-10-04 Jason Merrill <jason@redhat.com>
927 * tree.c (decl_storage_duration): New.
928 * cp-tree.h: Declare it.
929 (duration_kind): Return values.
931 2010-10-03 Jason Merrill <jason@redhat.com>
933 * typeck.c (require_complete_type_sfinae): Add complain parm to...
934 (require_complete_type): ...this function.
935 (cp_build_array_ref, convert_arguments): Use it.
936 (convert_for_initialization, cp_build_modify_expr): Likewise.
937 * cp-tree.h: Declare it.
938 * call.c (build_over_call): Use it.
940 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
942 merge from FSF 'apple/trunk' branch.
943 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
946 * cp/parser.c (cp_parser_objc_interstitial_code): For
947 @optional/@required set the optional/required flag.
949 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
951 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
952 and indentation when finding an Objective-C++ CPP_AT_NAME token.
954 2010-09-29 Richard Guenther <rguenther@suse.de>
956 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
957 (CP_TYPE_CONTEXT): Similar.
958 (FROB_CONTEXT): Frob global_namespace to the global
959 TRANSLATION_UNIT_DECL.
960 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
961 set DECL_CONTEXT of global_namespace to it.
962 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
963 instead of zeroing context.
964 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
965 (grokfndecl): Likewise.
966 (start_preparsed_function): Likewise.
967 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
968 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
969 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
970 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
971 (push_template_decl_real): Likewise.
972 (tsubst_friend_class): Likewise. Adjust context comparisons.
973 (instantiate_class_template): Use CP_TYPE_CONTEXT.
974 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
975 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
978 2010-09-29 Yao Qi <yao@codesourcery.com>
980 * decl.c (get_atexit_node): Fix typo.
982 2010-09-28 Jason Merrill <jason@redhat.com>
984 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
985 (real_lvalue_p): Take const_tree.
987 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
988 (cp_build_addr_expr_1): Likewise.
990 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
992 Partially merged from apple/trunk branch on FSF servers:
993 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
994 Radar 3803157 (method attributes)
996 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
997 (cp_parser_objc_method_tail_params_opt): Likewise.
998 (cp_parser_objc_method_signature): Likewise.
999 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
1000 (cp_parser_objc_method_prototype_list): Handle attributes.
1001 (cp_parser_objc_method_definition_list): Likewise.
1003 2010-09-28 Richard Henderson <rth@redhat.com>
1005 * cp-lang.c: Include "target.h".
1006 (cp_eh_personality): Use targetm.except_unwind_info.
1007 * Make-lang.in (cp-lang.o): Update deps.
1009 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
1011 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
1012 (cp_parser_declaration): Parse prefix attributes for ObjC++.
1013 (cp_parser_objc_protocol_declaration): Handle attributes.
1014 (cp_parser_objc_class_interface): Likewise.
1015 (cp_parser_objc_declaration): Likewise.
1017 2010-09-27 Jason Merrill <jason@redhat.com>
1019 Require lvalues as specified by the standard.
1020 * typeck.c (lvalue_or_else): Use real_lvalue_p.
1021 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
1022 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
1023 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
1024 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
1025 (build_const_cast_1): Adjust.
1026 * cp-tree.h: Declare new fns.
1027 * call.c (build_this, convert_like_real, build_over_call): Adjust.
1028 (initialize_reference): Adjust.
1029 * class.c (build_base_path, convert_to_base_statically): Adjust.
1030 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
1031 * cvt.c (build_up_reference, convert_to_reference): Adjust.
1032 * decl.c (register_dtor_fn): Adjust.
1033 * decl2.c (build_offset_ref_call_from_tree): Adjust.
1034 * except.c (initialize_handler_parm): Adjust.
1035 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
1036 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
1037 * tree.c (stabilize_expr): Adjust.
1039 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1041 Merge from apple/trunk branch on FSF servers:
1043 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1046 * typeck.c (composite_pointer_type): Call objc_have_common_type
1047 when comparing two objective-c pointer types.
1049 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1052 * call.c (standard_conversion): Do not issue warnings when
1053 comparing ObjC pointer types.
1055 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1058 * call.c (standard_conversion): Allow for a pointer conversion
1059 between any two ObjC pointer types.
1060 * typeck.c (composite_pointer_type): Determine common type
1061 for two ObjC pointer types.
1063 2010-09-24 Jan Hubicka <jh@suse.cz>
1065 * decl.c (finish_function): Use decl_replaceable_p
1066 * method.c (make_alias_for_thunk): Update call of
1067 cgraph_same_body_alias.
1069 2010-09-24 Jason Merrill <jason@redhat.com>
1071 * decl.c (compute_array_index_type): Remember type dependence of
1073 * pt.c (dependent_type_p_r): Don't recompute it here.
1075 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
1076 reference and pointer to the same type as "*" or "&".
1078 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
1080 * typeck.c (warn_args_num): Use warning 'too many arguments to
1081 method [methodname]' for an Objective-C method instead of the less
1082 satisfactory 'too many arguments to function' (with no method
1085 2010-09-21 Jason Merrill <jason@redhat.com>
1087 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
1088 special handling if we know the member.
1090 2010-09-18 Jason Merrill <jason@redhat.com>
1092 * call.c (compare_ics): Do lvalue/rvalue reference binding
1093 comparison for ck_list, too.
1095 2010-09-15 Jason Merrill <jason@redhat.com>
1097 * semantics.c (finish_id_expression): Diagnose use of function
1098 parms in evaluated context outside function body.
1100 * decl2.c (grokbitfield): Diagnose non-integral width.
1102 * call.c (convert_like_real): Use the underlying type of the
1103 reference for the temporary.
1105 2010-09-15 Jakub Jelinek <jakub@redhat.com>
1108 * class.c (build_vtbl_initializer): Use fn instead of init's operand
1109 as first argument to FDESC_EXPR.
1111 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
1114 * decl.c (grokdeclarator): Check build_memfn_type return value
1115 for error_mark_node.
1117 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1119 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
1120 (begin_range_for_stmt): Likewise.
1122 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
1124 Implement range-based for-statements.
1125 * cp-tree.def (RANGE_FOR_STMT): New.
1126 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
1127 (cp_convert_range_for): Declare.
1128 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
1129 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
1130 * semantics.c (begin_range_for_stmt): New.
1131 (finish_range_for_decl): New.
1132 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1133 (perform_koenig_lookup): Add extra argument include_std.
1134 * parser.c (cp_parser_c_for): New with code from
1135 cp_parser_iteration_statement().
1136 (cp_parser_range_for): New.
1137 (cp_convert_range_for): New.
1138 (cp_parser_iteration_statement): Add range-for support.
1139 (cp_parser_condition): Adjust comment.
1140 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1142 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1143 * cxx-pretty-print.c: Likewise.
1144 * lex.c (cxx_init): Likewise.
1145 * name-lookup.c (lookup_function_nonclass): Add extra argument
1147 (lookup_arg_dependent): Likewise.
1148 * name-lookup.h: Likewise.
1150 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1153 * error.c (maybe_warn_cpp0x): Add new warning
1154 CPP0X_INLINE_NAMESPACES.
1155 * parser.c (cp_parser_namespace_definition): Likewise.
1156 * cp-tree.h (cpp0x_warn_str): Likewise.
1158 2010-09-10 Richard Guenther <rguenther@suse.de>
1160 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1161 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1163 2010-09-10 Jan Hubicka <jh@suse.cz>
1165 PR tree-optimization/45605
1166 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1169 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1172 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1173 before calling fold_decl_constant_value.
1175 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1177 * cp-tree.h (build_enumerator): Add new location_t parameter.
1178 (build_lang_decl_loc): New function.
1179 * decl.c (build_enumerator): New parameter loc. Use it when calling
1180 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1181 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1182 * parser.c (cp_parser_enumerator_definition): Ditto.
1183 * lex.c (build_lang_decl_loc): New function.
1185 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1190 * tree.c (strip_typedefs): Strip typedefs from the context of
1193 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1195 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1196 * call.c (build_conditional_expr): Likewise.
1197 (convert_arg_to_ellipsis): Likewise.
1199 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1201 * parser.c (make_pointer_declarator, make_reference_declarator,
1202 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1203 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1205 2010-09-06 Jason Merrill <jason@redhat.com>
1207 * call.c (implicit_conversion): Fix value-init of enums.
1208 (convert_like_real): Likewise.
1210 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1212 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1213 (fold_non_dependent_expr): ...here.
1214 (convert_nontype_argument): Use it. Take complain parm.
1215 Use perform_implicit_conversion instead of ocp_convert.
1216 Allow cv-qual changes.
1217 (convert_template_argument): Pass complain down.
1218 (tsubst_template_arg): Suppress constant expression warnings.
1221 * method.c (synthesized_method_walk): In constructors, also check
1222 subobject destructors.
1224 * semantics.c (finish_compound_literal): Always build a
1227 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1230 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1232 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1235 * parser.c (cp_parser_omp_atomic): Handle boolean
1236 {PRE,POST}_INCREMENT.
1238 2010-08-29 Jason Merrill <jason@redhat.com>
1241 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1242 after tentative parsing.
1244 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1246 * Make-lang.in (g++spec.o): Update dependencies.
1247 * g++spec.c: Include opts.h
1248 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1249 (lang_specific_driver): Use cl_decoded_option structures.
1251 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1253 * call.c: Use FOR_EACH_VEC_ELT.
1254 * class.c: Likewise.
1256 * decl2.c: Likewise.
1257 * error.c: Likewise.
1258 * except.c: Likewise.
1259 * mangle.c: Likewise.
1260 * method.c: Likewise.
1261 * name-lookup.c: Likewise.
1262 * parser.c: Likewise.
1265 * semantics.c: Likewise.
1266 * typeck2.c: Likewise.
1268 2010-08-19 Jason Merrill <jason@redhat.com>
1270 * call.c (reference_related_p): Check for error_mark_node.
1271 (add_function_candidate): Check it instead of
1272 same_type_ignoring_top_level_qualifiers_p.
1275 * init.c (build_new_1): Don't use build_value_init in a template.
1276 (build_value_init): Make sure we don't.
1279 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1280 of empty class CONSTRUCTOR.
1282 * except.c (pending_noexcept, pending_noexcept_checks): New.
1283 (perform_deferred_noexcept_checks): New.
1284 (maybe_noexcept_warning): Split from...
1285 (finish_noexcept_expr): ...here. Adjust.
1286 * decl2.c (cp_write_global_declarations): Call
1287 perform_deferred_noexcept_checks.
1288 * cp-tree.h: And declare it.
1290 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1293 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1296 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1298 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1299 or if -fms-extensions is enabled check, check permissive.
1301 2010-08-09 Jason Merrill <jason@redhat.com>
1304 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1306 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1308 * call.c (add_builtin_candidates): Use VECs for local variable
1309 `types'. Adjust remainder of function accordingly.
1311 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1313 * name-lookup.c (is_associated_namespace): Convert local variables
1314 to be VECs instead of TREE_LISTs.
1316 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1318 * tree.c (varargs_function_p): Use stdarg_p.
1320 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1322 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1323 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1324 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1325 Change type to a VEC.
1326 (unparsed_funs_with_default_args): Define.
1327 (unparsed_funs_with_definitions): Define.
1328 (push_unparsed_function_queues): New function.
1329 (cp_parser_new): Call it.
1330 (pop_unparsed_function_queues): New function.
1331 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1332 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1333 (cp_parser_save_member_function_body): Likewise.
1334 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1335 and pop_unparsed_function_queues.
1336 (cp_parser_late_parsing_default_args): Likewise.
1337 (cp_parser_save_default_args): Use VEC_safe_push.
1339 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1341 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1343 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1345 * decl.c (poplevel): Adjust for type changes.
1346 (declare_local_label): Likewise.
1348 2010-08-06 Jason Merrill <jason@redhat.com>
1350 * typeck.c (complete_type_or_maybe_complain): Split out from...
1351 (complete_type_or_else): Here.
1352 (build_class_member_access_expr): Call it.
1353 (finish_class_member_access_expr): Likewise.
1354 * call.c (build_special_member_call): Likewise.
1355 * cvt.c (build_expr_type_conversion): Likewise.
1356 * init.c (build_new): Likewise.
1357 * typeck2.c (build_functional_cast): Likewise.
1358 * cp-tree.h: Declare it.
1360 * init.c (build_value_init): Add complain parm.
1361 (build_value_init_noctor): Likewise.
1362 (perform_member_init): Pass it.
1363 (expand_aggr_init_1): Likewise.
1364 (build_new_1): Likewise.
1365 (build_vec_init): Likewise.
1366 * pt.c (tsubst_expr): Likewise.
1367 * typeck2.c (build_functional_cast): Likewise.
1368 * cp-tree.h: Adjust.
1369 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1371 * typeck.c (decay_conversion): Any expression with type nullptr_t
1374 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1377 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1379 2010-07-27 Jason Merrill <jason@redhat.com>
1381 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1382 from build_value_init.
1383 * init.c (build_value_init_noctor): Give error for unknown array
1386 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1388 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1390 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1392 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1393 c_common_initialize_diagnostics.
1394 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1395 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1397 2010-07-21 Jason Merrill <jason@redhat.com>
1399 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1401 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1404 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1407 * pt.c (instantiate_class_template): Propagate the template's
1408 location to its instance.
1410 2010-07-20 Jason Merrill <jason@redhat.com>
1413 * pt.c (tsubst_copy_and_build): Rework last change.
1416 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1419 2010-07-19 Jason Merrill <jason@redhat.com>
1422 * semantics.c (finish_decltype_type): Correct decltype
1423 of parenthesized rvalue reference variable.
1426 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1427 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1429 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1432 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1434 * cp-tree.h: Adjust declaration.
1435 * init.c (perform_member_init): Adjust caller.
1436 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1437 * typeck2.c (store_init_value): Likewise.
1438 (build_functional_cast): Pass complain argument to
1439 build_x_compound_expr_from_list.
1441 2010-07-16 Jason Merrill <jason@redhat.com>
1444 * pt.c (process_partial_specialization): Diagnose partial
1445 specialization after instantiation.
1446 (most_specialized_class): Add complain parm.
1448 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1450 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1452 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1453 cp_build_function_call.
1455 2010-07-15 Jason Merrill <jason@redhat.com>
1458 * call.c (add_function_candidate): If we're working on an implicit
1459 declaration, don't consider candidates that won't match.
1460 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1461 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1464 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1465 (TYPE_HAS_USER_OPEQ): New.
1466 * decl.c (grok_special_member_properties): Set it.
1467 * class.c (add_implicitly_declared_members): Don't lazily declare
1468 constructors/operator= if a base or member has a user-declared one.
1469 (check_bases_and_members, check_bases): Adjust.
1470 (check_field_decls, check_field_decl): Adjust.
1472 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1474 * decl.c (integer_three_node): Remove.
1475 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1476 * cp-tree.h (integer_three_node): Remove.
1478 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1480 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1482 * class.c: Likewise.
1483 * cp-gimplify.c: Likewise.
1485 * decl2.c: Likewise.
1487 * mangle.c: Likewise.
1488 * name-lookup.c: Likewise.
1489 * optimize.c: Likewise.
1490 * parser.c: Likewise.
1493 * search.c: Likewise.
1494 * semantics.c: Likewise.
1495 * typeck.c: Likewise.
1496 * typeck2.c: Likewise.
1498 2010-07-14 Jason Merrill <jason@redhat.com>
1500 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1501 (build_field_list): Cache field type.
1503 Implement C++0x unrestricted unions (N2544)
1504 * class.c (check_field_decl): Loosen union handling in C++0x.
1505 * method.c (walk_field_subobs): Split out from...
1506 (synthesized_method_walk): ...here. Set msg before loops.
1507 (process_subob_fn): Check for triviality in union members.
1508 * init.c (sort_mem_initializers): Splice out uninitialized
1509 anonymous unions and union members.
1510 (push_base_cleanups): Don't automatically destroy anonymous unions
1513 2010-07-13 Jason Merrill <jason@redhat.com>
1516 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1517 (TYPE_HAS_USER_OPEQ): New.
1518 * decl.c (grok_special_member_properties): Set it.
1519 * class.c (add_implicitly_declared_members): Don't lazily declare
1520 constructors/operator= if a base or member has a user-declared one.
1521 (check_bases_and_members, check_bases): Adjust.
1522 (check_field_decls, check_field_decl): Adjust.
1523 * method.c (synthesized_method_walk): Initialize check_vdtor.
1526 * mangle.c (write_type): Canonicalize.
1527 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1528 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1530 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1533 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1535 * typeck.c (get_delta_difference): Update prototype, add a
1536 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1537 add checks for error_mark_node.
1538 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1539 parameter; update lookup_base call.
1540 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1541 parameter; update get_delta_difference call and add check for
1543 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1544 parameter; update get_delta_difference call and add check for
1545 error_mark_node; update build_ptrmemfunc call.
1546 (build_static_cast_1): Adjust convert_ptrmem call.
1547 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1548 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1549 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1550 and build_ptrmemfunc calls.
1551 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1553 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1556 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1557 adjust build_special_member_call call, pass complain.
1558 (convert_like_real): Adjust build_temp call, pass complain.
1560 2010-07-09 Jason Merrill <jason@redhat.com>
1563 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1564 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1565 Set BV_LOST_PRIMARY.
1566 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1568 2010-07-08 Jason Merrill <jason@redhat.com>
1571 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1572 virtual bases for covariant thunks.
1574 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1576 * cp-tree.h: Do not include toplev.h.
1578 2010-07-06 Jason Merrill <jason@redhat.com>
1581 * call.c (is_std_init_list): Look through typedefs.
1584 * init.c (build_offset_ref): If scope isn't dependent,
1585 don't exit early. Look at TYPE_MAIN_VARIANT.
1586 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1588 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1590 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1592 * cp-tree.h (impl_conv_void): New type.
1593 (convert_to_void): Adjust prototype.
1594 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1595 diagnostic for easy translation. Change caller.
1596 * typeck.c: Update call to convert_to_void.
1597 * semantics.c: Likewise.
1600 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1602 * decl.c (cp_finish_decl): Call add_local_decl.
1603 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1605 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1607 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1610 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1613 * parser.c (cp_parser_primary_expression): Error if local template is
1616 2010-07-02 Le-Chun Wu <lcwu@google.com>
1619 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1620 (variable or type) shadows another type.
1622 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1625 * typeck.c (convert_for_assignment): When converting a convertible
1626 vector type or objc++ types, call mark_rvalue_use.
1627 * typeck2.c (build_m_component_ref): Use return values from
1628 mark_rvalue_use or mark_lvalue_use.
1629 * class.c (build_base_path): Likewise.
1630 * call.c (build_conditional_expr): Likewise.
1632 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1635 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1638 2010-07-01 Richard Guenther <rguenther@suse.de>
1640 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1641 predicate we are looking for, allow non-gimplified
1644 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1647 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1648 arg is NULL_TREE too.
1649 * call.c (convert_class_to_reference): Return error_mark_node when
1652 2010-06-30 Michael Matz <matz@suse.de>
1654 * repo.c (finish_repo): Fix typo.
1656 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1658 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1660 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1662 * repo.c (pending_repo): Change type to a VEC.
1663 (finish_repo): Adjust for new type of pending_repo.
1664 (repo_emit_p): Likewise.
1666 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1668 * tree.c: Include gimple.h. Do not include tree-flow.h
1669 * decl.c: Do not include tree-flow.h
1670 * Make-lang.in: Adjust dependencies.
1672 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1674 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1675 (incomplete_vars): Adjust comment. Change type to a VEC.
1676 (maybe_register_incomplete_var): Adjust for new type.
1677 (complete_vars): Adjust iteration over incomplete_vars.
1679 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1681 * decl.c (struct named_label_entry): Change type of bad_decls field
1683 (poplevel_named_label_1): Adjust for new type of bad_decls.
1684 (check_goto): Likewise.
1686 2010-06-29 Jason Merrill <jason@redhat.com>
1688 Enable implicitly declared move constructor/operator= (N3053).
1689 * class.c (add_implicitly_declared_members): A class with no
1690 explicitly declared copy or move constructor gets both declared
1691 implicitly, and similarly for operator=.
1692 (check_bases): A type with no copy ctor does not inhibit
1693 a const copy ctor in a derived class. It does mean the derived
1695 (check_field_decl): Likewise.
1696 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1697 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1698 (trivially_copyable_p): Likewise.
1699 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1700 * class.c (finish_struct_bits): Likewise.
1701 * tree.c (build_target_expr_with_type): Likewise.
1702 * typeck2.c (store_init_value): Likewise.
1704 Enable implicitly deleted functions (N2346)
1705 * class.c (check_bases_and_members): Adjust lambda flags.
1706 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1708 * decl2.c (mark_used): Adjust error for use of deleted function.
1710 Machinery to support implicit delete/move.
1711 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1712 has_complex_move_ctor, has_complex_move_assign bitfields.
1713 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1714 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1715 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1716 (enum special_function_kind): Add sfk_move_assignment.
1717 (LOOKUP_SPECULATIVE): New.
1718 * call.c (build_over_call): Return early if it's set.
1719 (build_over_call): Use trivial_fn_p.
1720 * class.c (check_bases): If the base has no default constructor,
1721 the derived one is non-trivial. Handle move ctor/op=.
1722 (check_field_decl): Likewise.
1723 (check_bases_and_members): Handle move ctor/op=.
1724 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1725 (type_has_move_constructor, type_has_move_assign): New.
1726 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1727 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1728 (trivial_fn_p): New.
1729 (do_build_copy_constructor): Use it.
1730 (do_build_assign_ref): Likewise. Handle move assignment.
1731 (build_stub_type, build_stub_object, locate_fn_flags): New.
1732 (locate_ctor): Use locate_fn_flags.
1733 (locate_copy, locate_dtor): Remove.
1734 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1735 (process_subob_fn, synthesized_method_walk): New.
1736 (maybe_explain_implicit_delete): New.
1737 (implicitly_declare_fn): Use synthesized_method_walk,
1738 type_has_trivial_fn, and type_set_nontrivial_flag.
1739 (defaulted_late_check): Set DECL_DELETED_FN.
1740 (defaultable_fn_check): Handle sfk_move_assignment.
1741 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1742 implicitly deleted move ctor/op=.
1743 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1744 (lookup_fnfields_slot): New.
1745 * semantics.c (omp_clause_info_fndecl): Remove.
1746 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1747 get_copy_assign, trivial_fn_p.
1748 (trait_expr_value): Adjust call to locate_ctor.
1749 * tree.c (special_function_p): Handle sfk_move_assignment.
1751 * class.c (type_has_virtual_destructor): New.
1752 * cp-tree.h: Declare it.
1753 * semantics.c (trait_expr_value): Use it.
1755 * call.c (build_over_call): Only give warnings with tf_warning.
1757 * name-lookup.c (pop_scope): Handle NULL_TREE.
1759 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1760 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1761 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1762 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1763 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1764 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1765 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1766 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1767 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1768 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1769 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1770 * search.c, semantics.c, tree.c: Adjust.
1772 * pt.c (dependent_scope_ref_p): Remove.
1773 (value_dependent_expression_p): Don't call it.
1774 (type_dependent_expression_p): Here either.
1775 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1776 if the scope isn't dependent.
1778 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1782 * pt.c (has_value_dependent_address): New.
1783 (value_dependent_expression_p): Check it.
1784 (convert_nontype_argument): Likewise. Call decay_conversion before
1785 folding if we want a pointer.
1786 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1787 scope is the current instantiation.
1789 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1792 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1795 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1797 * init.c: Do not include except.h.
1800 * cp-lang.c: Likewise.
1802 * semantics.c: Likewise.
1803 * decl2.c: Likewise.
1804 * except.c: Likewise.
1805 (init_exception_processing): Do not set the removed
1806 lang_protect_cleanup_actions here.
1807 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1808 (doing_eh): New, moved from except.c but removed the do_warning flag.
1809 (expand_start_catch_block): Update doing_eh call.
1810 (expand_end_catch_block): Likewise.
1811 (build_throw): Likewise.
1812 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1813 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1814 cp_protect_cleanup_actions.
1815 * Make-lang.in: Update dependencies.
1817 2010-06-26 Jason Merrill <jason@redhat.com>
1819 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1820 constructor called with a single argument that takes a reference
1821 to the constructor's class.
1822 (BAD_CONVERSION_RANK): New.
1823 (compare_ics): Use it to compare bad ICSes.
1825 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1827 * lang-specs.h: Remove +e handling.
1829 2010-06-24 Andi Kleen <ak@linux.intel.com>
1831 * parser.c: (cp_parser_question_colon_clause):
1832 Switch to use cp_lexer_peek_token.
1833 Call warn_for_omitted_condop. Call pedwarn for omitted
1836 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1839 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1840 datum and mark_rvalue_use on component.
1843 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1844 the CALL_EXPR has no arguments.
1846 2010-06-21 Jason Merrill <jason@redhat.com>
1848 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1850 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1853 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1855 * name-lookup.c (struct arg_lookup): Convert namespaces and
1856 classes fields to VEC.
1857 (arg_assoc_namespace): Adjust for new type of namespaces.
1858 (arg_assoc_class): Adjust for new type of classes.
1859 (lookup_arg_dependent): Use make_tree_vector and
1860 release_tree_vector.
1861 * typeck2.c (build_x_arrow): Use vec_member.
1863 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1866 * error.c (dump_decl): Better wording for anonymous namespace.
1868 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1870 * class.c (build_vtbl_initializer): Adjust computation of new_position
1871 and which entry to add padding for.
1873 2010-06-16 Jason Merrill <jason@redhat.com>
1875 * except.c (check_noexcept_r): Return the problematic function.
1876 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1877 * pt.c (tsubst_copy_and_build): Pass it.
1878 * parser.c (cp_parser_unary_expression): Likewise.
1879 * cp-tree.h: Adjust prototype.
1881 * method.c (defaulted_late_check): Give the defaulted method
1882 the same exception specification as the implicit declaration.
1884 2010-06-15 Jason Merrill <jason@redhat.com>
1886 * class.c (add_implicitly_declared_members): Implicit assignment
1887 operators can also be virtual overriders.
1888 * method.c (lazily_declare_fn): Likewise.
1890 * call.c (convert_like_real): Give "initializing argument of"
1891 information for ambiguous conversion. Give source position
1894 * call.c (print_z_candidates): Do print viable deleted candidates.
1895 (joust): Don't choose a deleted function just because its worst
1896 conversion is better than another candidate's worst.
1898 * call.c (convert_like_real): Don't complain about
1899 list-value-initialization from an explicit constructor.
1901 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1902 DECL_SOURCE_LOCATION directly.
1904 * class.c (type_has_user_provided_default_constructor): Use
1907 * call.c (is_subseq): Handle ck_aggr, ck_list.
1908 (compare_ics): Treat an aggregate or ambiguous conversion to the
1909 same type as involving the same function.
1911 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1913 * typeck.c (convert_for_assignment): Fix comment. Change message
1914 format from %d to %qP.
1915 (convert_for_initialization): Fix comment.
1917 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1919 * cp-tree.h (expr_list_kind): New type.
1920 (impl_conv_rhs): New type.
1921 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1923 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1924 diagnostics for easy translation. Change caller.
1925 (convert_for_initialization): Use impl_conv_rhs and change caller.
1926 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1927 diagnostics for easy translation. Change caller.
1928 * decl.c (bad_spec_place): New enum.
1929 (bad_specifiers): Use it and emit the diagnostics for easy
1930 translation. Change caller.
1931 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1933 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1935 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1937 * decl2.c (cp_write_global_declarations): Adjust for new type of
1938 decl_namespace_list.
1939 * name-lookup.c (current_decl_namespace): Likewise.
1940 (push_decl_namespace): Likewise.
1941 (pop_decl_namespace): Likewise.
1943 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1945 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1946 instead of build_function_type.
1947 * decl.c (cxx_init_decl_processing): Likewise.
1948 (declare_global_var): Likewise.
1949 (get_atexit_node): Likewise.
1950 (expand_static_init): Likewise.
1951 * decl2.c (start_objects): Likewise.
1952 (start_static_storage_duration_function): Likewise.
1953 * except.c (init_exception_processing): Likewise.
1954 (build_exc_ptr): Likewise.
1955 (build_throw): Likewise.
1956 * rtti.c (throw_bad_cast): Likewise.
1957 (throw_bad_typeid): Likewise.
1958 (build_dynamic_cast_1): Likewise.
1960 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1962 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1963 (build_op_delete_call): Likewise.
1964 (build_over_call): Likewise.
1965 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1966 * pt.c (process_partial_specialization): Likewise.
1967 (tsubst_template_args): Likewise.
1968 * semantics.c (finish_asm_stmt): Likewise.
1970 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1972 * decl.c (record_key_method_defined): New, broken out of ...
1973 (finish_function): ... here. Call it.
1974 (start_decl): Treat aliases as definitions.
1976 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1978 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1980 * pt.c (maybe_process_partial_specialization): Likewise.
1981 (register_specialization): Likewise.
1982 (add_pending_template): Likewise.
1983 (lookup_template_class): Likewise.
1984 (push_tinst_level): Likewise.
1986 * parser.c (cp_lexer_new_main): Likewise.
1987 (cp_lexer_new_from_tokens): Likewise.
1988 (cp_token_cache_new): Likewise.
1989 (cp_parser_context_new): Likewise.
1990 (cp_parser_new): Likewise.
1991 (cp_parser_nested_name_specifier_opt): Likewise.
1992 (cp_parser_template_id): Likewise.
1994 * name-lookup.c (binding_entry_make): Likewise.
1995 (binding_table_construct): Likewise.
1996 (binding_table_new): Likewise.
1997 (cxx_binding_make): Likewise.
1998 (pushdecl_maybe_friend): Likewise.
1999 (begin_scope): Likewise.
2000 (push_to_top_level): Likewise.
2002 * lex.c (init_reswords): Likewise.
2003 (retrofit_lang_decl): Likewise.
2004 (cxx_dup_lang_specific_decl): Likewise.
2005 (copy_lang_type): Likewise.
2006 (cxx_make_type): Likewise.
2008 * decl.c (make_label_decl): Likewise.
2009 (check_goto): Likewise.
2010 (start_preparsed_function): Likewise.
2011 (save_function_data): Likewise.
2013 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2015 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2017 * class.c (finish_struct_1): Likewise.
2019 * cp-tree.h (struct lang_type): Add variable_size GTY option.
2020 (struct lang_decl): Likewise.
2022 * parser.c (cp_parser_new): Update comment to not reference
2025 2010-06-07 Jason Merrill <jason@redhat.com>
2028 * error.c (dump_parameters): Mask out TFF_SCOPE.
2029 (dump_simple_decl): Don't print the scope of a PARM_DECL.
2030 (dump_scope): Remove no-op mask.
2033 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
2035 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
2036 * init.c (build_offset_ref): Use it.
2037 * pt.c (maybe_process_partial_specialization): Use it.
2038 (instantiate_class_template): Use it.
2039 * search.c (lookup_base): Use it.
2041 2010-06-07 Jakub Jelinek <jakub@redhat.com>
2044 * expr.c (mark_exp_read): Handle INDIRECT_REF.
2045 * cvt.c (convert_to_void): Handle INDIRECT_REF like
2046 handled_component_p.
2049 * decl.c (initialize_local_var): If TREE_USED is set on the type,
2050 set also DECL_READ_P on the decl.
2052 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2055 * cp-tree.h (typedef_variant_p): Move this declaration to
2057 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2058 * decl.c (grokdeclarator): Do not rename debug info of an
2059 anonymous tagged type named by a typedef.
2061 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
2064 * class.c (check_field_decls): Move the call to
2065 check_bitfield_decl before trying to set the
2066 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
2068 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2070 * typeck.c: Update include path for moved files.
2073 * cp-gimplify.c: Likewise.
2074 * cp-lang.c: Likewise.
2076 * semantics.c: Likewise.
2077 * cxx-pretty-print.h: Likewise.
2078 * decl2.c: Likewise.
2079 * parser.c: Likewise.
2080 * cp-objcp-common.c: Likewise.
2081 * cp-tree.h: Likewise.
2082 * name-lookup.c: Likewise.
2084 * name-lookup.h: Likewise.
2085 * config-lang.in: Update paths in gtfiles for files in c-family/.
2086 * Make-lang.in: Likewise.
2088 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
2090 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
2091 * typeck.c (build_ptrmemfunc): Likewise.
2093 2010-06-04 Jason Merrill <jason@redhat.com>
2095 * typeck2.c (merge_exception_specifiers): Adjust merging of
2096 throw() and noexcept(true).
2098 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
2099 using an uninitialized variable.
2101 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
2102 (pp_cxx_expression): Likewise.
2104 Implement noexcept-specification (15.4)
2105 * parser.c (cp_parser_exception_specification_opt): Parse it.
2106 Give -Wdeprecated warning about throw() specs.
2107 * pt.c (tsubst_exception_specification): Handle it.
2108 * error.c (dump_exception_spec): Handle it.
2109 (dump_expr): Handle NOEXCEPT_EXPR.
2110 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
2111 * typeck.c (comp_except_specs): Handle compatibility rules.
2112 Change exact parm to take an enum.
2113 * typeck2.c (merge_exception_specifiers): Handle noexcept.
2114 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
2115 (type_throw_all_p, build_noexcept_spec): New fns.
2116 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
2117 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
2118 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
2119 (noexcept_true_spec, noexcept_false_spec): New macros.
2120 * name-lookup.c (pushdecl_maybe_friend): Adjust.
2121 * search.c (check_final_overrider): Adjust.
2122 * decl.c (check_redeclaration_exception_specification): Adjust.
2123 (use_eh_spec_block): Use type_throw_all_p.
2124 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
2125 Give operator new a noexcept-specification in C++0x mode.
2126 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
2127 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
2129 Implement noexcept operator (5.3.7)
2130 * cp-tree.def (NOEXCEPT_EXPR): New.
2131 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2132 * cp-tree.h: Declare finish_noexcept_expr.
2133 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2134 * pt.c (tsubst_copy_and_build): And tsubst it.
2135 (type_dependent_expression_p): Handle it.
2136 (value_dependent_expression_p): Handle it.
2138 * call.c (build_conditional_expr): Never fold in unevaluated context.
2139 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2140 * semantics.c (simplify_aggr_init_expr): Likewise.
2141 * typeck.c (merge_types): Call merge_exception_specifiers.
2142 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2143 DECL_ANTICIPATED for preferring new type.
2145 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2147 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2150 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2153 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2154 on object for static data members.
2156 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2157 Jason Merrill <jason@redhat.com>
2160 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2161 with the same type, call mark_lvalue_use on both.
2163 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2165 * class.c (struct vtbl_init_data_s): Remove last_init field.
2166 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2168 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2170 (build_vtt): Likewise.
2171 (initialize_vtable): Take a VEC instead of a tree.
2172 (build_vtt_inits): Change return type to void. Take a VEC **
2173 instead of a tree *; accumulate results into said VEC.
2174 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2175 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2176 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2178 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2179 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2181 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2182 rather than tree_cons.
2183 (build_vbase_offset_vtbl_entries): Likewise.
2184 (add_vcall_offset): Likewise.
2185 (build_rtti_vtbl_entries): Likewise.
2186 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2187 * decl.c (initialize_artificial_var): Use build_constructor instead
2188 of build_constructor_from_list.
2190 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2193 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2196 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2198 * parser.c (cp_parser_mem_initializer_list): Change error text.
2200 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2202 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2203 tree_decl_map hashtab from tree_map.
2204 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2205 (init_shadowed_var_for_decl): Adjust initialization.
2208 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2209 instead of calling mark_exp_read only when not an assignment.
2212 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2213 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2214 Set DECL_VALUE_EXPR on var.
2216 2010-06-02 Jason Merrill <jason@redhat.com>
2218 * error.c (dump_type): Improve typedef handling.
2223 * name-lookup.c (same_entity_p): New.
2224 (ambiguous_decl): Multiple declarations of the same entity
2227 2010-06-01 Jason Merrill <jason@redhat.com>
2230 * call.c (add_list_candidates): Prefer the default constructor.
2231 (build_aggr_conv): Treat missing initializers like { }.
2232 * typeck2.c (process_init_constructor_record): Likewise.
2233 * init.c (expand_default_init): Use digest_init for
2234 direct aggregate initialization, too.
2236 * call.c (add_list_candidates): Split out...
2237 (build_user_type_conversion_1): ...from here.
2238 (build_new_method_call): And here.
2239 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2242 * call.c (build_list_conv): Set list-initialization flags properly.
2244 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2246 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2248 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2249 Matthew Gingell <gingell@adacore.com>
2251 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2252 * decl2.c: Include langhooks.h and c-ada-spec.h.
2253 (cpp_check, collect_source_refs, collect_ada_namespace,
2254 collect_all_refs): New functions.
2255 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2256 * lang-specs.h: Ditto.
2258 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2260 * cp-tree.h (cp_build_function_call_nary): Declare.
2261 * typeck.c (cp_build_function_call_nary): Define.
2262 * decl.c (register_dtor_fn): Use it instead of
2263 cp_build_function_call.
2264 (cxx_maybe_build_cleanup): Likewise.
2265 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2266 * except.c (do_get_exception_ptr): Likewise.
2267 (do_begin_catch): Likewise.
2268 (do_allocate_exception): Likewise.
2269 (do_free_exception): Likewise.
2270 (build_throw): Likewise. Use cp_build_function_call_vec instead
2271 of cp_build_function_call.
2272 (do_end_catch): Likewise.
2274 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2276 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2277 (struct cp_declarator): Move id_loc field up.
2279 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2281 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2282 this file is included before c-common.h. Define GCC_DIAG_STYLE
2283 before including diagnostic-core.h and toplev.h.
2284 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2285 * pt.c: Include cp-tree.h before c-common.h.
2287 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2289 * tree.c (c_register_addr_space): Add stub.
2291 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2293 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2296 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2298 Revert fix of PR c++/44188
2299 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2301 * tree.c (typedef_variant_p): Revert moving this definition to
2303 * decl.c (grokdeclarator): Revert naming typedef handling.
2305 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2307 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2308 * cp-lang.c: Don't include diagnostic.h
2309 * name-lookup.c: Include diagnostic-core.h instead of
2311 (cp_emit_debug_info_for_using): Use seen_error.
2312 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2313 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2314 * pt.c (iterative_hash_template_arg): Use seen_error.
2315 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2316 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2317 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2318 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2321 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2324 * cp-tree.h (typedef_variant_p): Move this declaration to
2326 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2327 * decl.c (grokdeclarator): Do not rename debug info of an
2328 anonymous tagged type named by a typedef.
2330 2010-05-27 Jason Merrill <jason@redhat.com>
2333 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2336 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2339 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2340 * class.c (layout_class_type): Likewise.
2341 * decl.c (finish_enum): Likewise.
2342 * mangle.c (write_builitin_type): Likewise.
2344 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2346 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2348 * decl.c (grokdeclarator): Handle __int128.
2349 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2350 (cp_parser_simple_type_specifier): Likewise.
2351 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2352 * typeck.c (cp_common_type): Handle __int128.
2353 * mangle.c (integer_type_codes): Add itk_int128 and
2354 itk_unsigned_int128.
2356 2010-05-26 Jason Merrill <jason@redhat.com>
2359 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2362 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2364 * cp-lang.c: Do not include expr.h.
2366 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2368 * decl.c: Do not include rtl.h
2369 * semantics.c: Likewise.
2371 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2373 * cp-tree.h: Do not include splay-tree.h.
2374 (struct prtmem_cst): Remove unused field and false comment.
2375 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2376 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2377 * init.c: Do not include rtl.h and expr.h.
2378 * class.c: Do not include rtl.h. Include splay-tree.h.
2379 (build_clone): Use plain NULL instead of NULL_RTX.
2380 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2381 included. Include splay-tree.h.
2382 * method.c: Do not include rtl.h and expr.h.
2383 (use_thunk): Use plain NULL instead of NULL_RTX.
2384 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2385 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2386 and target.h. Include splay-tree.h.
2387 * expr.c: Do not include rtl.h and expr.h.
2388 * pt.c: Do not include obstack.h and rtl.h.
2389 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2390 (tsubst_decl): Likewise.
2391 (instantiate_decl): Likewise.
2392 * semantics.c: Do not include exprt.h and debug.h. Explain why
2393 rtl.h has to be included.
2394 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2395 * call.c: Do not include rtl.h and expr.h.
2396 * search.c: Do not include obstack.h and rtl.h.
2397 * friend.c: Do not include rtl.h and expr.h.
2398 * Make-lang.in: Update dependencies.
2400 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2403 * parser.c (non_integral_constant): Add NIC_NONE.
2404 (required_token): Add RT_NONE.
2405 (cp_parser_unary_expression): Initialize non_constant_p
2407 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2408 (cp_parser_primary_expression, cp_parser_postfix_expression,
2409 cp_parser_cast_expression, cp_parser_binary_expression,
2410 cp_parser_functional_cast): Fix formatting.
2412 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2415 * parser.c: Remove inclusion of dyn-string.h.
2416 (non_integral_constant): New enum.
2417 (name_lookup_error): New enum.
2418 (required_token): New enum.
2419 (cp_parser_required_error): New function.
2420 (cp_parser_require): Change the type of variable token_desc to
2421 required_token and use cp_parser_required_error.
2422 (cp_parser_require_keyword): Likewise.
2423 (cp_parser_error): Use gmsgid as parameter.
2424 (cp_parser_name_lookup_error): Change the type of variable desired to
2425 name_lookup_error and put the diagnostic in the full sentences. Change
2427 (cp_parser_non_integral_constant_expression): Change the type of the
2428 variable thing to non_integral_constant and put the diagnostics in
2429 full sentences. Change caller.
2431 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2434 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2436 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2438 * error.c (cp_diagnostic_starter): Update call to
2439 diagnostic_build_prefix.
2440 (cp_print_error_function,
2441 print_instantiation_partial_context_line): Check show_column flag
2444 2010-05-24 Jason Merrill <jason@redhat.com>
2447 * decl.c (check_initializer): Don't wrap an init-list in a
2449 * init.c (build_aggr_init): Don't assume copy-initialization if
2450 init has CONSTRUCTOR_IS_DIRECT_INIT.
2451 * call.c (build_new_method_call): Sanity check.
2453 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2455 * rtti.c (tinfo_base_init): Use build_constructor instead of
2456 build_constructor_from_list. Don't cons a tree node for
2458 (generic_initializer): Use build_constructor_single instead of
2459 build_constructor_from_list.
2460 (ptr_initializer): Use build_constructor instead of
2461 build_constructor_from_list
2462 (ptm_initializer): Likewise.
2463 (class_initializer): Likewise. Take varargs instead of TRAIL.
2464 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2465 build_constructor instead of build_constructor_from_list.
2467 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2469 * semantics.c: Include bitmap.h.
2470 * Make-lang.in: Update dependencies.
2472 2010-05-22 Jan Hubicka <jh@suse.cz>
2474 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2476 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2478 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2480 * cxx-pretty-print.c: Correct merge error.
2482 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2484 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2485 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2486 (cp_printer): Handle %K here using percent_K_format.
2487 * cxx-pretty-print.c: Include tree-pretty-print.h.
2488 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2491 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2493 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2494 Clean up redundant includes.
2496 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2499 * decl.c (xref_basetypes): Return false in case of ill-formed
2502 2010-05-19 Jason Merrill <jason@redhat.com>
2504 * call.c (reference_binding): Use cp_build_qualified_type_real
2505 and cp_type_quals consistently.
2506 (add_function_candidate): Likewise.
2507 (build_conditional_expr): Likewise.
2508 (convert_like_real): Likewise.
2509 (type_passed_as): Likewise.
2510 * class.c (add_method): Likewise.
2511 (same_signature_p): Likewise.
2512 (layout_class_type): Likewise.
2513 * decl.c (cxx_init_decl_processing): Likewise.
2514 (cp_fname_init): Likewise.
2515 (grokdeclarator): Likewise.
2516 * decl2.c (cp_reconstruct_complex_type): Likewise.
2517 * init.c (build_new_1): Likewise.
2518 * method.c (do_build_copy_constructor): Likewise.
2519 (implicitly_declare_fn): Likewise.
2520 * pt.c (tsubst_aggr_type): Likewise.
2522 * rtti.c (init_rtti_processing): Likewise.
2523 (build_headof): Likewise.
2524 (build_dynamic_cast_1): Likewise.
2525 (tinfo_base_init): Likewise.
2526 (emit_support_tinfos): Likewise.
2527 * semantics.c (capture_decltype): Likewise.
2528 * tree.c (cv_unqualified): Likewise.
2529 * typeck.c (composite_pointer_type): Likewise.
2530 (string_conv_p): Likewise.
2532 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2534 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2535 * decl.c (start_decl): Likewise.
2536 * semantics.c (finish_compound_literal): Likewise.
2537 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2538 (cp_type_readonly): Remove.
2539 * cp-tree.h: Remove declaration.
2541 * typeck.c (merge_types): Preserve memfn quals.
2543 * decl.c (grokdeclarator): Don't check quals on fn type.
2544 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2545 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2548 * typeck.c (type_memfn_quals): New fn.
2549 (apply_memfn_quals): New fn.
2550 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2551 (cp_type_readonly): Use cp_type_quals.
2552 * cp-tree.h: Add declarations.
2553 * tree.c (cp_build_qualified_type_real): Don't set, but do
2554 preserve, quals on FUNCTION_TYPE.
2555 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2556 * decl.c (build_ptrmem_type): Likewise.
2557 (grokdeclarator): Likewise.
2558 (static_fn_type): Likewise.
2559 * decl2.c (change_return_type): Likewise.
2560 (cp_reconstruct_complex_type): Likewise.
2561 * pt.c (tsubst_function_type): Likewise.
2563 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2565 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2567 * tree.c (build_min_non_dep_call_vec): Update comment.
2569 2010-05-17 Jason Merrill <jason@redhat.com>
2571 * call.c (struct z_candidate): Add explicit_targs field.
2572 (add_template_candidate_real): Set it.
2573 (build_over_call): Use it to control init-list warning.
2576 * call.c (build_over_call): Limit init-list deduction warning to
2577 cases where the argument is actually an init-list.
2580 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2582 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2583 Jason Merrill <jason@redhat.com>
2586 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2588 2010-05-15 Jason Merrill <jason@redhat.com>
2590 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2591 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2593 (finish_eh_spec_block): Adjust.
2595 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2598 * pt.c (tsubst): Unshare template argument.
2600 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2602 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2603 * Make-lang.in: Fix dependencies accordingly.
2605 2010-05-14 Jason Merrill <jason@redhat.com>
2608 * except.c (build_throw): Simplify, adjust for DR 475.
2611 * except.c (dtor_nothrow): Return nonzero for type with
2615 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2616 gimple_build_eh_must_not_throw.
2618 2010-05-14 Martin Jambor <mjambor@suse.cz>
2620 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2623 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2625 * call.c (build_new_method_call): Change warning text.
2626 * typeck2.c (build_functional_cast): Change error text.
2628 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2631 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2632 shadowing the outer parameter or variables by the declaration of
2633 nested function in nested structure or class. Warn the shadowing by
2634 the declaration of nested lambda expression.
2636 2010-05-13 Jason Merrill <jason@redhat.com>
2638 * typeck.c (cp_build_array_ref): Factor out from...
2639 (build_array_ref): ...here. Drop complain parm.
2640 (build_new_op): Adjust.
2641 * class.c (build_vtbl_ref_1): Adjust.
2642 * decl2.c (grok_array_decl): Adjust.
2643 * cp-tree.h: Adjust prototypes.
2645 2010-05-13 Jan Hubicka <jh@suse.cz>
2647 * decl.c (cp_finish_decl): Do not worry about used attribute.
2649 2010-05-12 Jason Merrill <jason@redhat.com>
2651 * typeck.c (build_array_ref): Take complain parm.
2652 * cp-tree.h: Add it to prototype.
2653 * call.c (build_new_op): Pass it.
2654 * class.c (build_vtbl_ref): Pass it.
2655 * decl2.c (grok_array_decl): Pass it.
2659 * cp-tree.def (NULLPTR_TYPE): Remove.
2660 * cp-tree.h (NULLPTR_TYPE_P): New.
2661 (SCALAR_TYPE_P): Use it.
2662 (nullptr_type_node): New.
2663 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2664 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2666 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2667 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2668 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2669 * mangle.c (write_type): Likewise.
2670 * name-lookup.c (arg_assoc_type): Likewise.
2671 * typeck.c (build_reinterpret_cast_1): Likewise.
2672 * rtti.c (typeinfo_in_lib_p): Likewise.
2673 (emit_support_tinfos): Remove local nullptr_type_node.
2675 * cp-tree.h (UNKNOWN_TYPE): Remove.
2676 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2677 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2678 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2679 * class.c (instantiate_type): Check unknown_type_node rather than
2681 * name-lookup.c (maybe_push_decl): Likewise.
2682 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2683 (get_typeid): Likewise.
2684 * semantics.c (finish_offsetof): Likewise.
2687 * call.c (add_template_candidate_real): If deduction fails, still
2688 add the template as a non-viable candidate.
2689 (equal_functions): Handle template candidates.
2690 (print_z_candidate): Likewise.
2691 (print_z_candidates): Likewise.
2692 (build_new_function_call): Likewise.
2694 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2695 * call.c (add_candidates): Enforce it.
2696 (build_new_method_call): Try non-list ctor if no viable list ctor.
2697 (build_user_type_conversion_1): Likewise.
2699 * call.c (add_candidates): Distinguish between type(x) and
2701 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2702 (build_new_method_call): Give better error for conversion op.
2704 * call.c (add_candidates): Add first_arg and return_type parms.
2705 Add special constructor/conversion op handling.
2706 (convert_class_to_reference): Use it.
2707 (build_user_type_conversion_1): Likewise.
2708 (build_op_call): Likewise.
2709 (build_new_method_call): Likewise.
2710 (build_new_op): Adjust.
2711 (perform_overload_resolution): Adjust.
2713 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2718 * pt.c (process_partial_specialization): Return error_mark_node
2719 in case of unused template parameters in partial specialization.
2721 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2724 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2725 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2726 look at its second operand.
2728 2010-05-10 Jason Merrill <jason@redhat.com>
2731 * semantics.c (baselink_for_fns): Revert earlier change.
2734 * typeck.c (cp_build_modify_expr): Complain about assignment to
2735 array from init list.
2737 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2740 * decl.c (check_initializer): strip array type before checking for
2741 uninitialized const or ref members.
2743 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2746 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2747 error count. Emit errors only if compain is true.
2748 (build_new_1): Do not return error_mark_node if
2749 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2750 errors. Delay the check for user-provided constructor.
2751 (perform_member_init): Adjust.
2752 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2755 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2756 Jason Merrill <jason@redhat.com>
2758 Add support for C++0x nullptr.
2759 * cp-tree.def: Add NULLPTR_TYPE.
2760 * cp-tree.h: Add nullptr_node.
2761 (cp_tree_index): Add CPTI_NULLPTR.
2762 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2763 * call.c (null_ptr_cst_p): Handle nullptr.
2764 (standard_conversion): Likewise.
2765 (convert_arg_to_ellipsis): Likewise.
2766 * mangle.c (write_type): Likewise.
2767 * name-lookup.c (arg_assoc_type): Likewise.
2768 * parser.c (cp_parser_primary_expression): Likewise.
2769 * typeck.c (cp_build_binary_op): Likewise.
2770 (build_reinterpret_cast_1): Likewise.
2771 * error.c (dump_type): Likewise.
2772 (dump_type_prefix, dump_type_suffix): Likewise.
2773 * decl.c (cxx_init_decl_processing): Likewise.
2774 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2775 * cvt.c (ocp_convert): Likewise.
2776 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2777 nullptr_t tinfo in libsupc++.
2779 2010-05-06 Jason Merrill <jason@redhat.com>
2781 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2783 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2784 Dodji Seketeli <dodji@redhat.com>
2787 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2789 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2790 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2791 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2792 (cp_build_unary_op): Call lvalue_use.
2793 * decl.c (unused_but_set_errorcount): New variable.
2794 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2795 (duplicate_decls): Merge DECL_READ_P flags.
2796 (start_cleanup_fn): Set DECL_READ_P flag.
2797 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2798 * tree.c (rvalue): Call rvalue_use.
2799 * pt.c (convert_nontype_argument): Likewise.
2800 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2801 finish_decltype_type): Likewise.
2802 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2803 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2804 or rvalue_use depending on the expr.
2805 * init.c (build_new, build_delete): Likewise.
2806 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2808 2010-05-05 Jason Merrill <jason@redhat.com>
2811 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2812 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2814 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2817 * pt.c (unify): Check each elt for error_mark_node.
2819 2010-05-04 Jason Merrill <jason@redhat.com>
2822 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2824 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2827 * call.c (build_new_method_call): Return error_mark_node if fns is
2830 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2833 * pt.c (most_specialized_class): Pretend we are processing
2834 a template decl during the call to coerce_template_parms.
2836 2010-05-03 Jason Merrill <jason@redhat.com>
2840 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2841 from the selected underlying type unless -fstrict-enums. Set
2842 ENUM_UNDERLYING_TYPE to have the restricted range.
2843 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2844 * class.c (check_bitfield_decl): Likewise.
2846 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2849 * init.c (build_new_1): Revert the accidental checkin in
2852 2010-04-30 Jason Merrill <jason@redhat.com>
2855 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2856 (pp_cxx_type_specifier_seq): ...here.
2858 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2860 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2861 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2863 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2866 * typeck.c (warn_args_num): New function.
2867 (convert_arguments): Use warn_args_num to print the diagnostic
2870 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2873 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2874 user-provided constructor while recursing.
2876 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2879 * error.c (print_instantiation_partial_context_line): Handle
2880 recursive instantiation.
2881 (print_instantiation_partial_context): Likewise.
2883 2010-04-27 Jason Merrill <jason@redhat.com>
2885 * init.c (perform_member_init): Check CLASS_TYPE_P.
2887 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2890 * init.c (perform_member_init): check for uninitialized const or
2891 reference members, including array types.
2893 2010-04-24 Jason Merrill <jason@redhat.com>
2895 * tree.c (get_fns): Split out from get_first_fn.
2896 * cp-tree.h: Declare it.
2897 * search.c (shared_member_p): Use it.
2898 * semantics.c (finish_qualified_id_expr): Simplify.
2899 (finish_id_expression): Simplify.
2901 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2902 whenever object is NULL_TREE. Don't do 'this' capture here.
2903 (finish_qualified_id_expr): Pass NULL_TREE.
2904 (finish_id_expression): Likewise.
2905 (lambda_expr_this_capture): Likewise.
2907 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2908 rather than checking current_class_ref directly.
2909 (finish_call_expr): Likewise.
2912 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2913 * class.c (current_nonlambda_class_type): New fn.
2914 * semantics.c (nonlambda_method_basetype): New.
2915 * cp-tree.h: Declare them.
2916 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2918 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2921 * semantics.c (lambda_return_type): Complain about
2925 * tree.c (cv_unqualified): Handle error_mark_node.
2928 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2929 if we don't want errors.
2932 * class.c (convert_to_base): Add complain parameter. Pass
2933 ba_quiet to lookup_base if we don't want errors.
2934 (build_vfield_ref): Pass complain to convert_to_base.
2935 * call.c (convert_like_real): Likewise.
2936 (initialize_reference): Likewise.
2937 (perform_direct_initialization_if_possible): Pass complain to
2939 * cp-tree.h: Adjust.
2941 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2942 Jason Merrill <jason@redhat.com>
2945 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2947 (check_initializer): Call it for classes that need constructing, too.
2948 * class.c (in_class_defaulted_default_constructor): New.
2949 * cp-tree.h: Declare it.
2951 2010-04-20 Jason Merrill <jason@redhat.com>
2954 * init.c (constant_value_1): Treat error_mark_node as a constant
2955 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2956 * cvt.c (ocp_convert): Handle getting error_mark_node from
2957 integral_constant_value.
2958 * decl.c (compute_array_index_type): Likewise.
2960 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2964 * typeck.c (incompatible_dependent_types_p): If one of the
2965 compared types if not a typedef then honour their main variant
2968 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2970 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2972 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2975 * typeck.c (structural_comptypes): Test dependent typedefs
2976 incompatibility before testing for their main variant based
2979 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2981 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2982 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2984 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2986 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2987 build_common_tree_nodes.
2989 2010-04-14 Jason Merrill <jason@redhat.com>
2992 * parser.c (cp_parser_parenthesized_expression_list): Change
2993 is_attribute_list parm to int to indicate whether or not to
2994 handle initial identifier specially.
2995 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2997 2010-04-13 Jason Merrill <jason@redhat.com>
2999 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
3001 * parser.c (cp_parser_lambda_expression): Complain about lambda in
3002 unevaluated context.
3003 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
3005 2010-04-12 Jason Merrill <jason@redhat.com>
3008 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
3009 return value directly.
3011 * call.c (type_decays_to): Call cv_unqualified for non-class type.
3013 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
3016 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
3017 * init.c (build_new_1): Check for uninitialized const members and
3018 uninitialized reference members, when using new without
3019 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
3020 (diagnose_uninitialized_cst_or_ref_member): Define, call
3021 diagnose_uninitialized_cst_or_ref_member_1.
3022 (diagnose_uninitialized_cst_or_ref_member_1): New function.
3024 2010-04-12 Richard Guenther <rguenther@suse.de>
3027 * semantics.c (expand_or_defer_fn_1): Do not keep extern
3028 template inline functions.
3030 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3033 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
3036 2010-04-07 Jason Merrill <jason@redhat.com>
3039 * decl.c (start_preparsed_function): Do defer nested functions.
3041 PR c++/11094, DR 408
3042 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
3043 * decl2.c (finish_static_data_member_decl): Set it.
3044 * decl.c (duplicate_decls): Propagate it.
3045 * pt.c (tsubst_decl): Don't substitute the domain of an array
3046 VAR_DECL if it's set.
3047 (regenerate_decl_from_template): Substitute it here.
3048 (type_dependent_expression_p): Return true if it's set.
3049 * semantics.c (finish_decltype_type): Instantiate such a variable.
3050 * typeck.c (cxx_sizeof_expr): Likewise.
3051 (strip_array_domain): New.
3054 * name-lookup.c (current_decl_namespace): Non-static.
3055 (pop_nested_namespace): Sanity check.
3056 * cp-tree.h: Declare current_decl_namespace.
3057 * decl.c (grokvardecl): Use it instead of current_namespace.
3058 (grokfndecl): Likewise.
3061 * pt.c (tsubst_friend_function): Instatiate a friend that has already
3064 * pt.c (print_template_statistics): New.
3065 * cp-tree.h: Declare it.
3066 * tree.c (cxx_print_statistics): Call it.
3069 * decl.c (grokvardecl): Tweak warning message.
3070 (grokfndecl): Likewise.
3072 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3075 *pt.c (tsubst_decl): Get the arguments of a specialization from
3076 the specialization template, not from the most general template.
3078 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3081 * typeck2.c (process_init_constructor_record):
3082 value-initialize members that are are not explicitely
3085 2010-04-07 Jie Zhang <jie@codesourcery.com>
3088 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
3089 when all of its elements are non-constant and have been split out.
3091 2010-04-06 Taras Glek <taras@mozilla.com>
3092 Jason Merrill <jason@redhat.com>
3094 * parser.c (cp_parser_class_specifier): Set class location to that
3095 of IDENTIFIER_NODE instead of '{' when possible.
3096 * semantics.c (begin_class_definition): Do not overide locations
3097 with less precise ones.
3099 2010-04-06 Jason Merrill <jason@redhat.com>
3102 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
3105 * pt.c (maybe_update_decl_type): Check the return value from
3108 2010-04-01 Jason Merrill <jason@redhat.com>
3110 * decl.c (next_initializable_field): No longer static.
3111 * cp-tree.h: Declare it.
3112 * call.c (build_aggr_conv): Fail if there are more initializers
3113 than initializable fields.
3115 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
3116 instead of void_zero_node.
3118 2010-03-31 Dodji Seketeli <dodji@redhat.com>
3121 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
3122 * pt.c (end_template_parm_list): Store sibling template parms of
3123 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3124 (push_template_decl_real): Don't store the containing template decl
3125 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
3126 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
3127 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3130 2010-03-30 Jason Merrill <jason@redhat.com>
3133 * pt.c (push_template_decl_real): Deal better with running out of
3134 scopes before running out of template parms.
3138 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3139 function parameter context. Don't print an error if parsing
3143 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3146 2010-03-26 Jason Merrill <jason@redhat.com>
3149 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3150 c++0x mode, but not other type-names.
3152 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3155 * pt.c (add_to_template_args): Support NULL ARGS;
3156 (most_specialized_class): call coerce_template_parms on
3157 template arguments passed to get_class_bindings. Use
3158 add_to_template_args.
3159 (unify): Handle VAR_DECLs.
3161 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3163 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3165 * pt.c (get_template_parms_at_level): Adjust.
3167 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3170 * cp-tree.h (get_template_parms_at_level): Declare ...
3171 * pt.c (get_template_parms_at_level): ... new function.
3172 * typeck.c (get_template_parms_of_dependent_type): If a template
3173 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3174 current_template_parms. Use get_template_parms_at_level. Remove
3176 (incompatible_dependent_types_p): If we get empty parms from just one
3177 of the template type parms we are comparing then the template parms are
3180 2010-03-24 Jason Merrill <jason@redhat.com>
3183 * parser.c (make_declarator): Initialize id_loc.
3184 (cp_parser_lambda_declarator_opt): And set it.
3186 2010-03-23 Jason Merrill <jason@redhat.com>
3188 Make lambda conversion op and op() non-static.
3189 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3190 Also add the thunk function returned by the conversion op.
3191 Mark the conversion deleted if the op() is variadic.
3192 * decl2.c (mark_used): Give helpful message about deleted conversion.
3193 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3194 * semantics.c (finish_this_expr): Adjust.
3195 * mangle.c (write_closure_type_name): Adjust.
3196 * decl.c (grok_op_properties): Don't allow it.
3197 * call.c (build_user_type_conversion_1): No static conversion ops.
3198 (build_op_call): Or op().
3200 * decl2.c (change_return_type): Fix 'this' quals.
3202 2010-03-22 Jason Merrill <jason@redhat.com>
3205 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3208 * pt.c (contains_auto_r): New fn.
3209 (do_auto_deduction): Use it.
3210 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3212 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3215 * decl2.c (grokfield): Handle invalid initializers for member
3218 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3221 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3223 * decl2.c (vague_linkage_p): Likewise.
3225 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3228 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3229 false, in the cp_parser_expression_statement call.
3231 2010-03-05 Jason Merrill <jason@redhat.com>
3233 * mangle.c (mangle_decl): Give name collision error even without
3236 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3238 * pt.c (process_partial_specialization): Use error_n instead of
3241 2010-03-03 Jason Merrill <jason@redhat.com>
3244 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3246 2010-03-03 Jason Merrill <jason@redhat.com>
3249 * mangle.c: Include cgraph.h.
3250 (mangle_decl): If the mangled name will change in a later
3251 ABI version, make the later mangled name an alias.
3252 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3253 * Make-lang.in (mangle.o): Depend on cgraph.h.
3254 * method.c (make_alias_for): Handle VAR_DECL, too.
3255 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3256 * tree.c (no_linkage_check): Adjust.
3257 * decl.c (maybe_commonize_var): Adjust.
3258 * cp-tree.h: Adjust.
3260 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3262 * pt.c (redeclare_class_template): Use error_n and inform_n.
3264 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3267 * cp-tree.h (push_tinst_level): Declare.
3268 (pop_tinst_level): Likewise.
3269 * pt.c (push_tinst_level): Give it external linkage.
3270 (pop_tinst_level): Likewise.
3271 * mangle.c (mangle_decl_string): Set the source location to that
3272 of the decl while mangling.
3274 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3277 * pt.c (redeclare_class_template): Return false if there are erroneous
3278 template parameters.
3280 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3282 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3285 2010-02-24 Jason Merrill <jason@redhat.com>
3288 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3290 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3291 in a previous ABI version.
3293 2010-02-23 Jason Merrill <jason@redhat.com>
3296 * typeck2.c (digest_init_r): Accept value init of array.
3298 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3301 * typeck.c (convert_arguments): Update error message.
3303 2010-02-22 Mike Stump <mikestump@comcast.net>
3306 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3308 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3311 * error.c (print_instantiation_partial_context_line): New.
3312 (print_instantiation_partial_context): Print at most 12 contexts,
3313 skip the rest with a message.
3315 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3318 * pt.c (lookup_template_class): Better support of specialization
3319 of member of class template implicit instantiation.
3321 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3324 * call.c (conversion_null_warnings): Replace -Wconversion with
3326 * cvt.c (build_expr_type_conversion): Likewise.
3328 2010-02-18 Jason Merrill <jason@redhat.com>
3331 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3334 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3336 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3337 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3340 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3344 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3345 (maybe_update_decl_type): New fn.
3346 * parser.c (cp_parser_init_declarator): Use it.
3349 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3351 2010-02-17 Jason Merrill <jason@redhat.com>
3354 * call.c (build_over_call): Don't create zero-sized assignments.
3355 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3356 * cp-objcp-common.c (cp_expr_size): Remove.
3357 * cp-tree.h: Remove prototype.
3360 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3361 decl we looked up doesn't match.
3364 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3365 have an INIT_EXPR anymore.
3368 * pt.c (convert_nontype_argument): Change assert to test.
3370 2010-02-16 Jason Merrill <jason@redhat.com>
3372 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3375 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3376 VIEW_CONVERT_EXPR for conversions between structural equality types
3377 that the back end can't tell are the same.
3380 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3381 cv-quals from element here.
3382 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3384 2010-02-14 Jason Merrill <jason@redhat.com>
3387 * semantics.c (finish_compound_literal): Use
3388 cp_apply_type_quals_to_decl when creating a static variable.
3390 2010-02-12 Jason Merrill <jason@redhat.com>
3393 * name-lookup.h (current_binding_level): Check for null
3396 2010-02-12 Jason Merrill <jason@redhat.com>
3399 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3401 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3404 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3407 2010-02-10 Jason Merrill <jason@redhat.com>
3410 * semantics.c (outer_lambda_capture_p): Revert.
3411 (add_capture): Only finish_member_declaration if
3412 we're in the lambda class.
3413 (register_capture_members): New.
3414 * cp-tree.h: Declare it.
3415 * parser.c (cp_parser_lambda_expression): Call it.
3417 2010-02-10 Jason Merrill <jason@redhat.com>
3420 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3421 instead of current_class_type.
3423 2010-02-10 Jason Merrill <jason@redhat.com>
3425 PR c++/42983, core issue 906
3426 * method.c (defaultable_fn_check): Check virtualness.
3428 2010-02-10 Jason Merrill <jason@redhat.com>
3431 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3433 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3435 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3436 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3438 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3439 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3440 (cp_parser_parameter_declaration)
3441 (cp_parser_exception_specification_opt)
3442 (cp_parser_exception_declaration): Likewise.
3443 * pt.c (check_default_tmpl_args): Likewise.
3444 * search.c (lookup_field_r): Likewise.
3446 2010-02-09 Jason Merrill <jason@redhat.com>
3449 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3451 2010-02-09 Jason Merrill <jason@redhat.com>
3454 * decl2.c (change_return_type): New fn.
3455 * semantics.c (apply_lambda_return_type): Use it.
3456 * cp-tree.h: Declare it.
3458 2010-02-05 Richard Guenther <rguenther@suse.de>
3460 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3461 * cp-lang.c: Include gt-cp-cp-lang.h.
3462 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3464 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3467 * typeck.c (get_template_parms_of_dependent_type): Try getting
3468 the template parameters fromt the type itself first.
3470 2010-02-03 Jason Merrill <jason@redhat.com>
3474 * mangle.c (write_unqualified_id): Split out from write_expression.
3475 (write_unqualified_name): Call it.
3476 (write_member_name): Likewise.
3477 (write_expression): Support TEMPLATE_ID_EXPR.
3478 Disambiguate operator names.
3481 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3484 2010-02-02 Jason Merrill <jason@redhat.com>
3487 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3488 * optimize.c (clone_body): Remap their initializers when making base
3490 (maybe_clone_body): Complain if multiple clones aren't safe.
3492 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3499 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3500 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3501 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3502 * pt.c (coerce_template_parms, type_unification_real,
3503 expand_template_argument_pack, coerce_template_parameter_pack):
3504 Set the non default template args count.
3505 (current_template_args): Always set non defaulted
3506 template args count when compiled with --enable-checking
3507 (tsubst_template_args, type_unification_real): Propagate the non
3508 defaulted template args count.
3509 * error.c (get_non_default_template_args_count): Renamed
3510 count_non_default_template_args into this. Don't calculate the
3511 non default template argument count anymore. Use the new
3512 accessor macros above to get it.
3513 (dump_template_argument_list, dump_type, dump_decl,
3514 dump_template_parms): Adjust.
3515 * parser.c (cp_parser_template_argument_list): Always set defaulted
3516 template args count when compiled with --enable-checking.
3518 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3520 * decl.c (redeclaration_error_message): Wrap the return messages into
3521 G_() for easy translation.
3523 2010-01-28 Jason Merrill <jason@redhat.com>
3526 * semantics.c (begin_class_definition): Don't use type_as_string.
3528 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3532 * typeck.c (get_template_parms_of_dependent_type): Factorized
3533 this out of incompatible_template_type_parms_p
3534 (incompatible_dependent_types_p): Renamed
3535 incompatible_template_type_parms_p into this. Make it detect
3536 two incompatible dependent typedefs too.
3537 (structural_comptypes): Use incompatible_dependent_types_p.
3538 * pt.c (get_template_info):
3539 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3541 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3542 Jason Merrill <jason@redhat.com>
3544 * mangle.c (write_type): Mangle transparent record as member type.
3545 * semantics.c (begin_class_definition): Recognize decimal classes
3546 and set TYPE_TRANSPARENT_AGGR.
3548 2010-01-20 Jason Merrill <jason@redhat.com>
3551 * mangle.c (write_expression): Handle tree codes that have extra
3552 arguments in the middle-end.
3554 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3557 * except.c (expand_start_catch_block): Deal correctly with
3558 do_begin_catch returning error_mark_node.
3560 2010-01-20 Jason Merrill <jason@redhat.com>
3563 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3567 * semantics.c (build_lambda_object): Call mark_used on captured
3571 * decl.c (grokdeclarator): Clear type_quals for a member function
3572 declared using a typedef. Don't complain about adding cv-quals
3573 to a function typedef in C++0x mode.
3575 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3577 * decl.c (create_array_type_for_decl): Remove set but not used
3578 variable error_msg. Remove break stmts after return stmts.
3580 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3582 * error.c (dump_template_parms, count_non_default_template_args):
3583 Revert fix of PR c++/42634.
3585 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3588 * error.c (dump_template_parms): Use innermost template
3589 arguments before calling count_non_default_template_args.
3590 (count_non_default_template_args): We are being called with
3591 template innermost arguments now. There is no need to ensure
3594 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3597 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3599 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3602 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3604 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3607 *pt.c (tsubst_decl): Get the arguments of a specialization from
3608 the specialization template, not from the most general template.
3610 2010-01-16 Jason Merrill <jason@redhat.com>
3613 * semantics.c (finish_decltype_type): Within a template, treat
3614 unresolved CALL_EXPR as dependent.
3616 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3618 * error.c (dump_template_parms,count_non_default_template_args):
3619 Revert changes of PR c++/42634.
3621 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3624 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3625 functions with noreturn attribute.
3627 2010-01-14 Jason Merrill <jason@redhat.com>
3630 * call.c (build_new_method_call): Don't free the vec here.
3633 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3635 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3638 * error.c (dump_template_parms): Use innermost template
3639 arguments before calling count_non_default_template_args.
3640 (count_non_default_template_args): We are being called with
3641 template innermost arguments now. There is no need to ensure
3644 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3647 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3648 arguments that were previously deduced.
3650 2010-01-05 Jason Merrill <jason@redhat.com>
3652 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3653 * call.c (build_over_call): Don't complain about it.
3655 2010-01-04 Jason Merrill <jason@redhat.com>
3658 * pt.c (tsubst_decl): Don't apply type attributes in place.
3661 * semantics.c (describable_type): Remove decltype comment and
3666 Copyright (C) 2010 Free Software Foundation, Inc.
3668 Copying and distribution of this file, with or without modification,
3669 are permitted in any medium without royalty provided the copyright
3670 notice and this notice are preserved.