OSDN Git Service

2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2010-06-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2
3         PR c++/44486
4         * error.c (dump_decl): Better wording for anonymous namespace.
5
6 2010-06-16  Nathan Froyd  <froydnj@codesourcery.com>
7
8         * class.c (build_vtbl_initializer): Adjust computation of new_position
9         and which entry to add padding for.
10
11 2010-06-16  Jason Merrill  <jason@redhat.com>
12
13         * except.c (check_noexcept_r): Return the problematic function.
14         (finish_noexcept_expr): Give -Wnoexcept warning.  Add complain parm.
15         * pt.c (tsubst_copy_and_build): Pass it.
16         * parser.c (cp_parser_unary_expression): Likewise.
17         * cp-tree.h: Adjust prototype.
18
19         * method.c (defaulted_late_check): Give the defaulted method
20         the same exception specification as the implicit declaration.
21
22 2010-06-15  Jason Merrill  <jason@redhat.com>
23
24         * class.c (add_implicitly_declared_members): Implicit assignment
25         operators can also be virtual overriders.
26         * method.c (lazily_declare_fn): Likewise.
27
28         * call.c (convert_like_real): Give "initializing argument of"
29         information for ambiguous conversion.  Give source position
30         of function.
31
32         * call.c (print_z_candidates): Do print viable deleted candidates.
33         (joust): Don't choose a deleted function just because its worst
34         conversion is better than another candidate's worst.
35
36         * call.c (convert_like_real): Don't complain about
37         list-value-initialization from an explicit constructor.
38
39         * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
40         DECL_SOURCE_LOCATION directly.
41
42         * class.c (type_has_user_provided_default_constructor): Use
43         sufficient_parms_p.
44
45         * call.c (is_subseq): Handle ck_aggr, ck_list.
46         (compare_ics): Treat an aggregate or ambiguous conversion to the
47         same type as involving the same function.
48
49 2010-06-13  Shujing Zhao  <pearly.zhao@oracle.com>
50
51         * typeck.c (convert_for_assignment): Fix comment. Change message
52         format from %d to %qP.
53         (convert_for_initialization): Fix comment. 
54
55 2010-06-11  Shujing Zhao  <pearly.zhao@oracle.com>
56
57         * cp-tree.h (expr_list_kind): New type.
58         (impl_conv_rhs): New type.
59         (build_x_compound_expr_from_list, convert_for_initialization): Adjust
60         prototype.
61         (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
62         diagnostics for easy translation. Change caller.
63         (convert_for_initialization): Use impl_conv_rhs and change caller.
64         (build_x_compound_expr_from_list): Use expr_list_kind and emit the
65         diagnostics for easy translation. Change caller.
66         * decl.c (bad_spec_place): New enum.
67         (bad_specifiers): Use it and emit the diagnostics for easy
68         translation. Change caller.
69         * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
70
71 2010-06-09  Nathan Froyd  <froydnj@codesourcery.com>
72
73         * cp-tree.h (struct saved_scope): Change decl_ns_list field type
74         to a VEC.
75         * decl2.c (cp_write_global_declarations): Adjust for new type of
76         decl_namespace_list.
77         * name-lookup.c (current_decl_namespace): Likewise.
78         (push_decl_namespace): Likewise.
79         (pop_decl_namespace): Likewise.
80
81 2010-06-09  Nathan Froyd  <froydnj@codesourcery.com>
82
83         * call.c (build_java_interface_fn_ref): Call build_function_type_list
84         instead of build_function_type.
85         * decl.c (cxx_init_decl_processing): Likewise.
86         (declare_global_var): Likewise.
87         (get_atexit_node): Likewise.
88         (expand_static_init): Likewise.
89         * decl2.c (start_objects): Likewise.
90         (start_static_storage_duration_function): Likewise.
91         * except.c (init_exception_processing): Likewise.
92         (build_exc_ptr): Likewise.
93         (build_throw): Likewise.
94         * rtti.c (throw_bad_cast): Likewise.
95         (throw_bad_typeid): Likewise.
96         (build_dynamic_cast_1): Likewise.
97
98 2010-06-09  Nathan Froyd  <froydnj@codesourcery.com>
99
100         * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
101         (build_op_delete_call): Likewise.
102         (build_over_call): Likewise.
103         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
104         * pt.c (process_partial_specialization): Likewise.
105         (tsubst_template_args): Likewise.
106         * semantics.c (finish_asm_stmt): Likewise.
107
108 2010-06-08  Nathan Sidwell  <nathan@codesourcery.com>
109
110         * decl.c (record_key_method_defined): New, broken out of ...
111         (finish_function): ... here.  Call it.  
112         (start_decl): Treat aliases as definitions.
113
114 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
115
116         * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
117
118         * pt.c (maybe_process_partial_specialization): Likewise.
119         (register_specialization): Likewise.
120         (add_pending_template): Likewise.
121         (lookup_template_class): Likewise.
122         (push_tinst_level): Likewise.
123
124         * parser.c (cp_lexer_new_main): Likewise.
125         (cp_lexer_new_from_tokens): Likewise.
126         (cp_token_cache_new): Likewise.
127         (cp_parser_context_new): Likewise.
128         (cp_parser_new): Likewise.
129         (cp_parser_nested_name_specifier_opt): Likewise.
130         (cp_parser_template_id): Likewise.
131
132         * name-lookup.c (binding_entry_make): Likewise.
133         (binding_table_construct): Likewise.
134         (binding_table_new): Likewise.
135         (cxx_binding_make): Likewise.
136         (pushdecl_maybe_friend): Likewise.
137         (begin_scope): Likewise.
138         (push_to_top_level): Likewise.
139
140         * lex.c (init_reswords): Likewise.
141         (retrofit_lang_decl): Likewise.
142         (cxx_dup_lang_specific_decl): Likewise.
143         (copy_lang_type): Likewise.
144         (cxx_make_type): Likewise.
145
146         * decl.c (make_label_decl): Likewise.
147         (check_goto): Likewise.
148         (start_preparsed_function): Likewise.
149         (save_function_data): Likewise.
150
151         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
152
153         * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
154
155         * class.c (finish_struct_1): Likewise.
156
157         * cp-tree.h (struct lang_type): Add variable_size GTY option.
158         (struct lang_decl): Likewise.
159
160         * parser.c (cp_parser_new): Update comment to not reference
161         ggc_alloc.
162
163 2010-06-07  Jason Merrill  <jason@redhat.com>
164
165         PR c++/44366
166         * error.c (dump_parameters): Mask out TFF_SCOPE.
167         (dump_simple_decl): Don't print the scope of a PARM_DECL.
168         (dump_scope): Remove no-op mask.
169
170         PR c++/44401
171         * parser.c (cp_parser_lookup_name): Fix naming the constructor.
172
173         * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
174         * init.c (build_offset_ref): Use it.
175         * pt.c (maybe_process_partial_specialization): Use it.
176         (instantiate_class_template): Use it.
177         * search.c (lookup_base): Use it.
178
179 2010-06-07  Jakub Jelinek  <jakub@redhat.com>
180
181         PR c++/44444
182         * expr.c (mark_exp_read): Handle INDIRECT_REF.
183         * cvt.c (convert_to_void): Handle INDIRECT_REF like
184         handled_component_p.
185
186         PR c++/44443
187         * decl.c (initialize_local_var): If TREE_USED is set on the type,
188         set also DECL_READ_P on the decl.
189
190 2010-05-25  Dodji Seketeli  <dodji@redhat.com>
191
192         PR c++/44188
193         * cp-tree.h (typedef_variant_p): Move this declaration to
194         gcc/tree.h.
195         * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
196         * decl.c (grokdeclarator): Do not rename debug info of an
197         anonymous tagged type named by a typedef.
198
199 2010-06-05  Fabien Chêne  <fabien@gcc.gnu.org>
200
201         PR c++/44086
202         * class.c (check_field_decls): Move the call to
203         check_bitfield_decl before trying to set the
204         CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
205
206 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
207
208         * typeck.c: Update include path for moved files.
209         * decl.c: Likewise.
210         * rtti.c: Likewise.
211         * cp-gimplify.c: Likewise.
212         * cp-lang.c: Likewise.
213         * pt.c: Likewise.
214         * semantics.c: Likewise.
215         * cxx-pretty-print.h: Likewise.
216         * decl2.c: Likewise.
217         * parser.c: Likewise.
218         * cp-objcp-common.c: Likewise.
219         * cp-tree.h: Likewise.
220         * name-lookup.c: Likewise.
221         * lex.c: Likewise.
222         * name-lookup.h: Likewise.
223         * config-lang.in: Update paths in gtfiles for files in c-family/.
224         * Make-lang.in: Likewise.
225
226 2010-06-04  Magnus Fromreide  <magfr@lysator.liu.se>
227
228         * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
229         * typeck.c (build_ptrmemfunc): Likewise.
230
231 2010-06-04  Jason Merrill  <jason@redhat.com>
232
233         * typeck2.c (merge_exception_specifiers): Adjust merging of
234         throw() and noexcept(true).
235
236         * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
237         using an uninitialized variable.
238
239         * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
240         (pp_cxx_expression): Likewise.
241
242         Implement noexcept-specification (15.4)
243         * parser.c (cp_parser_exception_specification_opt): Parse it.
244         Give -Wdeprecated warning about throw() specs.
245         * pt.c (tsubst_exception_specification): Handle it.
246         * error.c (dump_exception_spec): Handle it.
247         (dump_expr): Handle NOEXCEPT_EXPR.
248         * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
249         * typeck.c (comp_except_specs): Handle compatibility rules.
250         Change exact parm to take an enum.
251         * typeck2.c (merge_exception_specifiers): Handle noexcept.
252         * except.c (nothrow_spec_p, type_noexcept_p): New fns.
253         (type_throw_all_p, build_noexcept_spec): New fns.
254         * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
255         (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
256         (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
257         (noexcept_true_spec, noexcept_false_spec): New macros.
258         * name-lookup.c (pushdecl_maybe_friend): Adjust.
259         * search.c (check_final_overrider): Adjust.
260         * decl.c (check_redeclaration_exception_specification): Adjust.
261         (use_eh_spec_block): Use type_throw_all_p.
262         (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
263         Give operator new a noexcept-specification in C++0x mode.
264         * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
265         (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
266
267         Implement noexcept operator (5.3.7)
268         * cp-tree.def (NOEXCEPT_EXPR): New.
269         * except.c (check_noexcept_r, finish_noexcept_expr): New.
270         * cp-tree.h: Declare finish_noexcept_expr.
271         * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
272         * pt.c (tsubst_copy_and_build): And tsubst it.
273         (type_dependent_expression_p): Handle it.
274         (value_dependent_expression_p): Handle it.
275
276         * call.c (build_conditional_expr): Never fold in unevaluated context.
277         * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
278         * semantics.c (simplify_aggr_init_expr): Likewise.
279         * typeck.c (merge_types): Call merge_exception_specifiers.
280         * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
281         DECL_ANTICIPATED for preferring new type.
282
283 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
284
285         * g++spec.c (lang_specific_driver): Use GCC-specific formats in
286         diagnostics.
287
288 2010-06-04  Jakub Jelinek  <jakub@redhat.com>
289
290         PR c++/44412
291         * typeck.c (build_class_member_access_expr): Call mark_exp_read
292         on object for static data members.
293
294 2010-06-04  Jakub Jelinek  <jakub@redhat.com>
295             Jason Merrill  <jason@redhat.com>
296
297         PR c++/44362
298         * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
299         with the same type, call mark_lvalue_use on both.
300
301 2010-06-03  Nathan Froyd  <froydnj@codesourcery.com>
302
303         * class.c (struct vtbl_init_data_s): Remove last_init field.
304         (struct secondary_vptr_vtt_init_data_s): Change type of inits field
305         to a VEC.
306         (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
307         initializers.
308         (build_vtt): Likewise.
309         (initialize_vtable): Take a VEC instead of a tree.
310         (build_vtt_inits): Change return type to void.  Take a VEC **
311         instead of a tree *; accumulate results into said VEC.
312         (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
313         accumulated initializers.  Pass the vtable to accumulate_vtbl_inits.
314         (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
315         instead of a tree.
316         (dfs_accumulate_vtbl_inits): Likewise.  Change return type to void.
317         (build_vtbl_initializer): Add VEC parameter; accumulate initializers
318         into it.
319         (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
320         rather than tree_cons.
321         (build_vbase_offset_vtbl_entries): Likewise.
322         (add_vcall_offset): Likewise.
323         (build_rtti_vtbl_entries): Likewise.
324         * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
325         * decl.c (initialize_artificial_var): Use build_constructor instead
326         of build_constructor_from_list.
327
328 2010-06-03  H.J. Lu  <hongjiu.lu@intel.com>
329
330         PR c++/44294
331         * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
332         bit-field.
333
334 2010-06-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
335
336         * parser.c (cp_parser_mem_initializer_list): Change error text.
337
338 2010-06-02  Jakub Jelinek  <jakub@redhat.com>
339
340         * cp-objcp-common.c (shadowed_var_for_decl): Change into
341         tree_decl_map hashtab from tree_map.
342         (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
343         (init_shadowed_var_for_decl): Adjust initialization.
344
345         PR c++/44361
346         * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
347         instead of calling mark_exp_read only when not an assignment.
348
349         PR debug/44367
350         * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
351         DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
352         Set DECL_VALUE_EXPR on var.
353
354 2010-06-02  Jason Merrill  <jason@redhat.com>
355
356         * error.c (dump_type): Improve typedef handling.
357
358         PR c++/9726
359         PR c++/23594
360         PR c++/44333
361         * name-lookup.c (same_entity_p): New.
362         (ambiguous_decl): Multiple declarations of the same entity
363         are not ambiguous.
364
365 2010-06-01  Jason Merrill  <jason@redhat.com>
366
367         DR 990
368         * call.c (add_list_candidates): Prefer the default constructor.
369         (build_aggr_conv): Treat missing initializers like { }.
370         * typeck2.c (process_init_constructor_record): Likewise.
371         * init.c (expand_default_init): Use digest_init for
372         direct aggregate initialization, too.
373
374         * call.c (add_list_candidates): Split out...
375         (build_user_type_conversion_1): ...from here.
376         (build_new_method_call): And here.
377         (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
378
379         PR c++/44358
380         * call.c (build_list_conv): Set list-initialization flags properly.
381
382 2010-06-01  Nathan Froyd  <froydnj@codesourcery.com>
383
384         * typeck2.c (build_x_arrow): Make types_memoized a VEC.
385
386 2010-06-01  Arnaud Charlet  <charlet@adacore.com>
387             Matthew Gingell  <gingell@adacore.com>
388
389         * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
390         * decl2.c: Include langhooks.h and c-ada-spec.h.
391         (cpp_check, collect_source_refs, collect_ada_namespace,
392         collect_all_refs): New functions.
393         (cp_write_global_declarations): Add handling of -fdump-ada-spec.
394         * lang-specs.h: Ditto.
395
396 2010-05-29  Nathan Froyd  <froydnj@codesourcery.com>
397
398         * cp-tree.h (cp_build_function_call_nary): Declare.
399         * typeck.c (cp_build_function_call_nary): Define.
400         * decl.c (register_dtor_fn): Use it instead of
401         cp_build_function_call.
402         (cxx_maybe_build_cleanup): Likewise.
403         * decl2.c (generate_ctor_or_dtor_function): Likewise.
404         * except.c (do_get_exception_ptr): Likewise.
405         (do_begin_catch): Likewise.
406         (do_allocate_exception): Likewise.
407         (do_free_exception): Likewise.
408         (build_throw): Likewise.  Use cp_build_function_call_vec instead
409         of cp_build_function_call.
410         (do_end_catch): Likewise.
411
412 2010-05-29  Nathan Froyd  <froydnj@codesourcery.com>
413
414         * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
415         (struct cp_declarator): Move id_loc field up.
416
417 2010-05-29  Steven Bosscher  <steven@gcc.gnu.org>
418
419         * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove.  Require that
420         this file is included before c-common.h.  Define GCC_DIAG_STYLE
421         before including diagnostic-core.h and toplev.h.
422         (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
423         * pt.c: Include cp-tree.h before c-common.h.
424
425 2010-05-29  Steven Bosscher  <steven@gcc.gnu.org>
426
427         * tree.c (c_register_addr_space): Add stub.
428
429 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
430
431         * g++spec.c (lang_specific_driver): Use fatal_error instead of
432         fatal.
433
434 2010-05-28  Dodji Seketeli  <dodji@redhat.com>
435
436         Revert fix of PR c++/44188
437         * cp-tree.h (typedef_variant_p): Revert moving this declaration to
438         gcc/tree.h.
439         * tree.c (typedef_variant_p): Revert moving this definition to
440         gcc/tree.c.
441         * decl.c (grokdeclarator): Revert naming typedef handling.
442
443 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
444
445         * call.c: Include diagnostic-core.h instead of diagnostic.h.
446         * cp-lang.c: Don't include diagnostic.h
447         * name-lookup.c: Include diagnostic-core.h instead of
448         diagnostic.h.
449         (cp_emit_debug_info_for_using): Use seen_error.
450         * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
451         * parser.c: Include diagnostic-core.h instead of diagnostic.h.
452         * pt.c (iterative_hash_template_arg): Use seen_error.
453         * repo.c: Include diagnostic-core.h instead of diagnostic.h.
454         * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
455         * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
456         cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
457         dependencies.
458
459 2010-05-25  Dodji Seketeli  <dodji@redhat.com>
460
461         PR c++/44188
462         * cp-tree.h (typedef_variant_p): Move this declaration to
463         gcc/tree.h.
464         * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
465         * decl.c (grokdeclarator): Do not rename debug info of an
466         anonymous tagged type named by a typedef.
467
468 2010-05-27  Jason Merrill  <jason@redhat.com>
469
470         PR c++/43555
471         * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
472         anonymous VLA size.
473
474 2010-05-27  Kai Tietz  <kai.tietz@onevision.com>
475
476         PR bootstrap/44287
477         * rtti.c (emit_support_tinfos): Check for NULL_TREE.
478         * class.c (layout_class_type): Likewise.
479         * decl.c (finish_enum): Likewise.
480         * mangle.c (write_builitin_type): Likewise.
481
482 2010-05-26  Kai Tietz  <kai.tietz@onevision.com>
483
484         * cp-tree.h (cp_decl_specifier_seq): Add new bifield
485         explicit_int128_p.
486         * decl.c (grokdeclarator): Handle __int128.
487         * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
488         (cp_parser_simple_type_specifier): Likewise.
489         * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
490         * typeck.c (cp_common_type): Handle __int128.
491         * mangle.c (integer_type_codes): Add itk_int128 and
492         itk_unsigned_int128.
493
494 2010-05-26  Jason Merrill  <jason@redhat.com>
495
496         PR c++/43382
497         * pt.c (tsubst_pack_expansion): Don't get confused by recursive
498         unification.
499
500 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
501
502         * cp-lang.c: Do not include expr.h.
503
504 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
505
506         * decl.c: Do not include rtl.h
507         * semantics.c: Likewise.
508
509 2010-05-25  Steven Bosscher  <steven@gcc.gnu.org>
510
511         * cp-tree.h: Do not include splay-tree.h.
512         (struct prtmem_cst): Remove unused field and false comment.
513         * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
514         * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
515         * init.c: Do not include rtl.h and expr.h.
516         * class.c: Do not include rtl.h.  Include splay-tree.h.
517         (build_clone): Use plain NULL instead of NULL_RTX.
518         * decl.c: Do not include expr.h.  Explain why rtl.h has to be
519         included.  Include splay-tree.h.
520         * method.c: Do not include rtl.h and expr.h.
521         (use_thunk): Use plain NULL instead of NULL_RTX.
522         * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
523         * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
524         and target.h.  Include splay-tree.h.
525         * expr.c: Do not include rtl.h and expr.h.
526         * pt.c: Do not include obstack.h and rtl.h.
527         (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
528         (tsubst_decl): Likewise.
529         (instantiate_decl): Likewise.
530         * semantics.c: Do not include exprt.h and debug.h.  Explain why
531         rtl.h has to be included.
532         * decl2.c: Do not include rtl.h and expr.h.  Include splay-tree.h.
533         * call.c: Do not include rtl.h and expr.h.
534         * search.c: Do not include obstack.h and rtl.h.
535         * friend.c: Do not include rtl.h and expr.h.
536         * Make-lang.in: Update dependencies.
537
538 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
539
540         PR c++/18249
541         * parser.c (non_integral_constant): Add NIC_NONE.
542         (required_token): Add RT_NONE.
543         (cp_parser_unary_expression): Initialize non_constant_p
544         to NIC_NONE.
545         (cp_parser_asm_definition): Initialize missing to RT_NONE.
546         (cp_parser_primary_expression, cp_parser_postfix_expression,
547         cp_parser_cast_expression, cp_parser_binary_expression,
548         cp_parser_functional_cast): Fix formatting.
549
550 2010-05-25  Shujing Zhao  <pearly.zhao@oracle.com>
551         
552         PR c++/18249
553         * parser.c: Remove inclusion of dyn-string.h.
554         (non_integral_constant): New enum.
555         (name_lookup_error): New enum.
556         (required_token): New enum.
557         (cp_parser_required_error): New function.
558         (cp_parser_require): Change the type of variable token_desc to
559         required_token and use cp_parser_required_error.
560         (cp_parser_require_keyword): Likewise.
561         (cp_parser_error): Use gmsgid as parameter.
562         (cp_parser_name_lookup_error): Change the type of variable desired to
563         name_lookup_error and put the diagnostic in the full sentences. Change
564         caller.
565         (cp_parser_non_integral_constant_expression): Change the type of the
566         variable thing to non_integral_constant and put the diagnostics in
567         full sentences. Change caller.
568
569 2010-05-24  Eric Botcazou  <ebotcazou@adacore.com>
570
571         PR middle-end/44100
572         * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
573
574 2010-05-24  Joseph Myers  <joseph@codesourcery.com>
575
576         * error.c (cp_diagnostic_starter): Update call to
577         diagnostic_build_prefix.
578         (cp_print_error_function,
579         print_instantiation_partial_context_line): Check show_column flag
580         in context.
581
582 2010-05-24  Jason Merrill  <jason@redhat.com>
583
584         PR c++/41510
585         * decl.c (check_initializer): Don't wrap an init-list in a
586         TREE_LIST.
587         * init.c (build_aggr_init): Don't assume copy-initialization if
588         init has CONSTRUCTOR_IS_DIRECT_INIT.
589         * call.c (build_new_method_call): Sanity check.
590
591 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
592
593         * rtti.c (tinfo_base_init): Use build_constructor instead of
594         build_constructor_from_list.  Don't cons a tree node for
595         returning.
596         (generic_initializer): Use build_constructor_single instead of
597         build_constructor_from_list.
598         (ptr_initializer): Use build_constructor instead of
599         build_constructor_from_list
600         (ptm_initializer): Likewise.
601         (class_initializer): Likewise.  Take varargs instead of TRAIL.
602         (get_pseudo_ti_init): Adjust calls to class_initializer.  Use
603         build_constructor instead of build_constructor_from_list.
604
605 2010-05-22  Steven Bosscher  <steven@gcc.gnu.org>
606
607         * semantics.c: Include bitmap.h.
608         * Make-lang.in: Update dependencies.
609
610 2010-05-22  Jan Hubicka  <jh@suse.cz>
611
612         * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
613         comdat vtables.
614         (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
615
616 2010-05-21  Joseph Myers  <joseph@codesourcery.com>
617
618         * cxx-pretty-print.c: Correct merge error.
619
620 2010-05-21  Joseph Myers  <joseph@codesourcery.com>
621
622         * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
623         (cp_print_error_function): Use diagnostic_abstract_origin macro.
624         (cp_printer): Handle %K here using percent_K_format.
625         * cxx-pretty-print.c: Include tree-pretty-print.h.
626         * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
627         dependencies.
628
629 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
630
631         * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
632         Clean up redundant includes.
633
634 2010-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
635
636         PR c++/30298
637         * decl.c (xref_basetypes): Return false in case of ill-formed
638         redefinition.
639
640 2010-05-19  Jason Merrill  <jason@redhat.com>
641
642         * call.c (reference_binding): Use cp_build_qualified_type_real
643         and cp_type_quals consistently.
644         (add_function_candidate): Likewise.
645         (build_conditional_expr): Likewise.
646         (convert_like_real): Likewise.
647         (type_passed_as): Likewise.
648         * class.c (add_method): Likewise.
649         (same_signature_p): Likewise.
650         (layout_class_type): Likewise.
651         * decl.c (cxx_init_decl_processing): Likewise.
652         (cp_fname_init): Likewise.
653         (grokdeclarator): Likewise.
654         * decl2.c (cp_reconstruct_complex_type): Likewise.
655         * init.c (build_new_1): Likewise.
656         * method.c (do_build_copy_constructor): Likewise.
657         (implicitly_declare_fn): Likewise.
658         * pt.c (tsubst_aggr_type): Likewise.
659         (tsubst): Likewise.
660         * rtti.c (init_rtti_processing): Likewise.
661         (build_headof): Likewise.
662         (build_dynamic_cast_1): Likewise.
663         (tinfo_base_init): Likewise.
664         (emit_support_tinfos): Likewise.
665         * semantics.c (capture_decltype): Likewise.
666         * tree.c (cv_unqualified): Likewise.
667         * typeck.c (composite_pointer_type): Likewise.
668         (string_conv_p): Likewise.
669
670         * mangle.c (write_CV_qualifiers_for_type): Tweak.
671
672         * call.c (initialize_reference): Use CP_TYPE_CONST_P.
673         * decl.c (start_decl): Likewise.
674         * semantics.c (finish_compound_literal): Likewise.
675         * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
676         (cp_type_readonly): Remove.
677         * cp-tree.h: Remove declaration.
678
679         * typeck.c (merge_types): Preserve memfn quals.
680
681         * decl.c (grokdeclarator): Don't check quals on fn type.
682         * typeck.c (cp_apply_type_quals_to_decl): Likewise.
683         * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
684
685         PR c++/44193
686         * typeck.c (type_memfn_quals): New fn.
687         (apply_memfn_quals): New fn.
688         (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
689         (cp_type_readonly): Use cp_type_quals.
690         * cp-tree.h: Add declarations.
691         * tree.c (cp_build_qualified_type_real): Don't set, but do
692         preserve, quals on FUNCTION_TYPE.
693         (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
694         * decl.c (build_ptrmem_type): Likewise.
695         (grokdeclarator): Likewise.
696         (static_fn_type): Likewise.
697         * decl2.c (change_return_type): Likewise.
698         (cp_reconstruct_complex_type): Likewise.
699         * pt.c (tsubst_function_type): Likewise.
700         (unify): Likewise.
701         (tsubst): Likewise.  Drop special FUNCTION_TYPE substitution code.
702
703 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
704
705         * tree.c (build_min_non_dep_call_vec): Update comment.
706
707 2010-05-17  Jason Merrill  <jason@redhat.com>
708
709         * call.c (struct z_candidate): Add explicit_targs field.
710         (add_template_candidate_real): Set it.
711         (build_over_call): Use it to control init-list warning.
712
713         PR c++/44157
714         * call.c (build_over_call): Limit init-list deduction warning to
715         cases where the argument is actually an init-list.
716
717         PR c++/44158
718         * call.c (build_over_call): Don't do bitwise copy for move ctor.
719
720 2010-05-17  Dodji Seketeli  <dodji@redhat.com>
721             Jason Merrill  <jason@redhat.com>
722
723         PR c++/44108
724         * decl.c (compute_array_index_type): Call mark_rvalue_use.
725
726 2010-05-15  Jason Merrill  <jason@redhat.com>
727
728         * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
729         * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
730         TYPE_NOEXCEPT_P.
731         (finish_eh_spec_block): Adjust.
732
733 2010-05-15  Jakub Jelinek  <jakub@redhat.com>
734
735         PR c++/44148
736         * pt.c (tsubst): Unshare template argument.
737
738 2010-05-15  Steven Bosscher  <steven@gcc.gnu.org>
739
740         * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
741         * Make-lang.in: Fix dependencies accordingly.
742
743 2010-05-14  Jason Merrill  <jason@redhat.com>
744
745         C++ DR 475
746         * except.c (build_throw): Simplify, adjust for DR 475.
747
748         PR c++/44127
749         * except.c (dtor_nothrow): Return nonzero for type with
750         trivial destructor.
751
752         PR c++/44127
753         * cp-gimplify.c (gimplify_must_not_throw_expr): Use
754         gimple_build_eh_must_not_throw.
755
756 2010-05-14  Martin Jambor  <mjambor@suse.cz>
757
758         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
759         and define.
760
761 2010-05-14  Jonathan Wakely  <jwakely.gcc@gmail.com>
762
763         * call.c (build_new_method_call): Change warning text.
764         * typeck2.c (build_functional_cast): Change error text.
765
766 2010-05-14  Shujing Zhao  <pearly.zhao@oracle.com>
767
768         PR c++/30566
769         * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
770         shadowing the outer parameter or variables by the declaration of
771         nested function in nested structure or class. Warn the shadowing by
772         the declaration of nested lambda expression.
773
774 2010-05-13  Jason Merrill  <jason@redhat.com>
775
776         * typeck.c (cp_build_array_ref): Factor out from...
777         (build_array_ref): ...here.  Drop complain parm.
778         (build_new_op): Adjust.
779         * class.c (build_vtbl_ref_1): Adjust.
780         * decl2.c (grok_array_decl): Adjust.
781         * cp-tree.h: Adjust prototypes.
782
783 2010-05-13  Jan Hubicka  <jh@suse.cz>
784
785         * decl.c (cp_finish_decl): Do not worry about used attribute.
786
787 2010-05-12  Jason Merrill  <jason@redhat.com>
788
789         * typeck.c (build_array_ref): Take complain parm.
790         * cp-tree.h: Add it to prototype.
791         * call.c (build_new_op): Pass it.
792         * class.c (build_vtbl_ref): Pass it.
793         * decl2.c (grok_array_decl): Pass it.
794
795         PR bootstrap/44048
796         PR target/44099
797         * cp-tree.def (NULLPTR_TYPE): Remove.
798         * cp-tree.h (NULLPTR_TYPE_P): New.
799         (SCALAR_TYPE_P): Use it.
800         (nullptr_type_node): New.
801         (cp_tree_index): Add CPTI_NULLPTR_TYPE.
802         * decl.c (cxx_init_decl_processing): Call record_builtin_type on
803         nullptr_type_node.
804         * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
805         * cxx-pretty-print.c (pp_cxx_constant): Likewise.
806         * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
807         * mangle.c (write_type): Likewise.
808         * name-lookup.c (arg_assoc_type): Likewise.
809         * typeck.c (build_reinterpret_cast_1): Likewise.
810         * rtti.c (typeinfo_in_lib_p): Likewise.
811         (emit_support_tinfos): Remove local nullptr_type_node.
812
813         * cp-tree.h (UNKNOWN_TYPE): Remove.
814         * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
815         * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
816         * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
817         * class.c (instantiate_type): Check unknown_type_node rather than
818         UNKNOWN_TYPE.
819         * name-lookup.c (maybe_push_decl): Likewise.
820         * rtti.c (get_tinfo_decl_dynamic): Likewise.
821         (get_typeid): Likewise.
822         * semantics.c (finish_offsetof): Likewise.
823
824         PR c++/20669
825         * call.c (add_template_candidate_real): If deduction fails, still
826         add the template as a non-viable candidate.
827         (equal_functions): Handle template candidates.
828         (print_z_candidate): Likewise.
829         (print_z_candidates): Likewise.
830         (build_new_function_call): Likewise.
831
832         * cp-tree.h (LOOKUP_LIST_ONLY): New.
833         * call.c (add_candidates): Enforce it.
834         (build_new_method_call): Try non-list ctor if no viable list ctor.
835         (build_user_type_conversion_1): Likewise.
836
837         * call.c (add_candidates): Distinguish between type(x) and
838         x.operator type().
839         (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
840         (build_new_method_call): Give better error for conversion op.
841
842         * call.c (add_candidates): Add first_arg and return_type parms.
843         Add special constructor/conversion op handling.
844         (convert_class_to_reference): Use it.
845         (build_user_type_conversion_1): Likewise.
846         (build_op_call): Likewise.
847         (build_new_method_call): Likewise.
848         (build_new_op): Adjust.
849         (perform_overload_resolution): Adjust.
850
851 2010-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
852
853         PR c++/34272
854         PR c++/43630
855         PR c++/34491
856         * pt.c (process_partial_specialization): Return error_mark_node
857         in case of unused template parameters in partial specialization.
858
859 2010-05-11  Jakub Jelinek  <jakub@redhat.com>
860
861         PR c++/44062
862         * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
863         * cvt.c (convert_to_void): ... but here.  If expr is a COMPOUND_EXPR,
864         look at its second operand.
865
866 2010-05-10  Jason Merrill  <jason@redhat.com>
867
868         PR c++/44017
869         * semantics.c (baselink_for_fns): Revert earlier change.
870
871         PR c++/44045
872         * typeck.c (cp_build_modify_expr): Complain about assignment to
873         array from init list.
874
875 2010-05-10  Fabien Chêne  <fabien.chene@gmail.com>
876
877         PR c++/43719
878         * decl.c (check_initializer): strip array type before checking for
879         uninitialized const or ref members.
880
881 2010-05-07  Fabien Chêne  <fabien.chene@gmail.com>
882
883         PR c++/43951
884         * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
885         error count. Emit errors only if compain is true.
886         (build_new_1): Do not return error_mark_node if
887         diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
888         errors. Delay the check for user-provided constructor.
889         (perform_member_init): Adjust.
890         * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
891         prototype.
892
893 2010-05-06  Magnus Fromreide  <magfr@lysator.liu.se>
894             Jason Merrill  <jason@redhat.com>
895
896         Add support for C++0x nullptr.
897         * cp-tree.def: Add NULLPTR_TYPE.
898         * cp-tree.h: Add nullptr_node.
899         (cp_tree_index): Add CPTI_NULLPTR.
900         (SCALAR_TYPE_P): Add NULLPTR_TYPE.
901         * call.c (null_ptr_cst_p): Handle nullptr.
902         (standard_conversion): Likewise.
903         (convert_arg_to_ellipsis): Likewise.
904         * mangle.c (write_type): Likewise.
905         * name-lookup.c (arg_assoc_type): Likewise.
906         * parser.c (cp_parser_primary_expression): Likewise.
907         * typeck.c (cp_build_binary_op): Likewise.
908         (build_reinterpret_cast_1): Likewise.
909         * error.c (dump_type): Likewise.
910         (dump_type_prefix, dump_type_suffix): Likewise.
911         * decl.c (cxx_init_decl_processing): Likewise.
912         * cxx-pretty-print.c (pp_cxx_constant): Likewise.
913         * cvt.c (ocp_convert): Likewise.
914         * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
915         nullptr_t tinfo in libsupc++.
916
917 2010-05-06  Jason Merrill  <jason@redhat.com>
918
919         * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
920
921 2010-04-22  Jakub Jelinek <jakub@redhat.com>
922             Dodji Seketeli <dodji@redhat.com>
923
924         PR c/18624
925         * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
926         Declare ...
927         * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
928         * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
929         (decay_conversion, perform_integral_promotions): Call rvalue_use.
930         (cp_build_unary_op): Call lvalue_use.
931         * decl.c (unused_but_set_errorcount): New variable.
932         (poplevel): Issue -Wunused-but-set-variable diagnostics.
933         (duplicate_decls): Merge DECL_READ_P flags.
934         (start_cleanup_fn): Set DECL_READ_P flag.
935         (finish_function): Issue -Wunused-but-set-parameter diagnostics.
936         * tree.c (rvalue): Call rvalue_use.
937         * pt.c (convert_nontype_argument): Likewise.
938         * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
939         finish_decltype_type): Likewise.
940         * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
941         (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
942         or rvalue_use depending on the expr.
943         * init.c (build_new, build_delete): Likewise.
944         * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
945
946 2010-05-05  Jason Merrill  <jason@redhat.com>
947
948         PR c++/43787
949         * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
950         * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
951
952 2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
953
954         PR c++/43028
955         * pt.c (unify): Check each elt for error_mark_node.
956
957 2010-05-04  Jason Merrill  <jason@redhat.com>
958
959         PR c++/38064
960         * typeck.c (cp_build_binary_op): Allow enums for <> as well.
961
962 2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
963
964         PR c++/43705
965         * call.c (build_new_method_call): Return error_mark_node if fns is
966         NULL_TREE.
967
968 2010-05-03  Dodji Seketeli  <dodji@redhat.com>
969
970         PR c++/43953
971         * pt.c (most_specialized_class): Pretend we are processing
972         a template decl during the call to coerce_template_parms.
973
974 2010-05-03  Jason Merrill  <jason@redhat.com>
975
976         PR c++/42810
977         PR c++/43680
978         * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
979         from the selected underlying type unless -fstrict-enums.  Set
980         ENUM_UNDERLYING_TYPE to have the restricted range.
981         * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
982         * class.c (check_bitfield_decl): Likewise.
983
984 2010-05-01  H.J. Lu  <hongjiu.lu@intel.com>
985
986         PR c++/43951
987         * init.c (build_new_1): Revert the accidental checkin in
988         revision 158918.
989
990 2010-04-30  Jason Merrill  <jason@redhat.com>
991
992         PR c++/43868
993         * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
994         (pp_cxx_type_specifier_seq): ...here.
995
996 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
997
998         * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
999         * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1000
1001 2010-04-30  Shujing Zhao  <pearly.zhao@oracle.com>
1002
1003         PR c++/43779
1004         * typeck.c (warn_args_num): New function.
1005         (convert_arguments): Use warn_args_num to print the diagnostic
1006         messages. 
1007
1008 2010-04-29  Fabien Chêne  <fabien.chene@gmail.com>
1009
1010         PR c++/43890
1011         * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1012         user-provided constructor while recursing.
1013
1014 2010-04-28  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1015
1016         PR c++/9335
1017         * error.c (print_instantiation_partial_context_line): Handle
1018         recursive instantiation.
1019         (print_instantiation_partial_context): Likewise.
1020
1021 2010-04-27  Jason Merrill  <jason@redhat.com>
1022
1023         * init.c (perform_member_init): Check CLASS_TYPE_P.
1024
1025 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
1026
1027         PR c++/29043
1028         * init.c (perform_member_init): check for uninitialized const or
1029         reference members, including array types.
1030
1031 2010-04-24  Jason Merrill  <jason@redhat.com>
1032
1033         * tree.c (get_fns): Split out from get_first_fn.
1034         * cp-tree.h: Declare it.
1035         * search.c (shared_member_p): Use it.
1036         * semantics.c (finish_qualified_id_expr): Simplify.
1037         (finish_id_expression): Simplify.
1038
1039         * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1040         whenever object is NULL_TREE.  Don't do 'this' capture here.
1041         (finish_qualified_id_expr): Pass NULL_TREE.
1042         (finish_id_expression): Likewise.
1043         (lambda_expr_this_capture): Likewise.
1044
1045         * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1046         rather than checking current_class_ref directly.
1047         (finish_call_expr): Likewise.
1048
1049         PR c++/43856
1050         * name-lookup.c (qualify_lookup): Disqualify lambda op().
1051         * class.c (current_nonlambda_class_type): New fn.
1052         * semantics.c (nonlambda_method_basetype): New.
1053         * cp-tree.h: Declare them.
1054         * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1055
1056         * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1057
1058         PR c++/43875
1059         * semantics.c (lambda_return_type): Complain about
1060         braced-init-list.
1061
1062         PR c++/43790
1063         * tree.c (cv_unqualified): Handle error_mark_node.
1064
1065         PR c++/41468
1066         * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1067         if we don't want errors.
1068
1069         PR c++/41468
1070         * class.c (convert_to_base): Add complain parameter.  Pass
1071         ba_quiet to lookup_base if we don't want errors.
1072         (build_vfield_ref): Pass complain to convert_to_base.
1073         * call.c (convert_like_real): Likewise.
1074         (initialize_reference): Likewise.
1075         (perform_direct_initialization_if_possible): Pass complain to
1076         convert_like_real.
1077         * cp-tree.h: Adjust.
1078
1079 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
1080             Jason Merrill  <jason@redhat.com>
1081
1082         PR c++/42844
1083         * decl.c (check_for_uninitialized_const_var): Handle classes that need
1084         constructing, too.
1085         (check_initializer): Call it for classes that need constructing, too.
1086         * class.c (in_class_defaulted_default_constructor): New.
1087         * cp-tree.h: Declare it.
1088
1089 2010-04-20  Jason Merrill  <jason@redhat.com>
1090
1091         PR c++/9335
1092         * init.c (constant_value_1): Treat error_mark_node as a constant
1093         if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1094         * cvt.c (ocp_convert): Handle getting error_mark_node from
1095         integral_constant_value.
1096         * decl.c (compute_array_index_type): Likewise.
1097
1098 2010-04-20  Dodji Seketeli  <dodji@redhat.com>
1099
1100         PR c++/43800
1101         PR c++/43704
1102         * typeck.c (incompatible_dependent_types_p): If one of the
1103         compared types if not a typedef then honour their main variant
1104         equivalence.
1105
1106 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
1107
1108         * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1109
1110 2010-04-19  Dodji Seketeli  <dodji@redhat.com>
1111
1112         PR c++/43704
1113         * typeck.c (structural_comptypes): Test dependent typedefs
1114         incompatibility before testing for their main variant based
1115         equivalence.
1116
1117 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
1118
1119         * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1120         ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1121
1122 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1123
1124         * decl.c (cxx_init_decl_processing): Remove second argument in call to
1125         build_common_tree_nodes.
1126
1127 2010-04-14  Jason Merrill  <jason@redhat.com>
1128
1129         PR c++/36625
1130         * parser.c (cp_parser_parenthesized_expression_list): Change
1131         is_attribute_list parm to int to indicate whether or not to
1132         handle initial identifier specially.
1133         (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1134
1135 2010-04-13  Jason Merrill  <jason@redhat.com>
1136
1137         * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1138         CLASS_TYPE_P.
1139         * parser.c (cp_parser_lambda_expression): Complain about lambda in
1140         unevaluated context.
1141         * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1142
1143 2010-04-12  Jason Merrill  <jason@redhat.com>
1144
1145         PR c++/43641
1146         * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1147         return value directly.
1148
1149         * call.c (type_decays_to): Call cv_unqualified for non-class type.
1150
1151 2010-04-12  Fabien Chene  <fabien.chene@gmail.com>
1152
1153         PR c++/25811
1154         * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1155         * init.c (build_new_1): Check for uninitialized const members and
1156         uninitialized reference members, when using new without
1157         new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1158         (diagnose_uninitialized_cst_or_ref_member): Define, call
1159         diagnose_uninitialized_cst_or_ref_member_1.
1160         (diagnose_uninitialized_cst_or_ref_member_1): New function.
1161
1162 2010-04-12  Richard Guenther  <rguenther@suse.de>
1163
1164         PR c++/43611
1165         * semantics.c (expand_or_defer_fn_1): Do not keep extern
1166         template inline functions.
1167
1168 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1169
1170         PR c++/28584
1171         * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1172         pointer type.
1173
1174 2010-04-07  Jason Merrill  <jason@redhat.com>
1175
1176         PR c++/43016
1177         * decl.c (start_preparsed_function): Do defer nested functions.
1178
1179         PR c++/11094, DR 408
1180         * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1181         * decl2.c (finish_static_data_member_decl): Set it.
1182         * decl.c (duplicate_decls): Propagate it.
1183         * pt.c (tsubst_decl): Don't substitute the domain of an array
1184         VAR_DECL if it's set.
1185         (regenerate_decl_from_template): Substitute it here.
1186         (type_dependent_expression_p): Return true if it's set.
1187         * semantics.c (finish_decltype_type): Instantiate such a variable.
1188         * typeck.c (cxx_sizeof_expr): Likewise.
1189         (strip_array_domain): New.
1190
1191         PR c++/43145
1192         * name-lookup.c (current_decl_namespace): Non-static.
1193         (pop_nested_namespace): Sanity check.
1194         * cp-tree.h: Declare current_decl_namespace.
1195         * decl.c (grokvardecl): Use it instead of current_namespace.
1196         (grokfndecl): Likewise.
1197
1198         PR c++/38392
1199         * pt.c (tsubst_friend_function): Instatiate a friend that has already
1200         been used.
1201
1202         * pt.c (print_template_statistics): New.
1203         * cp-tree.h: Declare it.
1204         * tree.c (cxx_print_statistics): Call it.
1205
1206         PR c++/41970
1207         * decl.c (grokvardecl): Tweak warning message.
1208         (grokfndecl): Likewise.
1209
1210 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
1211
1212         PR c++/42697
1213         *pt.c (tsubst_decl): Get the arguments of a specialization from
1214         the specialization template, not from the most general template.
1215
1216 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
1217
1218         PR c++/40239
1219         * typeck2.c (process_init_constructor_record):
1220         value-initialize members that are are not explicitely
1221         initialized.
1222
1223 2010-04-07  Jie Zhang  <jie@codesourcery.com>
1224
1225         PR c++/42556
1226         * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1227         when all of its elements are non-constant and have been split out.
1228
1229 2010-04-06  Taras Glek  <taras@mozilla.com>
1230             Jason Merrill  <jason@redhat.com>
1231
1232         * parser.c (cp_parser_class_specifier): Set class location to that
1233         of IDENTIFIER_NODE instead of '{' when possible.
1234         * semantics.c (begin_class_definition): Do not overide locations
1235         with less precise ones.
1236
1237 2010-04-06  Jason Merrill  <jason@redhat.com>
1238
1239         PR c++/43648
1240         * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1241
1242         PR c++/43621
1243         * pt.c (maybe_update_decl_type): Check the return value from
1244         push_scope.
1245
1246 2010-04-01  Jason Merrill  <jason@redhat.com>
1247
1248         * decl.c (next_initializable_field): No longer static.
1249         * cp-tree.h: Declare it.
1250         * call.c (build_aggr_conv): Fail if there are more initializers
1251         than initializable fields.
1252
1253         * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1254         instead of void_zero_node.
1255
1256 2010-03-31  Dodji Seketeli  <dodji@redhat.com>
1257
1258         PR c++/43558
1259         * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1260         * pt.c (end_template_parm_list): Store sibling template parms of
1261         each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1262         (push_template_decl_real): Don't store the containing template decl
1263         into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1264         * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1265         of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1266         Simplify the logic.
1267
1268 2010-03-30  Jason Merrill  <jason@redhat.com>
1269
1270         PR c++/43076
1271         * pt.c (push_template_decl_real): Deal better with running out of
1272         scopes before running out of template parms.
1273
1274         PR c++/41185
1275         PR c++/41786
1276         * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1277         function parameter context.  Don't print an error if parsing
1278         tentatively.
1279
1280         PR c++/43559
1281         * pt.c (more_specialized_fn): Don't control cv-qualifier check
1282         with same_type_p.
1283
1284 2010-03-26  Jason Merrill  <jason@redhat.com>
1285
1286         PR c++/43509
1287         * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1288         c++0x mode, but not other type-names.
1289
1290 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
1291
1292         PR c++/43327
1293         * pt.c (add_to_template_args): Support NULL ARGS;
1294         (most_specialized_class): call coerce_template_parms on
1295         template arguments passed to get_class_bindings. Use
1296         add_to_template_args.
1297         (unify): Handle VAR_DECLs.
1298
1299 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
1300
1301         * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1302         into int.
1303         * pt.c (get_template_parms_at_level): Adjust.
1304
1305 2010-03-25  Dodji Seketeli  <dodji@redhat.com>
1306
1307         PR c++/43206
1308         * cp-tree.h (get_template_parms_at_level): Declare ...
1309         * pt.c (get_template_parms_at_level): ... new function.
1310         * typeck.c (get_template_parms_of_dependent_type): If a template
1311         type parm's DECL_CONTEXT isn't yet set, get its siblings from
1312         current_template_parms. Use get_template_parms_at_level. Remove
1313         useless test.
1314         (incompatible_dependent_types_p): If we get empty parms from just one
1315         of the template type parms we are comparing then the template parms are
1316         incompatible.
1317
1318 2010-03-24  Jason Merrill  <jason@redhat.com>
1319
1320         PR c++/43502
1321         * parser.c (make_declarator): Initialize id_loc.
1322         (cp_parser_lambda_declarator_opt): And set it.
1323
1324 2010-03-23  Jason Merrill  <jason@redhat.com>
1325
1326         Make lambda conversion op and op() non-static.
1327         * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1328         Also add the thunk function returned by the conversion op.
1329         Mark the conversion deleted if the op() is variadic.
1330         * decl2.c (mark_used): Give helpful message about deleted conversion.
1331         * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1332         * semantics.c (finish_this_expr): Adjust.
1333         * mangle.c (write_closure_type_name): Adjust.
1334         * decl.c (grok_op_properties): Don't allow it.
1335         * call.c (build_user_type_conversion_1): No static conversion ops.
1336         (build_op_call): Or op().
1337
1338         * decl2.c (change_return_type): Fix 'this' quals.
1339
1340 2010-03-22  Jason Merrill  <jason@redhat.com>
1341
1342         PR c++/43333
1343         * tree.c (pod_type_p): Use old meaning in C++98 mode.
1344
1345         PR c++/43281
1346         * pt.c (contains_auto_r): New fn.
1347         (do_auto_deduction): Use it.
1348         (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1349
1350 2010-03-20  Simon Martin  <simartin@users.sourceforge.net>
1351
1352         PR c++/43081:
1353         * decl2.c (grokfield): Handle invalid initializers for member
1354         functions.
1355
1356 2010-03-20  Dodji Seketeli  <dodji@redhat.com>
1357
1358         PR c++/43375
1359         * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1360         is NULL.
1361         * decl2.c (vague_linkage_p): Likewise.
1362
1363 2010-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
1364
1365         PR c++/43418
1366         * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1367         false, in the cp_parser_expression_statement call.
1368
1369 2010-03-05  Jason Merrill  <jason@redhat.com>
1370
1371         * mangle.c (mangle_decl): Give name collision error even without
1372         ASM_OUTPUT_DEF.
1373
1374 2010-03-04  Marco Poletti  <poletti.marco@gmail.com>
1375
1376         * pt.c (process_partial_specialization): Use error_n instead of
1377         error.
1378
1379 2010-03-03  Jason Merrill  <jason@redhat.com>
1380
1381         PR c++/12909
1382         * mangle.c (mangle_decl): Handle VAR_DECL, too.
1383
1384 2010-03-03  Jason Merrill  <jason@redhat.com>
1385
1386         PR c++/12909
1387         * mangle.c: Include cgraph.h.
1388         (mangle_decl): If the mangled name will change in a later
1389         ABI version, make the later mangled name an alias.
1390         * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1391         * Make-lang.in (mangle.o): Depend on cgraph.h.
1392         * method.c (make_alias_for): Handle VAR_DECL, too.
1393         * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1394         * tree.c (no_linkage_check): Adjust.
1395         * decl.c (maybe_commonize_var): Adjust.
1396         * cp-tree.h: Adjust.
1397
1398 2010-03-01  Marco Poletti  <poletti.marco@gmail.com>
1399
1400         * pt.c (redeclare_class_template): Use error_n and inform_n.
1401
1402 2010-02-27  Mark Mitchell  <mark@codesourcery.com>
1403
1404         PR c++/42748
1405         * cp-tree.h (push_tinst_level): Declare.
1406         (pop_tinst_level): Likewise.
1407         * pt.c (push_tinst_level): Give it external linkage.
1408         (pop_tinst_level): Likewise.
1409         * mangle.c (mangle_decl_string): Set the source location to that
1410         of the decl while mangling.
1411
1412 2010-02-27  Simon Martin  <simartin@users.sourceforge.net>
1413
1414         PR c++/42054
1415         * pt.c (redeclare_class_template): Return false if there are erroneous
1416         template parameters.
1417
1418 2010-02-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1419
1420         * pt.c (push_tinst_level): Replace -ftemplate-depth- with 
1421         -ftemplate-depth=.
1422
1423 2010-02-24  Jason Merrill  <jason@redhat.com>
1424
1425         PR c++/12909
1426         * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1427
1428         * class.c (layout_class_type): Don't give -Wabi warning for a bug
1429         in a previous ABI version.
1430
1431 2010-02-23  Jason Merrill  <jason@redhat.com>
1432
1433         PR c++/43143
1434         * typeck2.c (digest_init_r): Accept value init of array.
1435
1436 2010-02-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1437
1438         PR c++/43126
1439         * typeck.c (convert_arguments): Update error message.
1440
1441 2010-02-22  Mike Stump  <mikestump@comcast.net>
1442
1443         PR c++/43125
1444         * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1445
1446 2010-02-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1447
1448         PR c++/23510
1449         * error.c (print_instantiation_partial_context_line): New.
1450         (print_instantiation_partial_context): Print at most 12 contexts,
1451         skip the rest with a message.
1452
1453 2010-02-21  Dodji Seketeli  <dodji@redhat.com>
1454
1455         PR c++/42824
1456         * pt.c (lookup_template_class): Better support of specialization
1457         of member of class template implicit instantiation.
1458
1459 2010-02-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1460
1461         PR c++/35669
1462         * call.c (conversion_null_warnings): Replace -Wconversion with
1463         -Wconversion-null.
1464         * cvt.c (build_expr_type_conversion): Likewise.
1465
1466 2010-02-18  Jason Merrill  <jason@redhat.com>
1467
1468         PR c++/42837
1469         * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1470
1471         PR c++/43108
1472         * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1473         C build_binary_op.
1474         * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1475         * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1476
1477         PR c++/43070
1478         * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1479
1480         PR c++/26261
1481         PR c++/43101
1482         * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1483         (maybe_update_decl_type): New fn.
1484         * parser.c (cp_parser_init_declarator): Use it.
1485
1486         PR c++/43109
1487         * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1488
1489 2010-02-17  Jason Merrill  <jason@redhat.com>
1490
1491         PR c++/43075
1492         * call.c (build_over_call): Don't create zero-sized assignments.
1493         * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1494         * cp-objcp-common.c (cp_expr_size): Remove.
1495         * cp-tree.h: Remove prototype.
1496
1497         PR c++/43069
1498         * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1499         decl we looked up doesn't match.
1500
1501         PR c++/43093
1502         * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1503         have an INIT_EXPR anymore.
1504
1505         PR c++/43079
1506         * pt.c (convert_nontype_argument): Change assert to test.
1507
1508 2010-02-16  Jason Merrill  <jason@redhat.com>
1509
1510         * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1511
1512         PR c++/43031
1513         * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1514         VIEW_CONVERT_EXPR for conversions between structural equality types
1515         that the back end can't tell are the same.
1516
1517         PR c++/43036
1518         * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1519         cv-quals from element here.
1520         (cp_build_qualified_type_real): Not here.  Preserve typedef name.
1521
1522 2010-02-14  Jason Merrill  <jason@redhat.com>
1523
1524         PR c++/41997
1525         * semantics.c (finish_compound_literal): Use
1526         cp_apply_type_quals_to_decl when creating a static variable.
1527
1528 2010-02-12  Jason Merrill  <jason@redhat.com>
1529
1530         PR c++/43024
1531         * name-lookup.h (current_binding_level): Check for null
1532         cp_function_chain.
1533
1534 2010-02-12  Jason Merrill  <jason@redhat.com>
1535
1536         PR c++/43054
1537         * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1538
1539 2010-02-12  Jakub Jelinek  <jakub@redhat.com>
1540
1541         PR c++/43033
1542         * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1543         instead of x.
1544
1545 2010-02-10  Jason Merrill  <jason@redhat.com>
1546
1547         PR c++/41896
1548         * semantics.c (outer_lambda_capture_p): Revert.
1549         (add_capture): Only finish_member_declaration if
1550         we're in the lambda class.
1551         (register_capture_members): New.
1552         * cp-tree.h: Declare it.
1553         * parser.c (cp_parser_lambda_expression): Call it.
1554
1555 2010-02-10  Jason Merrill  <jason@redhat.com>
1556
1557         PR c++/41896
1558         * semantics.c (outer_lambda_capture_p): Use current_function_decl
1559         instead of current_class_type.
1560
1561 2010-02-10  Jason Merrill  <jason@redhat.com>
1562
1563         PR c++/42983, core issue 906
1564         * method.c (defaultable_fn_check): Check virtualness.
1565
1566 2010-02-10  Jason Merrill  <jason@redhat.com>
1567
1568         PR c++/43016
1569         * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1570
1571 2010-02-10  Shujing Zhao  <pearly.zhao@oracle.com>
1572
1573         * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1574         * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1575         translation.
1576         * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1577         (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1578         (cp_parser_parameter_declaration)
1579         (cp_parser_exception_specification_opt)
1580         (cp_parser_exception_declaration): Likewise.
1581         * pt.c (check_default_tmpl_args): Likewise.
1582         * search.c (lookup_field_r): Likewise.
1583
1584 2010-02-09  Jason Merrill  <jason@redhat.com>
1585
1586         PR c++/42399
1587         * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1588
1589 2010-02-09  Jason Merrill  <jason@redhat.com>
1590
1591         PR c++/42370
1592         * decl2.c (change_return_type): New fn.
1593         * semantics.c (apply_lambda_return_type): Use it.
1594         * cp-tree.h: Declare it.
1595
1596 2010-02-05  Richard Guenther  <rguenther@suse.de>
1597
1598         * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1599         * cp-lang.c: Include gt-cp-cp-lang.h.
1600         * config-lang.in (gtfiles): Add cp/cp-lang.c.
1601
1602 2010-02-05  Dodji Seketeli  <dodji@redhat.com>
1603
1604         PR c++/42915
1605         * typeck.c (get_template_parms_of_dependent_type): Try getting
1606         the template parameters fromt the type itself first.
1607
1608 2010-02-03  Jason Merrill  <jason@redhat.com>
1609
1610         PR c++/4926
1611         PR c++/38600
1612         * mangle.c (write_unqualified_id): Split out from write_expression.
1613         (write_unqualified_name): Call it.
1614         (write_member_name): Likewise.
1615         (write_expression): Support TEMPLATE_ID_EXPR.
1616         Disambiguate operator names.
1617
1618         PR c++/12909
1619         * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1620         -fabi-version=4.
1621
1622 2010-02-02  Jason Merrill  <jason@redhat.com>
1623
1624         PR c++/41090
1625         * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1626         * optimize.c (clone_body): Remap their initializers when making base
1627         variants.
1628         (maybe_clone_body): Complain if multiple clones aren't safe.
1629
1630 2010-01-29  Dodji Seketeli  <dodji@redhat.com>
1631
1632         PR c++/42758
1633         PR c++/42634
1634         PR c++/42336
1635         PR c++/42797
1636         PR c++/42880
1637         * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1638         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1639         GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1640         * pt.c (coerce_template_parms, type_unification_real,
1641         expand_template_argument_pack, coerce_template_parameter_pack):
1642         Set the non default template args count.
1643         (current_template_args): Always set non defaulted
1644         template args count when compiled with --enable-checking
1645         (tsubst_template_args, type_unification_real): Propagate the non
1646         defaulted template args count.
1647         * error.c (get_non_default_template_args_count): Renamed
1648         count_non_default_template_args into this. Don't calculate the
1649         non default template argument count anymore. Use the new
1650         accessor macros above to get it.
1651         (dump_template_argument_list, dump_type, dump_decl,
1652         dump_template_parms): Adjust.
1653         * parser.c (cp_parser_template_argument_list): Always set defaulted
1654         template args count when compiled with --enable-checking.
1655
1656 2010-01-29  Shujing Zhao  <pearly.zhao@oracle.com>
1657
1658         * decl.c (redeclaration_error_message): Wrap the return messages into
1659         G_() for easy translation.
1660
1661 2010-01-28  Jason Merrill  <jason@redhat.com>
1662
1663         PR c++/42880
1664         * semantics.c (begin_class_definition): Don't use type_as_string.
1665
1666 2010-01-28  Dodji Seketeli  <dodji@redhat.com>
1667
1668         PR c++/42713
1669         PR c++/42820
1670         * typeck.c (get_template_parms_of_dependent_type): Factorized
1671         this out of incompatible_template_type_parms_p
1672         (incompatible_dependent_types_p): Renamed
1673         incompatible_template_type_parms_p into this. Make it detect
1674         two incompatible dependent typedefs too.
1675         (structural_comptypes): Use incompatible_dependent_types_p.
1676         * pt.c (get_template_info):
1677         Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1678
1679 2010-01-20  Janis Johnson  <janis187@us.ibm.com>
1680             Jason Merrill  <jason@redhat.com>
1681
1682         * mangle.c (write_type): Mangle transparent record as member type.
1683         * semantics.c (begin_class_definition): Recognize decimal classes
1684         and set TYPE_TRANSPARENT_AGGR.
1685
1686 2010-01-20  Jason Merrill  <jason@redhat.com>
1687
1688         PR c++/42338
1689         * mangle.c (write_expression): Handle tree codes that have extra
1690         arguments in the middle-end.
1691
1692 2010-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
1693
1694         PR c++/42038
1695         * except.c (expand_start_catch_block): Deal correctly with
1696         do_begin_catch returning error_mark_node.
1697
1698 2010-01-20  Jason Merrill  <jason@redhat.com>
1699
1700         PR c++/41788
1701         * class.c (layout_class_type): Set packed_maybe_necessary for packed
1702         non-PODs.
1703
1704         PR c++/41920
1705         * semantics.c (build_lambda_object): Call mark_used on captured
1706         variables.
1707
1708         PR c++/40750
1709         * decl.c (grokdeclarator): Clear type_quals for a member function
1710         declared using a typedef.  Don't complain about adding cv-quals
1711         to a function typedef in C++0x mode.
1712
1713 2010-01-20  Jakub Jelinek  <jakub@redhat.com>
1714
1715         * decl.c (create_array_type_for_decl): Remove set but not used
1716         variable error_msg.  Remove break stmts after return stmts.
1717
1718 2010-01-19  Dodji Seketeli  <dodji@redhat.com>
1719
1720         * error.c (dump_template_parms, count_non_default_template_args):
1721         Revert fix of PR c++/42634.
1722
1723 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
1724
1725         PR c++/42634
1726         * error.c (dump_template_parms): Use innermost template
1727         arguments before calling count_non_default_template_args.
1728         (count_non_default_template_args): We are being called with
1729         template innermost arguments now. There is no need to ensure
1730         that again.
1731
1732 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
1733
1734         PR c++/42766
1735         * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
1736
1737 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
1738
1739         PR c++/42697
1740         *pt.c (tsubst_decl):  Revert commit for PR c++/42697.
1741
1742 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
1743
1744         PR c++/42697
1745         *pt.c (tsubst_decl): Get the arguments of a specialization from
1746         the specialization template, not from the most general template.
1747
1748 2010-01-16  Jason Merrill  <jason@redhat.com>
1749
1750         PR c++/42761
1751         * semantics.c (finish_decltype_type): Within a template, treat
1752         unresolved CALL_EXPR as dependent.
1753
1754 2010-01-15  Dodji Seketeli  <dodji@redhat.com>
1755
1756         * error.c (dump_template_parms,count_non_default_template_args):
1757         Revert changes of PR c++/42634.
1758
1759 2010-01-14  Jakub Jelinek  <jakub@redhat.com>
1760
1761         PR middle-end/42674
1762         * decl.c (finish_function): Don't emit -Wreturn-type warnings in
1763         functions with noreturn attribute.
1764
1765 2010-01-14  Jason Merrill  <jason@redhat.com>
1766
1767         PR c++/42701
1768         * call.c (build_new_method_call): Don't free the vec here.
1769
1770         PR c++/42655
1771         * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
1772
1773 2010-01-13  Dodji Seketeli  <dodji@redhat.com>
1774
1775         PR c++/42634
1776         * error.c (dump_template_parms): Use innermost template
1777         arguments before calling count_non_default_template_args.
1778         (count_non_default_template_args): We are being called with
1779         template innermost arguments now. There is no need to ensure
1780         that again.
1781
1782 2010-01-07  Dodji Seketeli  <dodji@redhat.com>
1783
1784         c++/40155
1785         * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
1786         arguments that were previously deduced.
1787
1788 2010-01-05  Jason Merrill  <jason@redhat.com>
1789
1790         * pt.c (unify_pack_expansion): Handle deduction from init-list.
1791         * call.c (build_over_call): Don't complain about it.
1792
1793 2010-01-04  Jason Merrill  <jason@redhat.com>
1794
1795         PR c++/42555
1796         * pt.c (tsubst_decl): Don't apply type attributes in place.
1797
1798         PR c++/42567
1799         * semantics.c (describable_type): Remove decltype comment and
1800         semantics.
1801
1802
1803 \f
1804 Copyright (C) 2010 Free Software Foundation, Inc.
1805
1806 Copying and distribution of this file, with or without modification,
1807 are permitted in any medium without royalty provided the copyright
1808 notice and this notice are preserved.
1809