OSDN Git Service

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