OSDN Git Service

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