OSDN Git Service

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