OSDN Git Service

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