1 2010-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> <ville.voutilainen@symbio.com>
3 Core 1135, 1136, 1145, 1149
4 * method.c (defaultable_fn_check): Do not disallow defaulting a
5 non-public or explicit special member function on its first
8 2010-11-12 James Dennett <jdennett@google.com>
11 * typeck.c (build_static_cast_1): Convert to the target type
12 when doing static_cast<cv Derived*>(Base*).
14 2010-11-10 Jason Merrill <jason@redhat.com>
17 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: New case.
18 [CONSTRUCTOR]: Use the tsubsted type.
21 * semantics.c (cxx_eval_bit_field_ref): New.
22 (cxx_eval_constant_expression): Call it.
24 2010-11-10 Joseph Myers <joseph@codesourcery.com>
26 * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
27 * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
28 Use %' in diagnostics.
29 * decl2.c (check_classfn): Use %' in diagnostic.
30 * init.c (build_java_class_ref): Use %' in diagnostic.
31 (build_delete): Remove trailing '.' from diagnostic.
32 * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
34 * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
35 * parser.c (cp_parser_exception_specification_opt): Remove
36 trailing '.' from diagnostic.
37 (cp_parser_objc_interstitial_code): Use %qs for quoting in
39 * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
41 * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
43 2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
46 * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
48 2010-11-09 Jakub Jelinek <jakub@redhat.com>
51 * tree.c (lvalue_kind): Don't crash if ref has NULL type.
53 2010-11-08 Jason Merrill <jason@redhat.com>
56 * semantics.c (check_constexpr_ctor_body): New fn.
57 * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Call it.
58 * cp-tree.h: Declare it.
61 * tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
63 Correct conversion/overflow behavior.
64 * cvt.c (ignore_overflows): Move here from typeck.c.
65 (ocp_convert): Use it.
66 (cp_fold_convert): Use it. Don't call rvalue.
67 * typeck.c (build_static_cast_1): Don't use it. Do call rvalue.
68 * error.c (location_of): Handle expressions, too.
69 * class.c (check_bitfield_decl): Set input_location around call to
71 * semantics.c (cxx_eval_outermost_constant_expr): Don't
72 print the expression if it already had TREE_OVERFLOW set.
73 (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
74 (verify_constant): Allow overflow with a permerror if we're
76 (cxx_eval_outermost_constant_expr): Use verify_constant.
77 (adjust_temp_type): Use cp_fold_convert.
78 * decl.c (build_enumerator): Don't call constant_expression_warning.
79 * decl2.c (grokbitfield): Likewise.
81 2010-11-06 Jason Merrill <jason@redhat.com>
84 * init.c (perform_member_init): Use build_vec_init_expr for
85 value-init of arrays, too.
86 * cp-gimplify.c (cp_gimplify_expr): Use VEC_INIT_EXPR_VALUE_INIT.
87 * cp-tree.h (VEC_INIT_EXPR_IS_CONSTEXPR): New macro.
88 (VEC_INIT_EXPR_VALUE_INIT): New macro.
89 * semantics.c (potential_constant_expression): No longer static.
90 Check VEC_INIT_EXPR_IS_CONSTEXPR.
91 * tree.c (build_vec_init_expr): Handle value-init. Set
92 VEC_INIT_EXPR_IS_CONSTEXPR and VEC_INIT_EXPR_VALUE_INIT.
94 2010-11-06 Nathan Froyd <froydnj@codesourcery.com>
97 * parser.c (cp_lexer_previous_token): New function.
98 (cp_parser_member_declaration): Use previous token for error
99 messages. Assume semicolon presence rather than grovelling for
102 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
105 * method.c (make_alias_for_thunk):
106 Use targetm.asm_out.generate_internal_label.
108 2010-11-05 Jason Merrill <jason@redhat.com>
111 * search.c (look_for_overrides): A constructor is never virtual.
113 2010-11-05 Jakub Jelinek <jakub@redhat.com>
116 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
117 on the RHS to avoid infinite recursion with gimplify_expr.
119 2010-11-05 Jason Merrill <jason@redhat.com>
122 * pt.c (tsubst_copy): Handle COMPLEX_CST.
124 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
126 Fixed using the Objective-C 2.0 dot-syntax with class names.
127 * parser.c (cp_parser_primary_expression): Recognize Objective-C
128 2.0 dot-syntax with class names and process it.
129 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
131 (cp_parser_class_name): Same change.
132 (cp_parser_simple_type_specifier): Tidied comments.
134 2010-11-04 Jason Merrill <jason@redhat.com>
137 * semantics.c (build_constexpr_constructor_member_initializers):
138 Handle an enclosing STATEMENT_LIST.
140 * semantics.c (speculative_access_check): New.
141 * cp-tree.h: Declare it.
142 * call.c (build_over_call): Use it.
143 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
144 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
146 2010-11-03 Jason Merrill <jason@redhat.com>
149 * semantics.c (build_data_member_initialization): Handle
150 value-init of aggregate empty base.
153 * call.c (can_convert_array): New fn.
154 (build_aggr_conv): Use it.
157 * semantics.c (build_constexpr_constructor_member_initializers):
160 2010-11-02 Dodji Seketeli <dodji@redhat.com>
162 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
164 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
166 2010-11-03 Jason Merrill <jason@redhat.com>
169 * init.c (expand_default_init): Avoid ICE if we can't figure out
170 which function is being called.
172 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
174 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
175 instead of fold_convert.
176 * init.c (build_zero_init): Likewise.
177 * typeck.c (cp_build_binary_op): Likewise.
179 2010-11-02 Dodji Seketeli <dodji@redhat.com>
183 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
185 (convert_nontype_argument, convert_nontype_argument): Pass the
186 complain parameter down to check_valid_ptrmem_cst_expr.
188 2010-11-02 Dodji Seketeli <dodji@redhat.com>
191 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
192 (struct template_parm_index_s)<num_siblings>: New field.
193 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
194 (process_template_parm): Extend the API to accept the number of
195 template parms in argument.
196 (cp_set_underlying_type): Remove this.
197 * class.c (build_self_reference): Require canonical type equality
198 back on the self reference of class.
199 * decl2.c (grokfield): Require canonical type equality back on
200 typedef class fields.
201 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
202 equality back on typedefs.
203 * parser.c (cp_parser_template_parameter_list): Do not require
204 canonical type equality on dependent types created during template
206 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
207 (fixup_template_parm, fixup_template_parms): New private
209 (current_template_args): Declare this.
210 (process_template_parm): Pass the total number of template parms
211 to canonical_type_parameter.
212 (build_template_parm_index): Add a new argument to carry the total
213 number of template parms.
214 (reduce_template_parm_level, process_template_parm, make_auto):
216 (current_template_args): Fix this for template template
218 (tsubst_template_parm): Split out of ...
219 (tsubst_template_parms): ... this.
220 (reduce_template_parm_level): Don't loose
221 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
222 (template_parm_to_arg): Extracted this function from
223 current_template_args. Make it represent invalid template parms
224 with an error_mark_node instead of a LIST_TREE containing an
226 (current_template_args): Use template_parm_to_arg.
227 (dependent_template_arg_p): Consider an invalid template argument
229 (end_template_parm_list): Do not update template sibling parms
230 here anymore. Use fixup_template_parms instead.
231 (process_template_parm): Pass the number of template parms to
232 canonical_type_parameter.
233 (make_auto): Require structural equality on auto
234 TEMPLATE_TYPE_PARM for now.
235 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
236 using all the arguments deduced so far.
237 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
238 canonical_type_parameter.
239 * tree.c (cp_set_underlying_type): Remove.
240 * typeck.c (get_template_parms_of_dependent_type)
241 (incompatible_dependent_types_p): Remove.
242 (structural_comptypes): Do not call incompatible_dependent_types_p
244 (comp_template_parms_position): Re-organized. Take the length of
245 template parms list in account.
247 2010-11-01 Jason Merrill <jason@redhat.com>
249 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
250 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
251 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
252 of giving follow-on errors.
253 * error.c (maybe_print_constexpr_context): New.
254 (cp_diagnostic_starter): Call it.
255 * cp-tree.h: Declare cx_error_context.
257 * semantics.c (cxx_eval_constant_expression): Explain
258 unacceptable use of variable better.
260 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
261 Jason Merrill <jason@redhat.com>
263 * call.c (null_ptr_cst_p): Use maybe_constant_value.
264 (set_up_extended_ref_temp): Support constant initialization.
265 (initialize_reference): Adjust.
266 * class.c (check_bitfield_decl): Use cxx_constant_value.
267 * cvt.c (ocp_convert): Don't use integral_constant_value when
268 converting to class type.
269 * decl.c (finish_case_label): Use maybe_constant_value.
270 (build_init_list_var_init): Support constant initialization.
271 (check_initializer): Likewise. Reorganize.
272 (cp_finish_decl): Likewise.
273 (expand_static_init): Likewise.
274 (compute_array_index_type): Use maybe_constant_value.
276 (create_array_type_for_decl, grokdeclarator): Pass it.
277 (build_enumerator): Use cxx_constant_value.
278 * decl2.c (grokfield): Use maybe_constant_init.
279 * except.c (check_noexcept_r): Handle constexpr.
280 (build_noexcept_spec): Use maybe_constant_value.
281 * init.c (expand_default_init): Support constant initialization.
282 (build_vec_init): Likewise.
283 (constant_value_1): Adjust.
284 (build_new_1): Adjust.
285 * parser.c (cp_parser_constant_expression): Allow non-integral
287 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
288 (cp_parser_initializer_clause): Toss folded result if non-constant.
289 * pt.c (fold_decl_constant_value): Remove.
290 (convert_nontype_argument): Use maybe_constant_value. Give clearer
291 error about overflow.
292 (tsubst): Move array bounds handling into compute_array_index_type.
293 (value_dependent_expression_p): Handle constant CALL_EXPR.
294 (tsubst_decl): Don't set
295 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
296 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
297 (instantiate_decl): Here too.
298 * semantics.c (finish_static_assert): Use maybe_constant_value.
299 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
300 (potential_constant_expression): Use maybe_constant_value.
301 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
302 is potentially valid in C++0x.
303 * typeck2.c (store_init_value): Handle constant init.
304 (check_narrowing): Use maybe_constant_value.
305 (build_functional_cast): Set TREE_CONSTANT on literal T().
306 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
307 (LOOKUP_ALREADY_DIGESTED): New.
308 (compute_array_index_type): Adjust prototype.
310 * semantics.c (constexpr_call): New datatype.
311 (constexpr_call_table): New global table.
312 (constexpr_call_hash): New.
313 (constexpr_call_equal): Likewise.
314 (maybe_initialize_constexpr_call_table): Likewise.
315 (lookup_parameter_binding): Likewise.
316 (cxx_eval_builtin_function_call): Likewise.
317 (cxx_bind_parameters_in_call): Likewise.
318 (cxx_eval_call_expression): Likewise.
319 (cxx_eval_unary_expression): Likewise.
320 (cxx_eval_binary_expression): Likewise.
321 (cxx_eval_conditional_expression): Likewise.
322 (cxx_eval_array_reference): Likewise.
323 (cxx_eval_component_reference): Likewise.
324 (cxx_eval_logical_expression): Likewise.
325 (cxx_eval_object_construction): Likewise.
326 (cxx_eval_constant_expression): Likewise.
327 (cxx_eval_indirect_ref): Likewise.
328 (cxx_constant_value): Likewise.
329 (cxx_eval_bare_aggregate): Likewise.
330 (adjust_temp_type): New.
331 (reduced_constant_expression_p): New.
332 (verify_constant): New.
333 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
334 (cxx_eval_outermost_constant_expr): New.
335 (maybe_constant_value, maybe_constant_init): New.
336 (cxx_eval_constant_expression): Use them.
337 * pt.c (iterative_hash_template_arg): No longer static.
338 * cp-tree.h: Declare fns.
340 * cp-tree.h (register_constexpr_fundef): Declare.
341 * decl.c (maybe_save_function_definition): New.
342 (finish_function): Use it.
343 * semantics.c (constexpr_fundef): New datatype.
344 (constexpr_fundef_table): New global table.
345 (constexpr_fundef_equal): New.
346 (constexpr_fundef_hash): Likewise.
347 (retrieve_constexpr_fundef): Likewise.
348 (validate_constexpr_fundecl): Store in the table.
349 (build_data_member_initialization): New fn.
350 (build_constexpr_constructor_member_initializers): New.
351 (register_constexpr_fundef): Define.
352 (is_this_parameter): New.
353 (get_function_named_in_call): Likewise.
354 (get_nth_callarg): Likewise.
355 (check_automatic_or_tls): New.
356 (morally_constexpr_builtin_function_p): New.
357 (potential_constant_expression): New.
359 2010-11-01 Jason Merrill <jason@redhat.com>
361 * decl2.c (decl_constant_var_p): New fn.
362 (decl_maybe_constant_var_p): New fn.
363 (mark_used): Rework instantiation of things needed for constant
365 * cp-tree.h: Declare new fns.
366 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
367 (always_instantiate_p): Use decl_maybe_constant_var_p.
368 (instantiate_decl): Don't defer constexpr functions.
369 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
370 * semantics.c (finish_id_expression): Use decl_constant_var_p.
371 Check for valid name in constant expr after mark_used.
373 2010-10-31 Jason Merrill <jason@redhat.com>
375 * class.c (is_really_empty_class): Work when type is not complete.
376 (synthesized_default_constructor_is_constexpr): New.
377 (add_implicitly_declared_members): Use it.
378 (type_has_constexpr_default_constructor): Likewise.
379 * cp-tree.h: Declare it.
380 * method.c (synthesized_method_walk): Use it.
382 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
383 * typeck.c (convert_for_assignment): Likewise.
385 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
386 message about constexpr without -std=c++0x.
388 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
391 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
393 * class.c (layout_vtable_decl): Call build_array_of_n_type.
394 (build_vtt, build_ctor_vtabl_group): Likewise.
396 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
398 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
399 * parser.c (cp_parser_objc_at_property_declaration): Removed
400 parsing of RID_COPIES and RID_IVAR. Updated call to
401 objc_add_property_declaration.
402 * typecheck.c (finish_class_member_access_expr): Call
403 objc_maybe_build_component_ref instead of objc_build_setter_call.
404 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
405 of objc_build_getter_call.
407 2010-10-27 Jason Merrill <jason@redhat.com>
409 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
410 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
411 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
412 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
413 (cp_parser_trait_expr): Likewise.
415 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
416 Jason Merrill <jason@redhat.com>
418 * decl.c (finish_case_label): Use decl_constant_value.
420 * method.c (synthesized_method_walk): Track constexprness too.
421 (process_subob_fn, walk_field_subobs): Likewise.
422 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
423 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
424 * class.c (add_implicitly_declared_members): Handle
425 constexpr default ctor.
427 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
428 Make sure a constexpr ctor has an empty body.
429 * class.c (type_has_constexpr_default_constructor): New.
430 * cp-tree.h: Declare it.
431 * init.c (perform_member_init): Complain about uninitialized
432 member in constexpr ctor.
433 (emit_mem_initializers): And uninitialized base.
434 * decl.c (check_tag_decl): Fix typo.
436 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
437 (is_valid_constexpr_fn): New fn.
438 (validate_constexpr_fundecl): Use it.
439 * decl.c (validate_constexpr_redeclaration): New.
440 (duplicate_decls): Use it.
441 (cp_finish_decl): Call validate_constexpr_fundecl and
442 ensure_literal_type_for_constexpr_object here.
443 (start_decl): Not here. Don't ICE on constexpr reference.
444 (check_for_uninitialized_const_var): Don't handle constexpr specially.
445 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
446 (check_static_variable_definition): Give friendly message about
448 (grokdeclarator): Complain about typedef and volatile with constexpr.
449 Reorganize. Give sorry about non-static data members in C++0x mode.
450 (start_preparsed_function): Check validate_constexpr_fundecl here.
451 (check_function_type): Not here.
452 * decl2.c (finish_static_data_member_decl): Don't complain about
454 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
455 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
456 (cp_parser_decl_specifier_seq): Handle it.
457 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
459 * class.c (check_bases): Propagate non-literality.
460 (check_field_decls): Likewise.
461 (finalize_literal_type_property): New.
462 (check_bases_and_members): Call it.
463 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
464 (lang_type_class): Add has_constexpr_ctor field.
465 (DECL_DECLARED_CONSTEXPR_P): Strip template.
466 * decl.c (grok_special_member_properties): Set
467 TYPE_HAS_CONSTEXPR_CTOR.
469 2010-10-27 Jason Merrill <jason@redhat.com>
471 * call.c (build_integral_nontype_arg_conv): New.
472 * cp-tree.h: Declare it.
473 * pt.c (convert_nontype_argument): Use it.
475 * error.c (dump_simple_decl): Print constexpr.
477 * cvt.c (build_up_reference): Use target_type for the temporary var.
479 * except.c (build_throw): Set EXPR_LOCATION.
481 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
483 * semantics.c (finish_compound_stmt): Avoid creating an
484 unnecessary BIND_EXPR.
486 * call.c (convert_like_real): Don't check narrowing if the element
487 is also an initializer-list.
489 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
491 * parser.c (cp_parser_objc_at_property_declaration): Recognize
492 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
493 Do not use objc_set_property_attr, but use local variables
494 instead. Detect repeated usage of setter, getter and ivar
495 attributes. Improved error processing when a setter name does not
496 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
497 that the token is a keyword. Updated call to
498 objc_add_property_declaration.
500 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
502 * parser.c (cp_parser_objc_property_decl): Renamed to
503 cp_parser_objc_struct_declaration. Return the parsed trees
504 instead of calling objc_add_property_variable directly. Detect
505 missing or invalid declspecs. Implemented attributes. Do not eat
506 the ';' at the end. Exit loop whenever a non-comma is parsed, not
508 (cp_parser_objc_at_property): Renamed to
509 cp_parser_objc_at_property_declaration. Updated calls to
510 objc_add_property_variable, now objc_add_property_declaration, and
511 to cp_parser_objc_property_decl, now
512 cp_parser_objc_struct_declaration. Rewritten all code to be more
513 robust in dealing with syntax errors, and almost identical to the
514 one in c_parser_objc_at_property_declaration.
515 (cp_parser_objc_property_attrlist): Removed.
516 (cp_parser_objc_method_prototype_list): Updated call to
517 cp_parser_objc_at_property.
518 (cp_parser_objc_method_definition_list): Same change.
519 (cp_parser_objc_class_ivars): Detect a number of invalid
520 declarations of instance variables and produce errors when they
523 2010-10-26 Jason Merrill <jason@redhat.com>
525 * tree.c (build_vec_init_expr): Split out from...
526 (build_array_copy): ...here.
527 * init.c (perform_member_init): Use it.
528 * cp-tree.h: Declare it.
529 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
530 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
531 (cp_gimplify_expr): Handle array default-initialization via
534 * tree.c (stabilize_expr): Handle xvalues properly.
536 * call.c (build_over_call): Use argarray[0] for 'this' argument.
538 * decl.c (finish_function): Don't look at function_depth.
540 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
542 Implement opaque-enum-specifiers for C++0x.
543 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
544 (OPAQUE_ENUM_P): New.
545 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
546 (start_enum): Update prototype.
547 (finish_enum_value_list): New prototype.
548 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
549 "enum class" is used in an elaborated-type-specifier.
550 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
551 * decl.c (copy_type_enum): New.
552 (finish_enum_value_list): New, with code from finish_enum.
553 (finish_enum): A lot of code removed. Added a gcc_assert.
554 (start_enum): Add parameters enumtype and is_new.
555 Rewrite to work with opaque-enum-specifiers.
556 * pt.c (maybe_process_partial_specialization): Allow for template
557 specialization of enumerations, with a pedwarn.
558 (lookup_template_class): Update call to start_enum. Call to
560 (tsubst_enum): Call to begin_scope, finish_scope and
561 finish_enum_value_list.
563 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
565 Removed Objective-C++ specific replacement of cxx_printable_name.
566 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
567 to cxx_printable_name for both C++ and Objective-C++.
568 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
570 * error.c (dump_decl): For Objective-C++, call
571 objc_maybe_printable_name here ...
572 * tree.c (cxx_printable_name_internal): ... instead of here.
574 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
576 * tree.c (cxx_printable_name_internal): In Objective-C++, call
577 objc_maybe_printable_name.
579 2010-10-22 Jason Merrill <jason@redhat.com>
582 * pt.c (instantiate_class_template): Don't instantiate default
586 * init.c (build_vec_init): Handle memberwise move.
588 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
591 * call.c (add_function_candidate): Don't use TREE_VALUE on null
594 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
596 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
597 bool instead of calling objc_set_method_type.
598 (cp_parser_objc_method_signature): Updated calls to
599 cp_parser_objc_method_type and to objc_build_method_signature.
600 (cp_parser_objc_method_prototype_list): Updated calls to
601 objc_add_method_declaration. Use token->type to determine if it
602 is a class method or not.
603 (cp_parser_objc_method_definition_list): Same change.
605 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
608 * parser.c (cp_convert_range_for): Call cp_finish_decl
609 instead of finish_expr_stmt.
611 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
613 * cp-lang.c (finish_file): Removed.
614 * decl2.c (cp_write_global_declarations): Call
615 objc_write_global_declarations when compiling Objective-C++.
617 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
620 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
621 (coerce_template_parms): Likewise for args.
623 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
625 Implemented parsing @synthesize and @dynamic for Objective-C++.
626 * parser.c (cp_parser_objc_method_definition_list): Recognize
627 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
628 (cp_parser_objc_at_dynamic_declaration): New.
629 (cp_parser_objc_at_synthesize_declaration): New.
631 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
633 * parser.c (cp_parser_objc_identifier_list): Check the return
634 value of cp_parser_identifier and react if it is error_mark_node.
636 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
638 Merge from apple/trunk branch on FSF servers.
640 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
643 * call.c (standard_conversion, implicit_conversion): Ignore
644 'volatile' attribute of artificially volatized type in objc when
645 evaluating various conversion weights.
647 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
650 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
651 artiificially 'volatized' type before doing pointer comparison.
653 2010-10-18 Jakub Jelinek <jakub@redhat.com>
656 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
659 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
661 Merge from apple/trunk branch on FSF servers.
663 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
666 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
667 objc object types if type is scope qualified.
669 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
671 Merge from apple/trunk branch on FSF servers.
673 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
676 * lex.c (unqualified_name_lookup_error): Issue diagnostic
677 for private 'ivar' access.
679 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
681 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
682 enum, and handle @package.
684 2010-10-15 Jason Merrill <jason@redhat.com>
687 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
688 with a different typedef variant of the element type.
690 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
692 merge from FSF apple 'trunk' branch.
693 2006 Fariborz Jahanian <fjahanian@apple.com>
695 Radars 4436866, 4505126, 4506903, 4517826
696 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
698 (cp_build_modify_expr): Likewise.
699 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
700 (cp_parser_objc_method_definition_list): Likewise.
701 (cp_parser_objc_property_decl): New.
702 (cp_parser_objc_property_attrlist): New.
703 (cp_parser_objc_at_property): New.
705 2010-10-14 Richard Guenther <rguenther@suse.de>
708 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
709 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
711 * error.c (dump_type): Handle NULLPTR_TYPE.
712 (dump_type_prefix): Likewise.
713 (dump_type_suffix): Likewise.
714 * mangle.c (write_type): Likewise.
715 * name-lookup.c (arg_assoc_type): Likewise.
716 * rtti.c (typeinfo_in_lib_p): Likewise.
717 * pt.c (tsubst): Likewise.
719 2010-10-13 Jason Merrill <jason@redhat.com>
722 * class.c (fixup_attribute_variants): New fn.
723 * cp-tree.h: Declare it.
724 * pt.c (instantiate_class_template): Call it.
725 * semantics.c (begin_class_definition): Call it.
727 2010-10-13 Richard Henderson <rth@redhat.com>
729 * cp-lang.c (cp_eh_personality): Update call to
730 build_personality_function.
731 * except.c (choose_personality_routine): Update function comment.
733 2010-10-13 Richard Guenther <rguenther@suse.de>
735 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
736 clear DECL_CHAIN of NAMESPACE_DECLs.
738 2010-10-11 Martin Jambor <mjambor@suse.cz>
741 * cp-tree.h (current_class_ref): Check that cp_function_chain is
743 * call.c (build_cxx_call): Likewise.
745 2010-10-10 Jason Merrill <jason@redhat.com>
747 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
748 (tsubst_default_arguments): Only do this once for cloned fns.
749 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
751 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
752 (tsubst_copy_and_build): Likewise.
753 (tsubst_initializer_list): Likewise.
754 (tsubst_copy): Change default to gcc_unreachable. Handle
755 OVERLOAD and PTRMEM_CST.
757 2010-10-10 Jason Merrill <jason@redhat.com>
761 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
763 2010-10-07 Andi Kleen <ak@linux.intel.com>
765 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
766 (cc1plus-dummy): Remove.
767 (cc1plus-checksum): Change to run checksum over object files
770 2010-10-08 Joseph Myers <joseph@codesourcery.com>
772 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
774 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
776 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
778 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
780 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
781 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
782 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
783 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
784 * parser.c (cp_parser_objc_encode_expression): Updated comment.
786 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
788 Merge from apple/trunk branch on FSF servers.
790 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
793 * parser.c (cp_parser_objc_interstitial_code): Recognize
794 and parse RID_NAMESPACE keyword.
796 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
798 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
799 finding ellipsis, before checking for attributes.
801 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
803 Merge from apple/trunk branch on FSF servers.
804 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
805 longer existing gcc/c-common.def.
807 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
810 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
811 * parser.c (cp_parser_objc_encode_expression): Build a templatized
812 parse tree for @encode(T).
814 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
817 * c-common.def: Add new expression code AT_ENCODE_EXPR.
819 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
822 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
823 code folding offsetof-like computations.
825 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
828 * parser.c (cp_parser_objc_class_interface): If no identifier
829 follows an @interface token, stop parsing the interface after
831 (cp_parser_objc_class_implementation): If no identifier follows an
832 @implementation token, stop parsing the implementation after
835 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
838 * parser.c (cp_parser_objc_method_keyword_params): If the required
839 colon is not found while parsing parameters, stop parsing them.
841 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
844 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
845 @end after detecting it. Print an error if @end is found without
847 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
848 detecting it. Fixed reading the next token when continuing
849 because of an error in a method signature. Print an error if EOF
850 is found without an '@end'.
851 (cp_parser_objc_method_definition_list): Same change.
853 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
855 Merge from apple/trunk branch on FSF servers:
857 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
860 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
861 method parameters and issue error.
862 (cp_parser_objc_method_definition_list): Check for invalid tokens
863 which cannot start a function definition.
865 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
868 * parser.c (cp_parser_objc_message_args): Check for missing message
869 arguments and syntax error.
871 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
874 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
877 2005-08-15 Ziemowit Laski <zlaski@apple.com>
880 * parser.c (cp_parser_objc_interstitial_code): Catch stray
881 '{' and '}' tokens and issue appropriate errors.
883 2005-08-02 Ziemowit Laski <zlaski@apple.com>
886 (cp_parser_statement_seq_opt): In addition to '}' and
887 end-of-file, a statement sequence may also be terminated
890 2010-10-05 Joseph Myers <joseph@codesourcery.com>
892 * cp-tree.h (cxx_print_error_function,
893 cxx_initialize_diagnostics): Declare using diagnostic_context
896 2010-10-04 Andi Kleen <ak@linux.intel.com>
898 * Make-lang.in (g++, cc1plus): Add + to build rule.
900 2010-10-04 Jason Merrill <jason@redhat.com>
902 * tree.c (decl_storage_duration): New.
903 * cp-tree.h: Declare it.
904 (duration_kind): Return values.
906 2010-10-03 Jason Merrill <jason@redhat.com>
908 * typeck.c (require_complete_type_sfinae): Add complain parm to...
909 (require_complete_type): ...this function.
910 (cp_build_array_ref, convert_arguments): Use it.
911 (convert_for_initialization, cp_build_modify_expr): Likewise.
912 * cp-tree.h: Declare it.
913 * call.c (build_over_call): Use it.
915 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
917 merge from FSF 'apple/trunk' branch.
918 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
921 * cp/parser.c (cp_parser_objc_interstitial_code): For
922 @optional/@required set the optional/required flag.
924 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
926 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
927 and indentation when finding an Objective-C++ CPP_AT_NAME token.
929 2010-09-29 Richard Guenther <rguenther@suse.de>
931 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
932 (CP_TYPE_CONTEXT): Similar.
933 (FROB_CONTEXT): Frob global_namespace to the global
934 TRANSLATION_UNIT_DECL.
935 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
936 set DECL_CONTEXT of global_namespace to it.
937 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
938 instead of zeroing context.
939 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
940 (grokfndecl): Likewise.
941 (start_preparsed_function): Likewise.
942 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
943 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
944 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
945 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
946 (push_template_decl_real): Likewise.
947 (tsubst_friend_class): Likewise. Adjust context comparisons.
948 (instantiate_class_template): Use CP_TYPE_CONTEXT.
949 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
950 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
953 2010-09-29 Yao Qi <yao@codesourcery.com>
955 * decl.c (get_atexit_node): Fix typo.
957 2010-09-28 Jason Merrill <jason@redhat.com>
959 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
960 (real_lvalue_p): Take const_tree.
962 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
963 (cp_build_addr_expr_1): Likewise.
965 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
967 Partially merged from apple/trunk branch on FSF servers:
968 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
969 Radar 3803157 (method attributes)
971 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
972 (cp_parser_objc_method_tail_params_opt): Likewise.
973 (cp_parser_objc_method_signature): Likewise.
974 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
975 (cp_parser_objc_method_prototype_list): Handle attributes.
976 (cp_parser_objc_method_definition_list): Likewise.
978 2010-09-28 Richard Henderson <rth@redhat.com>
980 * cp-lang.c: Include "target.h".
981 (cp_eh_personality): Use targetm.except_unwind_info.
982 * Make-lang.in (cp-lang.o): Update deps.
984 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
986 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
987 (cp_parser_declaration): Parse prefix attributes for ObjC++.
988 (cp_parser_objc_protocol_declaration): Handle attributes.
989 (cp_parser_objc_class_interface): Likewise.
990 (cp_parser_objc_declaration): Likewise.
992 2010-09-27 Jason Merrill <jason@redhat.com>
994 Require lvalues as specified by the standard.
995 * typeck.c (lvalue_or_else): Use real_lvalue_p.
996 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
997 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
998 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
999 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
1000 (build_const_cast_1): Adjust.
1001 * cp-tree.h: Declare new fns.
1002 * call.c (build_this, convert_like_real, build_over_call): Adjust.
1003 (initialize_reference): Adjust.
1004 * class.c (build_base_path, convert_to_base_statically): Adjust.
1005 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
1006 * cvt.c (build_up_reference, convert_to_reference): Adjust.
1007 * decl.c (register_dtor_fn): Adjust.
1008 * decl2.c (build_offset_ref_call_from_tree): Adjust.
1009 * except.c (initialize_handler_parm): Adjust.
1010 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
1011 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
1012 * tree.c (stabilize_expr): Adjust.
1014 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
1016 Merge from apple/trunk branch on FSF servers:
1018 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
1021 * typeck.c (composite_pointer_type): Call objc_have_common_type
1022 when comparing two objective-c pointer types.
1024 2005-07-18 Ziemowit Laski <zlaski@apple.com>
1027 * call.c (standard_conversion): Do not issue warnings when
1028 comparing ObjC pointer types.
1030 2005-06-22 Ziemowit Laski <zlaski@apple.com>
1033 * call.c (standard_conversion): Allow for a pointer conversion
1034 between any two ObjC pointer types.
1035 * typeck.c (composite_pointer_type): Determine common type
1036 for two ObjC pointer types.
1038 2010-09-24 Jan Hubicka <jh@suse.cz>
1040 * decl.c (finish_function): Use decl_replaceable_p
1041 * method.c (make_alias_for_thunk): Update call of
1042 cgraph_same_body_alias.
1044 2010-09-24 Jason Merrill <jason@redhat.com>
1046 * decl.c (compute_array_index_type): Remember type dependence of
1048 * pt.c (dependent_type_p_r): Don't recompute it here.
1050 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
1051 reference and pointer to the same type as "*" or "&".
1053 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
1055 * typeck.c (warn_args_num): Use warning 'too many arguments to
1056 method [methodname]' for an Objective-C method instead of the less
1057 satisfactory 'too many arguments to function' (with no method
1060 2010-09-21 Jason Merrill <jason@redhat.com>
1062 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
1063 special handling if we know the member.
1065 2010-09-18 Jason Merrill <jason@redhat.com>
1067 * call.c (compare_ics): Do lvalue/rvalue reference binding
1068 comparison for ck_list, too.
1070 2010-09-15 Jason Merrill <jason@redhat.com>
1072 * semantics.c (finish_id_expression): Diagnose use of function
1073 parms in evaluated context outside function body.
1075 * decl2.c (grokbitfield): Diagnose non-integral width.
1077 * call.c (convert_like_real): Use the underlying type of the
1078 reference for the temporary.
1080 2010-09-15 Jakub Jelinek <jakub@redhat.com>
1083 * class.c (build_vtbl_initializer): Use fn instead of init's operand
1084 as first argument to FDESC_EXPR.
1086 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
1089 * decl.c (grokdeclarator): Check build_memfn_type return value
1090 for error_mark_node.
1092 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1094 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
1095 (begin_range_for_stmt): Likewise.
1097 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
1099 Implement range-based for-statements.
1100 * cp-tree.def (RANGE_FOR_STMT): New.
1101 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
1102 (cp_convert_range_for): Declare.
1103 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
1104 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
1105 * semantics.c (begin_range_for_stmt): New.
1106 (finish_range_for_decl): New.
1107 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1108 (perform_koenig_lookup): Add extra argument include_std.
1109 * parser.c (cp_parser_c_for): New with code from
1110 cp_parser_iteration_statement().
1111 (cp_parser_range_for): New.
1112 (cp_convert_range_for): New.
1113 (cp_parser_iteration_statement): Add range-for support.
1114 (cp_parser_condition): Adjust comment.
1115 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1117 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1118 * cxx-pretty-print.c: Likewise.
1119 * lex.c (cxx_init): Likewise.
1120 * name-lookup.c (lookup_function_nonclass): Add extra argument
1122 (lookup_arg_dependent): Likewise.
1123 * name-lookup.h: Likewise.
1125 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1128 * error.c (maybe_warn_cpp0x): Add new warning
1129 CPP0X_INLINE_NAMESPACES.
1130 * parser.c (cp_parser_namespace_definition): Likewise.
1131 * cp-tree.h (cpp0x_warn_str): Likewise.
1133 2010-09-10 Richard Guenther <rguenther@suse.de>
1135 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1136 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1138 2010-09-10 Jan Hubicka <jh@suse.cz>
1140 PR tree-optimization/45605
1141 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1144 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1147 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1148 before calling fold_decl_constant_value.
1150 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1152 * cp-tree.h (build_enumerator): Add new location_t parameter.
1153 (build_lang_decl_loc): New function.
1154 * decl.c (build_enumerator): New parameter loc. Use it when calling
1155 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1156 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1157 * parser.c (cp_parser_enumerator_definition): Ditto.
1158 * lex.c (build_lang_decl_loc): New function.
1160 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1165 * tree.c (strip_typedefs): Strip typedefs from the context of
1168 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1170 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1171 * call.c (build_conditional_expr): Likewise.
1172 (convert_arg_to_ellipsis): Likewise.
1174 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1176 * parser.c (make_pointer_declarator, make_reference_declarator,
1177 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1178 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1180 2010-09-06 Jason Merrill <jason@redhat.com>
1182 * call.c (implicit_conversion): Fix value-init of enums.
1183 (convert_like_real): Likewise.
1185 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1187 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1188 (fold_non_dependent_expr): ...here.
1189 (convert_nontype_argument): Use it. Take complain parm.
1190 Use perform_implicit_conversion instead of ocp_convert.
1191 Allow cv-qual changes.
1192 (convert_template_argument): Pass complain down.
1193 (tsubst_template_arg): Suppress constant expression warnings.
1196 * method.c (synthesized_method_walk): In constructors, also check
1197 subobject destructors.
1199 * semantics.c (finish_compound_literal): Always build a
1202 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1205 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1207 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1210 * parser.c (cp_parser_omp_atomic): Handle boolean
1211 {PRE,POST}_INCREMENT.
1213 2010-08-29 Jason Merrill <jason@redhat.com>
1216 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1217 after tentative parsing.
1219 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1221 * Make-lang.in (g++spec.o): Update dependencies.
1222 * g++spec.c: Include opts.h
1223 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1224 (lang_specific_driver): Use cl_decoded_option structures.
1226 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1228 * call.c: Use FOR_EACH_VEC_ELT.
1229 * class.c: Likewise.
1231 * decl2.c: Likewise.
1232 * error.c: Likewise.
1233 * except.c: Likewise.
1234 * mangle.c: Likewise.
1235 * method.c: Likewise.
1236 * name-lookup.c: Likewise.
1237 * parser.c: Likewise.
1240 * semantics.c: Likewise.
1241 * typeck2.c: Likewise.
1243 2010-08-19 Jason Merrill <jason@redhat.com>
1245 * call.c (reference_related_p): Check for error_mark_node.
1246 (add_function_candidate): Check it instead of
1247 same_type_ignoring_top_level_qualifiers_p.
1250 * init.c (build_new_1): Don't use build_value_init in a template.
1251 (build_value_init): Make sure we don't.
1254 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1255 of empty class CONSTRUCTOR.
1257 * except.c (pending_noexcept, pending_noexcept_checks): New.
1258 (perform_deferred_noexcept_checks): New.
1259 (maybe_noexcept_warning): Split from...
1260 (finish_noexcept_expr): ...here. Adjust.
1261 * decl2.c (cp_write_global_declarations): Call
1262 perform_deferred_noexcept_checks.
1263 * cp-tree.h: And declare it.
1265 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1268 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1271 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1273 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1274 or if -fms-extensions is enabled check, check permissive.
1276 2010-08-09 Jason Merrill <jason@redhat.com>
1279 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1281 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1283 * call.c (add_builtin_candidates): Use VECs for local variable
1284 `types'. Adjust remainder of function accordingly.
1286 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1288 * name-lookup.c (is_associated_namespace): Convert local variables
1289 to be VECs instead of TREE_LISTs.
1291 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1293 * tree.c (varargs_function_p): Use stdarg_p.
1295 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1297 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1298 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1299 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1300 Change type to a VEC.
1301 (unparsed_funs_with_default_args): Define.
1302 (unparsed_funs_with_definitions): Define.
1303 (push_unparsed_function_queues): New function.
1304 (cp_parser_new): Call it.
1305 (pop_unparsed_function_queues): New function.
1306 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1307 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1308 (cp_parser_save_member_function_body): Likewise.
1309 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1310 and pop_unparsed_function_queues.
1311 (cp_parser_late_parsing_default_args): Likewise.
1312 (cp_parser_save_default_args): Use VEC_safe_push.
1314 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1316 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1318 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1320 * decl.c (poplevel): Adjust for type changes.
1321 (declare_local_label): Likewise.
1323 2010-08-06 Jason Merrill <jason@redhat.com>
1325 * typeck.c (complete_type_or_maybe_complain): Split out from...
1326 (complete_type_or_else): Here.
1327 (build_class_member_access_expr): Call it.
1328 (finish_class_member_access_expr): Likewise.
1329 * call.c (build_special_member_call): Likewise.
1330 * cvt.c (build_expr_type_conversion): Likewise.
1331 * init.c (build_new): Likewise.
1332 * typeck2.c (build_functional_cast): Likewise.
1333 * cp-tree.h: Declare it.
1335 * init.c (build_value_init): Add complain parm.
1336 (build_value_init_noctor): Likewise.
1337 (perform_member_init): Pass it.
1338 (expand_aggr_init_1): Likewise.
1339 (build_new_1): Likewise.
1340 (build_vec_init): Likewise.
1341 * pt.c (tsubst_expr): Likewise.
1342 * typeck2.c (build_functional_cast): Likewise.
1343 * cp-tree.h: Adjust.
1344 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1346 * typeck.c (decay_conversion): Any expression with type nullptr_t
1349 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1352 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1354 2010-07-27 Jason Merrill <jason@redhat.com>
1356 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1357 from build_value_init.
1358 * init.c (build_value_init_noctor): Give error for unknown array
1361 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1363 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1365 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1367 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1368 c_common_initialize_diagnostics.
1369 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1370 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1372 2010-07-21 Jason Merrill <jason@redhat.com>
1374 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1376 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1379 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1382 * pt.c (instantiate_class_template): Propagate the template's
1383 location to its instance.
1385 2010-07-20 Jason Merrill <jason@redhat.com>
1388 * pt.c (tsubst_copy_and_build): Rework last change.
1391 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1394 2010-07-19 Jason Merrill <jason@redhat.com>
1397 * semantics.c (finish_decltype_type): Correct decltype
1398 of parenthesized rvalue reference variable.
1401 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1402 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1404 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1407 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1409 * cp-tree.h: Adjust declaration.
1410 * init.c (perform_member_init): Adjust caller.
1411 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1412 * typeck2.c (store_init_value): Likewise.
1413 (build_functional_cast): Pass complain argument to
1414 build_x_compound_expr_from_list.
1416 2010-07-16 Jason Merrill <jason@redhat.com>
1419 * pt.c (process_partial_specialization): Diagnose partial
1420 specialization after instantiation.
1421 (most_specialized_class): Add complain parm.
1423 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1425 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1427 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1428 cp_build_function_call.
1430 2010-07-15 Jason Merrill <jason@redhat.com>
1433 * call.c (add_function_candidate): If we're working on an implicit
1434 declaration, don't consider candidates that won't match.
1435 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1436 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1439 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1440 (TYPE_HAS_USER_OPEQ): New.
1441 * decl.c (grok_special_member_properties): Set it.
1442 * class.c (add_implicitly_declared_members): Don't lazily declare
1443 constructors/operator= if a base or member has a user-declared one.
1444 (check_bases_and_members, check_bases): Adjust.
1445 (check_field_decls, check_field_decl): Adjust.
1447 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1449 * decl.c (integer_three_node): Remove.
1450 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1451 * cp-tree.h (integer_three_node): Remove.
1453 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1455 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1457 * class.c: Likewise.
1458 * cp-gimplify.c: Likewise.
1460 * decl2.c: Likewise.
1462 * mangle.c: Likewise.
1463 * name-lookup.c: Likewise.
1464 * optimize.c: Likewise.
1465 * parser.c: Likewise.
1468 * search.c: Likewise.
1469 * semantics.c: Likewise.
1470 * typeck.c: Likewise.
1471 * typeck2.c: Likewise.
1473 2010-07-14 Jason Merrill <jason@redhat.com>
1475 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1476 (build_field_list): Cache field type.
1478 Implement C++0x unrestricted unions (N2544)
1479 * class.c (check_field_decl): Loosen union handling in C++0x.
1480 * method.c (walk_field_subobs): Split out from...
1481 (synthesized_method_walk): ...here. Set msg before loops.
1482 (process_subob_fn): Check for triviality in union members.
1483 * init.c (sort_mem_initializers): Splice out uninitialized
1484 anonymous unions and union members.
1485 (push_base_cleanups): Don't automatically destroy anonymous unions
1488 2010-07-13 Jason Merrill <jason@redhat.com>
1491 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1492 (TYPE_HAS_USER_OPEQ): New.
1493 * decl.c (grok_special_member_properties): Set it.
1494 * class.c (add_implicitly_declared_members): Don't lazily declare
1495 constructors/operator= if a base or member has a user-declared one.
1496 (check_bases_and_members, check_bases): Adjust.
1497 (check_field_decls, check_field_decl): Adjust.
1498 * method.c (synthesized_method_walk): Initialize check_vdtor.
1501 * mangle.c (write_type): Canonicalize.
1502 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1503 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1505 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1508 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1510 * typeck.c (get_delta_difference): Update prototype, add a
1511 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1512 add checks for error_mark_node.
1513 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1514 parameter; update lookup_base call.
1515 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1516 parameter; update get_delta_difference call and add check for
1518 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1519 parameter; update get_delta_difference call and add check for
1520 error_mark_node; update build_ptrmemfunc call.
1521 (build_static_cast_1): Adjust convert_ptrmem call.
1522 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1523 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1524 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1525 and build_ptrmemfunc calls.
1526 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1528 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1531 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1532 adjust build_special_member_call call, pass complain.
1533 (convert_like_real): Adjust build_temp call, pass complain.
1535 2010-07-09 Jason Merrill <jason@redhat.com>
1538 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1539 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1540 Set BV_LOST_PRIMARY.
1541 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1543 2010-07-08 Jason Merrill <jason@redhat.com>
1546 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1547 virtual bases for covariant thunks.
1549 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1551 * cp-tree.h: Do not include toplev.h.
1553 2010-07-06 Jason Merrill <jason@redhat.com>
1556 * call.c (is_std_init_list): Look through typedefs.
1559 * init.c (build_offset_ref): If scope isn't dependent,
1560 don't exit early. Look at TYPE_MAIN_VARIANT.
1561 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1563 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1565 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1567 * cp-tree.h (impl_conv_void): New type.
1568 (convert_to_void): Adjust prototype.
1569 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1570 diagnostic for easy translation. Change caller.
1571 * typeck.c: Update call to convert_to_void.
1572 * semantics.c: Likewise.
1575 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1577 * decl.c (cp_finish_decl): Call add_local_decl.
1578 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1580 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1582 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1585 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1588 * parser.c (cp_parser_primary_expression): Error if local template is
1591 2010-07-02 Le-Chun Wu <lcwu@google.com>
1594 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1595 (variable or type) shadows another type.
1597 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1600 * typeck.c (convert_for_assignment): When converting a convertible
1601 vector type or objc++ types, call mark_rvalue_use.
1602 * typeck2.c (build_m_component_ref): Use return values from
1603 mark_rvalue_use or mark_lvalue_use.
1604 * class.c (build_base_path): Likewise.
1605 * call.c (build_conditional_expr): Likewise.
1607 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1610 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1613 2010-07-01 Richard Guenther <rguenther@suse.de>
1615 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1616 predicate we are looking for, allow non-gimplified
1619 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1622 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1623 arg is NULL_TREE too.
1624 * call.c (convert_class_to_reference): Return error_mark_node when
1627 2010-06-30 Michael Matz <matz@suse.de>
1629 * repo.c (finish_repo): Fix typo.
1631 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1633 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1635 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1637 * repo.c (pending_repo): Change type to a VEC.
1638 (finish_repo): Adjust for new type of pending_repo.
1639 (repo_emit_p): Likewise.
1641 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1643 * tree.c: Include gimple.h. Do not include tree-flow.h
1644 * decl.c: Do not include tree-flow.h
1645 * Make-lang.in: Adjust dependencies.
1647 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1649 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1650 (incomplete_vars): Adjust comment. Change type to a VEC.
1651 (maybe_register_incomplete_var): Adjust for new type.
1652 (complete_vars): Adjust iteration over incomplete_vars.
1654 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1656 * decl.c (struct named_label_entry): Change type of bad_decls field
1658 (poplevel_named_label_1): Adjust for new type of bad_decls.
1659 (check_goto): Likewise.
1661 2010-06-29 Jason Merrill <jason@redhat.com>
1663 Enable implicitly declared move constructor/operator= (N3053).
1664 * class.c (add_implicitly_declared_members): A class with no
1665 explicitly declared copy or move constructor gets both declared
1666 implicitly, and similarly for operator=.
1667 (check_bases): A type with no copy ctor does not inhibit
1668 a const copy ctor in a derived class. It does mean the derived
1670 (check_field_decl): Likewise.
1671 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1672 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1673 (trivially_copyable_p): Likewise.
1674 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1675 * class.c (finish_struct_bits): Likewise.
1676 * tree.c (build_target_expr_with_type): Likewise.
1677 * typeck2.c (store_init_value): Likewise.
1679 Enable implicitly deleted functions (N2346)
1680 * class.c (check_bases_and_members): Adjust lambda flags.
1681 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1683 * decl2.c (mark_used): Adjust error for use of deleted function.
1685 Machinery to support implicit delete/move.
1686 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1687 has_complex_move_ctor, has_complex_move_assign bitfields.
1688 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1689 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1690 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1691 (enum special_function_kind): Add sfk_move_assignment.
1692 (LOOKUP_SPECULATIVE): New.
1693 * call.c (build_over_call): Return early if it's set.
1694 (build_over_call): Use trivial_fn_p.
1695 * class.c (check_bases): If the base has no default constructor,
1696 the derived one is non-trivial. Handle move ctor/op=.
1697 (check_field_decl): Likewise.
1698 (check_bases_and_members): Handle move ctor/op=.
1699 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1700 (type_has_move_constructor, type_has_move_assign): New.
1701 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1702 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1703 (trivial_fn_p): New.
1704 (do_build_copy_constructor): Use it.
1705 (do_build_assign_ref): Likewise. Handle move assignment.
1706 (build_stub_type, build_stub_object, locate_fn_flags): New.
1707 (locate_ctor): Use locate_fn_flags.
1708 (locate_copy, locate_dtor): Remove.
1709 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1710 (process_subob_fn, synthesized_method_walk): New.
1711 (maybe_explain_implicit_delete): New.
1712 (implicitly_declare_fn): Use synthesized_method_walk,
1713 type_has_trivial_fn, and type_set_nontrivial_flag.
1714 (defaulted_late_check): Set DECL_DELETED_FN.
1715 (defaultable_fn_check): Handle sfk_move_assignment.
1716 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1717 implicitly deleted move ctor/op=.
1718 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1719 (lookup_fnfields_slot): New.
1720 * semantics.c (omp_clause_info_fndecl): Remove.
1721 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1722 get_copy_assign, trivial_fn_p.
1723 (trait_expr_value): Adjust call to locate_ctor.
1724 * tree.c (special_function_p): Handle sfk_move_assignment.
1726 * class.c (type_has_virtual_destructor): New.
1727 * cp-tree.h: Declare it.
1728 * semantics.c (trait_expr_value): Use it.
1730 * call.c (build_over_call): Only give warnings with tf_warning.
1732 * name-lookup.c (pop_scope): Handle NULL_TREE.
1734 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1735 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1736 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1737 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1738 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1739 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1740 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1741 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1742 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1743 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1744 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1745 * search.c, semantics.c, tree.c: Adjust.
1747 * pt.c (dependent_scope_ref_p): Remove.
1748 (value_dependent_expression_p): Don't call it.
1749 (type_dependent_expression_p): Here either.
1750 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1751 if the scope isn't dependent.
1753 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1757 * pt.c (has_value_dependent_address): New.
1758 (value_dependent_expression_p): Check it.
1759 (convert_nontype_argument): Likewise. Call decay_conversion before
1760 folding if we want a pointer.
1761 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1762 scope is the current instantiation.
1764 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1767 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1770 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1772 * init.c: Do not include except.h.
1775 * cp-lang.c: Likewise.
1777 * semantics.c: Likewise.
1778 * decl2.c: Likewise.
1779 * except.c: Likewise.
1780 (init_exception_processing): Do not set the removed
1781 lang_protect_cleanup_actions here.
1782 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1783 (doing_eh): New, moved from except.c but removed the do_warning flag.
1784 (expand_start_catch_block): Update doing_eh call.
1785 (expand_end_catch_block): Likewise.
1786 (build_throw): Likewise.
1787 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1788 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1789 cp_protect_cleanup_actions.
1790 * Make-lang.in: Update dependencies.
1792 2010-06-26 Jason Merrill <jason@redhat.com>
1794 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1795 constructor called with a single argument that takes a reference
1796 to the constructor's class.
1797 (BAD_CONVERSION_RANK): New.
1798 (compare_ics): Use it to compare bad ICSes.
1800 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1802 * lang-specs.h: Remove +e handling.
1804 2010-06-24 Andi Kleen <ak@linux.intel.com>
1806 * parser.c: (cp_parser_question_colon_clause):
1807 Switch to use cp_lexer_peek_token.
1808 Call warn_for_omitted_condop. Call pedwarn for omitted
1811 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1814 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1815 datum and mark_rvalue_use on component.
1818 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1819 the CALL_EXPR has no arguments.
1821 2010-06-21 Jason Merrill <jason@redhat.com>
1823 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1825 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1828 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1830 * name-lookup.c (struct arg_lookup): Convert namespaces and
1831 classes fields to VEC.
1832 (arg_assoc_namespace): Adjust for new type of namespaces.
1833 (arg_assoc_class): Adjust for new type of classes.
1834 (lookup_arg_dependent): Use make_tree_vector and
1835 release_tree_vector.
1836 * typeck2.c (build_x_arrow): Use vec_member.
1838 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1841 * error.c (dump_decl): Better wording for anonymous namespace.
1843 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1845 * class.c (build_vtbl_initializer): Adjust computation of new_position
1846 and which entry to add padding for.
1848 2010-06-16 Jason Merrill <jason@redhat.com>
1850 * except.c (check_noexcept_r): Return the problematic function.
1851 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1852 * pt.c (tsubst_copy_and_build): Pass it.
1853 * parser.c (cp_parser_unary_expression): Likewise.
1854 * cp-tree.h: Adjust prototype.
1856 * method.c (defaulted_late_check): Give the defaulted method
1857 the same exception specification as the implicit declaration.
1859 2010-06-15 Jason Merrill <jason@redhat.com>
1861 * class.c (add_implicitly_declared_members): Implicit assignment
1862 operators can also be virtual overriders.
1863 * method.c (lazily_declare_fn): Likewise.
1865 * call.c (convert_like_real): Give "initializing argument of"
1866 information for ambiguous conversion. Give source position
1869 * call.c (print_z_candidates): Do print viable deleted candidates.
1870 (joust): Don't choose a deleted function just because its worst
1871 conversion is better than another candidate's worst.
1873 * call.c (convert_like_real): Don't complain about
1874 list-value-initialization from an explicit constructor.
1876 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1877 DECL_SOURCE_LOCATION directly.
1879 * class.c (type_has_user_provided_default_constructor): Use
1882 * call.c (is_subseq): Handle ck_aggr, ck_list.
1883 (compare_ics): Treat an aggregate or ambiguous conversion to the
1884 same type as involving the same function.
1886 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1888 * typeck.c (convert_for_assignment): Fix comment. Change message
1889 format from %d to %qP.
1890 (convert_for_initialization): Fix comment.
1892 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1894 * cp-tree.h (expr_list_kind): New type.
1895 (impl_conv_rhs): New type.
1896 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1898 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1899 diagnostics for easy translation. Change caller.
1900 (convert_for_initialization): Use impl_conv_rhs and change caller.
1901 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1902 diagnostics for easy translation. Change caller.
1903 * decl.c (bad_spec_place): New enum.
1904 (bad_specifiers): Use it and emit the diagnostics for easy
1905 translation. Change caller.
1906 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1908 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1910 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1912 * decl2.c (cp_write_global_declarations): Adjust for new type of
1913 decl_namespace_list.
1914 * name-lookup.c (current_decl_namespace): Likewise.
1915 (push_decl_namespace): Likewise.
1916 (pop_decl_namespace): Likewise.
1918 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1920 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1921 instead of build_function_type.
1922 * decl.c (cxx_init_decl_processing): Likewise.
1923 (declare_global_var): Likewise.
1924 (get_atexit_node): Likewise.
1925 (expand_static_init): Likewise.
1926 * decl2.c (start_objects): Likewise.
1927 (start_static_storage_duration_function): Likewise.
1928 * except.c (init_exception_processing): Likewise.
1929 (build_exc_ptr): Likewise.
1930 (build_throw): Likewise.
1931 * rtti.c (throw_bad_cast): Likewise.
1932 (throw_bad_typeid): Likewise.
1933 (build_dynamic_cast_1): Likewise.
1935 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1937 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1938 (build_op_delete_call): Likewise.
1939 (build_over_call): Likewise.
1940 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1941 * pt.c (process_partial_specialization): Likewise.
1942 (tsubst_template_args): Likewise.
1943 * semantics.c (finish_asm_stmt): Likewise.
1945 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1947 * decl.c (record_key_method_defined): New, broken out of ...
1948 (finish_function): ... here. Call it.
1949 (start_decl): Treat aliases as definitions.
1951 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1953 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1955 * pt.c (maybe_process_partial_specialization): Likewise.
1956 (register_specialization): Likewise.
1957 (add_pending_template): Likewise.
1958 (lookup_template_class): Likewise.
1959 (push_tinst_level): Likewise.
1961 * parser.c (cp_lexer_new_main): Likewise.
1962 (cp_lexer_new_from_tokens): Likewise.
1963 (cp_token_cache_new): Likewise.
1964 (cp_parser_context_new): Likewise.
1965 (cp_parser_new): Likewise.
1966 (cp_parser_nested_name_specifier_opt): Likewise.
1967 (cp_parser_template_id): Likewise.
1969 * name-lookup.c (binding_entry_make): Likewise.
1970 (binding_table_construct): Likewise.
1971 (binding_table_new): Likewise.
1972 (cxx_binding_make): Likewise.
1973 (pushdecl_maybe_friend): Likewise.
1974 (begin_scope): Likewise.
1975 (push_to_top_level): Likewise.
1977 * lex.c (init_reswords): Likewise.
1978 (retrofit_lang_decl): Likewise.
1979 (cxx_dup_lang_specific_decl): Likewise.
1980 (copy_lang_type): Likewise.
1981 (cxx_make_type): Likewise.
1983 * decl.c (make_label_decl): Likewise.
1984 (check_goto): Likewise.
1985 (start_preparsed_function): Likewise.
1986 (save_function_data): Likewise.
1988 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1990 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1992 * class.c (finish_struct_1): Likewise.
1994 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1995 (struct lang_decl): Likewise.
1997 * parser.c (cp_parser_new): Update comment to not reference
2000 2010-06-07 Jason Merrill <jason@redhat.com>
2003 * error.c (dump_parameters): Mask out TFF_SCOPE.
2004 (dump_simple_decl): Don't print the scope of a PARM_DECL.
2005 (dump_scope): Remove no-op mask.
2008 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
2010 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
2011 * init.c (build_offset_ref): Use it.
2012 * pt.c (maybe_process_partial_specialization): Use it.
2013 (instantiate_class_template): Use it.
2014 * search.c (lookup_base): Use it.
2016 2010-06-07 Jakub Jelinek <jakub@redhat.com>
2019 * expr.c (mark_exp_read): Handle INDIRECT_REF.
2020 * cvt.c (convert_to_void): Handle INDIRECT_REF like
2021 handled_component_p.
2024 * decl.c (initialize_local_var): If TREE_USED is set on the type,
2025 set also DECL_READ_P on the decl.
2027 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2030 * cp-tree.h (typedef_variant_p): Move this declaration to
2032 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2033 * decl.c (grokdeclarator): Do not rename debug info of an
2034 anonymous tagged type named by a typedef.
2036 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
2039 * class.c (check_field_decls): Move the call to
2040 check_bitfield_decl before trying to set the
2041 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
2043 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
2045 * typeck.c: Update include path for moved files.
2048 * cp-gimplify.c: Likewise.
2049 * cp-lang.c: Likewise.
2051 * semantics.c: Likewise.
2052 * cxx-pretty-print.h: Likewise.
2053 * decl2.c: Likewise.
2054 * parser.c: Likewise.
2055 * cp-objcp-common.c: Likewise.
2056 * cp-tree.h: Likewise.
2057 * name-lookup.c: Likewise.
2059 * name-lookup.h: Likewise.
2060 * config-lang.in: Update paths in gtfiles for files in c-family/.
2061 * Make-lang.in: Likewise.
2063 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
2065 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
2066 * typeck.c (build_ptrmemfunc): Likewise.
2068 2010-06-04 Jason Merrill <jason@redhat.com>
2070 * typeck2.c (merge_exception_specifiers): Adjust merging of
2071 throw() and noexcept(true).
2073 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
2074 using an uninitialized variable.
2076 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
2077 (pp_cxx_expression): Likewise.
2079 Implement noexcept-specification (15.4)
2080 * parser.c (cp_parser_exception_specification_opt): Parse it.
2081 Give -Wdeprecated warning about throw() specs.
2082 * pt.c (tsubst_exception_specification): Handle it.
2083 * error.c (dump_exception_spec): Handle it.
2084 (dump_expr): Handle NOEXCEPT_EXPR.
2085 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
2086 * typeck.c (comp_except_specs): Handle compatibility rules.
2087 Change exact parm to take an enum.
2088 * typeck2.c (merge_exception_specifiers): Handle noexcept.
2089 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
2090 (type_throw_all_p, build_noexcept_spec): New fns.
2091 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
2092 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
2093 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
2094 (noexcept_true_spec, noexcept_false_spec): New macros.
2095 * name-lookup.c (pushdecl_maybe_friend): Adjust.
2096 * search.c (check_final_overrider): Adjust.
2097 * decl.c (check_redeclaration_exception_specification): Adjust.
2098 (use_eh_spec_block): Use type_throw_all_p.
2099 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
2100 Give operator new a noexcept-specification in C++0x mode.
2101 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
2102 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
2104 Implement noexcept operator (5.3.7)
2105 * cp-tree.def (NOEXCEPT_EXPR): New.
2106 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2107 * cp-tree.h: Declare finish_noexcept_expr.
2108 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2109 * pt.c (tsubst_copy_and_build): And tsubst it.
2110 (type_dependent_expression_p): Handle it.
2111 (value_dependent_expression_p): Handle it.
2113 * call.c (build_conditional_expr): Never fold in unevaluated context.
2114 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2115 * semantics.c (simplify_aggr_init_expr): Likewise.
2116 * typeck.c (merge_types): Call merge_exception_specifiers.
2117 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2118 DECL_ANTICIPATED for preferring new type.
2120 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2122 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2125 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2128 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2129 on object for static data members.
2131 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2132 Jason Merrill <jason@redhat.com>
2135 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2136 with the same type, call mark_lvalue_use on both.
2138 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2140 * class.c (struct vtbl_init_data_s): Remove last_init field.
2141 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2143 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2145 (build_vtt): Likewise.
2146 (initialize_vtable): Take a VEC instead of a tree.
2147 (build_vtt_inits): Change return type to void. Take a VEC **
2148 instead of a tree *; accumulate results into said VEC.
2149 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2150 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2151 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2153 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2154 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2156 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2157 rather than tree_cons.
2158 (build_vbase_offset_vtbl_entries): Likewise.
2159 (add_vcall_offset): Likewise.
2160 (build_rtti_vtbl_entries): Likewise.
2161 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2162 * decl.c (initialize_artificial_var): Use build_constructor instead
2163 of build_constructor_from_list.
2165 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2168 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2171 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2173 * parser.c (cp_parser_mem_initializer_list): Change error text.
2175 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2177 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2178 tree_decl_map hashtab from tree_map.
2179 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2180 (init_shadowed_var_for_decl): Adjust initialization.
2183 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2184 instead of calling mark_exp_read only when not an assignment.
2187 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2188 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2189 Set DECL_VALUE_EXPR on var.
2191 2010-06-02 Jason Merrill <jason@redhat.com>
2193 * error.c (dump_type): Improve typedef handling.
2198 * name-lookup.c (same_entity_p): New.
2199 (ambiguous_decl): Multiple declarations of the same entity
2202 2010-06-01 Jason Merrill <jason@redhat.com>
2205 * call.c (add_list_candidates): Prefer the default constructor.
2206 (build_aggr_conv): Treat missing initializers like { }.
2207 * typeck2.c (process_init_constructor_record): Likewise.
2208 * init.c (expand_default_init): Use digest_init for
2209 direct aggregate initialization, too.
2211 * call.c (add_list_candidates): Split out...
2212 (build_user_type_conversion_1): ...from here.
2213 (build_new_method_call): And here.
2214 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2217 * call.c (build_list_conv): Set list-initialization flags properly.
2219 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2221 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2223 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2224 Matthew Gingell <gingell@adacore.com>
2226 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2227 * decl2.c: Include langhooks.h and c-ada-spec.h.
2228 (cpp_check, collect_source_refs, collect_ada_namespace,
2229 collect_all_refs): New functions.
2230 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2231 * lang-specs.h: Ditto.
2233 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2235 * cp-tree.h (cp_build_function_call_nary): Declare.
2236 * typeck.c (cp_build_function_call_nary): Define.
2237 * decl.c (register_dtor_fn): Use it instead of
2238 cp_build_function_call.
2239 (cxx_maybe_build_cleanup): Likewise.
2240 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2241 * except.c (do_get_exception_ptr): Likewise.
2242 (do_begin_catch): Likewise.
2243 (do_allocate_exception): Likewise.
2244 (do_free_exception): Likewise.
2245 (build_throw): Likewise. Use cp_build_function_call_vec instead
2246 of cp_build_function_call.
2247 (do_end_catch): Likewise.
2249 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2251 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2252 (struct cp_declarator): Move id_loc field up.
2254 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2256 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2257 this file is included before c-common.h. Define GCC_DIAG_STYLE
2258 before including diagnostic-core.h and toplev.h.
2259 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2260 * pt.c: Include cp-tree.h before c-common.h.
2262 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2264 * tree.c (c_register_addr_space): Add stub.
2266 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2268 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2271 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2273 Revert fix of PR c++/44188
2274 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2276 * tree.c (typedef_variant_p): Revert moving this definition to
2278 * decl.c (grokdeclarator): Revert naming typedef handling.
2280 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2282 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2283 * cp-lang.c: Don't include diagnostic.h
2284 * name-lookup.c: Include diagnostic-core.h instead of
2286 (cp_emit_debug_info_for_using): Use seen_error.
2287 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2288 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2289 * pt.c (iterative_hash_template_arg): Use seen_error.
2290 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2291 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2292 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2293 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2296 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2299 * cp-tree.h (typedef_variant_p): Move this declaration to
2301 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2302 * decl.c (grokdeclarator): Do not rename debug info of an
2303 anonymous tagged type named by a typedef.
2305 2010-05-27 Jason Merrill <jason@redhat.com>
2308 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2311 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2314 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2315 * class.c (layout_class_type): Likewise.
2316 * decl.c (finish_enum): Likewise.
2317 * mangle.c (write_builitin_type): Likewise.
2319 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2321 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2323 * decl.c (grokdeclarator): Handle __int128.
2324 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2325 (cp_parser_simple_type_specifier): Likewise.
2326 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2327 * typeck.c (cp_common_type): Handle __int128.
2328 * mangle.c (integer_type_codes): Add itk_int128 and
2329 itk_unsigned_int128.
2331 2010-05-26 Jason Merrill <jason@redhat.com>
2334 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2337 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2339 * cp-lang.c: Do not include expr.h.
2341 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2343 * decl.c: Do not include rtl.h
2344 * semantics.c: Likewise.
2346 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2348 * cp-tree.h: Do not include splay-tree.h.
2349 (struct prtmem_cst): Remove unused field and false comment.
2350 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2351 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2352 * init.c: Do not include rtl.h and expr.h.
2353 * class.c: Do not include rtl.h. Include splay-tree.h.
2354 (build_clone): Use plain NULL instead of NULL_RTX.
2355 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2356 included. Include splay-tree.h.
2357 * method.c: Do not include rtl.h and expr.h.
2358 (use_thunk): Use plain NULL instead of NULL_RTX.
2359 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2360 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2361 and target.h. Include splay-tree.h.
2362 * expr.c: Do not include rtl.h and expr.h.
2363 * pt.c: Do not include obstack.h and rtl.h.
2364 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2365 (tsubst_decl): Likewise.
2366 (instantiate_decl): Likewise.
2367 * semantics.c: Do not include exprt.h and debug.h. Explain why
2368 rtl.h has to be included.
2369 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2370 * call.c: Do not include rtl.h and expr.h.
2371 * search.c: Do not include obstack.h and rtl.h.
2372 * friend.c: Do not include rtl.h and expr.h.
2373 * Make-lang.in: Update dependencies.
2375 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2378 * parser.c (non_integral_constant): Add NIC_NONE.
2379 (required_token): Add RT_NONE.
2380 (cp_parser_unary_expression): Initialize non_constant_p
2382 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2383 (cp_parser_primary_expression, cp_parser_postfix_expression,
2384 cp_parser_cast_expression, cp_parser_binary_expression,
2385 cp_parser_functional_cast): Fix formatting.
2387 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2390 * parser.c: Remove inclusion of dyn-string.h.
2391 (non_integral_constant): New enum.
2392 (name_lookup_error): New enum.
2393 (required_token): New enum.
2394 (cp_parser_required_error): New function.
2395 (cp_parser_require): Change the type of variable token_desc to
2396 required_token and use cp_parser_required_error.
2397 (cp_parser_require_keyword): Likewise.
2398 (cp_parser_error): Use gmsgid as parameter.
2399 (cp_parser_name_lookup_error): Change the type of variable desired to
2400 name_lookup_error and put the diagnostic in the full sentences. Change
2402 (cp_parser_non_integral_constant_expression): Change the type of the
2403 variable thing to non_integral_constant and put the diagnostics in
2404 full sentences. Change caller.
2406 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2409 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2411 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2413 * error.c (cp_diagnostic_starter): Update call to
2414 diagnostic_build_prefix.
2415 (cp_print_error_function,
2416 print_instantiation_partial_context_line): Check show_column flag
2419 2010-05-24 Jason Merrill <jason@redhat.com>
2422 * decl.c (check_initializer): Don't wrap an init-list in a
2424 * init.c (build_aggr_init): Don't assume copy-initialization if
2425 init has CONSTRUCTOR_IS_DIRECT_INIT.
2426 * call.c (build_new_method_call): Sanity check.
2428 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2430 * rtti.c (tinfo_base_init): Use build_constructor instead of
2431 build_constructor_from_list. Don't cons a tree node for
2433 (generic_initializer): Use build_constructor_single instead of
2434 build_constructor_from_list.
2435 (ptr_initializer): Use build_constructor instead of
2436 build_constructor_from_list
2437 (ptm_initializer): Likewise.
2438 (class_initializer): Likewise. Take varargs instead of TRAIL.
2439 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2440 build_constructor instead of build_constructor_from_list.
2442 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2444 * semantics.c: Include bitmap.h.
2445 * Make-lang.in: Update dependencies.
2447 2010-05-22 Jan Hubicka <jh@suse.cz>
2449 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2451 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2453 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2455 * cxx-pretty-print.c: Correct merge error.
2457 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2459 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2460 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2461 (cp_printer): Handle %K here using percent_K_format.
2462 * cxx-pretty-print.c: Include tree-pretty-print.h.
2463 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2466 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2468 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2469 Clean up redundant includes.
2471 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2474 * decl.c (xref_basetypes): Return false in case of ill-formed
2477 2010-05-19 Jason Merrill <jason@redhat.com>
2479 * call.c (reference_binding): Use cp_build_qualified_type_real
2480 and cp_type_quals consistently.
2481 (add_function_candidate): Likewise.
2482 (build_conditional_expr): Likewise.
2483 (convert_like_real): Likewise.
2484 (type_passed_as): Likewise.
2485 * class.c (add_method): Likewise.
2486 (same_signature_p): Likewise.
2487 (layout_class_type): Likewise.
2488 * decl.c (cxx_init_decl_processing): Likewise.
2489 (cp_fname_init): Likewise.
2490 (grokdeclarator): Likewise.
2491 * decl2.c (cp_reconstruct_complex_type): Likewise.
2492 * init.c (build_new_1): Likewise.
2493 * method.c (do_build_copy_constructor): Likewise.
2494 (implicitly_declare_fn): Likewise.
2495 * pt.c (tsubst_aggr_type): Likewise.
2497 * rtti.c (init_rtti_processing): Likewise.
2498 (build_headof): Likewise.
2499 (build_dynamic_cast_1): Likewise.
2500 (tinfo_base_init): Likewise.
2501 (emit_support_tinfos): Likewise.
2502 * semantics.c (capture_decltype): Likewise.
2503 * tree.c (cv_unqualified): Likewise.
2504 * typeck.c (composite_pointer_type): Likewise.
2505 (string_conv_p): Likewise.
2507 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2509 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2510 * decl.c (start_decl): Likewise.
2511 * semantics.c (finish_compound_literal): Likewise.
2512 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2513 (cp_type_readonly): Remove.
2514 * cp-tree.h: Remove declaration.
2516 * typeck.c (merge_types): Preserve memfn quals.
2518 * decl.c (grokdeclarator): Don't check quals on fn type.
2519 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2520 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2523 * typeck.c (type_memfn_quals): New fn.
2524 (apply_memfn_quals): New fn.
2525 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2526 (cp_type_readonly): Use cp_type_quals.
2527 * cp-tree.h: Add declarations.
2528 * tree.c (cp_build_qualified_type_real): Don't set, but do
2529 preserve, quals on FUNCTION_TYPE.
2530 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2531 * decl.c (build_ptrmem_type): Likewise.
2532 (grokdeclarator): Likewise.
2533 (static_fn_type): Likewise.
2534 * decl2.c (change_return_type): Likewise.
2535 (cp_reconstruct_complex_type): Likewise.
2536 * pt.c (tsubst_function_type): Likewise.
2538 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2540 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2542 * tree.c (build_min_non_dep_call_vec): Update comment.
2544 2010-05-17 Jason Merrill <jason@redhat.com>
2546 * call.c (struct z_candidate): Add explicit_targs field.
2547 (add_template_candidate_real): Set it.
2548 (build_over_call): Use it to control init-list warning.
2551 * call.c (build_over_call): Limit init-list deduction warning to
2552 cases where the argument is actually an init-list.
2555 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2557 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2558 Jason Merrill <jason@redhat.com>
2561 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2563 2010-05-15 Jason Merrill <jason@redhat.com>
2565 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2566 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2568 (finish_eh_spec_block): Adjust.
2570 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2573 * pt.c (tsubst): Unshare template argument.
2575 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2577 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2578 * Make-lang.in: Fix dependencies accordingly.
2580 2010-05-14 Jason Merrill <jason@redhat.com>
2583 * except.c (build_throw): Simplify, adjust for DR 475.
2586 * except.c (dtor_nothrow): Return nonzero for type with
2590 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2591 gimple_build_eh_must_not_throw.
2593 2010-05-14 Martin Jambor <mjambor@suse.cz>
2595 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2598 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2600 * call.c (build_new_method_call): Change warning text.
2601 * typeck2.c (build_functional_cast): Change error text.
2603 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2606 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2607 shadowing the outer parameter or variables by the declaration of
2608 nested function in nested structure or class. Warn the shadowing by
2609 the declaration of nested lambda expression.
2611 2010-05-13 Jason Merrill <jason@redhat.com>
2613 * typeck.c (cp_build_array_ref): Factor out from...
2614 (build_array_ref): ...here. Drop complain parm.
2615 (build_new_op): Adjust.
2616 * class.c (build_vtbl_ref_1): Adjust.
2617 * decl2.c (grok_array_decl): Adjust.
2618 * cp-tree.h: Adjust prototypes.
2620 2010-05-13 Jan Hubicka <jh@suse.cz>
2622 * decl.c (cp_finish_decl): Do not worry about used attribute.
2624 2010-05-12 Jason Merrill <jason@redhat.com>
2626 * typeck.c (build_array_ref): Take complain parm.
2627 * cp-tree.h: Add it to prototype.
2628 * call.c (build_new_op): Pass it.
2629 * class.c (build_vtbl_ref): Pass it.
2630 * decl2.c (grok_array_decl): Pass it.
2634 * cp-tree.def (NULLPTR_TYPE): Remove.
2635 * cp-tree.h (NULLPTR_TYPE_P): New.
2636 (SCALAR_TYPE_P): Use it.
2637 (nullptr_type_node): New.
2638 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2639 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2641 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2642 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2643 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2644 * mangle.c (write_type): Likewise.
2645 * name-lookup.c (arg_assoc_type): Likewise.
2646 * typeck.c (build_reinterpret_cast_1): Likewise.
2647 * rtti.c (typeinfo_in_lib_p): Likewise.
2648 (emit_support_tinfos): Remove local nullptr_type_node.
2650 * cp-tree.h (UNKNOWN_TYPE): Remove.
2651 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2652 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2653 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2654 * class.c (instantiate_type): Check unknown_type_node rather than
2656 * name-lookup.c (maybe_push_decl): Likewise.
2657 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2658 (get_typeid): Likewise.
2659 * semantics.c (finish_offsetof): Likewise.
2662 * call.c (add_template_candidate_real): If deduction fails, still
2663 add the template as a non-viable candidate.
2664 (equal_functions): Handle template candidates.
2665 (print_z_candidate): Likewise.
2666 (print_z_candidates): Likewise.
2667 (build_new_function_call): Likewise.
2669 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2670 * call.c (add_candidates): Enforce it.
2671 (build_new_method_call): Try non-list ctor if no viable list ctor.
2672 (build_user_type_conversion_1): Likewise.
2674 * call.c (add_candidates): Distinguish between type(x) and
2676 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2677 (build_new_method_call): Give better error for conversion op.
2679 * call.c (add_candidates): Add first_arg and return_type parms.
2680 Add special constructor/conversion op handling.
2681 (convert_class_to_reference): Use it.
2682 (build_user_type_conversion_1): Likewise.
2683 (build_op_call): Likewise.
2684 (build_new_method_call): Likewise.
2685 (build_new_op): Adjust.
2686 (perform_overload_resolution): Adjust.
2688 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2693 * pt.c (process_partial_specialization): Return error_mark_node
2694 in case of unused template parameters in partial specialization.
2696 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2699 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2700 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2701 look at its second operand.
2703 2010-05-10 Jason Merrill <jason@redhat.com>
2706 * semantics.c (baselink_for_fns): Revert earlier change.
2709 * typeck.c (cp_build_modify_expr): Complain about assignment to
2710 array from init list.
2712 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2715 * decl.c (check_initializer): strip array type before checking for
2716 uninitialized const or ref members.
2718 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2721 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2722 error count. Emit errors only if compain is true.
2723 (build_new_1): Do not return error_mark_node if
2724 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2725 errors. Delay the check for user-provided constructor.
2726 (perform_member_init): Adjust.
2727 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2730 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2731 Jason Merrill <jason@redhat.com>
2733 Add support for C++0x nullptr.
2734 * cp-tree.def: Add NULLPTR_TYPE.
2735 * cp-tree.h: Add nullptr_node.
2736 (cp_tree_index): Add CPTI_NULLPTR.
2737 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2738 * call.c (null_ptr_cst_p): Handle nullptr.
2739 (standard_conversion): Likewise.
2740 (convert_arg_to_ellipsis): Likewise.
2741 * mangle.c (write_type): Likewise.
2742 * name-lookup.c (arg_assoc_type): Likewise.
2743 * parser.c (cp_parser_primary_expression): Likewise.
2744 * typeck.c (cp_build_binary_op): Likewise.
2745 (build_reinterpret_cast_1): Likewise.
2746 * error.c (dump_type): Likewise.
2747 (dump_type_prefix, dump_type_suffix): Likewise.
2748 * decl.c (cxx_init_decl_processing): Likewise.
2749 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2750 * cvt.c (ocp_convert): Likewise.
2751 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2752 nullptr_t tinfo in libsupc++.
2754 2010-05-06 Jason Merrill <jason@redhat.com>
2756 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2758 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2759 Dodji Seketeli <dodji@redhat.com>
2762 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2764 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2765 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2766 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2767 (cp_build_unary_op): Call lvalue_use.
2768 * decl.c (unused_but_set_errorcount): New variable.
2769 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2770 (duplicate_decls): Merge DECL_READ_P flags.
2771 (start_cleanup_fn): Set DECL_READ_P flag.
2772 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2773 * tree.c (rvalue): Call rvalue_use.
2774 * pt.c (convert_nontype_argument): Likewise.
2775 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2776 finish_decltype_type): Likewise.
2777 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2778 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2779 or rvalue_use depending on the expr.
2780 * init.c (build_new, build_delete): Likewise.
2781 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2783 2010-05-05 Jason Merrill <jason@redhat.com>
2786 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2787 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2789 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2792 * pt.c (unify): Check each elt for error_mark_node.
2794 2010-05-04 Jason Merrill <jason@redhat.com>
2797 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2799 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2802 * call.c (build_new_method_call): Return error_mark_node if fns is
2805 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2808 * pt.c (most_specialized_class): Pretend we are processing
2809 a template decl during the call to coerce_template_parms.
2811 2010-05-03 Jason Merrill <jason@redhat.com>
2815 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2816 from the selected underlying type unless -fstrict-enums. Set
2817 ENUM_UNDERLYING_TYPE to have the restricted range.
2818 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2819 * class.c (check_bitfield_decl): Likewise.
2821 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2824 * init.c (build_new_1): Revert the accidental checkin in
2827 2010-04-30 Jason Merrill <jason@redhat.com>
2830 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2831 (pp_cxx_type_specifier_seq): ...here.
2833 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2835 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2836 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2838 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2841 * typeck.c (warn_args_num): New function.
2842 (convert_arguments): Use warn_args_num to print the diagnostic
2845 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2848 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2849 user-provided constructor while recursing.
2851 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2854 * error.c (print_instantiation_partial_context_line): Handle
2855 recursive instantiation.
2856 (print_instantiation_partial_context): Likewise.
2858 2010-04-27 Jason Merrill <jason@redhat.com>
2860 * init.c (perform_member_init): Check CLASS_TYPE_P.
2862 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2865 * init.c (perform_member_init): check for uninitialized const or
2866 reference members, including array types.
2868 2010-04-24 Jason Merrill <jason@redhat.com>
2870 * tree.c (get_fns): Split out from get_first_fn.
2871 * cp-tree.h: Declare it.
2872 * search.c (shared_member_p): Use it.
2873 * semantics.c (finish_qualified_id_expr): Simplify.
2874 (finish_id_expression): Simplify.
2876 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2877 whenever object is NULL_TREE. Don't do 'this' capture here.
2878 (finish_qualified_id_expr): Pass NULL_TREE.
2879 (finish_id_expression): Likewise.
2880 (lambda_expr_this_capture): Likewise.
2882 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2883 rather than checking current_class_ref directly.
2884 (finish_call_expr): Likewise.
2887 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2888 * class.c (current_nonlambda_class_type): New fn.
2889 * semantics.c (nonlambda_method_basetype): New.
2890 * cp-tree.h: Declare them.
2891 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2893 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2896 * semantics.c (lambda_return_type): Complain about
2900 * tree.c (cv_unqualified): Handle error_mark_node.
2903 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2904 if we don't want errors.
2907 * class.c (convert_to_base): Add complain parameter. Pass
2908 ba_quiet to lookup_base if we don't want errors.
2909 (build_vfield_ref): Pass complain to convert_to_base.
2910 * call.c (convert_like_real): Likewise.
2911 (initialize_reference): Likewise.
2912 (perform_direct_initialization_if_possible): Pass complain to
2914 * cp-tree.h: Adjust.
2916 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2917 Jason Merrill <jason@redhat.com>
2920 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2922 (check_initializer): Call it for classes that need constructing, too.
2923 * class.c (in_class_defaulted_default_constructor): New.
2924 * cp-tree.h: Declare it.
2926 2010-04-20 Jason Merrill <jason@redhat.com>
2929 * init.c (constant_value_1): Treat error_mark_node as a constant
2930 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2931 * cvt.c (ocp_convert): Handle getting error_mark_node from
2932 integral_constant_value.
2933 * decl.c (compute_array_index_type): Likewise.
2935 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2939 * typeck.c (incompatible_dependent_types_p): If one of the
2940 compared types if not a typedef then honour their main variant
2943 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2945 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2947 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2950 * typeck.c (structural_comptypes): Test dependent typedefs
2951 incompatibility before testing for their main variant based
2954 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2956 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2957 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2959 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2961 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2962 build_common_tree_nodes.
2964 2010-04-14 Jason Merrill <jason@redhat.com>
2967 * parser.c (cp_parser_parenthesized_expression_list): Change
2968 is_attribute_list parm to int to indicate whether or not to
2969 handle initial identifier specially.
2970 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2972 2010-04-13 Jason Merrill <jason@redhat.com>
2974 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2976 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2977 unevaluated context.
2978 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2980 2010-04-12 Jason Merrill <jason@redhat.com>
2983 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2984 return value directly.
2986 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2988 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2991 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2992 * init.c (build_new_1): Check for uninitialized const members and
2993 uninitialized reference members, when using new without
2994 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2995 (diagnose_uninitialized_cst_or_ref_member): Define, call
2996 diagnose_uninitialized_cst_or_ref_member_1.
2997 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2999 2010-04-12 Richard Guenther <rguenther@suse.de>
3002 * semantics.c (expand_or_defer_fn_1): Do not keep extern
3003 template inline functions.
3005 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3008 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
3011 2010-04-07 Jason Merrill <jason@redhat.com>
3014 * decl.c (start_preparsed_function): Do defer nested functions.
3016 PR c++/11094, DR 408
3017 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
3018 * decl2.c (finish_static_data_member_decl): Set it.
3019 * decl.c (duplicate_decls): Propagate it.
3020 * pt.c (tsubst_decl): Don't substitute the domain of an array
3021 VAR_DECL if it's set.
3022 (regenerate_decl_from_template): Substitute it here.
3023 (type_dependent_expression_p): Return true if it's set.
3024 * semantics.c (finish_decltype_type): Instantiate such a variable.
3025 * typeck.c (cxx_sizeof_expr): Likewise.
3026 (strip_array_domain): New.
3029 * name-lookup.c (current_decl_namespace): Non-static.
3030 (pop_nested_namespace): Sanity check.
3031 * cp-tree.h: Declare current_decl_namespace.
3032 * decl.c (grokvardecl): Use it instead of current_namespace.
3033 (grokfndecl): Likewise.
3036 * pt.c (tsubst_friend_function): Instatiate a friend that has already
3039 * pt.c (print_template_statistics): New.
3040 * cp-tree.h: Declare it.
3041 * tree.c (cxx_print_statistics): Call it.
3044 * decl.c (grokvardecl): Tweak warning message.
3045 (grokfndecl): Likewise.
3047 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3050 *pt.c (tsubst_decl): Get the arguments of a specialization from
3051 the specialization template, not from the most general template.
3053 2010-04-07 Dodji Seketeli <dodji@redhat.com>
3056 * typeck2.c (process_init_constructor_record):
3057 value-initialize members that are are not explicitely
3060 2010-04-07 Jie Zhang <jie@codesourcery.com>
3063 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
3064 when all of its elements are non-constant and have been split out.
3066 2010-04-06 Taras Glek <taras@mozilla.com>
3067 Jason Merrill <jason@redhat.com>
3069 * parser.c (cp_parser_class_specifier): Set class location to that
3070 of IDENTIFIER_NODE instead of '{' when possible.
3071 * semantics.c (begin_class_definition): Do not overide locations
3072 with less precise ones.
3074 2010-04-06 Jason Merrill <jason@redhat.com>
3077 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
3080 * pt.c (maybe_update_decl_type): Check the return value from
3083 2010-04-01 Jason Merrill <jason@redhat.com>
3085 * decl.c (next_initializable_field): No longer static.
3086 * cp-tree.h: Declare it.
3087 * call.c (build_aggr_conv): Fail if there are more initializers
3088 than initializable fields.
3090 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
3091 instead of void_zero_node.
3093 2010-03-31 Dodji Seketeli <dodji@redhat.com>
3096 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
3097 * pt.c (end_template_parm_list): Store sibling template parms of
3098 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3099 (push_template_decl_real): Don't store the containing template decl
3100 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
3101 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
3102 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
3105 2010-03-30 Jason Merrill <jason@redhat.com>
3108 * pt.c (push_template_decl_real): Deal better with running out of
3109 scopes before running out of template parms.
3113 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3114 function parameter context. Don't print an error if parsing
3118 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3121 2010-03-26 Jason Merrill <jason@redhat.com>
3124 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3125 c++0x mode, but not other type-names.
3127 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3130 * pt.c (add_to_template_args): Support NULL ARGS;
3131 (most_specialized_class): call coerce_template_parms on
3132 template arguments passed to get_class_bindings. Use
3133 add_to_template_args.
3134 (unify): Handle VAR_DECLs.
3136 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3138 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3140 * pt.c (get_template_parms_at_level): Adjust.
3142 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3145 * cp-tree.h (get_template_parms_at_level): Declare ...
3146 * pt.c (get_template_parms_at_level): ... new function.
3147 * typeck.c (get_template_parms_of_dependent_type): If a template
3148 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3149 current_template_parms. Use get_template_parms_at_level. Remove
3151 (incompatible_dependent_types_p): If we get empty parms from just one
3152 of the template type parms we are comparing then the template parms are
3155 2010-03-24 Jason Merrill <jason@redhat.com>
3158 * parser.c (make_declarator): Initialize id_loc.
3159 (cp_parser_lambda_declarator_opt): And set it.
3161 2010-03-23 Jason Merrill <jason@redhat.com>
3163 Make lambda conversion op and op() non-static.
3164 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3165 Also add the thunk function returned by the conversion op.
3166 Mark the conversion deleted if the op() is variadic.
3167 * decl2.c (mark_used): Give helpful message about deleted conversion.
3168 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3169 * semantics.c (finish_this_expr): Adjust.
3170 * mangle.c (write_closure_type_name): Adjust.
3171 * decl.c (grok_op_properties): Don't allow it.
3172 * call.c (build_user_type_conversion_1): No static conversion ops.
3173 (build_op_call): Or op().
3175 * decl2.c (change_return_type): Fix 'this' quals.
3177 2010-03-22 Jason Merrill <jason@redhat.com>
3180 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3183 * pt.c (contains_auto_r): New fn.
3184 (do_auto_deduction): Use it.
3185 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3187 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3190 * decl2.c (grokfield): Handle invalid initializers for member
3193 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3196 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3198 * decl2.c (vague_linkage_p): Likewise.
3200 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3203 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3204 false, in the cp_parser_expression_statement call.
3206 2010-03-05 Jason Merrill <jason@redhat.com>
3208 * mangle.c (mangle_decl): Give name collision error even without
3211 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3213 * pt.c (process_partial_specialization): Use error_n instead of
3216 2010-03-03 Jason Merrill <jason@redhat.com>
3219 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3221 2010-03-03 Jason Merrill <jason@redhat.com>
3224 * mangle.c: Include cgraph.h.
3225 (mangle_decl): If the mangled name will change in a later
3226 ABI version, make the later mangled name an alias.
3227 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3228 * Make-lang.in (mangle.o): Depend on cgraph.h.
3229 * method.c (make_alias_for): Handle VAR_DECL, too.
3230 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3231 * tree.c (no_linkage_check): Adjust.
3232 * decl.c (maybe_commonize_var): Adjust.
3233 * cp-tree.h: Adjust.
3235 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3237 * pt.c (redeclare_class_template): Use error_n and inform_n.
3239 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3242 * cp-tree.h (push_tinst_level): Declare.
3243 (pop_tinst_level): Likewise.
3244 * pt.c (push_tinst_level): Give it external linkage.
3245 (pop_tinst_level): Likewise.
3246 * mangle.c (mangle_decl_string): Set the source location to that
3247 of the decl while mangling.
3249 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3252 * pt.c (redeclare_class_template): Return false if there are erroneous
3253 template parameters.
3255 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3257 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3260 2010-02-24 Jason Merrill <jason@redhat.com>
3263 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3265 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3266 in a previous ABI version.
3268 2010-02-23 Jason Merrill <jason@redhat.com>
3271 * typeck2.c (digest_init_r): Accept value init of array.
3273 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3276 * typeck.c (convert_arguments): Update error message.
3278 2010-02-22 Mike Stump <mikestump@comcast.net>
3281 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3283 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3286 * error.c (print_instantiation_partial_context_line): New.
3287 (print_instantiation_partial_context): Print at most 12 contexts,
3288 skip the rest with a message.
3290 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3293 * pt.c (lookup_template_class): Better support of specialization
3294 of member of class template implicit instantiation.
3296 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3299 * call.c (conversion_null_warnings): Replace -Wconversion with
3301 * cvt.c (build_expr_type_conversion): Likewise.
3303 2010-02-18 Jason Merrill <jason@redhat.com>
3306 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3309 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3311 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3312 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3315 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3319 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3320 (maybe_update_decl_type): New fn.
3321 * parser.c (cp_parser_init_declarator): Use it.
3324 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3326 2010-02-17 Jason Merrill <jason@redhat.com>
3329 * call.c (build_over_call): Don't create zero-sized assignments.
3330 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3331 * cp-objcp-common.c (cp_expr_size): Remove.
3332 * cp-tree.h: Remove prototype.
3335 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3336 decl we looked up doesn't match.
3339 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3340 have an INIT_EXPR anymore.
3343 * pt.c (convert_nontype_argument): Change assert to test.
3345 2010-02-16 Jason Merrill <jason@redhat.com>
3347 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3350 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3351 VIEW_CONVERT_EXPR for conversions between structural equality types
3352 that the back end can't tell are the same.
3355 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3356 cv-quals from element here.
3357 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3359 2010-02-14 Jason Merrill <jason@redhat.com>
3362 * semantics.c (finish_compound_literal): Use
3363 cp_apply_type_quals_to_decl when creating a static variable.
3365 2010-02-12 Jason Merrill <jason@redhat.com>
3368 * name-lookup.h (current_binding_level): Check for null
3371 2010-02-12 Jason Merrill <jason@redhat.com>
3374 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3376 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3379 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3382 2010-02-10 Jason Merrill <jason@redhat.com>
3385 * semantics.c (outer_lambda_capture_p): Revert.
3386 (add_capture): Only finish_member_declaration if
3387 we're in the lambda class.
3388 (register_capture_members): New.
3389 * cp-tree.h: Declare it.
3390 * parser.c (cp_parser_lambda_expression): Call it.
3392 2010-02-10 Jason Merrill <jason@redhat.com>
3395 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3396 instead of current_class_type.
3398 2010-02-10 Jason Merrill <jason@redhat.com>
3400 PR c++/42983, core issue 906
3401 * method.c (defaultable_fn_check): Check virtualness.
3403 2010-02-10 Jason Merrill <jason@redhat.com>
3406 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3408 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3410 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3411 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3413 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3414 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3415 (cp_parser_parameter_declaration)
3416 (cp_parser_exception_specification_opt)
3417 (cp_parser_exception_declaration): Likewise.
3418 * pt.c (check_default_tmpl_args): Likewise.
3419 * search.c (lookup_field_r): Likewise.
3421 2010-02-09 Jason Merrill <jason@redhat.com>
3424 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3426 2010-02-09 Jason Merrill <jason@redhat.com>
3429 * decl2.c (change_return_type): New fn.
3430 * semantics.c (apply_lambda_return_type): Use it.
3431 * cp-tree.h: Declare it.
3433 2010-02-05 Richard Guenther <rguenther@suse.de>
3435 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3436 * cp-lang.c: Include gt-cp-cp-lang.h.
3437 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3439 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3442 * typeck.c (get_template_parms_of_dependent_type): Try getting
3443 the template parameters fromt the type itself first.
3445 2010-02-03 Jason Merrill <jason@redhat.com>
3449 * mangle.c (write_unqualified_id): Split out from write_expression.
3450 (write_unqualified_name): Call it.
3451 (write_member_name): Likewise.
3452 (write_expression): Support TEMPLATE_ID_EXPR.
3453 Disambiguate operator names.
3456 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3459 2010-02-02 Jason Merrill <jason@redhat.com>
3462 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3463 * optimize.c (clone_body): Remap their initializers when making base
3465 (maybe_clone_body): Complain if multiple clones aren't safe.
3467 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3474 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3475 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3476 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3477 * pt.c (coerce_template_parms, type_unification_real,
3478 expand_template_argument_pack, coerce_template_parameter_pack):
3479 Set the non default template args count.
3480 (current_template_args): Always set non defaulted
3481 template args count when compiled with --enable-checking
3482 (tsubst_template_args, type_unification_real): Propagate the non
3483 defaulted template args count.
3484 * error.c (get_non_default_template_args_count): Renamed
3485 count_non_default_template_args into this. Don't calculate the
3486 non default template argument count anymore. Use the new
3487 accessor macros above to get it.
3488 (dump_template_argument_list, dump_type, dump_decl,
3489 dump_template_parms): Adjust.
3490 * parser.c (cp_parser_template_argument_list): Always set defaulted
3491 template args count when compiled with --enable-checking.
3493 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3495 * decl.c (redeclaration_error_message): Wrap the return messages into
3496 G_() for easy translation.
3498 2010-01-28 Jason Merrill <jason@redhat.com>
3501 * semantics.c (begin_class_definition): Don't use type_as_string.
3503 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3507 * typeck.c (get_template_parms_of_dependent_type): Factorized
3508 this out of incompatible_template_type_parms_p
3509 (incompatible_dependent_types_p): Renamed
3510 incompatible_template_type_parms_p into this. Make it detect
3511 two incompatible dependent typedefs too.
3512 (structural_comptypes): Use incompatible_dependent_types_p.
3513 * pt.c (get_template_info):
3514 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3516 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3517 Jason Merrill <jason@redhat.com>
3519 * mangle.c (write_type): Mangle transparent record as member type.
3520 * semantics.c (begin_class_definition): Recognize decimal classes
3521 and set TYPE_TRANSPARENT_AGGR.
3523 2010-01-20 Jason Merrill <jason@redhat.com>
3526 * mangle.c (write_expression): Handle tree codes that have extra
3527 arguments in the middle-end.
3529 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3532 * except.c (expand_start_catch_block): Deal correctly with
3533 do_begin_catch returning error_mark_node.
3535 2010-01-20 Jason Merrill <jason@redhat.com>
3538 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3542 * semantics.c (build_lambda_object): Call mark_used on captured
3546 * decl.c (grokdeclarator): Clear type_quals for a member function
3547 declared using a typedef. Don't complain about adding cv-quals
3548 to a function typedef in C++0x mode.
3550 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3552 * decl.c (create_array_type_for_decl): Remove set but not used
3553 variable error_msg. Remove break stmts after return stmts.
3555 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3557 * error.c (dump_template_parms, count_non_default_template_args):
3558 Revert fix of PR c++/42634.
3560 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3563 * error.c (dump_template_parms): Use innermost template
3564 arguments before calling count_non_default_template_args.
3565 (count_non_default_template_args): We are being called with
3566 template innermost arguments now. There is no need to ensure
3569 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3572 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3574 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3577 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3579 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3582 *pt.c (tsubst_decl): Get the arguments of a specialization from
3583 the specialization template, not from the most general template.
3585 2010-01-16 Jason Merrill <jason@redhat.com>
3588 * semantics.c (finish_decltype_type): Within a template, treat
3589 unresolved CALL_EXPR as dependent.
3591 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3593 * error.c (dump_template_parms,count_non_default_template_args):
3594 Revert changes of PR c++/42634.
3596 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3599 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3600 functions with noreturn attribute.
3602 2010-01-14 Jason Merrill <jason@redhat.com>
3605 * call.c (build_new_method_call): Don't free the vec here.
3608 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3610 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3613 * error.c (dump_template_parms): Use innermost template
3614 arguments before calling count_non_default_template_args.
3615 (count_non_default_template_args): We are being called with
3616 template innermost arguments now. There is no need to ensure
3619 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3622 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3623 arguments that were previously deduced.
3625 2010-01-05 Jason Merrill <jason@redhat.com>
3627 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3628 * call.c (build_over_call): Don't complain about it.
3630 2010-01-04 Jason Merrill <jason@redhat.com>
3633 * pt.c (tsubst_decl): Don't apply type attributes in place.
3636 * semantics.c (describable_type): Remove decltype comment and
3641 Copyright (C) 2010 Free Software Foundation, Inc.
3643 Copying and distribution of this file, with or without modification,
3644 are permitted in any medium without royalty provided the copyright
3645 notice and this notice are preserved.