OSDN Git Service

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