OSDN Git Service

cp/:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2009-06-25  Ian Lance Taylor  <iant@google.com>
2
3         * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
4         the second nor third operand has side effects.
5
6 2009-06-25  Ian Lance Taylor  <iant@google.com>
7
8         * parser.c (cp_parser_binary_expression): Increment
9         c_inhibit_evaluation_warnings while parsing the right hand side of
10         "true || x" or "false && x".
11         * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
12         if c_inhibit_evaluation_warnings is zero.
13
14 2009-06-24  Jason Merrill  <jason@redhat.com>
15
16         * error.c (dump_decl): Do say "typedef" for the injected class name.
17
18         * pt.c (lookup_template_class): Use currently_open_class,
19         compare template args later.
20
21         PR c++/40342
22         * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
23         * class.c (resolve_address_of_overloaded_function): Fix typo.
24
25 2009-06-18  Aldy Hernandez  <aldyh@redhat.com>
26
27         * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
28         * decl.c (finish_decl): Remove.
29         (declare_global_var): Replace finish_decl with cp_finish_decl.
30         (start_method): Same.
31         * rtti.c (emit_tinfo_decl): Same.
32         * pt.c (tsubst_expr): Same.
33         (instantiate_decl): Same.
34         * decl2.c (grokbitfield): Same.
35         * name-lookup.c (pushdecl_top_level_1): Same.
36         * cp-tree.h: Remove finish_decl.
37
38 2009-06-16  David Edelsohn  <edelsohn@gnu.org>
39
40         * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
41         (lang_specific_driver): Always allocate extra argument.
42         Add LIBSTDCXX_STATIC to arglist if defined and linking
43         statically.
44
45 2009-06-16  Ian Lance Taylor  <iant@google.com>
46
47         * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
48         (cp/semantics.o): Depend upon gt-cp-semantics.h.
49
50 2009-06-16  Ian Lance Taylor  <iant@google.com>
51
52         * parser.c (cp_unevaluated_operand): Define global variable.
53         (cp_parser_question_colon_clause): Increment
54         c_inhibit_evaluation_warnings when evaluating an expression which
55         will never be executed.
56         (cp_parser_decltype): Increment cp_unevaluated_operand and
57         c_inhibit_evaluation_warnings, not skip_evaluation.
58         (cp_parser_sizeof_operand): Likewise.
59         (cp_parser_enclosed_template_argument_list): Save
60         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
61         skip_evaluation.
62         * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
63         Add unevaluated_operand and inhibit_evaluation_warnings fields.
64         (cp_unevaluated_operand): Declare.
65         * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
66         and c_inhibit_evaluation_warnings rather than skip_evaluation.
67         (pop_from_top_level): Restore cp_unevaluated_operand and
68         c_inhibit_evaluation_warnings rather than skip_evaluation.
69         * class.c (build_base_path): Check cp_unevaluated_operand rather
70         than skip_evaluation.
71         * typeck.c (build_class_member_access_expr): Likewise.
72         (cp_build_binary_op): Don't warn about bad shift counts if
73         c_inhibit_evaluation_warnings is non-zero.
74         * pt.c (coerce_template_parms): Save state of
75         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
76         skip_evaluation.
77         (tsubst_aggr_type): Likewise.
78         (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
79         skip_evaluation.
80         (tsubst_copy): Likewise.
81         (tsubst): Set cp_unevaluated_operand and
82         c_inhibit_evaluation_warnings, not skip_evaluation.
83         (tsubst_copy_and_build): Likewise.
84         * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
85         rather than skip_evaluation.
86         * decl2.c (mark_used): Likewise.
87         * semantics.c (finish_non_static_data_member): Likewise.
88         * cvt.c (cp_convert_and_check): Check
89         c_inhibit_evaluation_warnings rather than skip_evaluation.
90         * mangle.c (write_type): Set cp_unevaluated_operand rather than
91         skip_evaluation.
92
93 2009-06-15  Ian Lance Taylor  <iant@google.com>
94
95         * parser.c (cp_parser_direct_declarator): Add braces around
96         variables declared before label.
97
98 2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
99
100         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
101         * cp-tree.h (cxx_comdat_group): Change signature.
102         * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
103         (cxx_comdat_group): Change signature.
104         * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
105         make_decl_one_only.
106         (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
107         * method.c (use_thunk): Update call to make_decl_one_only.
108         * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
109
110 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
111
112         * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
113         (build_modify_expr): New arg.
114         * semantics.c (finish_unary_op_expr): Pass location to
115         overflow_warning.
116         (handle_omp_for_class_iterator): Pass location to build_modify_expr.
117         * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
118         c_sizeof_or_alignof_type.
119         (build_array_ref): New argument.
120         (build_compound_expr): Same.
121         (build_const_cast): Same.
122         (build_ptrmemfunc): Pass location to build_c_cast.
123         * init.c (avoid_placement_new_aliasing): Pass location to
124         build_stmt.
125         (build_vec_delete_1): Pass location to cp_build_modify_expr,
126         build_compound_expr.
127         * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
128         * decl.c (poplevel): Pass location to c_build_bind_expr.
129         (finish_case_label): Pass location to build_case_label.
130         (finish_constructor_body): Same.
131         (finish_destructor_body): Pass location to build_stmt.
132         (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
133         * call.c (build_new_op): Pass location to build_array_ref.
134         (build_x_va_arg): Pass location to build_va_arg.
135         * except.c (expand_end_catch_block): Pass location to
136         build_stmt.
137         * cp-tree.h (build_array_ref): New argument.
138         (build_compound_expr): Same.
139         (build_c_cast): Same.
140         * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
141         (gimplify_switch_stmt): Same.
142         * typeck2.c (split_nonconstant_init_1): Same.
143         * pt.c (tsubst_copy): Same.
144         * semantics.c (add_decl_expr): Same.
145         (do_poplevel): Same.
146         (push_cleanup): Same.
147         (finish_goto_stmt): Same.
148         (finish_expr_stmt): Same.
149         (begin_if_stmt): Same.
150         (begin_while_stmt): Same.
151         (begin_do_stmt): Same.
152         (finish_return_stmt): Same.
153         (begin_for_stmt): Same.
154         (finish_break_stmt): Same.
155         (finish_continue_stmt): Same.
156         (begin_switch_stmt): Same.
157         (begin_try_block): Same.
158         (begin_handler): Same.
159         (finish_asm_stmt): Same.
160         (finish_label_stmt): Same.
161         (finish_stmt_expr_expr): Same.
162         (finalize_nrv_r): Same.
163         (finish_omp_atomic): Same.
164         * name-lookup.c (do_using_directive): Same.
165         * decl2.c (grok_array_decl): Same.
166         * parser.c (cp_parser_cast_expression): Same.
167         (cp_parser_selection_statement): Same.
168         (cp_parser_implicitly_scoped_statement): Same.
169         (cp_parser_objc_selector_expression): Same.
170         (cp_parser_objc_synchronized_statement): Same.
171         (cp_parser_objc_throw_statement): Same.
172         (cp_parser_omp_critical): Same.
173         (cp_parser_omp_master): Same.
174         * typeck.c (build_function_call): Add location argument.
175         * init.c: Add location argument to all build_decl calls.
176         * class.c: Same.
177         * method.c: Same.
178         * rtti.c: Same.
179         * tree.c: Same.
180         * pt.c: Same.
181         * semantics.c: Same.
182         * lex.c: Same.
183         * decl2.c: Same.
184         * cp-gimplify.c: Same.
185         * decl.c: Same.
186         (cp_make_fname_decl): Add location argument.  Pass location ot
187         build_decl.
188         (finish_case_label): Same.
189         * cp-tree.h (finish_case_label): Add location argument.
190         * parser.c (cp_parser_label_for_labeled_statement): Pass location to
191         finish_case_label.
192         
193 2009-06-09  Jason Merrill  <jason@redhat.com>
194
195         PR c++/40381
196         * decl2.c (mark_used): Return after complaining about deleted fn.
197
198 2009-06-08  Jason Merrill  <jason@redhat.com>
199
200         * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
201         late-specified return type.
202
203 2009-06-08  Jakub Jelinek  <jakub@redhat.com>
204
205         PR c++/40373
206         * call.c (check_dtor_name): Return false even if
207         get_type_value (name) is error_mark_node.
208
209         PR c++/40370
210         PR c++/40372
211         * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
212         on error_mark_node.  Check for VLAs outside of function context
213         before check whether to wrap bounds into a NOP_EXPR with
214         TREE_SIDE_EFFECTS.
215
216 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
217
218         * repo.c (get_base_filename): Use aux_base_name rather than
219         alternate temporary file during second compare debug compilation.
220         (finish_repo): Skip during -fcompare-debug-second.
221
222 2009-06-06  Ian Lance Taylor  <iant@google.com>
223
224         * parser.c (cp_parser_label_for_labeled_statement): Support
225         attribute on labels if immediately followed by semicolon.
226         * semantics.c (finish_label_stmt): Return new label.
227         * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
228
229 2009-06-03  Ian Lance Taylor  <iant@google.com>
230
231         * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
232         $(SYSTEM_H).
233
234 2009-06-02  Mark Mitchell  <mark@codesourcery.com>
235
236         * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
237
238 2009-06-02  Jason Merrill  <jason@redhat.com>
239
240         PR c++/40308
241         PR c++/40311
242         * typeck.c (cp_build_modify_expr): Always pass init-lists to the
243         conversion code.
244         * call.c (implicit_conversion): Allow init-list conversion to scalar
245         during direct-initialization, too.  Mark the conversion bad if it
246         has too many levels of braces.
247         (convert_like_real): And give a helpful error.
248
249         PR c++/40306
250         PR c++/40307
251         * decl.c (cp_finish_decl): Handle auto deduction from ().
252         * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
253         with dependent type that is known to be a pointer.
254
255 2009-06-02  Simon Martin  <simartin@users.sourceforge.net>
256
257         PR c++/38089
258         * pt.c (register_specialization): Properly setup DECL_CONTEXT for
259         specializations in an invalid namespace.
260
261 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
262
263         * error.c (print_instantiation_partial_context): Print column
264         numbers.
265
266 2009-05-29  Ian Lance Taylor  <iant@google.com>
267
268         * error.c (cp_printer): Don't use va_arg with enum type.
269
270 2009-05-28  Dodji Seketeli  <dodji@redhat.com>
271
272         PR c++/39754
273         * cp-tree.h (canonical_type_variant): Remove this function declaration.
274         (strip_typedefs): New function declaration.
275         * tree.c (strip_typedefs): New function definition.
276         (canonical_type_variant): Remove function definition.
277         * cvt.c (convert_from_reference): No need to use
278         canonical_type_variant.
279         * typeck.c (cp_build_indirect_ref): Likewise.
280         * error.c (dump_template_bindings): Use strip_typedefs instead of
281         canonical_type_variant.
282         * pt.c (convert_template_argument, unify): Likewise.
283         * mangle.c (canonicalize_for_substitution): Don't use
284         canonical_type_variant.
285
286 2009-05-27  Jason Merrill  <jason@redhat.com>
287
288         * call.c (implicit_conversion): Handle conversion from
289         initializer-list to scalar.
290         (convert_like_real): Likewise.  Avoid crashing on list
291         initialization with bad conversions.
292         (can_convert): Use LOOKUP_EXPLICIT.
293         (can_convert_arg_bad): Add flags parm.
294         * cp-tree.h: Adjust.
295         * typeck.c (convert_for_assignment): Pass flags.
296
297 2009-05-27  Ian Lance Taylor  <iant@google.com>
298
299         * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
300         (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
301
302 2009-05-26  Ian Lance Taylor  <iant@google.com>
303
304         * Make-lang.in (g++spec.o): Use $(COMPILER).
305         (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
306         (cc1plus$(exeext)): Likewise.
307
308 2009-05-26  Dodji Seketeli  <dodji@redhat.com>
309
310         PR c++/40007
311         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
312         (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
313         (get_types_needing_access_check): Declare new entry point.
314         * pt.c (append_type_to_template_for_access_check_1,
315         get_types_needing_access_check): New functions.
316         (perform_typedefs_access_check): Accept FUNCTION_DECLs and
317         RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
318         get_types_needing_access_check, no more
319         MEMBER_TYPES_NEEDING_ACCESS_CHECK.
320         (instantiate_class_template): Set input_location to the source
321         location of the most specialized template definition.
322         Perform access check using the RECORD_TYPE of the template, not its
323         associated most generic TEMPLATE_DECL.
324         (append_type_to_template_for_access_check): Augment function
325         comments. Use the new get_types_needing_access_check, not
326         MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
327         append_type_to_template_for_access_check_1 subroutine.
328
329 2009-05-22  Jason Merrill  <jason@redhat.com>
330
331         PR c++/38064
332         * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
333         arithmetic comparisons.
334         (cp_common_type): Handle scoped enums.
335
336         * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
337         (add_builtin_candidate, add_builtin_candidates): Likewise.
338         (convert_like_real): Likewise.
339         * class.c (check_bitfield_decl): Likewise.
340         * decl.c (check_static_variable_definition): Likewise.
341         (compute_array_index_type): Likewise.
342         * decl2.c (grokbitfield): Likewise.
343         * init.c (build_new_1): Likewise.
344         * pt.c (convert_nontype_argument): Likewise.
345         (current_instantiation): Likewise.
346         * tree.c (pod_type_p): Likewise.
347         * typeck.c (build_static_cast_1): Likewise.
348         (build_reinterpret_cast_1): Likewise.
349
350 2009-05-22  Richard Guenther  <rguenther@suse.de>
351
352         PR middle-end/38964
353         * init.c (avoid_placement_new_aliasing): Remove.
354         (build_new_1): Do not call it.
355
356 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
357
358         * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
359         * semantics.c (expand_or_defer_fn): Similarly.
360
361 2009-05-20  Ian Lance Taylor  <iant@google.com>
362
363         * parser.c (cp_parser_postfix_expression): Change args to a vec.
364         Release it when done.
365         (tree_vector): Define typedef.  Define VEC functions.
366         (cp_parser_parenthesized_expression_list): Change return type to
367         vec.  Change all callers.
368         (cp_parser_new_expression): Change placement and initializer to
369         vecs.  Release them when done.
370         (cp_parser_new_placement): Change return type to vec.  Change all
371         callers.
372         (cp_parser_new_initializer): Likewise.
373         * typeck.c (build_function_call_vec): Just call
374         cp_build_function_call_vec.
375         (cp_build_function_call): Just build a vec and call
376         cp_build_function_call_vec.
377         (cp_build_function_call_vec): New function based on old
378         cp_build_function_call.
379         (convert_arguments): Remove nargs and argarray parameters.  Change
380         values to a vec.  Change caller.
381         (build_x_compound_expr_from_vec): New function.
382         (cp_build_modify_expr): Build vec to pass to
383         build_special_member_call.
384         * call.c (struct z_candidate): Add first_arg field.  Change args
385         field to vec.
386         (convert_class_to_reference): Handle first argument separately.
387         (add_candidate): Add first_arg parameter.  Change args parameter
388         to vec.  Change all callers.
389         (add_function_candidate, add_conv_candidate): Likewise.
390         (add_template_candidate_real, add_template_candidate): Likewise.
391         (add_template_conv_candidate): Likewise.
392         (build_user_type_conversion_1): Handle first argument separately.
393         (resolve_args): Change return type and parameter type to vecs.
394         Change all callers.
395         (perform_overload_resolution): Change args parameter to vec.
396         Change all callers.
397         (build_new_function_call, build_operator_new_call): Likewise.
398         (add_candidates): Likewise.
399         (build_op_call): New globally visible function, built from and
400         replacing static function build_object_call.
401         (build_new_op): Don't handle CALL_EXPR.  Build vec, not tree_list,
402         of arguments.
403         (build_op_delete_call): Build vec to pass to
404         cp_build_function_call_vec.
405         (build_temp): Build vec to pass to build_special_member_call.
406         (convert_like_real): Likewise.
407         (perform_direct_initialization_if_possible): Likewise.
408         (build_over_call): Handle first_arg field.  Use build_call_array
409         rather than build_call_list.
410         (build_special_member_call): Change args parameter to vec.  Change
411         all callers.
412         (build_new_method_call): Likewise.
413         * init.c (expand_default_init): Change parms to vec.
414         (build_raw_new_expr): Change placement and init to vecs.  Change
415         all callers.
416         (build_new_1, build_new): Likewise.
417         * class.c (resolve_address_of_overloaded_function): Build array to
418         pass to fn_type_unification.
419         * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
420         build_new.  For CALL_EXPR create a vec rather than a tree_list;
421         expand a pack if necessary.
422         (fn_type_unification): Change args parameter to const tree *.  Add
423         nargs parameter.  Change all callers.
424         (type_unification_real): Likewise.
425         (unify): Build array to pass to type_unification_real.
426         (get_bindings): Build array to pass to fn_type_unification.
427         (any_type_dependent_arguments_p): Change args parameter to a vec.
428         Change all callers.
429         (make_args_non_dependent): Renamed from build_non_dependent_args.
430         Change return type to void.  Change parameter type to vec.  Change
431         all callers.
432         (do_auto_deduction): Pass an array to type_unification_real.
433         * semantics.c (perform_koenig_lookup): Change args to vec.  Change
434         all callers.
435         (finish_call_expr): Change args to vec.  Change all callers.  Call
436         build_op_call instead of passing CALL_EXPR to build_new_op.
437         (cxx_omp_create_clause_info): Allocate vec to pass to
438         build_special_member_call.
439         * decl2.c (build_offset_ref_call_from_tree): Change args parameter
440         to vec.  Change all callers.
441         * name-lookup.c (lookup_function_nonclass): Likewise.
442         (struct arg_lookup): Change args to vec.
443         (arg_assoc_namespace): Handle args as a vec.
444         (arg_assoc_args_vec): New static function.
445         (lookup_arg_dependent): Change args parameter to vec.  Change all
446         callers.
447         * method.c (do_build_assign_ref): Allocate vec to pass to
448         build_special_member_call.
449         * except.c (build_throw): Likewise.
450         * typeck2.c (build_functional_cast): Likewise.
451         * cvt.c (ocp_convert): Likewise.
452         * tree.c (build_min_non_dep_call_vec): Change last parameter to
453         vec.  Change all callers.
454         * cp-tree.h: Update declarations.
455         * name-lookup.h: Update declarations.
456
457 2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
458
459         * typeck.c (default_conversion): Check targetm.promoted_type.
460         * decl.c (grokdeclarator): Check targetm.invalid_return_type.
461         (grokparms): Check targetm.invalid_parameter_type.
462         * cvt.c (ocp_convert): Check targetm.convert_to_type.
463         (build_expr_type_conversion): Check targetm.promoted_type.
464
465 2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
466
467         * typeck.c (build_binary_op): Allow % on integal vectors.
468
469 2009-05-18  Jason Merrill  <jason@redhat.com>
470
471         Implement explicit conversions ops as specified in N2437.
472         * decl.c (grokdeclarator): Handle explicit conversion ops.
473         (check_initializer): Pass flags to store_init_value.
474         * decl2.c (maybe_emit_vtables): Likewise.
475         * init.c (expand_aggr_init_1): Likewise.
476         * call.c (convert_class_to_reference): Take flags parm,
477         check DECL_NONCONVERTING_P.
478         (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
479         (add_builtin_candidates): Simplify getting type of conversion.
480         (build_object_call): Likewise.  Check DECL_NONCONVERTING_P.
481         (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
482         (reference_binding): Take flags parm.  Direct-initialize copy parm.
483         (add_function_candidate): Direct-initialize the copy parm.
484         (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
485         (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
486         (conditional_conversion): Likewise.
487         (convert_like_real): Only complain about DECL_NONCONVERTING_P
488         constructors.
489         (perform_implicit_conversion_flags): Add flags parm to
490         perform_implicit_conversion.  Improve diagnostics.
491         * cp-tree.h (LOOKUP_IMPLICIT): New macro.
492         (LOOKUP_COPY_PARM): New bit macro.
493         * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
494         * typeck.c (convert_for_assignment): Take flags parm, pass it to
495         perform_implicit_conversion_flags.
496         (cp_build_modify_expr): Pass flags to convert_for_assignment.
497         (convert_for_initialization): Likewise.
498         * typeck2.c (store_init_value): Take flags parm, pass to
499         digest_init_flags.
500         (digest_init_flags): Add flags parm to digest_init.
501         (digest_init_r): Take flags parm, pass to convert_for_initialization.
502         (process_init_constructor_array): Pass it.
503         (process_init_constructor_record): Likewise.
504         (process_init_constructor_union): Likewise.
505
506 2009-05-16  Jason Merrill  <jason@redhat.com>
507
508         PR c++/40139
509         * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
510         with a dependent type.  Actually look up the destructor.
511         * semantics.c (finish_id_expression): Fix logic.
512         (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
513         a function.
514         * typeck.c (build_x_unary_op): Diagnose taking the address of a
515         constructor or destructor.
516         * tree.c (get_first_fn): Handle OFFSET_REF.
517
518 2009-05-17  Joseph Myers  <joseph@codesourcery.com>
519
520         * tree.c (cxx_printable_name_internal): Allow consecutive
521         translated and untranslated cached copies of the name of the
522         current function.
523
524 2009-05-15  Ian Lance Taylor  <iant@google.com>
525
526         * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
527         cp_lvalue_kind.  Change all uses.
528         (enum base_access_flags): Rename from enum base_access.  Change
529         all uses.
530         * parser.c (enum cp_parser_flags): Remove enum tag.
531
532 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
533
534         PR 16302
535         * call.c (build_new_op): Update calls to warn_logical_operator.
536
537 2009-05-14  Ian Lance Taylor  <iant@google.com>
538
539         * class.c (layout_class_type): Change itk to unsigned int.
540         * decl.c (finish_enum): Change itk to unsigned int.
541         * parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
542         casts.
543
544 2009-05-13  David Mandelin <dmandelin@mozilla.com>:
545
546         * decl.c (duplicate_decls): Preserve parameter attributes.
547
548 2009-05-10  Jan Hubicka  <jh@suse.cz>
549
550         * decl2.c (cxx_callgraph_analyze_expr): Use
551         cgraph_mark_address_taken.
552
553 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
554
555         * call.c (name_as_c_string): Call type_as_string_translate.
556         Translate identifiers to locale character set.
557         * cp-tree.h (lang_decl_name): Update prototype.
558         (type_as_string_translate, decl_as_string_translate,
559         cxx_printable_name_translate): Declare.
560         * cxx-pretty-print.c (M_): Define.
561         (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
562         English fragments for conditional translation with M_.
563         * decl.c (grokdeclarator): Translate identifiers to locale
564         character set for diagnostics.
565         * error.c (M_): Define.
566         (dump_template_bindings, dump_type, dump_aggr_type,
567         dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
568         dump_function_decl, dump_template_parms, dump_expr,
569         dump_binary_op, op_to_string, assop_to_string): Mark English
570         fragments for conditional translation with M_.
571         (type_as_string): Disable translation of identifiers.
572         (type_as_string_translate): New.
573         (expr_as_string): Disable translation of identifiers.
574         (decl_as_string): Disable translation of identifiers.
575         (decl_as_string_translate): New.
576         (lang_decl_name): Add parameter translate.
577         (args_to_string): Call type_as_string_translate.
578         (cp_print_error_function): Call cxx_printable_name_translate.
579         (print_instantiation_full_context,
580         print_instantiation_partial_context): Call
581         decl_as_string_translate.
582         * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
583         identifier in diagnostic.
584         * tree.c (cxx_printable_name): Change to
585         cxx_printable_name_internal.  Add parameter translate.
586         (cxx_printable_name, cxx_printable_name_translate): New wrappers
587         round cxx_printable_name_internal.
588
589 2009-05-08  H.J. Lu  <hongjiu.lu@intel.com>
590
591         PR c/36892
592         * call.c (build_call_a): Updated warn_deprecated_use call.
593         (build_over_call): Likewise.
594         * decl.c (grokdeclarator): Likewise.
595         (grokparms): Likewise.
596         * semantics.c (finish_id_expression): Likewise.
597         * typeck.c (build_class_member_access_expr): Likewise.
598         (finish_class_member_access_expr): Likewise.
599
600 2009-05-06  Dodji Seketeli  <dodji@redhat.com>
601
602         PR c++/17395
603         * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
604         whole list of PARM_DECLs, just the current one.
605
606 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
607
608         * cp-tree.h:
609         (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
610         mangle_compound_literal): Remove unused declarations.
611         (build_vfield_ref, cxx_print_statistics, clone_function_decl,
612         adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
613         pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
614         check_for_out_of_scope_variable, print_other_binding_stack,
615         maybe_push_decl, cxx_mark_addressable, force_target_expr,
616         build_target_expr_with_type, finish_case_label,
617         cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
618         check_template_keyword, cxx_omp_predetermined_sharing,
619         cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
620         cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
621         cxx_omp_privatize_by_reference): Rearrange the declarations line to
622         match the comment that indicates the .c file which the functions are
623         defined.
624         (cxx_print_xnode, cxx_print_decl, cxx_print_type,
625         cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
626
627 2009-05-05  Nathan Sidwell  <nathan@codesourcery.com>
628
629         * typeck.c (cp_build_compound_expr): Require RHS to have a known
630         type.
631         * class.c (resolve_address_of_overloaded_function): Use
632         OVL_CURRENT for error message.
633         (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
634         with them.  Do not copy the node.
635
636 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
637
638         PR c++/40013
639         * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
640         set it from its operand's type after tsubst_expr.
641
642 2009-05-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
643
644         PR c++/28152
645         * parser.c (cp_lexer_get_preprocessor_token):  Do not store the
646         canonical spelling for keywords.
647         (cp_parser_attribute_list): Use the canonical spelling for
648         keywords in attributes.
649
650 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
651
652         * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
653         pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
654         pp_cxx_new_expression, pp_cxx_delete_expression,
655         pp_cxx_unary_expression, pp_cxx_assignment_operator,
656         pp_cxx_assignment_expression, pp_cxx_expression,
657         pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
658         pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
659         pp_cxx_exception_specification, pp_cxx_direct_declarator,
660         pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
661         pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
662         pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
663         pp_cxx_declaration, pp_cxx_typeid_expression,
664         pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
665         pp_cxx_trait_expression): Mostly use pp_string and
666         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
667         for non-identifiers.  Mark English strings for translation.
668         * cxx-pretty-print.h (pp_cxx_ws_string): Define.
669         * error.c (dump_template_parameter, dump_template_bindings,
670         dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
671         dump_decl, dump_template_decl, dump_function_decl,
672         dump_parameters, dump_exception_spec, dump_template_parms,
673         dump_expr, dump_binary_op, dump_unary_op, op_to_string,
674         assop_to_string, args_to_string, cp_print_error_function,
675         print_instantiation_full_context,
676         print_instantiation_partial_context): Mostly use pp_string and
677         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
678         for non-identifiers.  Mark English strings for translation.
679         (dump_global_iord): Mark strings for translation; use longer
680         strings instead of substituting single words.
681         (function_category): Return a format string marked for
682         translation, not a single word or phrase to substitute in a longer
683         phrase.
684
685 2009-04-28  Ben Elliston  <bje@au.ibm.com>
686
687         PR c++/35652
688         Revert:
689
690         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
691
692         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
693
694 2009-04-27  Ian Lance Taylor  <iant@google.com>
695
696         * semantics.c (finish_omp_clauses): Change type of c_kind to enum
697         omp_clause_code.
698
699 2009-04-27  Jakub Jelinek  <jakub@redhat.com>
700
701         PR c++/39875
702         * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
703         -Wunused-value if implicit.
704
705 2009-04-24  Ian Lance Taylor  <iant@google.com>
706
707         * call.c (build_temp): Change 0 to enum constant.
708         * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
709         type.
710         * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
711         * decl2.c (constrain_visibility): Likewise.
712         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
713         (cp_parser_flags): Typedef to int rather than enum type.
714         (cp_parser_expression_stack_entry): Change prec field to enum
715         cp_parser_prec.
716
717         * typeck.c (build_modify_expr): Add lhs_origtype parameter.
718         Change all callers.
719
720 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
721
722         PR c++/39639
723         * parser.c (cp_parser_template_argument_list): Display an error
724         when an ellipsis is not preceded by a parameter pack. Also, warn
725         about variadic templates usage without -std=c++0x.
726
727 2009-04-21  Taras Glek <tglek@mozilla.com>
728
729         * cp-tree.h: Update GTY annotations to new syntax.
730         * decl.c: Likewise.
731         * mangle.c: Likewise.
732         * name-lookup.c: Likewise.
733         * name-lookup.h: Likewise.
734         * parser.c: Likewise.
735         * pt.c: Likewise.
736         * rtti.c: Likewise.
737         * semantics.c: Likewise.
738         * typeck2.c: Likewise.
739
740 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
741
742         PR c++/14875
743         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
744
745 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
746
747         PR c++/35711
748         * typeck.c (check_for_casting_away_constness): We diagnose casting
749         away any qualifiers not just constness.
750         (casts_away_constness): Mention that it handles more than just
751         constness.
752         
753 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
754
755         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
756         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
757         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
758         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
759         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
760         cfns.gperf: Add copyright and license notices.
761         * cfns.h: Regenerate.
762         * ChangeLog, ChangeLog-2004: Correct dates.
763
764 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
765
766         PR 16202
767         * tree.c (lvalue_p_1): Use const_tree.
768         Use CONST_CAST_TREE to avoid warning.
769         (lvalue_p): Returns bool, receives const_tree.
770
771 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
772
773         PR c++/13358
774         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
775         * error.c (pedwarn_cxx98): New.
776         * cp-tree.h (pedwarn_cxx98): Declare.
777
778 2009-04-20  Le-Chun Wu  <lcwu@google.com>
779
780         PR c++/39803
781         * init.c (build_vec_init): Set TREE_NO_WARNING on the
782         compiler-generated INDIRECT_REF expression.
783
784 2009-04-20  Ian Lance Taylor  <iant@google.com>
785
786         * typeck.c (build_function_call_vec): New function.
787         (cp_build_function_call): Only pass first parameter to
788         objc_rewrite_function_call.
789         (build_modify_expr): Add rhs_origtype parameter.  Change all
790         callers.
791         * decl.c (finish_decl): Add origtype parameter.  Change all
792         callers.
793         * semantics.c (finish_call_expr): Pass VEC to
794         resolve_overloaded_builtin.
795
796 2009-04-20  Ian Lance Taylor  <iant@google.com>
797
798         * cp-tree.h (base_access): Change typedef to int.
799         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
800         (cp_parser_omp_threadprivate): Likewise.
801         * pt.c (unify_pack_expansion): Add casts to enum type.
802
803 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
804
805         PR c/32061
806         PR c++/36954
807         * call.c (build_new_op): Save the original codes of operands
808         before folding.
809
810 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
811
812         * cp-tree.h: Remove the prototype for insert_block.
813         * decl.c (insert_block): Remove.
814
815 2009-04-16  Ian Lance Taylor  <iant@google.com>
816
817         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
818         (tsubst_flags_t): Change typedef from enum type to int.
819
820 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
821
822         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
823         instead of targetm.vector_opaque_p.
824
825 2009-04-15  Le-Chun Wu  <lcwu@google.com>
826
827         PR c++/39551
828         * call.c (build_over_call): Set TREE_NO_WARNING on the
829         compiler-generated INDIRECT_REF expression.
830         * cvt.c (convert_to_void): Emit warning when stripping off
831         INDIRECT_REF.
832
833 2009-04-14  Diego Novillo  <dnovillo@google.com>
834
835         * parser.c (cp_parser_type_specifier_seq): Move call to
836         invoke_plugin_callbacks ...
837         (cp_parser_type_specifier_seq): ... here.
838
839 2009-04-14  Le-Chun Wu  <lcwu@google.com>
840
841         * Make-lang.in: Modify dependencies of files including plugin.h.
842         * decl.c (finish_function): Call invoke_plugin_callbacks.
843         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
844
845 2009-04-14  Jason Merrill  <jason@redhat.com>
846
847         PR c++/39763
848         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
849         about shadowing by tentative parms.
850
851 2009-04-13  Jason Merrill  <jason@redhat.com>
852
853         PR c++/39480
854         * call.c (build_over_call): Don't call memcpy if the target is
855         the same as the source.
856
857 2009-04-13  Jason Merrill  <jason@redhat.com>
858
859         PR c++/39750
860         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
861
862 2009-04-12  Jason Merrill  <jason@redhat.com>
863
864         PR c++/39742
865         * call.c (joust): Don't crash on variadic fn.
866
867 2009-04-10  Jason Merrill  <jason@redhat.com>
868
869         PR c++/28301
870         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
871         if we see a close brace without an open brace.
872
873 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
874
875         * parser.c (cp_parser_class_specifier): Remove the unused
876         has_trailing_semicolon.
877
878 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
879
880         PR  c++/20118
881         * parser.c (cp_parser_check_template_parameters): Take a
882         cp_declarator parameter.
883         (cp_parser_elaborated_type_specifier): Update to
884         cp_parser_check_template_parameters.
885         (cp_parser_class_head): Likewise.
886         (cp_parser_check_declarator_template_parameters): Likewise.
887         (cp_parser_check_template_parameters): Handle first the non-error
888         conditions. Give more accurate diagnostics if a declarator is
889         given. 
890
891 2009-04-08  Jason Merrill  <jason@redhat.com>
892
893         PR c++/25185
894         * error.c (dump_aggr_type): Chase template typedefs if
895         -fno-pretty-templates.
896
897 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
898
899         PR c++/39637
900         * parser.c (cp_parser_enumerator_definition): Make sure the
901         initializer of the enumerator doesn't contain any bare parameter pack.
902
903 2009-04-07  Jason Merrill  <jason@redhat.com>
904
905         PR c++/34691
906         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
907         * call.c (joust): Complain about mismatched default arguments
908         in extern "C" functions.
909         * class.c (resolve_address_of_overloaded_function): Handle multiple
910         extern "C" functions.
911         * pt.c (resolve_overloaded_unification): Likewise.
912
913 2009-04-07  Jason Merrill  <jason@redhat.com>
914
915         PR c++/25185
916         * error.c (dump_function_decl): Don't pretty-print templates
917         if -fno-pretty-templates.
918         (count_non_default_template_args): Print all args if
919         -fno-pretty-templates.
920
921 2009-04-06  Jason Merrill  <jason@redhat.com>
922
923         PR c++/35146
924         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
925         the deduced template arguments give us the parameter types
926         we're looking for.
927
928 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
929             Jason Merrill  <jason@redhat.com>
930
931         PR c++/14912
932         * error.c (count_non_default_template_args): New fn.
933         (dump_template_parms): Call it.
934         (dump_template_argument_list): Call it.  Add parms parm.
935         (dump_template_argument): Adjust call to dump_template_argument_list.
936         (dump_type, dump_decl): Likewise.
937         (dump_template_bindings): Refactor logic.
938
939 2009-04-03  Jason Merrill  <jason@redhat.com>
940
941         PR c++/25185
942         * error.c (dump_template_bindings): Look through typedefs in
943         typename results.
944         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
945         (find_typenames_r): Also collect typedefs.
946         * pt.c (unify): Strip typedefs.
947
948         PR c++/39608
949         * semantics.c (finish_id_expression): Don't assume a dependent
950         member of the current instantiation isn't a valid integral
951         constant expression.  Check dependent_scope_p.
952         * pt.c (dependent_scope_p): Check TYPE_P.
953         (tsubst_copy): If args is null, just return.
954
955 2009-04-02  Jason Merrill  <jason@redhat.com>
956
957         PR c++/25185
958         * error.c (find_typenames, find_typenames_r): New fns.
959         (dump_function_decl): Call find_typenames.
960         (dump_template_bindings): Print typenames as well.
961         * pt.c (tsubst): Non-static.
962         * cp-tree.h: Declare it.
963
964 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
965
966         PR c++/26693
967         * decl2.c (grokfield): when a typedef appears in a
968         class, create the typedef variant type node for it.
969         (save_template_attributes): Creating typedef variant type node
970          here is now useless.
971         * decl.c (grokdeclarator): If the typedef'ed struct/class was
972         anonymous, set the proper type name to all its type variants.
973         (xref_basetypes) : Fixup the variant types after setting
974         TYPE_BINFO on REF.
975         * name-lookup.c (pushdecl_maybe_friend): Reuse the
976         set_underlying_type function to install typedef variant types.
977         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
978         macro.
979         (append_type_to_template_for_access_check): New entry points.
980         * semantics.c (check_accessibility_of_qualified_id):
981         When a typedef that is a member of a class appears in a template,
982         add it to the template. It will be ...
983         * class.c (finish_struct_bits): Split type variant fixup into ...
984         (fixup_type_variants): A new entry point.
985         * pt.c (instantiate_class_template, instantiate_template ): ... access
986         checked at template instantiation time.
987         (resolve_type_name_type): The type name should be the name of the
988         main type variant.
989         (retrieve_specialization): Specializations of template typedefs aren't
990         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
991         (append_type_to_template_for_access_check): New entry point.
992         (tsubst_decl): For typedefs, build the variant type from the correct
993         original type.
994         (get_class_bindings): Fix function comment.
995         (perform_typedefs_access_check): New entry point.
996
997 2009-03-31  Jason Merrill  <jason@redhat.com>
998
999         PR c++/34691
1000         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
1001         extern "C" declarations.
1002
1003         C++ DR 613
1004         * semantics.c (finish_non_static_data_member): Allow such references
1005         without an associated object in sizeof/decltype/alignof.
1006
1007         * ptree.c (cxx_print_decl): Pretty-print full name of
1008         function/template.
1009         (cxx_print_type): Pretty-print full name of class.
1010
1011         * decl.c (grokdeclarator): Reject pointer to qualified function
1012         type.
1013
1014         PR c++/37806, core issue 547
1015         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
1016         to a typedef.
1017         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
1018         function type.
1019         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
1020         * decl.c (groktypename): Add is_template_arg parameter.
1021         (grokdeclarator): Allow function cv-quals on a template type arg.
1022         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
1023         is_template_arg argument in calls to groktypename.
1024         * cp-tree.h: Adjust prototype.
1025         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
1026         FUNCTION_TYPE printing.
1027         
1028         * mangle.c (write_expression): Mangle dependent name as
1029         source-name.
1030
1031         PR c++/38030, 38850, 39070
1032         * pt.c (type_dependent_expression_p_push): New fn.
1033         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
1034         substitution makes the call non-dependent.  Preserve koenig_p.
1035         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
1036         for non-dependent calls.
1037         * semantics.c (finish_call_expr): Revert earlier changes.
1038         * cp-tree.h: Revert change to finish_call_expr prototype.
1039
1040 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1041
1042         PR preprocessor/34695
1043         * cp-tree.h (cp_cpp_error): Remove.
1044         * error.c (cp_cpp_error): Remove.
1045         * parser.c (cp_lexer_new_main): Set done_lexing instead of
1046         client_diagnostic and error callback.
1047
1048 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
1049
1050         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1051         * cp/cp-objcp-common.c (cxx_staticp): Remove.
1052         * cp/cp-tree.h (cxx_staticp): Remove.
1053
1054 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
1055
1056         PR c++/39554
1057         * parser.c (cp_parser_postfix_expression): Don't call
1058         warning_if_disallowed_function_p.
1059
1060 2009-03-27  Jan Hubicka  <jh@suse.cz>
1061
1062         * except.c (choose_personality_routine): Set terminate_node to abort
1063         for java exceptions.
1064
1065 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
1066             Jakub Jelinek  <jakub@redhat.com>
1067
1068         PR debug/37959
1069         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
1070         (cp_function_decl_explicit_p): New prototype.
1071         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
1072
1073 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1074
1075         PR c++/38638
1076         * parser.c (cp_parser_elaborated_type_specifier): If we have a
1077         typename tag and don't have either a TYPE_DECL or a
1078         TEMPLATE_ID_EXPR, set the type to NULL.
1079
1080 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
1081
1082         PR c++/37647
1083         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
1084         scope.
1085
1086 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
1087
1088         PR c++/29727
1089         * decl.c (check_array_designated_initializer): Handle error_mark_node.
1090
1091 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1092
1093         PR c++/35652
1094         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1095
1096 2009-03-26  Andrew Haley  <aph@redhat.com>
1097
1098         PR C++/39380
1099         * decl2.c (possibly_inlined_p): If java exceptions are in use
1100         don't inline a decl unless it is explicitly marked inline.
1101         * lex.c: (pragma_java_exceptions): New variable.
1102         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
1103         * cp-tree.h (pragma_java_exceptions): Declare new variable.
1104
1105 2009-03-24  Jason Merrill  <jason@redhat.com>
1106
1107         PR c++/28274
1108         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1109
1110 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
1111
1112         PR c/39495
1113         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1114         code if iter is the second operand.
1115         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1116         argument.  If it is set, don't build the toplevel expression with
1117         build_x_binary_op, but build2.
1118         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
1119         callers.
1120         (cp_parser_omp_for_cond): Don't assume the first operand of the
1121         comparison must be decl.
1122
1123 2009-03-23  Jason Merrill  <jason@redhat.com>
1124
1125         PR c++/37729
1126         * pt.c (make_fnparm_pack): Split out from...
1127         (instantiate_decl): ...here.
1128         (tsubst_pack_expansion): Handle being called in a late-specified
1129         return type.
1130
1131         PR c++/39526
1132         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1133         a parm with a parm.
1134
1135 2009-03-20  Jason Merrill  <jason@redhat.com>
1136
1137         PR c++/28879
1138         * parser.c (cp_parser_direct_declarator): In a template, wrap 
1139         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1140         * pt.c (tsubst): Preserve it in a partial instantiation.
1141         (dependent_type_p_r): Don't check value_dependent_expression_p.
1142         * decl.c (compute_array_index_type): Don't check
1143         value_dependent_expression_p if TREE_SIDE_EFFECTS.
1144
1145         C++ core issue 703
1146         * typeck2.c (check_narrowing): Don't complain about loss of 
1147         precision when converting a floating-point constant.
1148
1149 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
1150
1151         PR c/39495
1152         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1153         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1154
1155 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
1156
1157         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1158         (eof_token): Adjust.
1159
1160 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
1161
1162         PR c++/39425
1163         * parser.c (cp_parser_explicit_specialization): Don't skip the
1164         rest of the specialization when begin_specialization returns
1165         false.
1166
1167 2009-03-17  Jason Merrill  <jason@redhat.com>
1168
1169         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1170         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1171         * pt.c (check_explicit_specialization): Likewise.
1172         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1173         local specialization.
1174         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1175         * decl2.c (parm_index): New fn.
1176         * semantics.c (finish_decltype_type): Don't use describable_type.
1177         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
1178         Give a sorry for unsupported codes rather than crash.  Mangle
1179         conversions with other than 1 operand.  New mangling for PARM_DECL.
1180         * operators.def (ALIGNOF_EXPR): Mangle as "az".
1181
1182 2009-03-17  Jing Yu  <jingyu@google.com>
1183
1184         PR middle-end/39378
1185         * method.c (use_thunk): Change is_thunk from crtl to cfun.
1186
1187 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
1188
1189         PR c++/39475
1190         * semantics.c (check_trait_type): New.
1191         (finish_trait_expr): Use it.
1192
1193 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
1194
1195         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1196         instead of calling imported_module_or_decl debug hook if
1197         building_stmt_tree ().
1198         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1199         is a NAMESPACE_DECL.
1200
1201         PR debug/37890
1202         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1203         hook at function scope.
1204
1205         PR debug/39471
1206         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1207         on IMPORTED_DECL.
1208
1209 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1210
1211         PR c++/39371
1212         * semantics.c (finish_switch_cond): Don't call get_unwidened.
1213         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1214         instead of TREE_TYPE (cond).
1215
1216 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1217
1218         PR c++/39060
1219         * parser.c (cp_parser_late_parsing_default_args): Continue
1220         the loop when cp_parser_assignment_expression returns
1221         error_mark_node.
1222
1223 2009-03-07  Jason Merrill  <jason@redhat.com>
1224
1225         PR c++/39367
1226         * init.c (build_new_1): Don't use a VLA type.
1227         (build_vec_init): Handle getting a pointer for BASE.
1228
1229 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
1230
1231         PR c++/37520
1232         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1233         when mangling symbols.
1234
1235 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
1236
1237         PR c++/33492
1238         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1239
1240 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
1241
1242         * decl.c (record_builtin_java_type): Use canonicalized integer
1243         types.
1244
1245 2009-03-04  Jason Merrill  <jason@redhat.com>
1246
1247         PR c++/38908
1248         * class.c (is_really_empty_class): New fn.
1249         * cp-tree.h: Declare it.
1250         * cp-objcp-common.c (cp_expr_size): Use it.
1251
1252         PR c++/13549
1253         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1254         * parser.c (cp_parser_postfix_expression): Call it for 
1255         TEMPLATE_ID_EXPR.
1256         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1257         (get_first_fn): Likewise.
1258
1259         PR c++/9634
1260         PR c++/29469
1261         PR c++/29607
1262         Implement DR 224.
1263         * decl.c (make_typename_type): Do look inside currently open classes.
1264         * parser.c (cp_parser_lookup_name): Likewise.
1265         (cp_parser_template_name): Likewise.
1266         * pt.c (dependent_scope_p): New function.
1267         * cp-tree.h: Declare it.
1268         * class.c (currently_open_class): Return fast if T isn't a class.
1269
1270 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1271
1272         PR c++/37789
1273         * parser.c (cp_parser_mem_initializer): Return error_mark_node
1274         if cp_parser_mem_initializer_id returns error_mark_node.
1275
1276 2009-02-24  Richard Guenther  <rguenther@suse.de>
1277
1278         PR c++/39242
1279         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1280         declared functions.
1281
1282 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1283
1284         PR c++/36411
1285         * pt.c (coerce_template_template_parms): Return 0 if parameter
1286         is error_mark_node.
1287
1288 2009-02-23  Jason Merrill  <jason@redhat.com>
1289
1290         * pt.c (unify): Call maybe_adjust_types_for_deduction when
1291         deducing from an initializer list.
1292
1293 2009-02-20  Jason Merrill  <jason@redhat.com>
1294
1295         PR c++/39225
1296         * decl.c (grokdeclarator): Handle ~identifier.
1297
1298 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
1299
1300         PR target/39175
1301         * decl2.c (determine_visibility): If visibility changed and
1302         DECL_RTL has been already set, call make_decl_rtl to update symbol
1303         flags.
1304
1305 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
1306
1307         PR c++/39188
1308         * cp-tree.h (maybe_commonize_var): New.
1309
1310         * decl.c (maybe_commonize_var): Make it extern.
1311
1312         * decl2.c (finish_anon_union): Call maybe_commonize_var.
1313
1314 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
1315
1316         PR c++/39219
1317         * parser.c (cp_parser_enum_specifier): Apply all attributes.
1318
1319 2009-02-18  Jason Merrill  <jason@redhat.com>
1320
1321         * cfns.h: Tweak pathname for cfns.gperf.
1322
1323 2009-02-13  Jason Merrill  <jason@redhat.com>
1324
1325         PR c++/39070
1326         * semantics.c (finish_call_expr): Change koenig_p parm to int.
1327         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1328         * cp-tree.h: Adjust prototype.
1329         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1330
1331 2009-02-12  Jason Merrill  <jason@redhat.com>
1332
1333         PR c++/38950
1334         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1335
1336 2009-02-11  Jason Merrill  <jason@redhat.com>
1337
1338         PR c++/39153
1339         * decl2.c (cp_write_global_declarations): 
1340         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1341
1342         PR c++/30111
1343         * init.c (build_value_init_noctor): Split out from...
1344         (build_value_init): ...here.
1345         (expand_aggr_init_1): Handle value-initialization.
1346         * cp-tree.h: Add declaration.
1347         * class.c (type_has_user_provided_constructor): 
1348         Handle non-class arguments.
1349
1350 2009-02-10  Jason Merrill  <jason@redhat.com>
1351
1352         PR c++/38649
1353         * class.c (defaultable_fn_p): Handle ... properly.
1354
1355         PR c++/36744
1356         * tree.c (lvalue_p_1): Condition rvalue ref handling on
1357         treat_class_rvalues_as_lvalues, too.
1358
1359 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
1360
1361         PR c++/34397
1362         * typeck.c (build_x_array_ref): New.
1363         * cp-tree.h: Declare it.
1364         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1365
1366 2009-02-09  Jason Merrill  <jason@redhat.com>
1367
1368         PR c++/39109
1369         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1370         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1371         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1372         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1373         for build_value_init TARGET_EXPR.
1374         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1375
1376 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
1377
1378         PR c++/35147
1379         PR c++/37737
1380         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1381
1382 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
1383
1384         PR c++/39095
1385         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1386         remove ./dt operator.
1387         * mangle.c (write_expression): Handle COMPONENT_REF after handling
1388         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1389         write_string ("dt") instead of using operators.def.
1390
1391 2009-02-03  Jason Merrill  <jason@redhat.com>
1392
1393         * typeck.c (cp_build_unary_op): Only complain about taking address
1394         of main if pedantic.
1395
1396 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
1397
1398         PR inline-asm/39059
1399         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1400
1401         PR c++/39056
1402         * typeck2.c (digest_init_r): Don't call process_init_constructor
1403         for COMPLEX_TYPE.
1404
1405 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
1406
1407         PR c++/36897
1408         * pt.c (convert_nontype_argument_function): Expect expr to be an
1409         ADDR_EXPR.
1410
1411         PR c++/37314
1412         * typeck.c (merge_types): Call resolve_typename_type if only
1413         one type is a typename.
1414
1415 2009-02-02  Jason Merrill  <jason@redhat.com>
1416
1417         PR c++/39054
1418         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
1419         in BIT_NOT_EXPR.
1420
1421 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
1422
1423         PR c++/39053
1424         * parser.c (cp_parser_pure_specifier): If there are no tokens left
1425         do not call cp_lexer_consume_token.
1426
1427 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
1428
1429         PR c++/39028
1430         * parser.c (cp_parser_already_scoped_statement): Handle __label__
1431         declarations.
1432
1433 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1434
1435         PR c++/33465
1436         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1437
1438 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
1439
1440         PR c++/38655
1441         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1442
1443 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1444
1445         * typeck.c (invalid_nonstatic_memfn_p): Use
1446         DECL_NONSTATIC_MEMBER_FUNCTION_P.
1447
1448 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
1449
1450         PR c++/37554
1451         * call.c (build_over_call): If convert_for_arg_passing returns
1452         error_mark_node unconditionally return it.
1453
1454 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
1455
1456         * class.c (check_field_decls): Also inherit packed for bitfields
1457         regardless of their type.
1458
1459 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
1460
1461         PR c++/38930
1462         * decl2.c (grokfield): Reverting changes of PR c++/26693
1463         (save_template_attributes): Likewise.
1464         * decl.c (grokdeclarator): Likewise.
1465         * name-lookup.c (pushdecl_maybe_friend): Likewise.
1466         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1467         (append_type_to_template_for_access_check): Likewise.
1468         * semantics.c (check_accessibility_of_qualified_id): Likewise.
1469         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1470         (tsubst): Likewise.
1471         (resolve_type_name_type): Likewise.
1472         (append_type_to_template_for_access_check): Likewise.
1473
1474 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
1475
1476         PR c++/26693
1477         * decl2.c (grokfield): when a typedef appears in a
1478         class, create the typedef variant type node for it.
1479         (save_template_attributes): Creating typedef variant type node
1480          here is now useless.
1481         * decl.c (grokdeclarator): If the typedef'ed struct/class was
1482         anonymous, set the proper type name to all its type variants.
1483         * name-lookup.c (pushdecl_maybe_friend): Reuse the
1484         set_underlying_type function to install typedef variant types.
1485         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1486         macro.
1487         (append_type_to_template_for_access_check): New entry points.
1488         * semantics.c (check_accessibility_of_qualified_id):
1489         When a typedef that is a member of a class appears in a template,
1490         add it to the template. It will be ...
1491         * pt.c (instantiate_class_template, instantiate_template ): ... access
1492         checked at template instantiation time.
1493         (tsubst): Handle the case of being called with NULL args.
1494         (resolve_type_name_type): The type name should be the name of the
1495         main type variant.
1496         (append_type_to_template_for_access_check): New entry point.
1497
1498 2009-01-19  Jason Merrill  <jason@redhat.com>
1499
1500         PR c++/23287
1501         * parser.c (cp_parser_unqualified_id): In a template,
1502         accept ~identifier.
1503         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1504
1505 2009-01-16  Jason Merrill  <jason@redhat.com>
1506
1507         PR c++/38877
1508         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1509         * init.c (build_new): Don't call describable_type unless we
1510         have an auto.
1511
1512         PR c++/29470
1513         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1514
1515         PR c++/38579
1516         * search.c (protected_accessible_p): N doesn't vary.
1517
1518 2009-01-15  Jason Merrill  <jason@redhat.com>
1519
1520         PR c++/38850
1521         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1522         accept hidden friends.
1523
1524 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1525
1526         PR C++/29388
1527         * decl.c (grokdeclarator): Check for a non namespace/class context.
1528
1529 2009-01-15  Jason Merrill  <jason@redhat.com>
1530
1531         PR c++/36334
1532         PR c++/37646
1533         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
1534         a function isn't necessarily an lvalue. Take tree, not const_tree.
1535         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1536         * typeck.c (lvalue_or_else): Likewise.
1537         * cp-tree.h: Adjust prototypes.
1538
1539 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
1540
1541         PR c++/38357
1542         * pt.c (tsubst): Check for NULL args.
1543
1544 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
1545
1546         PR c++/38636
1547         * name-lookup.c (pushtag): Don't create members to types that are not
1548         being created.
1549
1550 2009-01-14  Nick Clifton  <nickc@redhat.com>
1551
1552         PR c++/37862
1553         * parser.c: Pass cp_id_kind computed in
1554         cp_parser_postfix_dot_deref_expression to
1555         cp_parser_primary_expression.
1556
1557 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
1558
1559         PR c++/38795
1560         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1561         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1562         as CAST_EXPR.
1563
1564 2009-01-12  Jason Merrill  <jason@redhat.com>
1565             Steve Ellcey  <sje@cup.hp.com>
1566
1567         PR c++/35109
1568         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
1569         binding.
1570
1571 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
1572
1573         PR c++/36019
1574         * pt.c (parameter_of_template_p): New function.
1575         * cp-tree.h: Declare it.
1576         * name-lookup.c (binding_to_template_parms_of_scope_p): New
1577         function.
1578         (outer_binding): Take template parameters in account when looking for
1579         a name binding.
1580
1581 2009-01-12  Jason Merrill  <jason@redhat.com>
1582
1583         PR c++/31488
1584         * tree.c (pod_type_p): Return 1 for structs created by the back end.
1585
1586 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
1587
1588         PR c/32041
1589         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1590         offsetof member-designator, handle it as `[0].'.
1591
1592         PR c++/38794
1593         * decl.c (start_function): If grokdeclarator hasn't returned
1594         FUNCTION_DECL nor error_mark_node, issue diagnostics.
1595
1596 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
1597
1598         PR c++/36254
1599         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1600         (gimplify_if_stmt): ... this.
1601         (cp_gimplify_expr): Don't handle IF_STMT here.
1602         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1603
1604 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
1605
1606         PR c++/38648
1607         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1608
1609         PR c++/36695
1610         * typeck2.c (build_functional_cast): Check for reference type and NULL
1611         PARMS.
1612
1613 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
1614
1615         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1616
1617 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
1618
1619         PR c++/35335
1620         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1621
1622 2009-01-09  John F. Carr  <jfc@mit.edu>
1623
1624         PR c++/37877
1625         * parser.c (cp_parser_class_specifier): Clear
1626         parser->in_unbraced_linkage_specification_p while parsing class
1627         specifiers.
1628
1629 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
1630
1631         PR c++/38725
1632         * semantics.c (finish_goto_stmt): Convert destination to
1633         void *.
1634
1635 2009-01-06  Jason Merrill  <jason@redhat.com>
1636
1637         PR c++/35297
1638         PR c++/35477
1639         PR c++/35784
1640         PR c++/36846
1641         PR c++/38276
1642         * pt.c (check_default_tmpl_args): Don't complain about
1643         out-of-order parameter packs in the enclosing class
1644         or parameter packs after default args.
1645         (coerce_template_parms): If we have more than one
1646         parameter pack, don't flatten argument packs.
1647         (template_args_equal): Handle argument packs.
1648         (comp_template_args): Don't flatten argument packs.
1649         (check_instantiated_arg): Split out from...
1650         (check_instantiated_args): Here.  Handle arg packs.
1651         (convert_template_argument): Just check that nontype argument
1652         packs have the right type.
1653
1654 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
1655
1656         PR c++/38472
1657         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1658
1659 2009-01-05  Jason Merrill  <jason@redhat.com>
1660
1661         PR c++/38698
1662         * typeck2.c (process_init_constructor_union): Handle union with
1663         no fields.
1664
1665         * mangle.c (write_expression): Remove mangling for zero-operand
1666         casts.
1667
1668         PR c++/38701
1669         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1670         defaulting.
1671
1672         PR c++/38702
1673         * class.c (defaultable_fn_p): Only operator== can be a copy
1674         assignment operator.
1675
1676 2009-01-02  Jason Merrill  <jason@redhat.com>
1677
1678         PR c++/38698
1679         * typeck2.c (process_init_constructor_union): Handle excess
1680         initializers.
1681         (process_init_constructor_record): Likewise.
1682
1683         PR c++/38684
1684         * typeck2.c (digest_init_r): Don't use process_init_constructor
1685         for non-aggregate classes.
1686
1687 \f
1688 Copyright (C) 2009 Free Software Foundation, Inc.
1689
1690 Copying and distribution of this file, with or without modification,
1691 are permitted in any medium without royalty provided the copyright
1692 notice and this notice are preserved.