OSDN Git Service

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