OSDN Git Service

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