OSDN Git Service

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