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