cab1040c6ddcfdc10ebc4074ddc94efbc285ef1f
[gcc.git] / gcc / cp / ChangeLog
1 2010-11-05 Jason Merrill <jason@redhat.com>
2
3 PR c++/45473
4 * search.c (look_for_overrides): A constructor is never virtual.
5
6 2010-11-05 Jakub Jelinek <jakub@redhat.com>
7
8 PR c++/46160
9 * cp-gimplify.c (cp_gimplify_expr): Drop volatile MEM_REFs
10 on the RHS to avoid infinite recursion with gimplify_expr.
11
12 2010-11-05 Jason Merrill <jason@redhat.com>
13
14 PR c++/46304
15 * pt.c (tsubst_copy): Handle COMPLEX_CST.
16
17 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
18
19 Fixed using the Objective-C 2.0 dot-syntax with class names.
20 * parser.c (cp_parser_primary_expression): Recognize Objective-C
21 2.0 dot-syntax with class names and process it.
22 (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
23 with class names.
24 (cp_parser_class_name): Same change.
25 (cp_parser_simple_type_specifier): Tidied comments.
26
27 2010-11-04 Jason Merrill <jason@redhat.com>
28
29 PR c++/46298
30 * semantics.c (build_constexpr_constructor_member_initializers):
31 Handle an enclosing STATEMENT_LIST.
32
33 * semantics.c (speculative_access_check): New.
34 * cp-tree.h: Declare it.
35 * call.c (build_over_call): Use it.
36 * class.c (type_has_constexpr_default_constructor): Use locate_ctor.
37 * method.c (locate_ctor): Use push/pop_deferring_access_checks.
38
39 2010-11-03 Jason Merrill <jason@redhat.com>
40
41 PR c++/46293
42 * semantics.c (build_data_member_initialization): Handle
43 value-init of aggregate empty base.
44
45 PR c++/46289
46 * call.c (can_convert_array): New fn.
47 (build_aggr_conv): Use it.
48
49 PR c++/46289
50 * semantics.c (build_constexpr_constructor_member_initializers):
51 Avoid ICE on error.
52
53 2010-11-02 Dodji Seketeli <dodji@redhat.com>
54
55 * cp-tree.h (enum tsubst_flags)<tf_no_class_instantiations>:
56 Remove.
57 * pt.c (tsubst): Remove the use of tf_no_class_instantiations.
58
59 2010-11-03 Jason Merrill <jason@redhat.com>
60
61 PR c++/46277
62 * init.c (expand_default_init): Avoid ICE if we can't figure out
63 which function is being called.
64
65 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
66
67 * class.c (build_base_path, add_vcall_offset): Use build_zero_cst
68 instead of fold_convert.
69 * init.c (build_zero_init): Likewise.
70 * typeck.c (cp_build_binary_op): Likewise.
71
72 2010-11-02 Dodji Seketeli <dodji@redhat.com>
73
74 PR c++/46170
75 PR c++/46162
76 * pt.c (check_valid_ptrmem_cst_expr): Add a complain parameter to
77 control diagnostic.
78 (convert_nontype_argument, convert_nontype_argument): Pass the
79 complain parameter down to check_valid_ptrmem_cst_expr.
80
81 2010-11-02 Dodji Seketeli <dodji@redhat.com>
82
83 PR c++/45606
84 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): Remove.
85 (struct template_parm_index_s)<num_siblings>: New field.
86 (TEMPLATE_PARM_NUM_SIBLINGS): New accessor.
87 (process_template_parm): Extend the API to accept the number of
88 template parms in argument.
89 (cp_set_underlying_type): Remove this.
90 * class.c (build_self_reference): Require canonical type equality
91 back on the self reference of class.
92 * decl2.c (grokfield): Require canonical type equality back on
93 typedef class fields.
94 * name-lookup.c (pushdecl_maybe_friend): Require canonical type
95 equality back on typedefs.
96 * parser.c (cp_parser_template_parameter_list): Do not require
97 canonical type equality on dependent types created during template
98 parameters parsing.
99 * pt.c (fixup_template_type_parm_type, fixup_template_parm_index)
100 (fixup_template_parm, fixup_template_parms): New private
101 functions.
102 (current_template_args): Declare this.
103 (process_template_parm): Pass the total number of template parms
104 to canonical_type_parameter.
105 (build_template_parm_index): Add a new argument to carry the total
106 number of template parms.
107 (reduce_template_parm_level, process_template_parm, make_auto):
108 Adjust.
109 (current_template_args): Fix this for template template
110 parameters.
111 (tsubst_template_parm): Split out of ...
112 (tsubst_template_parms): ... this.
113 (reduce_template_parm_level): Don't loose
114 TEMPLATE_PARM_NUM_SIBLINGS when cloning a TEMPLATE_PARM_INDEX.
115 (template_parm_to_arg): Extracted this function from
116 current_template_args. Make it represent invalid template parms
117 with an error_mark_node instead of a LIST_TREE containing an
118 error_mark_node.
119 (current_template_args): Use template_parm_to_arg.
120 (dependent_template_arg_p): Consider an invalid template argument
121 as dependent.
122 (end_template_parm_list): Do not update template sibling parms
123 here anymore. Use fixup_template_parms instead.
124 (process_template_parm): Pass the number of template parms to
125 canonical_type_parameter.
126 (make_auto): Require structural equality on auto
127 TEMPLATE_TYPE_PARM for now.
128 (unify)<BOUND_TEMPLATE_TEMPLATE_PARM>: Coerce template parameters
129 using all the arguments deduced so far.
130 (tsubst)<TEMPLATE_TYPE_PARM>: Pass the number of sibling parms to
131 canonical_type_parameter.
132 * tree.c (cp_set_underlying_type): Remove.
133 * typeck.c (get_template_parms_of_dependent_type)
134 (incompatible_dependent_types_p): Remove.
135 (structural_comptypes): Do not call incompatible_dependent_types_p
136 anymore.
137 (comp_template_parms_position): Re-organized. Take the length of
138 template parms list in account.
139
140 2010-11-01 Jason Merrill <jason@redhat.com>
141
142 * semantics.c (call_stack, call_stack_tick, cx_error_context): New.
143 (last_cx_error_tick, push_cx_call_context, pop_cx_call_context): New.
144 (cxx_eval_call_expression): Call push/pop_cx_call_context instead
145 of giving follow-on errors.
146 * error.c (maybe_print_constexpr_context): New.
147 (cp_diagnostic_starter): Call it.
148 * cp-tree.h: Declare cx_error_context.
149
150 * semantics.c (cxx_eval_constant_expression): Explain
151 unacceptable use of variable better.
152
153 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
154 Jason Merrill <jason@redhat.com>
155
156 * call.c (null_ptr_cst_p): Use maybe_constant_value.
157 (set_up_extended_ref_temp): Support constant initialization.
158 (initialize_reference): Adjust.
159 * class.c (check_bitfield_decl): Use cxx_constant_value.
160 * cvt.c (ocp_convert): Don't use integral_constant_value when
161 converting to class type.
162 * decl.c (finish_case_label): Use maybe_constant_value.
163 (build_init_list_var_init): Support constant initialization.
164 (check_initializer): Likewise. Reorganize.
165 (cp_finish_decl): Likewise.
166 (expand_static_init): Likewise.
167 (compute_array_index_type): Use maybe_constant_value.
168 Add complain parm.
169 (create_array_type_for_decl, grokdeclarator): Pass it.
170 (build_enumerator): Use cxx_constant_value.
171 * decl2.c (grokfield): Use maybe_constant_init.
172 * except.c (check_noexcept_r): Handle constexpr.
173 (build_noexcept_spec): Use maybe_constant_value.
174 * init.c (expand_default_init): Support constant initialization.
175 (build_vec_init): Likewise.
176 (constant_value_1): Adjust.
177 (build_new_1): Adjust.
178 * parser.c (cp_parser_constant_expression): Allow non-integral
179 in C++0x mode.
180 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
181 (cp_parser_initializer_clause): Toss folded result if non-constant.
182 * pt.c (fold_decl_constant_value): Remove.
183 (convert_nontype_argument): Use maybe_constant_value. Give clearer
184 error about overflow.
185 (tsubst): Move array bounds handling into compute_array_index_type.
186 (value_dependent_expression_p): Handle constant CALL_EXPR.
187 (tsubst_decl): Don't set
188 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
189 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
190 (instantiate_decl): Here too.
191 * semantics.c (finish_static_assert): Use maybe_constant_value.
192 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
193 (potential_constant_expression): Use maybe_constant_value.
194 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
195 is potentially valid in C++0x.
196 * typeck2.c (store_init_value): Handle constant init.
197 (check_narrowing): Use maybe_constant_value.
198 (build_functional_cast): Set TREE_CONSTANT on literal T().
199 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
200 (LOOKUP_ALREADY_DIGESTED): New.
201 (compute_array_index_type): Adjust prototype.
202
203 * semantics.c (constexpr_call): New datatype.
204 (constexpr_call_table): New global table.
205 (constexpr_call_hash): New.
206 (constexpr_call_equal): Likewise.
207 (maybe_initialize_constexpr_call_table): Likewise.
208 (lookup_parameter_binding): Likewise.
209 (cxx_eval_builtin_function_call): Likewise.
210 (cxx_bind_parameters_in_call): Likewise.
211 (cxx_eval_call_expression): Likewise.
212 (cxx_eval_unary_expression): Likewise.
213 (cxx_eval_binary_expression): Likewise.
214 (cxx_eval_conditional_expression): Likewise.
215 (cxx_eval_array_reference): Likewise.
216 (cxx_eval_component_reference): Likewise.
217 (cxx_eval_logical_expression): Likewise.
218 (cxx_eval_object_construction): Likewise.
219 (cxx_eval_constant_expression): Likewise.
220 (cxx_eval_indirect_ref): Likewise.
221 (cxx_constant_value): Likewise.
222 (cxx_eval_bare_aggregate): Likewise.
223 (adjust_temp_type): New.
224 (reduced_constant_expression_p): New.
225 (verify_constant): New.
226 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
227 (cxx_eval_outermost_constant_expr): New.
228 (maybe_constant_value, maybe_constant_init): New.
229 (cxx_eval_constant_expression): Use them.
230 * pt.c (iterative_hash_template_arg): No longer static.
231 * cp-tree.h: Declare fns.
232
233 * cp-tree.h (register_constexpr_fundef): Declare.
234 * decl.c (maybe_save_function_definition): New.
235 (finish_function): Use it.
236 * semantics.c (constexpr_fundef): New datatype.
237 (constexpr_fundef_table): New global table.
238 (constexpr_fundef_equal): New.
239 (constexpr_fundef_hash): Likewise.
240 (retrieve_constexpr_fundef): Likewise.
241 (validate_constexpr_fundecl): Store in the table.
242 (build_data_member_initialization): New fn.
243 (build_constexpr_constructor_member_initializers): New.
244 (register_constexpr_fundef): Define.
245 (is_this_parameter): New.
246 (get_function_named_in_call): Likewise.
247 (get_nth_callarg): Likewise.
248 (check_automatic_or_tls): New.
249 (morally_constexpr_builtin_function_p): New.
250 (potential_constant_expression): New.
251
252 2010-11-01 Jason Merrill <jason@redhat.com>
253
254 * decl2.c (decl_constant_var_p): New fn.
255 (decl_maybe_constant_var_p): New fn.
256 (mark_used): Rework instantiation of things needed for constant
257 expressions.
258 * cp-tree.h: Declare new fns.
259 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
260 (always_instantiate_p): Use decl_maybe_constant_var_p.
261 (instantiate_decl): Don't defer constexpr functions.
262 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
263 * semantics.c (finish_id_expression): Use decl_constant_var_p.
264 Check for valid name in constant expr after mark_used.
265
266 2010-10-31 Jason Merrill <jason@redhat.com>
267
268 * class.c (is_really_empty_class): Work when type is not complete.
269 (synthesized_default_constructor_is_constexpr): New.
270 (add_implicitly_declared_members): Use it.
271 (type_has_constexpr_default_constructor): Likewise.
272 * cp-tree.h: Declare it.
273 * method.c (synthesized_method_walk): Use it.
274
275 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
276 * typeck.c (convert_for_assignment): Likewise.
277
278 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
279 message about constexpr without -std=c++0x.
280
281 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
282 member.
283
284 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
285
286 * class.c (layout_vtable_decl): Call build_array_of_n_type.
287 (build_vtt, build_ctor_vtabl_group): Likewise.
288
289 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
290
291 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
292 * parser.c (cp_parser_objc_at_property_declaration): Removed
293 parsing of RID_COPIES and RID_IVAR. Updated call to
294 objc_add_property_declaration.
295 * typecheck.c (finish_class_member_access_expr): Call
296 objc_maybe_build_component_ref instead of objc_build_setter_call.
297 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
298 of objc_build_getter_call.
299
300 2010-10-27 Jason Merrill <jason@redhat.com>
301
302 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
303 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
304 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
305 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
306 (cp_parser_trait_expr): Likewise.
307
308 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
309 Jason Merrill <jason@redhat.com>
310
311 * decl.c (finish_case_label): Use decl_constant_value.
312
313 * method.c (synthesized_method_walk): Track constexprness too.
314 (process_subob_fn, walk_field_subobs): Likewise.
315 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
316 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
317 * class.c (add_implicitly_declared_members): Handle
318 constexpr default ctor.
319
320 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
321 Make sure a constexpr ctor has an empty body.
322 * class.c (type_has_constexpr_default_constructor): New.
323 * cp-tree.h: Declare it.
324 * init.c (perform_member_init): Complain about uninitialized
325 member in constexpr ctor.
326 (emit_mem_initializers): And uninitialized base.
327 * decl.c (check_tag_decl): Fix typo.
328
329 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
330 (is_valid_constexpr_fn): New fn.
331 (validate_constexpr_fundecl): Use it.
332 * decl.c (validate_constexpr_redeclaration): New.
333 (duplicate_decls): Use it.
334 (cp_finish_decl): Call validate_constexpr_fundecl and
335 ensure_literal_type_for_constexpr_object here.
336 (start_decl): Not here. Don't ICE on constexpr reference.
337 (check_for_uninitialized_const_var): Don't handle constexpr specially.
338 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
339 (check_static_variable_definition): Give friendly message about
340 missing constexpr.
341 (grokdeclarator): Complain about typedef and volatile with constexpr.
342 Reorganize. Give sorry about non-static data members in C++0x mode.
343 (start_preparsed_function): Check validate_constexpr_fundecl here.
344 (check_function_type): Not here.
345 * decl2.c (finish_static_data_member_decl): Don't complain about
346 in-class init.
347 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
348 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
349 (cp_parser_decl_specifier_seq): Handle it.
350 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
351
352 * class.c (check_bases): Propagate non-literality.
353 (check_field_decls): Likewise.
354 (finalize_literal_type_property): New.
355 (check_bases_and_members): Call it.
356 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
357 (lang_type_class): Add has_constexpr_ctor field.
358 (DECL_DECLARED_CONSTEXPR_P): Strip template.
359 * decl.c (grok_special_member_properties): Set
360 TYPE_HAS_CONSTEXPR_CTOR.
361
362 2010-10-27 Jason Merrill <jason@redhat.com>
363
364 * call.c (build_integral_nontype_arg_conv): New.
365 * cp-tree.h: Declare it.
366 * pt.c (convert_nontype_argument): Use it.
367
368 * error.c (dump_simple_decl): Print constexpr.
369
370 * cvt.c (build_up_reference): Use target_type for the temporary var.
371
372 * except.c (build_throw): Set EXPR_LOCATION.
373
374 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
375
376 * semantics.c (finish_compound_stmt): Avoid creating an
377 unnecessary BIND_EXPR.
378
379 * call.c (convert_like_real): Don't check narrowing if the element
380 is also an initializer-list.
381
382 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
383
384 * parser.c (cp_parser_objc_at_property_declaration): Recognize
385 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
386 Do not use objc_set_property_attr, but use local variables
387 instead. Detect repeated usage of setter, getter and ivar
388 attributes. Improved error processing when a setter name does not
389 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
390 that the token is a keyword. Updated call to
391 objc_add_property_declaration.
392
393 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
394
395 * parser.c (cp_parser_objc_property_decl): Renamed to
396 cp_parser_objc_struct_declaration. Return the parsed trees
397 instead of calling objc_add_property_variable directly. Detect
398 missing or invalid declspecs. Implemented attributes. Do not eat
399 the ';' at the end. Exit loop whenever a non-comma is parsed, not
400 just EOF.
401 (cp_parser_objc_at_property): Renamed to
402 cp_parser_objc_at_property_declaration. Updated calls to
403 objc_add_property_variable, now objc_add_property_declaration, and
404 to cp_parser_objc_property_decl, now
405 cp_parser_objc_struct_declaration. Rewritten all code to be more
406 robust in dealing with syntax errors, and almost identical to the
407 one in c_parser_objc_at_property_declaration.
408 (cp_parser_objc_property_attrlist): Removed.
409 (cp_parser_objc_method_prototype_list): Updated call to
410 cp_parser_objc_at_property.
411 (cp_parser_objc_method_definition_list): Same change.
412 (cp_parser_objc_class_ivars): Detect a number of invalid
413 declarations of instance variables and produce errors when they
414 are found.
415
416 2010-10-26 Jason Merrill <jason@redhat.com>
417
418 * tree.c (build_vec_init_expr): Split out from...
419 (build_array_copy): ...here.
420 * init.c (perform_member_init): Use it.
421 * cp-tree.h: Declare it.
422 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
423 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
424 (cp_gimplify_expr): Handle array default-initialization via
425 VEC_INIT_EXPR.
426
427 * tree.c (stabilize_expr): Handle xvalues properly.
428
429 * call.c (build_over_call): Use argarray[0] for 'this' argument.
430
431 * decl.c (finish_function): Don't look at function_depth.
432
433 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
434
435 Implement opaque-enum-specifiers for C++0x.
436 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
437 (OPAQUE_ENUM_P): New.
438 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
439 (start_enum): Update prototype.
440 (finish_enum_value_list): New prototype.
441 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
442 "enum class" is used in an elaborated-type-specifier.
443 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
444 * decl.c (copy_type_enum): New.
445 (finish_enum_value_list): New, with code from finish_enum.
446 (finish_enum): A lot of code removed. Added a gcc_assert.
447 (start_enum): Add parameters enumtype and is_new.
448 Rewrite to work with opaque-enum-specifiers.
449 * pt.c (maybe_process_partial_specialization): Allow for template
450 specialization of enumerations, with a pedwarn.
451 (lookup_template_class): Update call to start_enum. Call to
452 SET_OPAQUE_ENUM_P.
453 (tsubst_enum): Call to begin_scope, finish_scope and
454 finish_enum_value_list.
455
456 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
457
458 Removed Objective-C++ specific replacement of cxx_printable_name.
459 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
460 to cxx_printable_name for both C++ and Objective-C++.
461 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
462
463 * error.c (dump_decl): For Objective-C++, call
464 objc_maybe_printable_name here ...
465 * tree.c (cxx_printable_name_internal): ... instead of here.
466
467 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
468
469 * tree.c (cxx_printable_name_internal): In Objective-C++, call
470 objc_maybe_printable_name.
471
472 2010-10-22 Jason Merrill <jason@redhat.com>
473
474 PR c++/46129
475 * pt.c (instantiate_class_template): Don't instantiate default
476 arguments.
477
478 PR c++/46103
479 * init.c (build_vec_init): Handle memberwise move.
480
481 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
482
483 PR c++/46117
484 * call.c (add_function_candidate): Don't use TREE_VALUE on null
485 parmnode.
486
487 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
488
489 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
490 bool instead of calling objc_set_method_type.
491 (cp_parser_objc_method_signature): Updated calls to
492 cp_parser_objc_method_type and to objc_build_method_signature.
493 (cp_parser_objc_method_prototype_list): Updated calls to
494 objc_add_method_declaration. Use token->type to determine if it
495 is a class method or not.
496 (cp_parser_objc_method_definition_list): Same change.
497
498 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
499
500 PR c++/46056
501 * parser.c (cp_convert_range_for): Call cp_finish_decl
502 instead of finish_expr_stmt.
503
504 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
505
506 * cp-lang.c (finish_file): Removed.
507 * decl2.c (cp_write_global_declarations): Call
508 objc_write_global_declarations when compiling Objective-C++.
509
510 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
511
512 PR c++/46046
513 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
514 (coerce_template_parms): Likewise for args.
515
516 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
517
518 Implemented parsing @synthesize and @dynamic for Objective-C++.
519 * parser.c (cp_parser_objc_method_definition_list): Recognize
520 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
521 (cp_parser_objc_at_dynamic_declaration): New.
522 (cp_parser_objc_at_synthesize_declaration): New.
523
524 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
525
526 * parser.c (cp_parser_objc_identifier_list): Check the return
527 value of cp_parser_identifier and react if it is error_mark_node.
528
529 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
530
531 Merge from apple/trunk branch on FSF servers.
532
533 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
534
535 Radar 4451818
536 * call.c (standard_conversion, implicit_conversion): Ignore
537 'volatile' attribute of artificially volatized type in objc when
538 evaluating various conversion weights.
539
540 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
541
542 Radar 4330422
543 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
544 artiificially 'volatized' type before doing pointer comparison.
545
546 2010-10-18 Jakub Jelinek <jakub@redhat.com>
547
548 PR c/46015
549 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
550 goto destination.
551
552 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
553
554 Merge from apple/trunk branch on FSF servers.
555
556 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
557
558 Radar 4516785
559 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
560 objc object types if type is scope qualified.
561
562 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
563
564 Merge from apple/trunk branch on FSF servers.
565
566 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
567
568 Radar 4133425
569 * lex.c (unqualified_name_lookup_error): Issue diagnostic
570 for private 'ivar' access.
571
572 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
573
574 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
575 enum, and handle @package.
576
577 2010-10-15 Jason Merrill <jason@redhat.com>
578
579 PR c++/45983
580 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
581 with a different typedef variant of the element type.
582
583 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
584
585 merge from FSF apple 'trunk' branch.
586 2006 Fariborz Jahanian <fjahanian@apple.com>
587
588 Radars 4436866, 4505126, 4506903, 4517826
589 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
590 syntax.
591 (cp_build_modify_expr): Likewise.
592 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
593 (cp_parser_objc_method_definition_list): Likewise.
594 (cp_parser_objc_property_decl): New.
595 (cp_parser_objc_property_attrlist): New.
596 (cp_parser_objc_at_property): New.
597
598 2010-10-14 Richard Guenther <rguenther@suse.de>
599
600 PR lto/44561
601 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
602 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
603 use build_int_cst.
604 * error.c (dump_type): Handle NULLPTR_TYPE.
605 (dump_type_prefix): Likewise.
606 (dump_type_suffix): Likewise.
607 * mangle.c (write_type): Likewise.
608 * name-lookup.c (arg_assoc_type): Likewise.
609 * rtti.c (typeinfo_in_lib_p): Likewise.
610 * pt.c (tsubst): Likewise.
611
612 2010-10-13 Jason Merrill <jason@redhat.com>
613
614 PR c++/45984
615 * class.c (fixup_attribute_variants): New fn.
616 * cp-tree.h: Declare it.
617 * pt.c (instantiate_class_template): Call it.
618 * semantics.c (begin_class_definition): Call it.
619
620 2010-10-13 Richard Henderson <rth@redhat.com>
621
622 * cp-lang.c (cp_eh_personality): Update call to
623 build_personality_function.
624 * except.c (choose_personality_routine): Update function comment.
625
626 2010-10-13 Richard Guenther <rguenther@suse.de>
627
628 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
629 clear DECL_CHAIN of NAMESPACE_DECLs.
630
631 2010-10-11 Martin Jambor <mjambor@suse.cz>
632
633 PR c++/45562
634 * cp-tree.h (current_class_ref): Check that cp_function_chain is
635 non-NULL.
636 * call.c (build_cxx_call): Likewise.
637
638 2010-10-10 Jason Merrill <jason@redhat.com>
639
640 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
641 (tsubst_default_arguments): Only do this once for cloned fns.
642 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
643 handle expressions.
644 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
645 (tsubst_copy_and_build): Likewise.
646 (tsubst_initializer_list): Likewise.
647 (tsubst_copy): Change default to gcc_unreachable. Handle
648 OVERLOAD and PTRMEM_CST.
649
650 2010-10-10 Jason Merrill <jason@redhat.com>
651
652 PR lto/45959
653 PR lto/45960
654 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
655
656 2010-10-07 Andi Kleen <ak@linux.intel.com>
657
658 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
659 (cc1plus-dummy): Remove.
660 (cc1plus-checksum): Change to run checksum over object files
661 and options only.
662
663 2010-10-08 Joseph Myers <joseph@codesourcery.com>
664
665 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
666
667 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
668
669 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
670 tcc_expression.
671 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
672 AT_ENCODE_EXPR.
673 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
674 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
675 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
676 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
677 * parser.c (cp_parser_objc_encode_expression): Updated comment.
678
679 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
680
681 Merge from apple/trunk branch on FSF servers.
682
683 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
684
685 Radar 4508851
686 * parser.c (cp_parser_objc_interstitial_code): Recognize
687 and parse RID_NAMESPACE keyword.
688
689 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
690
691 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
692 finding ellipsis, before checking for attributes.
693
694 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
695
696 Merge from apple/trunk branch on FSF servers.
697 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
698 longer existing gcc/c-common.def.
699
700 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
701
702 Radar 4278774
703 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
704 * parser.c (cp_parser_objc_encode_expression): Build a templatized
705 parse tree for @encode(T).
706
707 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
708
709 Radar 4278774
710 * c-common.def: Add new expression code AT_ENCODE_EXPR.
711
712 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
713
714 PR c++/45908
715 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
716 code folding offsetof-like computations.
717
718 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
719
720 PR objc++/31125
721 * parser.c (cp_parser_objc_class_interface): If no identifier
722 follows an @interface token, stop parsing the interface after
723 printing an error.
724 (cp_parser_objc_class_implementation): If no identifier follows an
725 @implementation token, stop parsing the implementation after
726 printing an error.
727
728 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
729
730 PR objc++/23707
731 * parser.c (cp_parser_objc_method_keyword_params): If the required
732 colon is not found while parsing parameters, stop parsing them.
733
734 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
735
736 PR objc++/31126
737 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
738 @end after detecting it. Print an error if @end is found without
739 a '}'.
740 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
741 detecting it. Fixed reading the next token when continuing
742 because of an error in a method signature. Print an error if EOF
743 is found without an '@end'.
744 (cp_parser_objc_method_definition_list): Same change.
745
746 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
747
748 Merge from apple/trunk branch on FSF servers:
749
750 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
751
752 Radar 4290840
753 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
754 method parameters and issue error.
755 (cp_parser_objc_method_definition_list): Check for invalid tokens
756 which cannot start a function definition.
757
758 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
759
760 Radar 4294425
761 * parser.c (cp_parser_objc_message_args): Check for missing message
762 arguments and syntax error.
763
764 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
765
766 Radar 4261146
767 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
768 looking for '}'.
769
770 2005-08-15 Ziemowit Laski <zlaski@apple.com>
771
772 Radar 4093475
773 * parser.c (cp_parser_objc_interstitial_code): Catch stray
774 '{' and '}' tokens and issue appropriate errors.
775
776 2005-08-02 Ziemowit Laski <zlaski@apple.com>
777
778 Radar 4185810
779 (cp_parser_statement_seq_opt): In addition to '}' and
780 end-of-file, a statement sequence may also be terminated
781 by a stray '@end'.
782
783 2010-10-05 Joseph Myers <joseph@codesourcery.com>
784
785 * cp-tree.h (cxx_print_error_function,
786 cxx_initialize_diagnostics): Declare using diagnostic_context
787 typedef.
788
789 2010-10-04 Andi Kleen <ak@linux.intel.com>
790
791 * Make-lang.in (g++, cc1plus): Add + to build rule.
792
793 2010-10-04 Jason Merrill <jason@redhat.com>
794
795 * tree.c (decl_storage_duration): New.
796 * cp-tree.h: Declare it.
797 (duration_kind): Return values.
798
799 2010-10-03 Jason Merrill <jason@redhat.com>
800
801 * typeck.c (require_complete_type_sfinae): Add complain parm to...
802 (require_complete_type): ...this function.
803 (cp_build_array_ref, convert_arguments): Use it.
804 (convert_for_initialization, cp_build_modify_expr): Likewise.
805 * cp-tree.h: Declare it.
806 * call.c (build_over_call): Use it.
807
808 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
809
810 merge from FSF 'apple/trunk' branch.
811 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
812
813 Radar 4386773
814 * cp/parser.c (cp_parser_objc_interstitial_code): For
815 @optional/@required set the optional/required flag.
816
817 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
818
819 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
820 and indentation when finding an Objective-C++ CPP_AT_NAME token.
821
822 2010-09-29 Richard Guenther <rguenther@suse.de>
823
824 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
825 (CP_TYPE_CONTEXT): Similar.
826 (FROB_CONTEXT): Frob global_namespace to the global
827 TRANSLATION_UNIT_DECL.
828 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
829 set DECL_CONTEXT of global_namespace to it.
830 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
831 instead of zeroing context.
832 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
833 (grokfndecl): Likewise.
834 (start_preparsed_function): Likewise.
835 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
836 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
837 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
838 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
839 (push_template_decl_real): Likewise.
840 (tsubst_friend_class): Likewise. Adjust context comparisons.
841 (instantiate_class_template): Use CP_TYPE_CONTEXT.
842 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
843 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
844 SCOPE_FILE_SCOPE_P.
845
846 2010-09-29 Yao Qi <yao@codesourcery.com>
847
848 * decl.c (get_atexit_node): Fix typo.
849
850 2010-09-28 Jason Merrill <jason@redhat.com>
851
852 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
853 (real_lvalue_p): Take const_tree.
854 * cp-tree.h: Adjust.
855 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
856 (cp_build_addr_expr_1): Likewise.
857
858 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
859
860 Partially merged from apple/trunk branch on FSF servers:
861 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
862 Radar 3803157 (method attributes)
863
864 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
865 (cp_parser_objc_method_tail_params_opt): Likewise.
866 (cp_parser_objc_method_signature): Likewise.
867 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
868 (cp_parser_objc_method_prototype_list): Handle attributes.
869 (cp_parser_objc_method_definition_list): Likewise.
870
871 2010-09-28 Richard Henderson <rth@redhat.com>
872
873 * cp-lang.c: Include "target.h".
874 (cp_eh_personality): Use targetm.except_unwind_info.
875 * Make-lang.in (cp-lang.o): Update deps.
876
877 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
878
879 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
880 (cp_parser_declaration): Parse prefix attributes for ObjC++.
881 (cp_parser_objc_protocol_declaration): Handle attributes.
882 (cp_parser_objc_class_interface): Likewise.
883 (cp_parser_objc_declaration): Likewise.
884
885 2010-09-27 Jason Merrill <jason@redhat.com>
886
887 Require lvalues as specified by the standard.
888 * typeck.c (lvalue_or_else): Use real_lvalue_p.
889 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
890 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
891 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
892 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
893 (build_const_cast_1): Adjust.
894 * cp-tree.h: Declare new fns.
895 * call.c (build_this, convert_like_real, build_over_call): Adjust.
896 (initialize_reference): Adjust.
897 * class.c (build_base_path, convert_to_base_statically): Adjust.
898 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
899 * cvt.c (build_up_reference, convert_to_reference): Adjust.
900 * decl.c (register_dtor_fn): Adjust.
901 * decl2.c (build_offset_ref_call_from_tree): Adjust.
902 * except.c (initialize_handler_parm): Adjust.
903 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
904 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
905 * tree.c (stabilize_expr): Adjust.
906
907 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
908
909 Merge from apple/trunk branch on FSF servers:
910
911 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
912
913 Radar 4229905
914 * typeck.c (composite_pointer_type): Call objc_have_common_type
915 when comparing two objective-c pointer types.
916
917 2005-07-18 Ziemowit Laski <zlaski@apple.com>
918
919 Radar 4175534
920 * call.c (standard_conversion): Do not issue warnings when
921 comparing ObjC pointer types.
922
923 2005-06-22 Ziemowit Laski <zlaski@apple.com>
924
925 Radar 4154928
926 * call.c (standard_conversion): Allow for a pointer conversion
927 between any two ObjC pointer types.
928 * typeck.c (composite_pointer_type): Determine common type
929 for two ObjC pointer types.
930
931 2010-09-24 Jan Hubicka <jh@suse.cz>
932
933 * decl.c (finish_function): Use decl_replaceable_p
934 * method.c (make_alias_for_thunk): Update call of
935 cgraph_same_body_alias.
936
937 2010-09-24 Jason Merrill <jason@redhat.com>
938
939 * decl.c (compute_array_index_type): Remember type dependence of
940 array bound.
941 * pt.c (dependent_type_p_r): Don't recompute it here.
942
943 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
944 reference and pointer to the same type as "*" or "&".
945
946 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
947
948 * typeck.c (warn_args_num): Use warning 'too many arguments to
949 method [methodname]' for an Objective-C method instead of the less
950 satisfactory 'too many arguments to function' (with no method
951 name).
952
953 2010-09-21 Jason Merrill <jason@redhat.com>
954
955 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
956 special handling if we know the member.
957
958 2010-09-18 Jason Merrill <jason@redhat.com>
959
960 * call.c (compare_ics): Do lvalue/rvalue reference binding
961 comparison for ck_list, too.
962
963 2010-09-15 Jason Merrill <jason@redhat.com>
964
965 * semantics.c (finish_id_expression): Diagnose use of function
966 parms in evaluated context outside function body.
967
968 * decl2.c (grokbitfield): Diagnose non-integral width.
969
970 * call.c (convert_like_real): Use the underlying type of the
971 reference for the temporary.
972
973 2010-09-15 Jakub Jelinek <jakub@redhat.com>
974
975 PR c++/45635
976 * class.c (build_vtbl_initializer): Use fn instead of init's operand
977 as first argument to FDESC_EXPR.
978
979 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
980
981 PR c++/45665
982 * decl.c (grokdeclarator): Check build_memfn_type return value
983 for error_mark_node.
984
985 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
986
987 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
988 (begin_range_for_stmt): Likewise.
989
990 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
991
992 Implement range-based for-statements.
993 * cp-tree.def (RANGE_FOR_STMT): New.
994 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
995 (cp_convert_range_for): Declare.
996 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
997 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
998 * semantics.c (begin_range_for_stmt): New.
999 (finish_range_for_decl): New.
1000 (finish_for_stmt): Accept also RANGE_FOR_STMT.
1001 (perform_koenig_lookup): Add extra argument include_std.
1002 * parser.c (cp_parser_c_for): New with code from
1003 cp_parser_iteration_statement().
1004 (cp_parser_range_for): New.
1005 (cp_convert_range_for): New.
1006 (cp_parser_iteration_statement): Add range-for support.
1007 (cp_parser_condition): Adjust comment.
1008 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
1009 argument.
1010 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
1011 * cxx-pretty-print.c: Likewise.
1012 * lex.c (cxx_init): Likewise.
1013 * name-lookup.c (lookup_function_nonclass): Add extra argument
1014 include_std.
1015 (lookup_arg_dependent): Likewise.
1016 * name-lookup.h: Likewise.
1017
1018 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
1019
1020 PR c++/43824
1021 * error.c (maybe_warn_cpp0x): Add new warning
1022 CPP0X_INLINE_NAMESPACES.
1023 * parser.c (cp_parser_namespace_definition): Likewise.
1024 * cp-tree.h (cpp0x_warn_str): Likewise.
1025
1026 2010-09-10 Richard Guenther <rguenther@suse.de>
1027
1028 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
1029 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
1030
1031 2010-09-10 Jan Hubicka <jh@suse.cz>
1032
1033 PR tree-optimization/45605
1034 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
1035 ADDR_EXPR.
1036
1037 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1038
1039 PR c++/45588
1040 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
1041 before calling fold_decl_constant_value.
1042
1043 2010-09-07 Arnaud Charlet <charlet@adacore.com>
1044
1045 * cp-tree.h (build_enumerator): Add new location_t parameter.
1046 (build_lang_decl_loc): New function.
1047 * decl.c (build_enumerator): New parameter loc. Use it when calling
1048 build_decl. Replace build_lang_decl with build_lang_decl_loc.
1049 * pt.c (tsubst_enum): Adjust call to build_enumerator.
1050 * parser.c (cp_parser_enumerator_definition): Ditto.
1051 * lex.c (build_lang_decl_loc): New function.
1052
1053 2010-09-06 Dodji Seketeli <dodji@redhat.com>
1054
1055 PR c++/45200
1056 PR c++/45293
1057 PR c++/45558
1058 * tree.c (strip_typedefs): Strip typedefs from the context of
1059 TYPENAME_TYPEs.
1060
1061 2010-09-06 Mark Mitchell <mark@codesourcery.com>
1062
1063 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
1064 * call.c (build_conditional_expr): Likewise.
1065 (convert_arg_to_ellipsis): Likewise.
1066
1067 2010-09-06 Arnaud Charlet <charlet@adacore.com>
1068
1069 * parser.c (make_pointer_declarator, make_reference_declarator,
1070 make_call_declarator, make_array_declarator): Set declarator->id_loc.
1071 (cp_parser_init_declarator): Adjust location of decl if appropriate.
1072
1073 2010-09-06 Jason Merrill <jason@redhat.com>
1074
1075 * call.c (implicit_conversion): Fix value-init of enums.
1076 (convert_like_real): Likewise.
1077
1078 * decl.c (cp_finish_decl): Don't change init for auto deduction.
1079
1080 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
1081 (fold_non_dependent_expr): ...here.
1082 (convert_nontype_argument): Use it. Take complain parm.
1083 Use perform_implicit_conversion instead of ocp_convert.
1084 Allow cv-qual changes.
1085 (convert_template_argument): Pass complain down.
1086 (tsubst_template_arg): Suppress constant expression warnings.
1087 Don't fold here.
1088
1089 * method.c (synthesized_method_walk): In constructors, also check
1090 subobject destructors.
1091
1092 * semantics.c (finish_compound_literal): Always build a
1093 TARGET_EXPR.
1094
1095 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1096
1097 PR c++/45043
1098 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
1099
1100 2010-08-30 Jakub Jelinek <jakub@redhat.com>
1101
1102 PR middle-end/45423
1103 * parser.c (cp_parser_omp_atomic): Handle boolean
1104 {PRE,POST}_INCREMENT.
1105
1106 2010-08-29 Jason Merrill <jason@redhat.com>
1107
1108 PR c++/44991
1109 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
1110 after tentative parsing.
1111
1112 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1113
1114 * Make-lang.in (g++spec.o): Update dependencies.
1115 * g++spec.c: Include opts.h
1116 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
1117 (lang_specific_driver): Use cl_decoded_option structures.
1118
1119 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1120
1121 * call.c: Use FOR_EACH_VEC_ELT.
1122 * class.c: Likewise.
1123 * decl.c: Likewise.
1124 * decl2.c: Likewise.
1125 * error.c: Likewise.
1126 * except.c: Likewise.
1127 * mangle.c: Likewise.
1128 * method.c: Likewise.
1129 * name-lookup.c: Likewise.
1130 * parser.c: Likewise.
1131 * pt.c: Likewise.
1132 * repo.c: Likewise.
1133 * semantics.c: Likewise.
1134 * typeck2.c: Likewise.
1135
1136 2010-08-19 Jason Merrill <jason@redhat.com>
1137
1138 * call.c (reference_related_p): Check for error_mark_node.
1139 (add_function_candidate): Check it instead of
1140 same_type_ignoring_top_level_qualifiers_p.
1141
1142 PR c++/45315
1143 * init.c (build_new_1): Don't use build_value_init in a template.
1144 (build_value_init): Make sure we don't.
1145
1146 PR c++/45307
1147 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
1148 of empty class CONSTRUCTOR.
1149
1150 * except.c (pending_noexcept, pending_noexcept_checks): New.
1151 (perform_deferred_noexcept_checks): New.
1152 (maybe_noexcept_warning): Split from...
1153 (finish_noexcept_expr): ...here. Adjust.
1154 * decl2.c (cp_write_global_declarations): Call
1155 perform_deferred_noexcept_checks.
1156 * cp-tree.h: And declare it.
1157
1158 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1159
1160 PR c++/45049
1161 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1162 TREE_CHAIN.
1163
1164 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1165
1166 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1167 or if -fms-extensions is enabled check, check permissive.
1168
1169 2010-08-09 Jason Merrill <jason@redhat.com>
1170
1171 PR c++/45236
1172 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1173
1174 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1175
1176 * call.c (add_builtin_candidates): Use VECs for local variable
1177 `types'. Adjust remainder of function accordingly.
1178
1179 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1180
1181 * name-lookup.c (is_associated_namespace): Convert local variables
1182 to be VECs instead of TREE_LISTs.
1183
1184 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1185
1186 * tree.c (varargs_function_p): Use stdarg_p.
1187
1188 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1189
1190 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1191 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1192 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1193 Change type to a VEC.
1194 (unparsed_funs_with_default_args): Define.
1195 (unparsed_funs_with_definitions): Define.
1196 (push_unparsed_function_queues): New function.
1197 (cp_parser_new): Call it.
1198 (pop_unparsed_function_queues): New function.
1199 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1200 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1201 (cp_parser_save_member_function_body): Likewise.
1202 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1203 and pop_unparsed_function_queues.
1204 (cp_parser_late_parsing_default_args): Likewise.
1205 (cp_parser_save_default_args): Use VEC_safe_push.
1206
1207 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1208
1209 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1210 containing it.
1211 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1212 fields to VECs.
1213 * decl.c (poplevel): Adjust for type changes.
1214 (declare_local_label): Likewise.
1215
1216 2010-08-06 Jason Merrill <jason@redhat.com>
1217
1218 * typeck.c (complete_type_or_maybe_complain): Split out from...
1219 (complete_type_or_else): Here.
1220 (build_class_member_access_expr): Call it.
1221 (finish_class_member_access_expr): Likewise.
1222 * call.c (build_special_member_call): Likewise.
1223 * cvt.c (build_expr_type_conversion): Likewise.
1224 * init.c (build_new): Likewise.
1225 * typeck2.c (build_functional_cast): Likewise.
1226 * cp-tree.h: Declare it.
1227
1228 * init.c (build_value_init): Add complain parm.
1229 (build_value_init_noctor): Likewise.
1230 (perform_member_init): Pass it.
1231 (expand_aggr_init_1): Likewise.
1232 (build_new_1): Likewise.
1233 (build_vec_init): Likewise.
1234 * pt.c (tsubst_expr): Likewise.
1235 * typeck2.c (build_functional_cast): Likewise.
1236 * cp-tree.h: Adjust.
1237 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1238
1239 * typeck.c (decay_conversion): Any expression with type nullptr_t
1240 decays to nullptr.
1241
1242 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1243
1244 PR c++/45112
1245 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1246
1247 2010-07-27 Jason Merrill <jason@redhat.com>
1248
1249 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1250 from build_value_init.
1251 * init.c (build_value_init_noctor): Give error for unknown array
1252 bound.
1253
1254 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1255
1256 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1257
1258 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1259
1260 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1261 c_common_initialize_diagnostics.
1262 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1263 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1264
1265 2010-07-21 Jason Merrill <jason@redhat.com>
1266
1267 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1268
1269 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1270 to cp_finish_decl.
1271
1272 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1273
1274 PR c++/44641
1275 * pt.c (instantiate_class_template): Propagate the template's
1276 location to its instance.
1277
1278 2010-07-20 Jason Merrill <jason@redhat.com>
1279
1280 PR c++/44967
1281 * pt.c (tsubst_copy_and_build): Rework last change.
1282
1283 PR c++/44967
1284 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1285 CALL_EXPR.
1286
1287 2010-07-19 Jason Merrill <jason@redhat.com>
1288
1289 PR c++/44996
1290 * semantics.c (finish_decltype_type): Correct decltype
1291 of parenthesized rvalue reference variable.
1292
1293 PR c++/44969
1294 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1295 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1296
1297 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1298
1299 PR c++/44969
1300 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1301 parameter.
1302 * cp-tree.h: Adjust declaration.
1303 * init.c (perform_member_init): Adjust caller.
1304 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1305 * typeck2.c (store_init_value): Likewise.
1306 (build_functional_cast): Pass complain argument to
1307 build_x_compound_expr_from_list.
1308
1309 2010-07-16 Jason Merrill <jason@redhat.com>
1310
1311 PR c++/32505
1312 * pt.c (process_partial_specialization): Diagnose partial
1313 specialization after instantiation.
1314 (most_specialized_class): Add complain parm.
1315
1316 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1317
1318 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1319
1320 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1321 cp_build_function_call.
1322
1323 2010-07-15 Jason Merrill <jason@redhat.com>
1324
1325 PR c++/44909
1326 * call.c (add_function_candidate): If we're working on an implicit
1327 declaration, don't consider candidates that won't match.
1328 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1329 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1330
1331 Revert:
1332 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1333 (TYPE_HAS_USER_OPEQ): New.
1334 * decl.c (grok_special_member_properties): Set it.
1335 * class.c (add_implicitly_declared_members): Don't lazily declare
1336 constructors/operator= if a base or member has a user-declared one.
1337 (check_bases_and_members, check_bases): Adjust.
1338 (check_field_decls, check_field_decl): Adjust.
1339
1340 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1341
1342 * decl.c (integer_three_node): Remove.
1343 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1344 * cp-tree.h (integer_three_node): Remove.
1345
1346 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1347
1348 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1349 * call.c: Likewise.
1350 * class.c: Likewise.
1351 * cp-gimplify.c: Likewise.
1352 * decl.c: Likewise.
1353 * decl2.c: Likewise.
1354 * init.c: Likewise.
1355 * mangle.c: Likewise.
1356 * name-lookup.c: Likewise.
1357 * optimize.c: Likewise.
1358 * parser.c: Likewise.
1359 * pt.c: Likewise.
1360 * rtti.c: Likewise.
1361 * search.c: Likewise.
1362 * semantics.c: Likewise.
1363 * typeck.c: Likewise.
1364 * typeck2.c: Likewise.
1365
1366 2010-07-14 Jason Merrill <jason@redhat.com>
1367
1368 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1369 (build_field_list): Cache field type.
1370
1371 Implement C++0x unrestricted unions (N2544)
1372 * class.c (check_field_decl): Loosen union handling in C++0x.
1373 * method.c (walk_field_subobs): Split out from...
1374 (synthesized_method_walk): ...here. Set msg before loops.
1375 (process_subob_fn): Check for triviality in union members.
1376 * init.c (sort_mem_initializers): Splice out uninitialized
1377 anonymous unions and union members.
1378 (push_base_cleanups): Don't automatically destroy anonymous unions
1379 and union members.
1380
1381 2010-07-13 Jason Merrill <jason@redhat.com>
1382
1383 PR c++/44909
1384 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1385 (TYPE_HAS_USER_OPEQ): New.
1386 * decl.c (grok_special_member_properties): Set it.
1387 * class.c (add_implicitly_declared_members): Don't lazily declare
1388 constructors/operator= if a base or member has a user-declared one.
1389 (check_bases_and_members, check_bases): Adjust.
1390 (check_field_decls, check_field_decl): Adjust.
1391 * method.c (synthesized_method_walk): Initialize check_vdtor.
1392
1393 PR c++/44540
1394 * mangle.c (write_type): Canonicalize.
1395 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1396 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1397
1398 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1399
1400 PR c++/44908
1401 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1402 complain argument.
1403 * typeck.c (get_delta_difference): Update prototype, add a
1404 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1405 add checks for error_mark_node.
1406 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1407 parameter; update lookup_base call.
1408 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1409 parameter; update get_delta_difference call and add check for
1410 error_mark_node.
1411 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1412 parameter; update get_delta_difference call and add check for
1413 error_mark_node; update build_ptrmemfunc call.
1414 (build_static_cast_1): Adjust convert_ptrmem call.
1415 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1416 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1417 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1418 and build_ptrmemfunc calls.
1419 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1420
1421 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1422
1423 PR c++/44907
1424 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1425 adjust build_special_member_call call, pass complain.
1426 (convert_like_real): Adjust build_temp call, pass complain.
1427
1428 2010-07-09 Jason Merrill <jason@redhat.com>
1429
1430 PR c++/43120
1431 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1432 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1433 Set BV_LOST_PRIMARY.
1434 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1435
1436 2010-07-08 Jason Merrill <jason@redhat.com>
1437
1438 PR c++/43120
1439 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1440 virtual bases for covariant thunks.
1441
1442 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1443
1444 * cp-tree.h: Do not include toplev.h.
1445
1446 2010-07-06 Jason Merrill <jason@redhat.com>
1447
1448 PR c++/44703
1449 * call.c (is_std_init_list): Look through typedefs.
1450
1451 PR c++/44778
1452 * init.c (build_offset_ref): If scope isn't dependent,
1453 don't exit early. Look at TYPE_MAIN_VARIANT.
1454 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1455
1456 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1457
1458 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1459
1460 * cp-tree.h (impl_conv_void): New type.
1461 (convert_to_void): Adjust prototype.
1462 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1463 diagnostic for easy translation. Change caller.
1464 * typeck.c: Update call to convert_to_void.
1465 * semantics.c: Likewise.
1466 * init.c: Likewise.
1467
1468 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1469
1470 * decl.c (cp_finish_decl): Call add_local_decl.
1471 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1472
1473 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1474
1475 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1476 throughout.
1477
1478 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1479
1480 PR c++/22138
1481 * parser.c (cp_parser_primary_expression): Error if local template is
1482 declared.
1483
1484 2010-07-02 Le-Chun Wu <lcwu@google.com>
1485
1486 PR/44128
1487 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1488 (variable or type) shadows another type.
1489
1490 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR c++/44780
1493 * typeck.c (convert_for_assignment): When converting a convertible
1494 vector type or objc++ types, call mark_rvalue_use.
1495 * typeck2.c (build_m_component_ref): Use return values from
1496 mark_rvalue_use or mark_lvalue_use.
1497 * class.c (build_base_path): Likewise.
1498 * call.c (build_conditional_expr): Likewise.
1499
1500 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1501
1502 PR c++/44039
1503 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1504 returns NULL_TREE.
1505
1506 2010-07-01 Richard Guenther <rguenther@suse.de>
1507
1508 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1509 predicate we are looking for, allow non-gimplified
1510 INDIRECT_REFs.
1511
1512 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1513
1514 PR c++/44628
1515 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1516 arg is NULL_TREE too.
1517 * call.c (convert_class_to_reference): Return error_mark_node when
1518 expr is NULL_TREE.
1519
1520 2010-06-30 Michael Matz <matz@suse.de>
1521
1522 * repo.c (finish_repo): Fix typo.
1523
1524 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1525
1526 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1527
1528 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1529
1530 * repo.c (pending_repo): Change type to a VEC.
1531 (finish_repo): Adjust for new type of pending_repo.
1532 (repo_emit_p): Likewise.
1533
1534 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1535
1536 * tree.c: Include gimple.h. Do not include tree-flow.h
1537 * decl.c: Do not include tree-flow.h
1538 * Make-lang.in: Adjust dependencies.
1539
1540 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1541
1542 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1543 (incomplete_vars): Adjust comment. Change type to a VEC.
1544 (maybe_register_incomplete_var): Adjust for new type.
1545 (complete_vars): Adjust iteration over incomplete_vars.
1546
1547 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1548
1549 * decl.c (struct named_label_entry): Change type of bad_decls field
1550 to a VEC.
1551 (poplevel_named_label_1): Adjust for new type of bad_decls.
1552 (check_goto): Likewise.
1553
1554 2010-06-29 Jason Merrill <jason@redhat.com>
1555
1556 Enable implicitly declared move constructor/operator= (N3053).
1557 * class.c (add_implicitly_declared_members): A class with no
1558 explicitly declared copy or move constructor gets both declared
1559 implicitly, and similarly for operator=.
1560 (check_bases): A type with no copy ctor does not inhibit
1561 a const copy ctor in a derived class. It does mean the derived
1562 one is non-trivial.
1563 (check_field_decl): Likewise.
1564 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1565 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1566 (trivially_copyable_p): Likewise.
1567 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1568 * class.c (finish_struct_bits): Likewise.
1569 * tree.c (build_target_expr_with_type): Likewise.
1570 * typeck2.c (store_init_value): Likewise.
1571
1572 Enable implicitly deleted functions (N2346)
1573 * class.c (check_bases_and_members): Adjust lambda flags.
1574 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1575
1576 * decl2.c (mark_used): Adjust error for use of deleted function.
1577
1578 Machinery to support implicit delete/move.
1579 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1580 has_complex_move_ctor, has_complex_move_assign bitfields.
1581 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1582 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1583 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1584 (enum special_function_kind): Add sfk_move_assignment.
1585 (LOOKUP_SPECULATIVE): New.
1586 * call.c (build_over_call): Return early if it's set.
1587 (build_over_call): Use trivial_fn_p.
1588 * class.c (check_bases): If the base has no default constructor,
1589 the derived one is non-trivial. Handle move ctor/op=.
1590 (check_field_decl): Likewise.
1591 (check_bases_and_members): Handle move ctor/op=.
1592 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1593 (type_has_move_constructor, type_has_move_assign): New.
1594 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1595 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1596 (trivial_fn_p): New.
1597 (do_build_copy_constructor): Use it.
1598 (do_build_assign_ref): Likewise. Handle move assignment.
1599 (build_stub_type, build_stub_object, locate_fn_flags): New.
1600 (locate_ctor): Use locate_fn_flags.
1601 (locate_copy, locate_dtor): Remove.
1602 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1603 (process_subob_fn, synthesized_method_walk): New.
1604 (maybe_explain_implicit_delete): New.
1605 (implicitly_declare_fn): Use synthesized_method_walk,
1606 type_has_trivial_fn, and type_set_nontrivial_flag.
1607 (defaulted_late_check): Set DECL_DELETED_FN.
1608 (defaultable_fn_check): Handle sfk_move_assignment.
1609 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1610 implicitly deleted move ctor/op=.
1611 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1612 (lookup_fnfields_slot): New.
1613 * semantics.c (omp_clause_info_fndecl): Remove.
1614 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1615 get_copy_assign, trivial_fn_p.
1616 (trait_expr_value): Adjust call to locate_ctor.
1617 * tree.c (special_function_p): Handle sfk_move_assignment.
1618
1619 * class.c (type_has_virtual_destructor): New.
1620 * cp-tree.h: Declare it.
1621 * semantics.c (trait_expr_value): Use it.
1622
1623 * call.c (build_over_call): Only give warnings with tf_warning.
1624
1625 * name-lookup.c (pop_scope): Handle NULL_TREE.
1626
1627 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1628 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1629 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1630 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1631 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1632 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1633 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1634 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1635 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1636 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1637 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1638 * search.c, semantics.c, tree.c: Adjust.
1639
1640 * pt.c (dependent_scope_ref_p): Remove.
1641 (value_dependent_expression_p): Don't call it.
1642 (type_dependent_expression_p): Here either.
1643 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1644 if the scope isn't dependent.
1645
1646 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1647 a reference.
1648
1649 PR c++/44587
1650 * pt.c (has_value_dependent_address): New.
1651 (value_dependent_expression_p): Check it.
1652 (convert_nontype_argument): Likewise. Call decay_conversion before
1653 folding if we want a pointer.
1654 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1655 scope is the current instantiation.
1656
1657 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR c++/44682
1660 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1661 on expr.
1662
1663 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1664
1665 * init.c: Do not include except.h.
1666 * decl.c: Likewise.
1667 * expr.c: Likewise.
1668 * cp-lang.c: Likewise.
1669 * pt.c: Likewise.
1670 * semantics.c: Likewise.
1671 * decl2.c: Likewise.
1672 * except.c: Likewise.
1673 (init_exception_processing): Do not set the removed
1674 lang_protect_cleanup_actions here.
1675 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1676 (doing_eh): New, moved from except.c but removed the do_warning flag.
1677 (expand_start_catch_block): Update doing_eh call.
1678 (expand_end_catch_block): Likewise.
1679 (build_throw): Likewise.
1680 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1681 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1682 cp_protect_cleanup_actions.
1683 * Make-lang.in: Update dependencies.
1684
1685 2010-06-26 Jason Merrill <jason@redhat.com>
1686
1687 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1688 constructor called with a single argument that takes a reference
1689 to the constructor's class.
1690 (BAD_CONVERSION_RANK): New.
1691 (compare_ics): Use it to compare bad ICSes.
1692
1693 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1694
1695 * lang-specs.h: Remove +e handling.
1696
1697 2010-06-24 Andi Kleen <ak@linux.intel.com>
1698
1699 * parser.c: (cp_parser_question_colon_clause):
1700 Switch to use cp_lexer_peek_token.
1701 Call warn_for_omitted_condop. Call pedwarn for omitted
1702 middle operand.
1703
1704 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1705
1706 PR c++/44619
1707 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1708 datum and mark_rvalue_use on component.
1709
1710 PR c++/44627
1711 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1712 the CALL_EXPR has no arguments.
1713
1714 2010-06-21 Jason Merrill <jason@redhat.com>
1715
1716 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1717
1718 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1719 element type.
1720
1721 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1722
1723 * name-lookup.c (struct arg_lookup): Convert namespaces and
1724 classes fields to VEC.
1725 (arg_assoc_namespace): Adjust for new type of namespaces.
1726 (arg_assoc_class): Adjust for new type of classes.
1727 (lookup_arg_dependent): Use make_tree_vector and
1728 release_tree_vector.
1729 * typeck2.c (build_x_arrow): Use vec_member.
1730
1731 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1732
1733 PR c++/44486
1734 * error.c (dump_decl): Better wording for anonymous namespace.
1735
1736 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1737
1738 * class.c (build_vtbl_initializer): Adjust computation of new_position
1739 and which entry to add padding for.
1740
1741 2010-06-16 Jason Merrill <jason@redhat.com>
1742
1743 * except.c (check_noexcept_r): Return the problematic function.
1744 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1745 * pt.c (tsubst_copy_and_build): Pass it.
1746 * parser.c (cp_parser_unary_expression): Likewise.
1747 * cp-tree.h: Adjust prototype.
1748
1749 * method.c (defaulted_late_check): Give the defaulted method
1750 the same exception specification as the implicit declaration.
1751
1752 2010-06-15 Jason Merrill <jason@redhat.com>
1753
1754 * class.c (add_implicitly_declared_members): Implicit assignment
1755 operators can also be virtual overriders.
1756 * method.c (lazily_declare_fn): Likewise.
1757
1758 * call.c (convert_like_real): Give "initializing argument of"
1759 information for ambiguous conversion. Give source position
1760 of function.
1761
1762 * call.c (print_z_candidates): Do print viable deleted candidates.
1763 (joust): Don't choose a deleted function just because its worst
1764 conversion is better than another candidate's worst.
1765
1766 * call.c (convert_like_real): Don't complain about
1767 list-value-initialization from an explicit constructor.
1768
1769 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1770 DECL_SOURCE_LOCATION directly.
1771
1772 * class.c (type_has_user_provided_default_constructor): Use
1773 sufficient_parms_p.
1774
1775 * call.c (is_subseq): Handle ck_aggr, ck_list.
1776 (compare_ics): Treat an aggregate or ambiguous conversion to the
1777 same type as involving the same function.
1778
1779 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1780
1781 * typeck.c (convert_for_assignment): Fix comment. Change message
1782 format from %d to %qP.
1783 (convert_for_initialization): Fix comment.
1784
1785 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1786
1787 * cp-tree.h (expr_list_kind): New type.
1788 (impl_conv_rhs): New type.
1789 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1790 prototype.
1791 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1792 diagnostics for easy translation. Change caller.
1793 (convert_for_initialization): Use impl_conv_rhs and change caller.
1794 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1795 diagnostics for easy translation. Change caller.
1796 * decl.c (bad_spec_place): New enum.
1797 (bad_specifiers): Use it and emit the diagnostics for easy
1798 translation. Change caller.
1799 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1800
1801 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1802
1803 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1804 to a VEC.
1805 * decl2.c (cp_write_global_declarations): Adjust for new type of
1806 decl_namespace_list.
1807 * name-lookup.c (current_decl_namespace): Likewise.
1808 (push_decl_namespace): Likewise.
1809 (pop_decl_namespace): Likewise.
1810
1811 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1812
1813 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1814 instead of build_function_type.
1815 * decl.c (cxx_init_decl_processing): Likewise.
1816 (declare_global_var): Likewise.
1817 (get_atexit_node): Likewise.
1818 (expand_static_init): Likewise.
1819 * decl2.c (start_objects): Likewise.
1820 (start_static_storage_duration_function): Likewise.
1821 * except.c (init_exception_processing): Likewise.
1822 (build_exc_ptr): Likewise.
1823 (build_throw): Likewise.
1824 * rtti.c (throw_bad_cast): Likewise.
1825 (throw_bad_typeid): Likewise.
1826 (build_dynamic_cast_1): Likewise.
1827
1828 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1829
1830 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1831 (build_op_delete_call): Likewise.
1832 (build_over_call): Likewise.
1833 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1834 * pt.c (process_partial_specialization): Likewise.
1835 (tsubst_template_args): Likewise.
1836 * semantics.c (finish_asm_stmt): Likewise.
1837
1838 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1839
1840 * decl.c (record_key_method_defined): New, broken out of ...
1841 (finish_function): ... here. Call it.
1842 (start_decl): Treat aliases as definitions.
1843
1844 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1845
1846 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1847
1848 * pt.c (maybe_process_partial_specialization): Likewise.
1849 (register_specialization): Likewise.
1850 (add_pending_template): Likewise.
1851 (lookup_template_class): Likewise.
1852 (push_tinst_level): Likewise.
1853
1854 * parser.c (cp_lexer_new_main): Likewise.
1855 (cp_lexer_new_from_tokens): Likewise.
1856 (cp_token_cache_new): Likewise.
1857 (cp_parser_context_new): Likewise.
1858 (cp_parser_new): Likewise.
1859 (cp_parser_nested_name_specifier_opt): Likewise.
1860 (cp_parser_template_id): Likewise.
1861
1862 * name-lookup.c (binding_entry_make): Likewise.
1863 (binding_table_construct): Likewise.
1864 (binding_table_new): Likewise.
1865 (cxx_binding_make): Likewise.
1866 (pushdecl_maybe_friend): Likewise.
1867 (begin_scope): Likewise.
1868 (push_to_top_level): Likewise.
1869
1870 * lex.c (init_reswords): Likewise.
1871 (retrofit_lang_decl): Likewise.
1872 (cxx_dup_lang_specific_decl): Likewise.
1873 (copy_lang_type): Likewise.
1874 (cxx_make_type): Likewise.
1875
1876 * decl.c (make_label_decl): Likewise.
1877 (check_goto): Likewise.
1878 (start_preparsed_function): Likewise.
1879 (save_function_data): Likewise.
1880
1881 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1882
1883 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1884
1885 * class.c (finish_struct_1): Likewise.
1886
1887 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1888 (struct lang_decl): Likewise.
1889
1890 * parser.c (cp_parser_new): Update comment to not reference
1891 ggc_alloc.
1892
1893 2010-06-07 Jason Merrill <jason@redhat.com>
1894
1895 PR c++/44366
1896 * error.c (dump_parameters): Mask out TFF_SCOPE.
1897 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1898 (dump_scope): Remove no-op mask.
1899
1900 PR c++/44401
1901 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1902
1903 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1904 * init.c (build_offset_ref): Use it.
1905 * pt.c (maybe_process_partial_specialization): Use it.
1906 (instantiate_class_template): Use it.
1907 * search.c (lookup_base): Use it.
1908
1909 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c++/44444
1912 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1913 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1914 handled_component_p.
1915
1916 PR c++/44443
1917 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1918 set also DECL_READ_P on the decl.
1919
1920 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1921
1922 PR c++/44188
1923 * cp-tree.h (typedef_variant_p): Move this declaration to
1924 gcc/tree.h.
1925 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1926 * decl.c (grokdeclarator): Do not rename debug info of an
1927 anonymous tagged type named by a typedef.
1928
1929 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1930
1931 PR c++/44086
1932 * class.c (check_field_decls): Move the call to
1933 check_bitfield_decl before trying to set the
1934 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1935
1936 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1937
1938 * typeck.c: Update include path for moved files.
1939 * decl.c: Likewise.
1940 * rtti.c: Likewise.
1941 * cp-gimplify.c: Likewise.
1942 * cp-lang.c: Likewise.
1943 * pt.c: Likewise.
1944 * semantics.c: Likewise.
1945 * cxx-pretty-print.h: Likewise.
1946 * decl2.c: Likewise.
1947 * parser.c: Likewise.
1948 * cp-objcp-common.c: Likewise.
1949 * cp-tree.h: Likewise.
1950 * name-lookup.c: Likewise.
1951 * lex.c: Likewise.
1952 * name-lookup.h: Likewise.
1953 * config-lang.in: Update paths in gtfiles for files in c-family/.
1954 * Make-lang.in: Likewise.
1955
1956 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1957
1958 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1959 * typeck.c (build_ptrmemfunc): Likewise.
1960
1961 2010-06-04 Jason Merrill <jason@redhat.com>
1962
1963 * typeck2.c (merge_exception_specifiers): Adjust merging of
1964 throw() and noexcept(true).
1965
1966 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1967 using an uninitialized variable.
1968
1969 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1970 (pp_cxx_expression): Likewise.
1971
1972 Implement noexcept-specification (15.4)
1973 * parser.c (cp_parser_exception_specification_opt): Parse it.
1974 Give -Wdeprecated warning about throw() specs.
1975 * pt.c (tsubst_exception_specification): Handle it.
1976 * error.c (dump_exception_spec): Handle it.
1977 (dump_expr): Handle NOEXCEPT_EXPR.
1978 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1979 * typeck.c (comp_except_specs): Handle compatibility rules.
1980 Change exact parm to take an enum.
1981 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1982 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1983 (type_throw_all_p, build_noexcept_spec): New fns.
1984 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1985 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1986 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1987 (noexcept_true_spec, noexcept_false_spec): New macros.
1988 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1989 * search.c (check_final_overrider): Adjust.
1990 * decl.c (check_redeclaration_exception_specification): Adjust.
1991 (use_eh_spec_block): Use type_throw_all_p.
1992 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1993 Give operator new a noexcept-specification in C++0x mode.
1994 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1995 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1996
1997 Implement noexcept operator (5.3.7)
1998 * cp-tree.def (NOEXCEPT_EXPR): New.
1999 * except.c (check_noexcept_r, finish_noexcept_expr): New.
2000 * cp-tree.h: Declare finish_noexcept_expr.
2001 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
2002 * pt.c (tsubst_copy_and_build): And tsubst it.
2003 (type_dependent_expression_p): Handle it.
2004 (value_dependent_expression_p): Handle it.
2005
2006 * call.c (build_conditional_expr): Never fold in unevaluated context.
2007 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
2008 * semantics.c (simplify_aggr_init_expr): Likewise.
2009 * typeck.c (merge_types): Call merge_exception_specifiers.
2010 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
2011 DECL_ANTICIPATED for preferring new type.
2012
2013 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2014
2015 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
2016 diagnostics.
2017
2018 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2019
2020 PR c++/44412
2021 * typeck.c (build_class_member_access_expr): Call mark_exp_read
2022 on object for static data members.
2023
2024 2010-06-04 Jakub Jelinek <jakub@redhat.com>
2025 Jason Merrill <jason@redhat.com>
2026
2027 PR c++/44362
2028 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
2029 with the same type, call mark_lvalue_use on both.
2030
2031 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
2032
2033 * class.c (struct vtbl_init_data_s): Remove last_init field.
2034 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
2035 to a VEC.
2036 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
2037 initializers.
2038 (build_vtt): Likewise.
2039 (initialize_vtable): Take a VEC instead of a tree.
2040 (build_vtt_inits): Change return type to void. Take a VEC **
2041 instead of a tree *; accumulate results into said VEC.
2042 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
2043 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
2044 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
2045 instead of a tree.
2046 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
2047 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
2048 into it.
2049 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
2050 rather than tree_cons.
2051 (build_vbase_offset_vtbl_entries): Likewise.
2052 (add_vcall_offset): Likewise.
2053 (build_rtti_vtbl_entries): Likewise.
2054 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
2055 * decl.c (initialize_artificial_var): Use build_constructor instead
2056 of build_constructor_from_list.
2057
2058 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
2059
2060 PR c++/44294
2061 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
2062 bit-field.
2063
2064 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2065
2066 * parser.c (cp_parser_mem_initializer_list): Change error text.
2067
2068 2010-06-02 Jakub Jelinek <jakub@redhat.com>
2069
2070 * cp-objcp-common.c (shadowed_var_for_decl): Change into
2071 tree_decl_map hashtab from tree_map.
2072 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
2073 (init_shadowed_var_for_decl): Adjust initialization.
2074
2075 PR c++/44361
2076 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
2077 instead of calling mark_exp_read only when not an assignment.
2078
2079 PR debug/44367
2080 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
2081 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
2082 Set DECL_VALUE_EXPR on var.
2083
2084 2010-06-02 Jason Merrill <jason@redhat.com>
2085
2086 * error.c (dump_type): Improve typedef handling.
2087
2088 PR c++/9726
2089 PR c++/23594
2090 PR c++/44333
2091 * name-lookup.c (same_entity_p): New.
2092 (ambiguous_decl): Multiple declarations of the same entity
2093 are not ambiguous.
2094
2095 2010-06-01 Jason Merrill <jason@redhat.com>
2096
2097 DR 990
2098 * call.c (add_list_candidates): Prefer the default constructor.
2099 (build_aggr_conv): Treat missing initializers like { }.
2100 * typeck2.c (process_init_constructor_record): Likewise.
2101 * init.c (expand_default_init): Use digest_init for
2102 direct aggregate initialization, too.
2103
2104 * call.c (add_list_candidates): Split out...
2105 (build_user_type_conversion_1): ...from here.
2106 (build_new_method_call): And here.
2107 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
2108
2109 PR c++/44358
2110 * call.c (build_list_conv): Set list-initialization flags properly.
2111
2112 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
2113
2114 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
2115
2116 2010-06-01 Arnaud Charlet <charlet@adacore.com>
2117 Matthew Gingell <gingell@adacore.com>
2118
2119 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
2120 * decl2.c: Include langhooks.h and c-ada-spec.h.
2121 (cpp_check, collect_source_refs, collect_ada_namespace,
2122 collect_all_refs): New functions.
2123 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
2124 * lang-specs.h: Ditto.
2125
2126 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2127
2128 * cp-tree.h (cp_build_function_call_nary): Declare.
2129 * typeck.c (cp_build_function_call_nary): Define.
2130 * decl.c (register_dtor_fn): Use it instead of
2131 cp_build_function_call.
2132 (cxx_maybe_build_cleanup): Likewise.
2133 * decl2.c (generate_ctor_or_dtor_function): Likewise.
2134 * except.c (do_get_exception_ptr): Likewise.
2135 (do_begin_catch): Likewise.
2136 (do_allocate_exception): Likewise.
2137 (do_free_exception): Likewise.
2138 (build_throw): Likewise. Use cp_build_function_call_vec instead
2139 of cp_build_function_call.
2140 (do_end_catch): Likewise.
2141
2142 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
2143
2144 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
2145 (struct cp_declarator): Move id_loc field up.
2146
2147 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2148
2149 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
2150 this file is included before c-common.h. Define GCC_DIAG_STYLE
2151 before including diagnostic-core.h and toplev.h.
2152 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2153 * pt.c: Include cp-tree.h before c-common.h.
2154
2155 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2156
2157 * tree.c (c_register_addr_space): Add stub.
2158
2159 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2160
2161 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2162 fatal.
2163
2164 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2165
2166 Revert fix of PR c++/44188
2167 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2168 gcc/tree.h.
2169 * tree.c (typedef_variant_p): Revert moving this definition to
2170 gcc/tree.c.
2171 * decl.c (grokdeclarator): Revert naming typedef handling.
2172
2173 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2174
2175 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2176 * cp-lang.c: Don't include diagnostic.h
2177 * name-lookup.c: Include diagnostic-core.h instead of
2178 diagnostic.h.
2179 (cp_emit_debug_info_for_using): Use seen_error.
2180 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2181 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2182 * pt.c (iterative_hash_template_arg): Use seen_error.
2183 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2184 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2185 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2186 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2187 dependencies.
2188
2189 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2190
2191 PR c++/44188
2192 * cp-tree.h (typedef_variant_p): Move this declaration to
2193 gcc/tree.h.
2194 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2195 * decl.c (grokdeclarator): Do not rename debug info of an
2196 anonymous tagged type named by a typedef.
2197
2198 2010-05-27 Jason Merrill <jason@redhat.com>
2199
2200 PR c++/43555
2201 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2202 anonymous VLA size.
2203
2204 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2205
2206 PR bootstrap/44287
2207 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2208 * class.c (layout_class_type): Likewise.
2209 * decl.c (finish_enum): Likewise.
2210 * mangle.c (write_builitin_type): Likewise.
2211
2212 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2213
2214 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2215 explicit_int128_p.
2216 * decl.c (grokdeclarator): Handle __int128.
2217 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2218 (cp_parser_simple_type_specifier): Likewise.
2219 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2220 * typeck.c (cp_common_type): Handle __int128.
2221 * mangle.c (integer_type_codes): Add itk_int128 and
2222 itk_unsigned_int128.
2223
2224 2010-05-26 Jason Merrill <jason@redhat.com>
2225
2226 PR c++/43382
2227 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2228 unification.
2229
2230 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2231
2232 * cp-lang.c: Do not include expr.h.
2233
2234 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2235
2236 * decl.c: Do not include rtl.h
2237 * semantics.c: Likewise.
2238
2239 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2240
2241 * cp-tree.h: Do not include splay-tree.h.
2242 (struct prtmem_cst): Remove unused field and false comment.
2243 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2244 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2245 * init.c: Do not include rtl.h and expr.h.
2246 * class.c: Do not include rtl.h. Include splay-tree.h.
2247 (build_clone): Use plain NULL instead of NULL_RTX.
2248 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2249 included. Include splay-tree.h.
2250 * method.c: Do not include rtl.h and expr.h.
2251 (use_thunk): Use plain NULL instead of NULL_RTX.
2252 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2253 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2254 and target.h. Include splay-tree.h.
2255 * expr.c: Do not include rtl.h and expr.h.
2256 * pt.c: Do not include obstack.h and rtl.h.
2257 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2258 (tsubst_decl): Likewise.
2259 (instantiate_decl): Likewise.
2260 * semantics.c: Do not include exprt.h and debug.h. Explain why
2261 rtl.h has to be included.
2262 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2263 * call.c: Do not include rtl.h and expr.h.
2264 * search.c: Do not include obstack.h and rtl.h.
2265 * friend.c: Do not include rtl.h and expr.h.
2266 * Make-lang.in: Update dependencies.
2267
2268 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2269
2270 PR c++/18249
2271 * parser.c (non_integral_constant): Add NIC_NONE.
2272 (required_token): Add RT_NONE.
2273 (cp_parser_unary_expression): Initialize non_constant_p
2274 to NIC_NONE.
2275 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2276 (cp_parser_primary_expression, cp_parser_postfix_expression,
2277 cp_parser_cast_expression, cp_parser_binary_expression,
2278 cp_parser_functional_cast): Fix formatting.
2279
2280 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2281
2282 PR c++/18249
2283 * parser.c: Remove inclusion of dyn-string.h.
2284 (non_integral_constant): New enum.
2285 (name_lookup_error): New enum.
2286 (required_token): New enum.
2287 (cp_parser_required_error): New function.
2288 (cp_parser_require): Change the type of variable token_desc to
2289 required_token and use cp_parser_required_error.
2290 (cp_parser_require_keyword): Likewise.
2291 (cp_parser_error): Use gmsgid as parameter.
2292 (cp_parser_name_lookup_error): Change the type of variable desired to
2293 name_lookup_error and put the diagnostic in the full sentences. Change
2294 caller.
2295 (cp_parser_non_integral_constant_expression): Change the type of the
2296 variable thing to non_integral_constant and put the diagnostics in
2297 full sentences. Change caller.
2298
2299 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2300
2301 PR middle-end/44100
2302 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2303
2304 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2305
2306 * error.c (cp_diagnostic_starter): Update call to
2307 diagnostic_build_prefix.
2308 (cp_print_error_function,
2309 print_instantiation_partial_context_line): Check show_column flag
2310 in context.
2311
2312 2010-05-24 Jason Merrill <jason@redhat.com>
2313
2314 PR c++/41510
2315 * decl.c (check_initializer): Don't wrap an init-list in a
2316 TREE_LIST.
2317 * init.c (build_aggr_init): Don't assume copy-initialization if
2318 init has CONSTRUCTOR_IS_DIRECT_INIT.
2319 * call.c (build_new_method_call): Sanity check.
2320
2321 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2322
2323 * rtti.c (tinfo_base_init): Use build_constructor instead of
2324 build_constructor_from_list. Don't cons a tree node for
2325 returning.
2326 (generic_initializer): Use build_constructor_single instead of
2327 build_constructor_from_list.
2328 (ptr_initializer): Use build_constructor instead of
2329 build_constructor_from_list
2330 (ptm_initializer): Likewise.
2331 (class_initializer): Likewise. Take varargs instead of TRAIL.
2332 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2333 build_constructor instead of build_constructor_from_list.
2334
2335 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2336
2337 * semantics.c: Include bitmap.h.
2338 * Make-lang.in: Update dependencies.
2339
2340 2010-05-22 Jan Hubicka <jh@suse.cz>
2341
2342 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2343 comdat vtables.
2344 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2345
2346 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2347
2348 * cxx-pretty-print.c: Correct merge error.
2349
2350 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2351
2352 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2353 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2354 (cp_printer): Handle %K here using percent_K_format.
2355 * cxx-pretty-print.c: Include tree-pretty-print.h.
2356 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2357 dependencies.
2358
2359 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2360
2361 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2362 Clean up redundant includes.
2363
2364 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2365
2366 PR c++/30298
2367 * decl.c (xref_basetypes): Return false in case of ill-formed
2368 redefinition.
2369
2370 2010-05-19 Jason Merrill <jason@redhat.com>
2371
2372 * call.c (reference_binding): Use cp_build_qualified_type_real
2373 and cp_type_quals consistently.
2374 (add_function_candidate): Likewise.
2375 (build_conditional_expr): Likewise.
2376 (convert_like_real): Likewise.
2377 (type_passed_as): Likewise.
2378 * class.c (add_method): Likewise.
2379 (same_signature_p): Likewise.
2380 (layout_class_type): Likewise.
2381 * decl.c (cxx_init_decl_processing): Likewise.
2382 (cp_fname_init): Likewise.
2383 (grokdeclarator): Likewise.
2384 * decl2.c (cp_reconstruct_complex_type): Likewise.
2385 * init.c (build_new_1): Likewise.
2386 * method.c (do_build_copy_constructor): Likewise.
2387 (implicitly_declare_fn): Likewise.
2388 * pt.c (tsubst_aggr_type): Likewise.
2389 (tsubst): Likewise.
2390 * rtti.c (init_rtti_processing): Likewise.
2391 (build_headof): Likewise.
2392 (build_dynamic_cast_1): Likewise.
2393 (tinfo_base_init): Likewise.
2394 (emit_support_tinfos): Likewise.
2395 * semantics.c (capture_decltype): Likewise.
2396 * tree.c (cv_unqualified): Likewise.
2397 * typeck.c (composite_pointer_type): Likewise.
2398 (string_conv_p): Likewise.
2399
2400 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2401
2402 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2403 * decl.c (start_decl): Likewise.
2404 * semantics.c (finish_compound_literal): Likewise.
2405 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2406 (cp_type_readonly): Remove.
2407 * cp-tree.h: Remove declaration.
2408
2409 * typeck.c (merge_types): Preserve memfn quals.
2410
2411 * decl.c (grokdeclarator): Don't check quals on fn type.
2412 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2413 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2414
2415 PR c++/44193
2416 * typeck.c (type_memfn_quals): New fn.
2417 (apply_memfn_quals): New fn.
2418 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2419 (cp_type_readonly): Use cp_type_quals.
2420 * cp-tree.h: Add declarations.
2421 * tree.c (cp_build_qualified_type_real): Don't set, but do
2422 preserve, quals on FUNCTION_TYPE.
2423 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2424 * decl.c (build_ptrmem_type): Likewise.
2425 (grokdeclarator): Likewise.
2426 (static_fn_type): Likewise.
2427 * decl2.c (change_return_type): Likewise.
2428 (cp_reconstruct_complex_type): Likewise.
2429 * pt.c (tsubst_function_type): Likewise.
2430 (unify): Likewise.
2431 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2432
2433 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2434
2435 * tree.c (build_min_non_dep_call_vec): Update comment.
2436
2437 2010-05-17 Jason Merrill <jason@redhat.com>
2438
2439 * call.c (struct z_candidate): Add explicit_targs field.
2440 (add_template_candidate_real): Set it.
2441 (build_over_call): Use it to control init-list warning.
2442
2443 PR c++/44157
2444 * call.c (build_over_call): Limit init-list deduction warning to
2445 cases where the argument is actually an init-list.
2446
2447 PR c++/44158
2448 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2449
2450 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2451 Jason Merrill <jason@redhat.com>
2452
2453 PR c++/44108
2454 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2455
2456 2010-05-15 Jason Merrill <jason@redhat.com>
2457
2458 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2459 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2460 TYPE_NOEXCEPT_P.
2461 (finish_eh_spec_block): Adjust.
2462
2463 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2464
2465 PR c++/44148
2466 * pt.c (tsubst): Unshare template argument.
2467
2468 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2469
2470 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2471 * Make-lang.in: Fix dependencies accordingly.
2472
2473 2010-05-14 Jason Merrill <jason@redhat.com>
2474
2475 C++ DR 475
2476 * except.c (build_throw): Simplify, adjust for DR 475.
2477
2478 PR c++/44127
2479 * except.c (dtor_nothrow): Return nonzero for type with
2480 trivial destructor.
2481
2482 PR c++/44127
2483 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2484 gimple_build_eh_must_not_throw.
2485
2486 2010-05-14 Martin Jambor <mjambor@suse.cz>
2487
2488 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2489 and define.
2490
2491 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2492
2493 * call.c (build_new_method_call): Change warning text.
2494 * typeck2.c (build_functional_cast): Change error text.
2495
2496 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2497
2498 PR c++/30566
2499 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2500 shadowing the outer parameter or variables by the declaration of
2501 nested function in nested structure or class. Warn the shadowing by
2502 the declaration of nested lambda expression.
2503
2504 2010-05-13 Jason Merrill <jason@redhat.com>
2505
2506 * typeck.c (cp_build_array_ref): Factor out from...
2507 (build_array_ref): ...here. Drop complain parm.
2508 (build_new_op): Adjust.
2509 * class.c (build_vtbl_ref_1): Adjust.
2510 * decl2.c (grok_array_decl): Adjust.
2511 * cp-tree.h: Adjust prototypes.
2512
2513 2010-05-13 Jan Hubicka <jh@suse.cz>
2514
2515 * decl.c (cp_finish_decl): Do not worry about used attribute.
2516
2517 2010-05-12 Jason Merrill <jason@redhat.com>
2518
2519 * typeck.c (build_array_ref): Take complain parm.
2520 * cp-tree.h: Add it to prototype.
2521 * call.c (build_new_op): Pass it.
2522 * class.c (build_vtbl_ref): Pass it.
2523 * decl2.c (grok_array_decl): Pass it.
2524
2525 PR bootstrap/44048
2526 PR target/44099
2527 * cp-tree.def (NULLPTR_TYPE): Remove.
2528 * cp-tree.h (NULLPTR_TYPE_P): New.
2529 (SCALAR_TYPE_P): Use it.
2530 (nullptr_type_node): New.
2531 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2532 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2533 nullptr_type_node.
2534 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2535 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2536 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2537 * mangle.c (write_type): Likewise.
2538 * name-lookup.c (arg_assoc_type): Likewise.
2539 * typeck.c (build_reinterpret_cast_1): Likewise.
2540 * rtti.c (typeinfo_in_lib_p): Likewise.
2541 (emit_support_tinfos): Remove local nullptr_type_node.
2542
2543 * cp-tree.h (UNKNOWN_TYPE): Remove.
2544 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2545 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2546 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2547 * class.c (instantiate_type): Check unknown_type_node rather than
2548 UNKNOWN_TYPE.
2549 * name-lookup.c (maybe_push_decl): Likewise.
2550 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2551 (get_typeid): Likewise.
2552 * semantics.c (finish_offsetof): Likewise.
2553
2554 PR c++/20669
2555 * call.c (add_template_candidate_real): If deduction fails, still
2556 add the template as a non-viable candidate.
2557 (equal_functions): Handle template candidates.
2558 (print_z_candidate): Likewise.
2559 (print_z_candidates): Likewise.
2560 (build_new_function_call): Likewise.
2561
2562 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2563 * call.c (add_candidates): Enforce it.
2564 (build_new_method_call): Try non-list ctor if no viable list ctor.
2565 (build_user_type_conversion_1): Likewise.
2566
2567 * call.c (add_candidates): Distinguish between type(x) and
2568 x.operator type().
2569 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2570 (build_new_method_call): Give better error for conversion op.
2571
2572 * call.c (add_candidates): Add first_arg and return_type parms.
2573 Add special constructor/conversion op handling.
2574 (convert_class_to_reference): Use it.
2575 (build_user_type_conversion_1): Likewise.
2576 (build_op_call): Likewise.
2577 (build_new_method_call): Likewise.
2578 (build_new_op): Adjust.
2579 (perform_overload_resolution): Adjust.
2580
2581 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2582
2583 PR c++/34272
2584 PR c++/43630
2585 PR c++/34491
2586 * pt.c (process_partial_specialization): Return error_mark_node
2587 in case of unused template parameters in partial specialization.
2588
2589 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2590
2591 PR c++/44062
2592 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2593 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2594 look at its second operand.
2595
2596 2010-05-10 Jason Merrill <jason@redhat.com>
2597
2598 PR c++/44017
2599 * semantics.c (baselink_for_fns): Revert earlier change.
2600
2601 PR c++/44045
2602 * typeck.c (cp_build_modify_expr): Complain about assignment to
2603 array from init list.
2604
2605 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2606
2607 PR c++/43719
2608 * decl.c (check_initializer): strip array type before checking for
2609 uninitialized const or ref members.
2610
2611 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2612
2613 PR c++/43951
2614 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2615 error count. Emit errors only if compain is true.
2616 (build_new_1): Do not return error_mark_node if
2617 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2618 errors. Delay the check for user-provided constructor.
2619 (perform_member_init): Adjust.
2620 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2621 prototype.
2622
2623 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2624 Jason Merrill <jason@redhat.com>
2625
2626 Add support for C++0x nullptr.
2627 * cp-tree.def: Add NULLPTR_TYPE.
2628 * cp-tree.h: Add nullptr_node.
2629 (cp_tree_index): Add CPTI_NULLPTR.
2630 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2631 * call.c (null_ptr_cst_p): Handle nullptr.
2632 (standard_conversion): Likewise.
2633 (convert_arg_to_ellipsis): Likewise.
2634 * mangle.c (write_type): Likewise.
2635 * name-lookup.c (arg_assoc_type): Likewise.
2636 * parser.c (cp_parser_primary_expression): Likewise.
2637 * typeck.c (cp_build_binary_op): Likewise.
2638 (build_reinterpret_cast_1): Likewise.
2639 * error.c (dump_type): Likewise.
2640 (dump_type_prefix, dump_type_suffix): Likewise.
2641 * decl.c (cxx_init_decl_processing): Likewise.
2642 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2643 * cvt.c (ocp_convert): Likewise.
2644 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2645 nullptr_t tinfo in libsupc++.
2646
2647 2010-05-06 Jason Merrill <jason@redhat.com>
2648
2649 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2650
2651 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2652 Dodji Seketeli <dodji@redhat.com>
2653
2654 PR c/18624
2655 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2656 Declare ...
2657 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2658 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2659 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2660 (cp_build_unary_op): Call lvalue_use.
2661 * decl.c (unused_but_set_errorcount): New variable.
2662 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2663 (duplicate_decls): Merge DECL_READ_P flags.
2664 (start_cleanup_fn): Set DECL_READ_P flag.
2665 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2666 * tree.c (rvalue): Call rvalue_use.
2667 * pt.c (convert_nontype_argument): Likewise.
2668 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2669 finish_decltype_type): Likewise.
2670 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2671 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2672 or rvalue_use depending on the expr.
2673 * init.c (build_new, build_delete): Likewise.
2674 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2675
2676 2010-05-05 Jason Merrill <jason@redhat.com>
2677
2678 PR c++/43787
2679 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2680 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2681
2682 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2683
2684 PR c++/43028
2685 * pt.c (unify): Check each elt for error_mark_node.
2686
2687 2010-05-04 Jason Merrill <jason@redhat.com>
2688
2689 PR c++/38064
2690 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2691
2692 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2693
2694 PR c++/43705
2695 * call.c (build_new_method_call): Return error_mark_node if fns is
2696 NULL_TREE.
2697
2698 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2699
2700 PR c++/43953
2701 * pt.c (most_specialized_class): Pretend we are processing
2702 a template decl during the call to coerce_template_parms.
2703
2704 2010-05-03 Jason Merrill <jason@redhat.com>
2705
2706 PR c++/42810
2707 PR c++/43680
2708 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2709 from the selected underlying type unless -fstrict-enums. Set
2710 ENUM_UNDERLYING_TYPE to have the restricted range.
2711 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2712 * class.c (check_bitfield_decl): Likewise.
2713
2714 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2715
2716 PR c++/43951
2717 * init.c (build_new_1): Revert the accidental checkin in
2718 revision 158918.
2719
2720 2010-04-30 Jason Merrill <jason@redhat.com>
2721
2722 PR c++/43868
2723 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2724 (pp_cxx_type_specifier_seq): ...here.
2725
2726 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2727
2728 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2729 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2730
2731 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2732
2733 PR c++/43779
2734 * typeck.c (warn_args_num): New function.
2735 (convert_arguments): Use warn_args_num to print the diagnostic
2736 messages.
2737
2738 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2739
2740 PR c++/43890
2741 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2742 user-provided constructor while recursing.
2743
2744 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2745
2746 PR c++/9335
2747 * error.c (print_instantiation_partial_context_line): Handle
2748 recursive instantiation.
2749 (print_instantiation_partial_context): Likewise.
2750
2751 2010-04-27 Jason Merrill <jason@redhat.com>
2752
2753 * init.c (perform_member_init): Check CLASS_TYPE_P.
2754
2755 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2756
2757 PR c++/29043
2758 * init.c (perform_member_init): check for uninitialized const or
2759 reference members, including array types.
2760
2761 2010-04-24 Jason Merrill <jason@redhat.com>
2762
2763 * tree.c (get_fns): Split out from get_first_fn.
2764 * cp-tree.h: Declare it.
2765 * search.c (shared_member_p): Use it.
2766 * semantics.c (finish_qualified_id_expr): Simplify.
2767 (finish_id_expression): Simplify.
2768
2769 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2770 whenever object is NULL_TREE. Don't do 'this' capture here.
2771 (finish_qualified_id_expr): Pass NULL_TREE.
2772 (finish_id_expression): Likewise.
2773 (lambda_expr_this_capture): Likewise.
2774
2775 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2776 rather than checking current_class_ref directly.
2777 (finish_call_expr): Likewise.
2778
2779 PR c++/43856
2780 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2781 * class.c (current_nonlambda_class_type): New fn.
2782 * semantics.c (nonlambda_method_basetype): New.
2783 * cp-tree.h: Declare them.
2784 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2785
2786 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2787
2788 PR c++/43875
2789 * semantics.c (lambda_return_type): Complain about
2790 braced-init-list.
2791
2792 PR c++/43790
2793 * tree.c (cv_unqualified): Handle error_mark_node.
2794
2795 PR c++/41468
2796 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2797 if we don't want errors.
2798
2799 PR c++/41468
2800 * class.c (convert_to_base): Add complain parameter. Pass
2801 ba_quiet to lookup_base if we don't want errors.
2802 (build_vfield_ref): Pass complain to convert_to_base.
2803 * call.c (convert_like_real): Likewise.
2804 (initialize_reference): Likewise.
2805 (perform_direct_initialization_if_possible): Pass complain to
2806 convert_like_real.
2807 * cp-tree.h: Adjust.
2808
2809 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2810 Jason Merrill <jason@redhat.com>
2811
2812 PR c++/42844
2813 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2814 constructing, too.
2815 (check_initializer): Call it for classes that need constructing, too.
2816 * class.c (in_class_defaulted_default_constructor): New.
2817 * cp-tree.h: Declare it.
2818
2819 2010-04-20 Jason Merrill <jason@redhat.com>
2820
2821 PR c++/9335
2822 * init.c (constant_value_1): Treat error_mark_node as a constant
2823 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2824 * cvt.c (ocp_convert): Handle getting error_mark_node from
2825 integral_constant_value.
2826 * decl.c (compute_array_index_type): Likewise.
2827
2828 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2829
2830 PR c++/43800
2831 PR c++/43704
2832 * typeck.c (incompatible_dependent_types_p): If one of the
2833 compared types if not a typedef then honour their main variant
2834 equivalence.
2835
2836 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2837
2838 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2839
2840 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2841
2842 PR c++/43704
2843 * typeck.c (structural_comptypes): Test dependent typedefs
2844 incompatibility before testing for their main variant based
2845 equivalence.
2846
2847 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2848
2849 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2850 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2851
2852 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2853
2854 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2855 build_common_tree_nodes.
2856
2857 2010-04-14 Jason Merrill <jason@redhat.com>
2858
2859 PR c++/36625
2860 * parser.c (cp_parser_parenthesized_expression_list): Change
2861 is_attribute_list parm to int to indicate whether or not to
2862 handle initial identifier specially.
2863 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2864
2865 2010-04-13 Jason Merrill <jason@redhat.com>
2866
2867 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2868 CLASS_TYPE_P.
2869 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2870 unevaluated context.
2871 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2872
2873 2010-04-12 Jason Merrill <jason@redhat.com>
2874
2875 PR c++/43641
2876 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2877 return value directly.
2878
2879 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2880
2881 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2882
2883 PR c++/25811
2884 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2885 * init.c (build_new_1): Check for uninitialized const members and
2886 uninitialized reference members, when using new without
2887 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2888 (diagnose_uninitialized_cst_or_ref_member): Define, call
2889 diagnose_uninitialized_cst_or_ref_member_1.
2890 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2891
2892 2010-04-12 Richard Guenther <rguenther@suse.de>
2893
2894 PR c++/43611
2895 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2896 template inline functions.
2897
2898 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2899
2900 PR c++/28584
2901 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2902 pointer type.
2903
2904 2010-04-07 Jason Merrill <jason@redhat.com>
2905
2906 PR c++/43016
2907 * decl.c (start_preparsed_function): Do defer nested functions.
2908
2909 PR c++/11094, DR 408
2910 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2911 * decl2.c (finish_static_data_member_decl): Set it.
2912 * decl.c (duplicate_decls): Propagate it.
2913 * pt.c (tsubst_decl): Don't substitute the domain of an array
2914 VAR_DECL if it's set.
2915 (regenerate_decl_from_template): Substitute it here.
2916 (type_dependent_expression_p): Return true if it's set.
2917 * semantics.c (finish_decltype_type): Instantiate such a variable.
2918 * typeck.c (cxx_sizeof_expr): Likewise.
2919 (strip_array_domain): New.
2920
2921 PR c++/43145
2922 * name-lookup.c (current_decl_namespace): Non-static.
2923 (pop_nested_namespace): Sanity check.
2924 * cp-tree.h: Declare current_decl_namespace.
2925 * decl.c (grokvardecl): Use it instead of current_namespace.
2926 (grokfndecl): Likewise.
2927
2928 PR c++/38392
2929 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2930 been used.
2931
2932 * pt.c (print_template_statistics): New.
2933 * cp-tree.h: Declare it.
2934 * tree.c (cxx_print_statistics): Call it.
2935
2936 PR c++/41970
2937 * decl.c (grokvardecl): Tweak warning message.
2938 (grokfndecl): Likewise.
2939
2940 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2941
2942 PR c++/42697
2943 *pt.c (tsubst_decl): Get the arguments of a specialization from
2944 the specialization template, not from the most general template.
2945
2946 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2947
2948 PR c++/40239
2949 * typeck2.c (process_init_constructor_record):
2950 value-initialize members that are are not explicitely
2951 initialized.
2952
2953 2010-04-07 Jie Zhang <jie@codesourcery.com>
2954
2955 PR c++/42556
2956 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2957 when all of its elements are non-constant and have been split out.
2958
2959 2010-04-06 Taras Glek <taras@mozilla.com>
2960 Jason Merrill <jason@redhat.com>
2961
2962 * parser.c (cp_parser_class_specifier): Set class location to that
2963 of IDENTIFIER_NODE instead of '{' when possible.
2964 * semantics.c (begin_class_definition): Do not overide locations
2965 with less precise ones.
2966
2967 2010-04-06 Jason Merrill <jason@redhat.com>
2968
2969 PR c++/43648
2970 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2971
2972 PR c++/43621
2973 * pt.c (maybe_update_decl_type): Check the return value from
2974 push_scope.
2975
2976 2010-04-01 Jason Merrill <jason@redhat.com>
2977
2978 * decl.c (next_initializable_field): No longer static.
2979 * cp-tree.h: Declare it.
2980 * call.c (build_aggr_conv): Fail if there are more initializers
2981 than initializable fields.
2982
2983 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2984 instead of void_zero_node.
2985
2986 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2987
2988 PR c++/43558
2989 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2990 * pt.c (end_template_parm_list): Store sibling template parms of
2991 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2992 (push_template_decl_real): Don't store the containing template decl
2993 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2994 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2995 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2996 Simplify the logic.
2997
2998 2010-03-30 Jason Merrill <jason@redhat.com>
2999
3000 PR c++/43076
3001 * pt.c (push_template_decl_real): Deal better with running out of
3002 scopes before running out of template parms.
3003
3004 PR c++/41185
3005 PR c++/41786
3006 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
3007 function parameter context. Don't print an error if parsing
3008 tentatively.
3009
3010 PR c++/43559
3011 * pt.c (more_specialized_fn): Don't control cv-qualifier check
3012 with same_type_p.
3013
3014 2010-03-26 Jason Merrill <jason@redhat.com>
3015
3016 PR c++/43509
3017 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
3018 c++0x mode, but not other type-names.
3019
3020 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3021
3022 PR c++/43327
3023 * pt.c (add_to_template_args): Support NULL ARGS;
3024 (most_specialized_class): call coerce_template_parms on
3025 template arguments passed to get_class_bindings. Use
3026 add_to_template_args.
3027 (unify): Handle VAR_DECLs.
3028
3029 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3030
3031 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
3032 into int.
3033 * pt.c (get_template_parms_at_level): Adjust.
3034
3035 2010-03-25 Dodji Seketeli <dodji@redhat.com>
3036
3037 PR c++/43206
3038 * cp-tree.h (get_template_parms_at_level): Declare ...
3039 * pt.c (get_template_parms_at_level): ... new function.
3040 * typeck.c (get_template_parms_of_dependent_type): If a template
3041 type parm's DECL_CONTEXT isn't yet set, get its siblings from
3042 current_template_parms. Use get_template_parms_at_level. Remove
3043 useless test.
3044 (incompatible_dependent_types_p): If we get empty parms from just one
3045 of the template type parms we are comparing then the template parms are
3046 incompatible.
3047
3048 2010-03-24 Jason Merrill <jason@redhat.com>
3049
3050 PR c++/43502
3051 * parser.c (make_declarator): Initialize id_loc.
3052 (cp_parser_lambda_declarator_opt): And set it.
3053
3054 2010-03-23 Jason Merrill <jason@redhat.com>
3055
3056 Make lambda conversion op and op() non-static.
3057 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
3058 Also add the thunk function returned by the conversion op.
3059 Mark the conversion deleted if the op() is variadic.
3060 * decl2.c (mark_used): Give helpful message about deleted conversion.
3061 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
3062 * semantics.c (finish_this_expr): Adjust.
3063 * mangle.c (write_closure_type_name): Adjust.
3064 * decl.c (grok_op_properties): Don't allow it.
3065 * call.c (build_user_type_conversion_1): No static conversion ops.
3066 (build_op_call): Or op().
3067
3068 * decl2.c (change_return_type): Fix 'this' quals.
3069
3070 2010-03-22 Jason Merrill <jason@redhat.com>
3071
3072 PR c++/43333
3073 * tree.c (pod_type_p): Use old meaning in C++98 mode.
3074
3075 PR c++/43281
3076 * pt.c (contains_auto_r): New fn.
3077 (do_auto_deduction): Use it.
3078 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
3079
3080 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
3081
3082 PR c++/43081:
3083 * decl2.c (grokfield): Handle invalid initializers for member
3084 functions.
3085
3086 2010-03-20 Dodji Seketeli <dodji@redhat.com>
3087
3088 PR c++/43375
3089 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
3090 is NULL.
3091 * decl2.c (vague_linkage_p): Likewise.
3092
3093 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
3094
3095 PR c++/43418
3096 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
3097 false, in the cp_parser_expression_statement call.
3098
3099 2010-03-05 Jason Merrill <jason@redhat.com>
3100
3101 * mangle.c (mangle_decl): Give name collision error even without
3102 ASM_OUTPUT_DEF.
3103
3104 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
3105
3106 * pt.c (process_partial_specialization): Use error_n instead of
3107 error.
3108
3109 2010-03-03 Jason Merrill <jason@redhat.com>
3110
3111 PR c++/12909
3112 * mangle.c (mangle_decl): Handle VAR_DECL, too.
3113
3114 2010-03-03 Jason Merrill <jason@redhat.com>
3115
3116 PR c++/12909
3117 * mangle.c: Include cgraph.h.
3118 (mangle_decl): If the mangled name will change in a later
3119 ABI version, make the later mangled name an alias.
3120 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
3121 * Make-lang.in (mangle.o): Depend on cgraph.h.
3122 * method.c (make_alias_for): Handle VAR_DECL, too.
3123 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
3124 * tree.c (no_linkage_check): Adjust.
3125 * decl.c (maybe_commonize_var): Adjust.
3126 * cp-tree.h: Adjust.
3127
3128 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
3129
3130 * pt.c (redeclare_class_template): Use error_n and inform_n.
3131
3132 2010-02-27 Mark Mitchell <mark@codesourcery.com>
3133
3134 PR c++/42748
3135 * cp-tree.h (push_tinst_level): Declare.
3136 (pop_tinst_level): Likewise.
3137 * pt.c (push_tinst_level): Give it external linkage.
3138 (pop_tinst_level): Likewise.
3139 * mangle.c (mangle_decl_string): Set the source location to that
3140 of the decl while mangling.
3141
3142 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
3143
3144 PR c++/42054
3145 * pt.c (redeclare_class_template): Return false if there are erroneous
3146 template parameters.
3147
3148 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
3149
3150 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3151 -ftemplate-depth=.
3152
3153 2010-02-24 Jason Merrill <jason@redhat.com>
3154
3155 PR c++/12909
3156 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3157
3158 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3159 in a previous ABI version.
3160
3161 2010-02-23 Jason Merrill <jason@redhat.com>
3162
3163 PR c++/43143
3164 * typeck2.c (digest_init_r): Accept value init of array.
3165
3166 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3167
3168 PR c++/43126
3169 * typeck.c (convert_arguments): Update error message.
3170
3171 2010-02-22 Mike Stump <mikestump@comcast.net>
3172
3173 PR c++/43125
3174 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3175
3176 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3177
3178 PR c++/23510
3179 * error.c (print_instantiation_partial_context_line): New.
3180 (print_instantiation_partial_context): Print at most 12 contexts,
3181 skip the rest with a message.
3182
3183 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3184
3185 PR c++/42824
3186 * pt.c (lookup_template_class): Better support of specialization
3187 of member of class template implicit instantiation.
3188
3189 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3190
3191 PR c++/35669
3192 * call.c (conversion_null_warnings): Replace -Wconversion with
3193 -Wconversion-null.
3194 * cvt.c (build_expr_type_conversion): Likewise.
3195
3196 2010-02-18 Jason Merrill <jason@redhat.com>
3197
3198 PR c++/42837
3199 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3200
3201 PR c++/43108
3202 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3203 C build_binary_op.
3204 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3205 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3206
3207 PR c++/43070
3208 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3209
3210 PR c++/26261
3211 PR c++/43101
3212 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3213 (maybe_update_decl_type): New fn.
3214 * parser.c (cp_parser_init_declarator): Use it.
3215
3216 PR c++/43109
3217 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3218
3219 2010-02-17 Jason Merrill <jason@redhat.com>
3220
3221 PR c++/43075
3222 * call.c (build_over_call): Don't create zero-sized assignments.
3223 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3224 * cp-objcp-common.c (cp_expr_size): Remove.
3225 * cp-tree.h: Remove prototype.
3226
3227 PR c++/43069
3228 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3229 decl we looked up doesn't match.
3230
3231 PR c++/43093
3232 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3233 have an INIT_EXPR anymore.
3234
3235 PR c++/43079
3236 * pt.c (convert_nontype_argument): Change assert to test.
3237
3238 2010-02-16 Jason Merrill <jason@redhat.com>
3239
3240 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3241
3242 PR c++/43031
3243 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3244 VIEW_CONVERT_EXPR for conversions between structural equality types
3245 that the back end can't tell are the same.
3246
3247 PR c++/43036
3248 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3249 cv-quals from element here.
3250 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3251
3252 2010-02-14 Jason Merrill <jason@redhat.com>
3253
3254 PR c++/41997
3255 * semantics.c (finish_compound_literal): Use
3256 cp_apply_type_quals_to_decl when creating a static variable.
3257
3258 2010-02-12 Jason Merrill <jason@redhat.com>
3259
3260 PR c++/43024
3261 * name-lookup.h (current_binding_level): Check for null
3262 cp_function_chain.
3263
3264 2010-02-12 Jason Merrill <jason@redhat.com>
3265
3266 PR c++/43054
3267 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3268
3269 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3270
3271 PR c++/43033
3272 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3273 instead of x.
3274
3275 2010-02-10 Jason Merrill <jason@redhat.com>
3276
3277 PR c++/41896
3278 * semantics.c (outer_lambda_capture_p): Revert.
3279 (add_capture): Only finish_member_declaration if
3280 we're in the lambda class.
3281 (register_capture_members): New.
3282 * cp-tree.h: Declare it.
3283 * parser.c (cp_parser_lambda_expression): Call it.
3284
3285 2010-02-10 Jason Merrill <jason@redhat.com>
3286
3287 PR c++/41896
3288 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3289 instead of current_class_type.
3290
3291 2010-02-10 Jason Merrill <jason@redhat.com>
3292
3293 PR c++/42983, core issue 906
3294 * method.c (defaultable_fn_check): Check virtualness.
3295
3296 2010-02-10 Jason Merrill <jason@redhat.com>
3297
3298 PR c++/43016
3299 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3300
3301 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3302
3303 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3304 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3305 translation.
3306 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3307 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3308 (cp_parser_parameter_declaration)
3309 (cp_parser_exception_specification_opt)
3310 (cp_parser_exception_declaration): Likewise.
3311 * pt.c (check_default_tmpl_args): Likewise.
3312 * search.c (lookup_field_r): Likewise.
3313
3314 2010-02-09 Jason Merrill <jason@redhat.com>
3315
3316 PR c++/42399
3317 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3318
3319 2010-02-09 Jason Merrill <jason@redhat.com>
3320
3321 PR c++/42370
3322 * decl2.c (change_return_type): New fn.
3323 * semantics.c (apply_lambda_return_type): Use it.
3324 * cp-tree.h: Declare it.
3325
3326 2010-02-05 Richard Guenther <rguenther@suse.de>
3327
3328 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3329 * cp-lang.c: Include gt-cp-cp-lang.h.
3330 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3331
3332 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3333
3334 PR c++/42915
3335 * typeck.c (get_template_parms_of_dependent_type): Try getting
3336 the template parameters fromt the type itself first.
3337
3338 2010-02-03 Jason Merrill <jason@redhat.com>
3339
3340 PR c++/4926
3341 PR c++/38600
3342 * mangle.c (write_unqualified_id): Split out from write_expression.
3343 (write_unqualified_name): Call it.
3344 (write_member_name): Likewise.
3345 (write_expression): Support TEMPLATE_ID_EXPR.
3346 Disambiguate operator names.
3347
3348 PR c++/12909
3349 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3350 -fabi-version=4.
3351
3352 2010-02-02 Jason Merrill <jason@redhat.com>
3353
3354 PR c++/41090
3355 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3356 * optimize.c (clone_body): Remap their initializers when making base
3357 variants.
3358 (maybe_clone_body): Complain if multiple clones aren't safe.
3359
3360 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3361
3362 PR c++/42758
3363 PR c++/42634
3364 PR c++/42336
3365 PR c++/42797
3366 PR c++/42880
3367 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3368 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3369 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3370 * pt.c (coerce_template_parms, type_unification_real,
3371 expand_template_argument_pack, coerce_template_parameter_pack):
3372 Set the non default template args count.
3373 (current_template_args): Always set non defaulted
3374 template args count when compiled with --enable-checking
3375 (tsubst_template_args, type_unification_real): Propagate the non
3376 defaulted template args count.
3377 * error.c (get_non_default_template_args_count): Renamed
3378 count_non_default_template_args into this. Don't calculate the
3379 non default template argument count anymore. Use the new
3380 accessor macros above to get it.
3381 (dump_template_argument_list, dump_type, dump_decl,
3382 dump_template_parms): Adjust.
3383 * parser.c (cp_parser_template_argument_list): Always set defaulted
3384 template args count when compiled with --enable-checking.
3385
3386 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3387
3388 * decl.c (redeclaration_error_message): Wrap the return messages into
3389 G_() for easy translation.
3390
3391 2010-01-28 Jason Merrill <jason@redhat.com>
3392
3393 PR c++/42880
3394 * semantics.c (begin_class_definition): Don't use type_as_string.
3395
3396 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3397
3398 PR c++/42713
3399 PR c++/42820
3400 * typeck.c (get_template_parms_of_dependent_type): Factorized
3401 this out of incompatible_template_type_parms_p
3402 (incompatible_dependent_types_p): Renamed
3403 incompatible_template_type_parms_p into this. Make it detect
3404 two incompatible dependent typedefs too.
3405 (structural_comptypes): Use incompatible_dependent_types_p.
3406 * pt.c (get_template_info):
3407 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3408
3409 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3410 Jason Merrill <jason@redhat.com>
3411
3412 * mangle.c (write_type): Mangle transparent record as member type.
3413 * semantics.c (begin_class_definition): Recognize decimal classes
3414 and set TYPE_TRANSPARENT_AGGR.
3415
3416 2010-01-20 Jason Merrill <jason@redhat.com>
3417
3418 PR c++/42338
3419 * mangle.c (write_expression): Handle tree codes that have extra
3420 arguments in the middle-end.
3421
3422 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3423
3424 PR c++/42038
3425 * except.c (expand_start_catch_block): Deal correctly with
3426 do_begin_catch returning error_mark_node.
3427
3428 2010-01-20 Jason Merrill <jason@redhat.com>
3429
3430 PR c++/41788
3431 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3432 non-PODs.
3433
3434 PR c++/41920
3435 * semantics.c (build_lambda_object): Call mark_used on captured
3436 variables.
3437
3438 PR c++/40750
3439 * decl.c (grokdeclarator): Clear type_quals for a member function
3440 declared using a typedef. Don't complain about adding cv-quals
3441 to a function typedef in C++0x mode.
3442
3443 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3444
3445 * decl.c (create_array_type_for_decl): Remove set but not used
3446 variable error_msg. Remove break stmts after return stmts.
3447
3448 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3449
3450 * error.c (dump_template_parms, count_non_default_template_args):
3451 Revert fix of PR c++/42634.
3452
3453 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3454
3455 PR c++/42634
3456 * error.c (dump_template_parms): Use innermost template
3457 arguments before calling count_non_default_template_args.
3458 (count_non_default_template_args): We are being called with
3459 template innermost arguments now. There is no need to ensure
3460 that again.
3461
3462 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3463
3464 PR c++/42766
3465 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3466
3467 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3468
3469 PR c++/42697
3470 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3471
3472 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3473
3474 PR c++/42697
3475 *pt.c (tsubst_decl): Get the arguments of a specialization from
3476 the specialization template, not from the most general template.
3477
3478 2010-01-16 Jason Merrill <jason@redhat.com>
3479
3480 PR c++/42761
3481 * semantics.c (finish_decltype_type): Within a template, treat
3482 unresolved CALL_EXPR as dependent.
3483
3484 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3485
3486 * error.c (dump_template_parms,count_non_default_template_args):
3487 Revert changes of PR c++/42634.
3488
3489 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3490
3491 PR middle-end/42674
3492 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3493 functions with noreturn attribute.
3494
3495 2010-01-14 Jason Merrill <jason@redhat.com>
3496
3497 PR c++/42701
3498 * call.c (build_new_method_call): Don't free the vec here.
3499
3500 PR c++/42655
3501 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3502
3503 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3504
3505 PR c++/42634
3506 * error.c (dump_template_parms): Use innermost template
3507 arguments before calling count_non_default_template_args.
3508 (count_non_default_template_args): We are being called with
3509 template innermost arguments now. There is no need to ensure
3510 that again.
3511
3512 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3513
3514 c++/40155
3515 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3516 arguments that were previously deduced.
3517
3518 2010-01-05 Jason Merrill <jason@redhat.com>
3519
3520 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3521 * call.c (build_over_call): Don't complain about it.
3522
3523 2010-01-04 Jason Merrill <jason@redhat.com>
3524
3525 PR c++/42555
3526 * pt.c (tsubst_decl): Don't apply type attributes in place.
3527
3528 PR c++/42567
3529 * semantics.c (describable_type): Remove decltype comment and
3530 semantics.
3531
3532
3533 \f
3534 Copyright (C) 2010 Free Software Foundation, Inc.
3535
3536 Copying and distribution of this file, with or without modification,
3537 are permitted in any medium without royalty provided the copyright
3538 notice and this notice are preserved.
3539