Merged with mainline at revision 128810.
[official-gcc.git] / gcc / cp / ChangeLog
blobb47c802399aeebc7cbc94d6685ee1af1c08b5547
1 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
3         PR c++/33207
4         * name-lookup.c (pushtag): Do not create an implicit typedef before
5         the associated type declaration is known to be valid.
7 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
9         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
10         rather than pointers.
12 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
14         PR c++/14688
15         * search.c (check_final_overrider): Fail if
16         targetm.comp_type_attributes returns 0.
18 2007-09-24  Jason Merrill  <jason@redhat.com>
20         PR c++/33239
21         * pt.c (resolve_typename_type): Don't look things up in the original
22         template if it would mean losing template arguments.    
24 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
26         PR c++/33506
27         * cp-tree.h (cxx_type_hash_eq): New prototype.
28         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
29         * tree.c (cxx_type_hash_eq): New function.
31 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
33         PR c++/33185    
34         * tree.c (cp_build_qualified_type_real): Build a canonical
35         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
36         
37 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
39         PR c++/33112
40         PR c++/33185    
41         * tree.c (cplus_array_compare): Compare pointers, not types.
42         (build_cplus_array_type_1): Store new array type into the hash
43         table before building the canonical type; build the canonical type
44         correctly.
45         (cp_build_qualified_type_real): Put all of the array types with
46         cv-qualified element types into the C++ array hash table, built as 
47         variants of the unqualified versions.
48         
49 2007-09-23  Jason Merrill  <jason@redhat.com>
51         PR c++/16370
52         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
53         for deprecation warnings.
55 2007-09-22  Jason Merrill  <jason@redhat.com>
57         PR c++/15269
58         * call.c (build_over_call): Warn about deprecated virtuals.
60         PR c++/19407
61         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
62         (MAYBE_TAGGED_TYPE_P): Remove.
63         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
64         instead of calling is_late_template_attribute again.
65         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
66         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
67         Don't crash on typedefs from non-template classes.
68         * decl2.c (grokfield): Don't sorry about attrs on template parms.
69         (is_late_template_attribute): All attributes applied to template
70         parms or typename types are dependent.  Static.
71         (splice_template_attributes): Pass decl through.
72         (save_template_attributes): Likewise.
74 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
76         PR c++/33496
77         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
78         returned from tsubst_pack_expansion.
79         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
80         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
82 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
84         PR c++/33460
85         * semantics.c (finish_id_expression): Use consistently
86         context_for_name_lookup.
87         * decl.c (fixup_anonymous_aggr): Fix error message for
88         anonymous struct (vs union).
90 2007-09-19  Jason Merrill  <jason@redhat.com>
92         PR c++/7586
93         * pt.c (tsubst): Handle typedefs by looking for the specialization.
94         (retrieve_specialization): Only tagged types use 
95         DECL_TEMPLATE_INSTANTIATIONS.
96         (instantiate_class_template): Push nested classes too.
97         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
98         tagged types.
99         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
100         * init.c (is_aggr_type): Remove redundant tests.
101         * class.c (push_nested_class): Use CLASS_TYPE_P.
103 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
105         PR c++/33459
106         * init.c (build_zero_init): If, recursively, build_zero_init
107         returns a NULL_TREE, do not append it to the VEC of constructors.
109 2007-09-18  Jason Merrill  <jason@redhat.com>
111         PR c++/17743
112         * pt.c (apply_late_template_attributes): Set processing_template_decl.
113         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
114         ATTR_FLAG_TYPE_IN_PLACE.
115         (tsubst): Do unqualified lookup to find typedefs from current class.
116         [ARRAY_TYPE]: Propagate alignment info.
117         * decl2.c (is_late_template_attribute): Only defer handling of
118         attribute aligned if the expression is dependent.
119         (save_template_attributes): If we're deferring any attributes,
120         make this a naming typedef.
122 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
124         PR c++/33462 (again)
125         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
126         va_arg instead of __builtin_va_arg.
128 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
130         PR c++/33462
131         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
132         (pp_cxx_primary_expression): Use it.
133         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
134         * error.c (dump_expr): Use it.
136 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
138         PR c++/33463
139         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
140         out case TYPEID_EXPR to...
141         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
142         and pp_cxx_right_paren.
143         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
144         * error.c (dump_expr): Use it.
146 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
148         PR c++/33464
149         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
150         (pp_cxx_primary_expression): Use it.
151         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
152         * error.c (dump_expr): Use it.
154 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
156         PR c++/33124
157         * init.c (build_new): Remove warning for zero-element
158         allocations.
160 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
162         PR c++/32756
163         * call.c (maybe_handle_implicit_object): Set this_p, clear
164         rvaluedness_matches_p.
165         (compare_ics): Do not compare rvaluedness matching when one of the
166         operands is an implicit object.
168 2007-09-14  Jason Merrill  <jason@redhat.com>
170         PR c++/17743, c++/19163
171         * decl2.c (is_late_template_attribute): New fn.
172         (splice_template_attributes, save_template_attributes): New fns.
173         (cplus_decl_attributes): Call save_template_attributes.
174         * pt.c (apply_late_template_attributes): New fn.
175         (instantiate_class_template, tsubst_decl): Use it.
176         * cp-tree.h: Declare is_late_template_attribute.
178 2007-09-13  Tom Tromey  <tromey@redhat.com>
180         * parser.c (cp_lexer_new_main): Don't use
181         c_lex_return_raw_strings.
182         (cp_lexer_get_preprocessor_token): Update.  Add special case when
183         lexer is NULL.
185 2007-09-11  Jan Hubicka <jh@suse.cz>
187         * method.c (use_thunk): Use tree_rest_of_compilation
188         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
189         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
190         * cp-tree.h (expand_body): Kill.
191         (emit_associated_thunks): Declare.
192         * semantics.c (emit_associated_thunks): Export.
193         (expand_body): Kill.
195 2007-09-09  David Daney  <ddaney@avtrex.com>
197         PR c++/33324
198         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
199         to calculate cookie_ptr.
201 2007-09-08  Jason Merrill  <jason@redhat.com>
203         PR c++/33342
204         * pt.c (most_specialized_class): Set processing_template_decl
205         while tsubsting partial spec args.
207 2007-09-06  Jason Merrill  <jason@redhat.com>
209         * decl2.c (get_guard): Copy visibility from the guarded variable.
211 2007-09-06  Jan Hubicka  <jh@suse.cz>
213         * semantics.c (expand_body): Do not mark arguments of clones used.
215 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
217         PR c++/32674
218         * decl.c (cp_finish_decl): When processing_template_decl,
219         deal correctly with init as TREE_LIST.
221 2007-09-06  Tom Tromey  <tromey@redhat.com>
223         * decl.c (finish_function): Put return's location on line zero of
224         file.
226 2007-09-05  Jason Merrill  <jason@redhat.com>
228         PR c++/15745
229         * except.c (prepare_eh_type): Use type_decays_to.
231         PR c++/15097
232         * init.c (build_delete): Use build_headof to get the address of the
233         complete object if we aren't using the deleting destructor.
234         * rtti.c (build_headof): No longer static.
235         * cp-tree.h: Declare it.
237 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
239         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
240         decl if a prototype for XX is provided with throw().
242         PR c++/33289
243         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
244         on __*_chk non-__builtin_* decls.
246 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
248         PR c++/30302
249         * semantics.c (finish_id_expression): Use context_for_name_lookup
250         insted of DECL_CONTEXT, to see through anonymous structs and unions.
251         * class.c (finish_struct_anon): Deal correctly with anonymous
252         structs (vs unions, as GNU extension) in error messages.
254 2007-09-05  Jan Hubicka  <jh@suse.cz>
256         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
257         call, DECL_EXTERNAL checks and current_function_decl saving.
259 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
261         PR c++/29731 (again)
262         * parser.c (cp_parser_primary_expression): Return error_mark_node
263         when a statement-expression is found in a template-argument list.
265 2007-09-04  Jason Merrill  <jason@redhat.com>
267         * except.c (initialize_handler_parm): Use
268         fold_build_cleanup_point_expr.
270         PR c++/31419
271         * call.c (reference_binding): Don't look for user-defined conversions
272         to the same type.
274         PR c++/31411
275         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
276         the MUST_NOT_THROW_EXPR.
278 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
280         * decl.c (cp_finish_decl): Call determine_visibility before
281         make_rtl_for_nonlocal_decl.
283 2007-09-04  Jason Merrill  <jason@redhat.com>
285         PR c++/14032
286         * pt.c (most_specialized_class): Substitute outer template
287         arguments into the arguments of a member template partial
288         specialization.
289         (strip_innermost_template_args): New fn.
291 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
293         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
295 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
297         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
298         * decl.c (cp_make_fname_decl): Likewise,
299         * parser.c (cp_parser_string_literal): Likewise,
300         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
301         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
302         Likewise,
304 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
306         PR c++/33208
307         * typeck.c (build_unary_op): Fix error message for
308         Boolean expression as operand to operator--.
310 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
312         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
313         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
314         Likewise.
316 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
318         PR c++/32597
319         * init.c (build_default_init): Make extern.
320         * cp-tree.h (build_default_init): Declare here.
321         * pt.c (tsubst_expr): When the instantiation of the initializer of
322         a variable results in an empty list, default-initialize the
323         variable.
324         (tsubst_copy_and_build): When the instantiation of the initializer
325         in a new expression results in an empty initializer list,
326         default-initialize it.
328 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
330         * mangle.c (write_type): Change mangling of rvalue reference from
331         `RR' to `O'. 
333 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
335         * decl.c (duplicate_decls): Remove duplicated line.
337 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
339         PR c++/33210
340         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
341         BOUND_TEMPLATE_TEMPLATE_PARM.
343 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
345         PR c++/32113
346         * search.c (lookup_member): Check the name argument for
347         error_mark_node.
349 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
351         PR c++/33212
352         * parser.c (cp_parser_trait_expr): Check rerurn value of
353         cp_parser_type_id.
355 2007-08-30  Ollie Wild  <aaw@google.com>
357         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
358         convert_ptrmem for pointer to member conversions.
359         (convert_to_pointer_force): Update cp_convert_to_pointer call.
360         (ocp_convert): Update cp_convert_to_pointer call.
361         * typeck.c (convert_ptrmem): Add conditional for null pointers to
362         members.
363         (build_static_cast_1): Check can_convert for conversions in either
364         direction.
365         (get_delta_difference_1): New function.
366         (get_delta_difference): Refactor to call get_delta_difference_1.
368 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
370         * decl.c (start_preparsed_function): Set
371         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
373 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
375         PR c++/33209
376         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
377         BOUND_TEMPLATE_TEMPLATE_PARM.
379 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
381         PR c++/32596
382         PR c++/32400
383         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
384         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
386 2007-08-27  Jason Merrill  <jason@redhat.com>
388         PR c++/29000
389         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
390         Look inside STMT_EXPR.
391         * semantics.c (stmt_expr_value_expr): New fn.
392         * cp-tree.h: Declare it.
394         PR c++/28558
395         * decl.c (groktypename): Ignore attributes applied to class type.
397 2007-08-28  Richard Guenther  <rguenther@suse.de>
399         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
401 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
402         
403         * error.c (dump_expr): Handle COMPLEX_CST.
404         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
405         (pp_cxx_expression): Likewise.
407 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
409         * decl.c (GNU_INLINE_P): New.
410         (duplicate_decls): Handle gnu_inline.  Merge attributes and
411         some flags in overriding definitions.
412         (redeclaration_error_message): Handle gnu_inline.
413         (start_preparsed_function): Likewise.
415 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
417         * call.c (sufficient_parms_p): Constify.
418         * class.c (same_signature_p): Likewise.
419         * cp-gimplify.c (is_invisiref_parm,
420         cxx_omp_privatize_by_reference): Likewise.
421         * cp-objcp-common.c (has_c_linkage): Likewise.
422         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
423         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
424         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
425         num_artificial_parms_for, comp_template_parms,
426         template_parameter_pack_p, any_dependent_template_arguments_p,
427         any_type_dependent_arguments_p, any_value_dependent_elements_p,
428         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
429         zero_init_p, member_p, cp_lvalue_kind,
430         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
431         varargs_function_p, is_dummy_object, special_function_kind,
432         string_conv_p, type_unknown_p, comp_except_specs, compparms,
433         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
434         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
435         cp_has_mutable_p, at_least_as_qualified_p,
436         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
437         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
438         * except.c (nothrow_libfn_p): Likewise.
439         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
440         Likewise.
441         * pt.c (comp_template_parms, template_parameter_pack_p,
442         any_type_dependent_arguments_p, any_value_dependent_elements_p,
443         any_dependent_template_arguments_p): Likewise.
444         * repo.c (repo_export_class_p): Likewise.
445         * semantics.c (anon_aggr_type_p): Likewise.
446         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
447         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
448         varargs_function_p, member_p, is_dummy_object, pod_type_p,
449         zero_init_p, special_function_p): Likewise.
450         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
451         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
452         compparms, invalid_nonstatic_memfn_p,
453         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
454         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
455         cp_has_mutable_p, lvalue_or_else): Likewise.
457 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
459         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
460         * cp-objcp-common.c (cp_tree_size): Ditto.
461         * tree.c (cp_walk_subtrees): Ditto
462         * cp-tree.def (TINST_LEVEL): Go away.
463         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
464         move together with other non-tree structs.
465         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
466         (union lang_tree_node): Eliminate tinst_level field.
467         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
468         (current_instantiation, outermost_tinst_level): Return
469         a "struct tinst_level *".
471         * error.c (print_instantiation_partial_context): Change second
472         parameter to a "struct tinst_level *".  Replace accessor macros
473         with field access.
474         (print_instantiation_full_context): Likewise.
475         * lex.c (in_main_input_context): Likewise.
477         * pt.c (struct pending_templates): New.
478         (pending_templates, last_pending_template): Use it as a type.
479         (current_tinst_level): Change typo to "struct tinst_level *"
480         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
481         (add_pending_template): Construct a "struct pending_template".
482         Replace TINST_LEVEL accessor macros with field access.
483         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
484         (pop_tinst_level): Likewise.
485         (instantiate_pending_templates): Likewise.  Factor common code used
486         when an instantiation has been done.
487         (outermost_tinst_level): Replace tree_last with loop.
488         (current_instantiation): Return a "struct tinst_level *".
490 2007-08-24  Ollie Wild  <aaw@google.com>
492         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
493         * name-lookup.h (cp_binding_level): Remove vtables member.
495 2007-08-24  Richard Guenther  <rguenther@suse.de>
497         * tree.c (cp_cannot_inline_tree_fn): Remove.
498         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
499         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
500         Remove define.
502 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
504         PR c++/32567
505         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
506         error_mark_node right away if build_expr_type_conversion
507         returned it.
509         PR c++/32898
510         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
511         is error_mark_node rather than NULL_TREE.
512         * pt.c (check_explicit_specialization): Likewise.
514         PR c++/31941
515         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
516         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
518 2007-08-22  Jason Merrill  <jason@redhat.com>
520         PR c++/29365
521         * pt.c (outermost_tinst_level): New function.
522         * lex.c (in_main_input_context): New function.
523         * cp-tree.h: Declare it.
524         * decl2.c (constrain_class_visibility): Use it to avoid warning
525         about uses of the anonymous namespace in the main input file.
527 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
529         * init.c (build_new_1): Use get_target_expr instead of save_expr.
531 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
533         PR c++/7302
534         * class.c (finish_struct_1): Warn when a class has virtual
535         functions and accessible non-virtual destructor.
537 2007-08-20  Richard Guenther  <rguenther@suse.de>
539         PR c++/22369
540         PR c++/22451
541         * call.c (build_new_method_call): Convert initializer to
542         the basetype.
543         * init.c (build_aggr_init): Do not fiddle with types.
544         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
545         * except.c (build_throw): Do not drop qualifiers for the
546         pointer type.
547         * typeck.c (get_member_function_from_ptrfunc): Do not
548         fiddle with types, instead convert.
549         (build_ptrmemfunc1): Convert to the target type for
550         initialization.
551         (gfc_trans_allocate): Convert result to target type.
552         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
553         pointer-to-member structures shall have alias set zero as well.
555 2007-08-20  Richard Guenther  <rguenther@suse.de>
557         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
558         Remove.
559         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
560         (nonstatic_local_decl_p): Likewise.
561         * tree.c (cp_auto_var_in_fn_p): Remove.
562         * decl.c (nonstatic_local_decl_p): Remove.
564 2007-08-20  Richard Guenther  <rguenther@suse.de>
566         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
567         Remove define.
568         * tree.h (cp_walk_tree): New define to walk_tree_1 with
569         cp_walk_subtrees lh parameter.
570         (cp_walk_tree_without_duplicates): New define to
571         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
572         * tree.c (count_trees): Call
573         cp_walk_tree_without_duplicates.
574         (verify_stmt_tree): Call cp_walk_tree.
575         (break_out_target_exprs): Likewise.
576         (WALK_SUBTREE): Likewise.
577         * cp-gimplify.c (cp_genericize): Likewise.
578         * cp-pt.c (find_parameter_packs_r): Likewise.
579         (uses_parameter_packs): Likewise.
580         (make_pack_expansion): Likewise.
581         (check_for_bare_parameter_packs): Likewise.
582         (for_each_template_parm): Likewise.
583         * decl.c (check_default_argument): Call
584         cp_walk_tree_without_duplicates.
585         * except.c (build_throw): Likewise.
586         * decl2.c (type_visibility): Likewise.
587         * semantics.c (expand_or_defer_fn): Likewise.
588         (finalize_nrv): Call cp_walk_tree.
590 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
592         PR c++/33025
593         * init.c (build_new_1): Rename placement_var variable to placement_expr.
594         Initialize it with save_expr rather than get_temp_regvar.
596 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
598         PR c++/28989
599         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
600         lvalues.
602 2007-08-17  Ollie Wild  <aaw@google.com>
604         PR c++/31749
605         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
606         declarations into appropriate slots for comparison.  Fix type
607         comparison.
609 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
611         PR c++/32112
612         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
613         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
615 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
617         PR c++/32870
618         * parser.c (cp_parser_class_head): Improve error message.
620 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
622         * pt.c (instantiate_decl): Set input_location
623         for the function end.
625 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
627         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
628         Constify.
629         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
630         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
631         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
632         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
633         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
634         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
635         * typeck.c (cp_type_quals): Likewise.
636         * typeck2.c (cxx_incomplete_type_diagnostic,
637         cxx_incomplete_type_error): Likewise.
639 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
641         PR c++/31132
642         * pt.c (tsubst_friend_function): When check_classfn
643         returns error_mark_node likewise return it.
645 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
647         PR c++/32992
648         * typeck.c (check_return_expr): Don't NRV optimize vars in
649         anonymous unions.
650         * decl.c (finish_function): Comment fix.
652 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
654         PR c++/33035
655         * pt.c (push_template_decl_real): Depending on TYPE_P
656         use either TYPE_CONTEXT or DECL_CONTEXT.
658 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
660         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
661         constructors and destructors return this.
663 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
665         PR c++/27211
666         * decl2.c (check_classfn): Return error_mark_node in case of error;
667         in that case, do not call add_method.
668         * decl.c (start_decl): Deal with check_classfn returning
669         error_mark_node.
670         (grokfndecl): Likewise.
671         * pt.c (tsubst_friend_function): Likewise.
673 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
675         PR c++/30428
676         * typeck.c (build_binary_op): Disallow vector float types with
677         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
679 2007-08-11  Ian Lance Taylor  <iant@google.com>
681         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
682         alias_set_type.
683         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
685 2007-08-10  Ollie Wild  <aaw@google.com>
687         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
688         type lookups.
689         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
690         function parameter.
691         (unqualified_namespace_lookup): Fix ambiguous_decl call.
692         (lookup_using_namespace): Fix ambiguous_decl call.
693         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
695 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
697         * call.c (name_as_c_string): Use CONST_CAST.
698         * decl.c (build_decl): Likewise.
699         * parser.c (cp_parser_string_literal): Likewise.
701 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
703         PR c++/17763
704         * error.c (dump_expr): Consistently use the *_cxx_*
705         variants of the pretty-print functions.
707 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
709         PR c++/22256
710         * decl.c (check_special_function_return_type): Just error
711         on return type specified for conversion operator.
713 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
715         * typeck2.c (readonly_error): Handle general expressions.
716         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
718 2007-08-06  Dan Hipschman  <dsh@google.com>
720         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
721         access function name.
723 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
725         PR pch/13676
726         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
727         * g++spec.c (lang_specific_driver): Check them.
729 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
731         PR c++/19532
732         * pt.c (inline_needs_template_parms): Fix comment; change return type
733         to bool.
735 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
737         Revert:
738         2007-03-26  Dirk Mueller  <dmueller@suse.de>
740         * parser.c (cp_parser_member_declaration): Pedwarn
741         about stray semicolons after member declarations.
743 2007-08-02  Lee Millward  <lee.millward@gmail.com>
745         PR c++/30849
746         PR c++/30850
747         PR c++/30851
748         * parser.c (cp_parser_asm_definition): Detect and discard asm
749         statements with invalid inputs or outputs.
750         (cp_parser_asm_operand_list): Return error mark node if any
751         of the operands are invalid. Adjust documentation.
752         
753 2007-08-02  Nick Clifton  <nickc@redhat.com>
755         * typeck.c: Change copyright header to refer to version 3 of the
756         GNU General Public License and to point readers at the COPYING3
757         file and the FSF's license web page.
758         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
759         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
760         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
761         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
762         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
763         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
764         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
765         name-lookup.h, parser.c: Likewise.
767 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
769         PR middle-end/32668
770         * call.c (magic_varargs_p): Honor the "type generic" attribute.
772 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
774         PR c++/32108
775         * semantics.c (finish_label_stmt): Reject the __label__
776         extension outside function scopes.
778 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
780         * parser.c (eof_token): Un-constify.
781         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
782         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
783         casts.
785 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
787         * pt.c, tree.c, typeck2.c: Fix comment typos.
789 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
790             Mark Mitchell  <mark@codesourcery.com>
792         PR c++/30917
793         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
794         hidden due to friend declarations in local classes.
796 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
798         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
799         * cp-tree.def (DECLTYPE_TYPE): New.
800         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
801         (dump_type_prefix): Ditto.
802         (dump_type_suffix): Ditto.
803         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
804         * mangle.c (write_type): Handle DECLTYPE_TYPE.
805         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
806         types.
807         (DECLTYPE_TYPE_EXPR): New.
808         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
809         (finish_declared_type): Declare.
810         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
811         DECLTYPE_TYPE nodes.
812         (pp_cxx_type_id): Ditto.
813         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
814         (tsubst): Substitute into a DECLTYPE_TYPE node.
815         (tsubst_copy): Ditto.
816         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
817         nodes.
818         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
819         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
820         structural equality (because we can't hash the expressions).
821         (finish_declared_type): New.
822         * lex.c (reswords): Add "decltype" keyword.
823         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
824         (cp_parser_postfix_expression): Add member_access_only_p to
825         restrict postfix expression to member access expressions.
826         (cp_parser_unary_expression): Update call to
827         cp_parser_postfix_expression to reflect new parameter.
828         (cp_parser_declared_type): New.
829         (cp_parser_simple_type_specifier): Parse decltype types.
831 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
833         PR c++/32346
834         * call.c (convert_for_arg_passing): Only widen bitfields to their
835         declared types if necessary.
837 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
839         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
840         Constify.
842 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
844         * decl.c (typename_hash, typename_compare): Constify.
845         * mangle.c (hash_type, compare_type): Likewise.
846         * pt.c (eq_local_specializations, hash_local_specialization):
847         Likewise.
848         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
849         list_hash): Likewise.
850         * typeck2.c (pat_compare): Likewise.
852 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
854         * method.c (implicitly_declare_fn): Increase alignment if member
855         function pointer format requires it.
857 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
859         PR c++/29001
860         * typeck.c (check_return_expr): Do not pass a null argument
861         to null_ptr_cst_p.
863 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
865         PR c++/32561
866         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
867         only on VAR_DECL.
869 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
871         PR c++/32839
872         * typeck.c (convert_arguments): Only use default args if we have
873         a function decl.
875         PR c++/30818
876         * typeck.c (structural_comptypes): No need to check
877         resolve_typename_type return value here.
878         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
879         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
880         original type rather than error_mark_node in case of failure.
881         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
882         resolve_typename_type result check.
883         (cp_parser_direct_declarator, cp_parser_head,
884         cp_parser_constructor_declarator_p): Likewise.
886 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
888         * pt.c (template_parms_variadic_p): Remove.
889         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
891 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
893         PR c++/30854
894         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
895         argument to dump_aggr_init_expr_args instead of false.
897 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
899         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
900         canonical types; otherwise, fall back to structural type
901         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
902         internal compiler error if the canonical types are wrong.
903         
904 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
906         PR c++/32560
907         * parser.c (cp_parser_make_indirect_declarator): When the
908         the code argument is ERROR_MARK return cp_error_declarator.
910 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
912         PR 32617
913         * decl.c (cxx_init_decl_processing): Don't set
914         force_align_functions_log.
915         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
916         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
917         FUNCTION_DECL, return its alignment.
919 2007-07-09  Richard Guenther  <rguenther@suse.de>
921         * decl.c (start_preparsed_function): Do not promote return type.
923 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
925         PR c++/30535
926         * pt.c (unify): Never pass error_mark_node to template_decl_level.
928 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
930         PR c++/32232
931         * pt.c (resolve_overloaded_unification): Robustify.  Return a
932         bool, not an int.
933         (type_unification_real): Adjust accordingly.
935 2007-07-06  Richard Guenther  <rguenther@suse.de>
937         * init.c (build_new_1): Use the correct pointer type.
938         * typeck2.c (build_m_component_ref): Likewise.
940 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
942         PR c++/32245
943         * init.c (build_zero_init): Always build an initializer for
944         non-static storage.
945         * typeck2.c (build_functional_cast): Use build_zero_init.
947         PR c++/32251
948         * init.c (build_new_1): Always pass the allocation function to
949         build_op_delete_call.
950         * call.c (build_op_delete_call): Handle operator delete with a
951         variable-argument list.  Do not issue an error when no matching
952         deallocation function is available for a new operator.
954         PR c++/31992
955         * cp-tree.h (any_value_dependent_elements_p): Declare it.
956         * decl.c (value_dependent_init_p): New function.
957         (cp_finish_decl): Use it.
958         * pt.c (value_dependent_expression_p): Use
959         any_value_dependent_elements_p.
960         * parser.c (cp_parser_primary_expression): Add comment about
961         treating dependent qualified names as integral
962         constant-expressions.
964 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
966         * decl.c (build_ptrmemfunc_type): Always use structural equality
967         tests when comparing pointer-to-member-function types, because the
968         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
969         types.
970         
971 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
973         * init.c (build_new): Tweak comment.
975 2007-06-29  Dave Brolley  <brolley@redhat.com>
977         PR c++/31743
978         * parser.c (cp_parser_new_type_id): Don't reduce a named array
979         type to its base type and number of elements here.
980         * init.c (build_new): Call complete_type_or_else to ensure that the
981         type is complete and to issue a diagnostic if it is not.
982         (build_new_1): Don't call complete_type_or_else here.
984 2007-07-03  Richard Guenther  <rguenther@suse.de>
986         PR c++/32609
987         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
988         after recursing.
990 2007-07-02  Simon Baldwin  <simonb@google.com>
992         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
993         for inner-style nested forward declarations that don't declare
994         anything useful.
996 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
998         PR c++/31748
999         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1000         DECL_P in not a variable and appears more than once error messages.
1002 2007-07-01  Ollie Wild  <aaw@google.com>
1004         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1005         (select_decl): Remove function.
1006         (unqualified_namespace_lookup): Populate binding by calling
1007         ambiguous_decl.  Remove select_decl call.
1008         (lookup_qualified_name): Remove select_decl call.
1009         * decl.c (lookup_and_check_tag): Check for ambiguous references.
1010         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1011         generation when name lookup is ambiguous.
1013 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
1015         PR c++/31724
1016         * init.c (build_new_1): Use structural equality on the copy of the
1017         array type.
1019 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1021         * decl2.c (determine_visibility): Implement
1022         flag_visibility_ms_compat effect on type info.
1023         * decl.c (cxx_init_decl_processing): Implement
1024         global effect of flag_visibility_ms_compat.
1026 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1028         * decl2.c (start_objects): Mark constructor-running function
1029         as artificial.
1031 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
1033         PR c++/32111
1034         * decl.c (grokdeclarator): Reset friendp for member functions declared
1035         friend of their own class.
1037 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
1039         * decl2.c (determine_visibility): Don't look for dllexport here.
1040         (determine_visibility_from_class): Tidy.
1042 2007-06-18  Simon Baldwin <simonb@google.com>
1044         PR c++/31923
1045         * parser.c (cp_parser_single_declaration): Added check for storage
1046         class other than sc_none in parsed declaration, and a flag to indicate
1047         if the call is part of an explicit template specialization parse.
1048         * (cp_parser_explicit_specialization): Specialization check flag added
1049         to call to cp_parser_single_declaration(), set true.
1050         * (cp_parser_template_declaration_after_export): Specialization check
1051         flag added to call to cp_parser_single_declaration(), set false.
1052         * pt.c (check_explicit_specialization): Added code to copy visiblity
1053         and linkage from the templated function to the explicit specialization.
1055 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1057         * typeck.c (build_binary_op): For templates build the
1058         expression in pieces to avoid the assert in build2_stat.
1059         (get_member_function_from_ptrfunc):
1060         Change over to using POINTER_PLUS_EXPR and convert
1061         the second operand to sizetype.
1062         * typeck2.c (build_m_component_ref):  Likewise.
1063         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1064         instead of PLUS_EXPR for pointers.
1065         (build_new_1): Likewise.
1066         (build_vec_delete_1): Likewise.
1067         (build_vec_delete): Likewise.
1068         * class.c (build_base_path): Likewise.
1069         (build_base_path): Likewise.
1070         (convert_to_base_statically): Likewise.
1071         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1072         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1073         instead of PLUS_EXPR.
1074         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1075         instead of PLUS_EXPR for pointers.
1076         * call.c (build_special_member_call): Likewise.
1077         * rtti.c (build_headof): Likewise.
1078         Use sizetype instead of ptrdiff_type_node.
1079         (tinfo_base_init): Create a POINTER_PLUS_EXPR
1080         instead of PLUS_EXPR for pointers.
1081         * except.c (expand_start_catch_block):  Do a
1082         NEGATIVE and then a POINTER_PLUS_EXPR instead
1083         of a MINUS_EXPR.
1084         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1085         PLUS_EXPR on pointer types over to use
1086         POINTER_PLUS_EXPR and remove the conversion
1087         to the pointer types.
1088         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1089         adding to a pointer type. Use size_int instead of
1090         ssize_int. Convert the index to sizetype before
1091         adding it to the pointer.
1093 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
1095         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1096         (DECL_ANON_UNION_VAR_P): New macro.
1097         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
1098         than DECL_VAR_MARKED_P, to keep track of which variables we have
1099         seen.
1100         * decl.c (redeclaration_error_message): Complain about redeclaring
1101         anonymous union members at namespace scope.
1102         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1104 2007-06-14  Geoff Keating  <geoffk@apple.com>
1106         * decl2.c (determine_visibility): Ensure that functions with
1107         hidden types as parameters are hidden.
1109         PR 31093
1110         * decl2.c (determine_visibility): Remove duplicate code for
1111         handling type info.
1113 2007-06-12  Ian Lance Taylor  <iant@google.com>
1115         PR libstdc++/29286
1116         * init.c (avoid_placement_new_aliasing): New static function.
1117         (build_new_1): Call it.
1119 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
1121         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1122         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1124 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
1126         PR c++/32177
1127         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1128         on init, the non-decl cond operand and increment value.
1130 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
1132         PR c++/30759
1133         * decl.c (check_initializer): Report an error when a brace enclosed
1134         initializer is used for a non-aggregate type in C++98.
1135         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1136         cxx_dialect.
1137         (grokdeclarator): Likewise.
1138         (move_fn_p): Likewise.
1139         * typeck.c (check_return_expr): Likewise.
1140         * call.c (reference_binding): Likewise.
1141         * error.c (cp_cpp_error): Likewise.
1142         * pt.c (check_default_tmpl_args): Likewise.
1143         (tsubst): Likewise.
1144         * lex.c (init_reswords): Likewise.
1145         * parser.c (p_parser_primary_expression): Likewise.
1146         (TOKEN_PRECEDENCE): Likewise.
1147         (cp_parser_init_declarator): Likewise.
1148         (cp_parser_ptr_operator): Likewise.
1149         (cp_parser_parameter_declaration): Likewise.
1150         (cp_parser_enclosed_template_argument_list): Likewise.
1151         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1152         (cp_parser_next_token_ends_template_argument_p): Likewise.
1154 2007-06-04  Simon Baldwin  <simonb@google.com>
1156         * decl.c (grokdeclarator): Readability change.  Moved case labels
1157         into direct switch statement scope.
1159 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
1161         * call.c (convert_like_real): Remove pointless code.
1163 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
1165         * decl.c (get_atexit_fn_ptr_type): New function.
1166         (get_atexit_node): Use it.
1167         (start_cleanup_fn): Likewise.
1168         (register_dtor_fn): Use the object's destructor, instead of a
1169         separate cleanup function, where possible.
1170         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1171         (atexit_fn_ptr_type_node): New macro.
1172         * decl2.c (build_cleanup): Use build_address.
1174 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
1176         * typeck.c (build_binary_op): Include types in error.
1178 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
1180         PR c++/31806
1181         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1182         needs runtime initialization.
1184 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
1186         PR c++/32158
1187         * semantics.c (finish_trait_expr): Complete the types.
1189 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
1190             Douglas Gregor <doug.gregor@gmail.com>
1191             Pedro Lamarao <pedro.lamarao@mndfck.org>
1192             Howard Hinnant <howard.hinnant@gmail.com>
1194         PR c++/7412
1195         PR c++/29939
1196         * typeck.c (comptypes): Don't consider rvalue and lvalue
1197         reference types to be equivalent.
1198         (check_return_expr): Move from certain lvalues when returning
1199         them.
1200         * decl.c (grokdeclarator): Implement reference collapsing.
1201         (copy_fn_p): Don't consider constructors taking rvalue references
1202         to be copy constructors.
1203         (move_fn_p): New.
1204         * call.c (conversion): New "rvaluedness_matches_p" member.
1205         (convert_class_to_reference): Require reference type as first
1206         parameter instead of base type.
1207         (reference_binding): Add logic to handle rvalue references.
1208         (implicit_conversion): Update inaccurate comment.
1209         (convert_like_real): Disable creation of temporaries that are
1210         impossible to initialize for types with move constructors.
1211         (build_over_call): Elide move constructors when possible.
1212         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1213         (maybe_handle_ref_bind): Return conversion instead of type node.
1214         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1215         determine preferred conversion sequences.
1216         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1217         (LOOKUP_PREFER_RVALUE): New.
1218         (DECL_MOVE_CONSTRUCTOR_P): New.
1219         (struct cp_declarator): Add "reference" member for reference
1220         types, with new "rvalue_ref" flag.
1221         (cp_build_reference_type): Declare.
1222         (move_fn_p): Declare.
1223         * error.c (dump_type_prefix): Format rvalue reference types
1224         correctly in error messages.
1225         * except.c (build_throw): Move from certain lvalues when
1226         throwing.
1227         * mangle.c (write_type): Mangle rvalue references differently
1228         than regular references.
1229         * parser.c (make_reference_declarator): Add boolean parameter for
1230         rvalue references.
1231         (cp_parser_make_indirect_declarator): New.
1232         (cp_parser_new_declarator_opt): Call
1233         cp_parser_make_indirect_declarator. 
1234         (cp_parser_conversion_declarator_opt): Ditto.
1235         (cp_parser_declarator): Ditto.
1236         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1237         declarators.
1238         * pt.c (tsubst): Implement reference collapsing.
1239         (maybe_adjust_types_for_deduction): Implement special template
1240         parameter deduction rule for rvalue references.
1241         (type_unification_real): Update calls to
1242         maybe_adjust_types_for_deduction.
1243         (try_one_overload): Ditto.
1244         (unify_pack_expansion): Ditto.
1245         * tree.c (lvalue_p_1): Handle rvalue reference types.
1246         (cp_build_reference_type): New.
1248 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
1250         PR c++/31809
1251         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1252         variables that need runtime initialization.
1254 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
1256         PR c++/31339
1257         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1258         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1259         case POSTDECREMENT_EXPR>): Return the error_mark_node
1260         if either the real or imaginary parts would an
1261         error_mark_node.
1262         
1263 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
1264             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1266         PR c++/31745
1267         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1268         token is a closing brace, false if there are no tokens left.
1269         (cp_parser_namespace_alias_definition): Only consume the next token if
1270         it is a closing brace.
1272         * parser.c (cp_parser_class_specifier): Likewise.
1274 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1276         * semantics.c (finish_member_declaration): Fix a typo in the
1277         last checkin.
1279 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
1281         PR c++/31431
1282         PR c++/31432
1283         PR c++/31434
1284         PR c++/31435
1285         PR c++/31437
1286         PR c++/31438
1287         PR c++/31442
1288         PR c++/31443
1289         PR c++/31444
1290         PR c++/31445
1291         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1292         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1293         * pt.c (check_for_bare_parameter_packs): Return bool indicated
1294         whether everything was okay. Fix indentation.
1295         (push_template_decl_real): Check for bare parameter packs in
1296         function parameters; where errors occur, mark the parameter types
1297         with ERROR_MARK_NODEs to avert ICEs.
1298         (coerce_template_parameter_pack): New.
1299         (coerce_template_parms): Moved parameter pack coercion into
1300         coerce_template_parameter_pack, and permit it anywhere in the
1301         template parameter list (not just at the end). Parameter and
1302         argument indices can vary (somewhat) separately now, so add
1303         PARM_IDX and ARG_IDX.
1304         (fn_type_unification): Don't set an argument pack as incomplete if
1305         no argument pack was deduced.
1306         (type_unification_real): If a type parameter is a parameter pack
1307         and has not otherwise been deduced, it will be deduced to an empty
1308         parameter pack.
1309         (more_specialized_fn): Use the actual lengths of the argument
1310         lists when comparing against expansions.
1311         * semantics.c (finish_member_declaration): If a field's type has
1312         bare parameter packs, error and set its type to ERROR_MARK_NODE.
1314 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
1316         PR target/27067
1317         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1319 2007-05-22  Ollie Wild  <aaw@google.com>
1321         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1322         (unqualified_namespace_lookup): Adds check for hidden types.
1324 2007-05-22  Ollie Wild  <aaw@google.com>
1326         * decl.c (duplicate_decls): Verify namespace names are unique.
1328 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
1330         * decl.c (cxx_maybe_build_cleanup): Handle
1331         __attribute__((cleanup)).
1333 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1335         * cvt.c (cp_convert_and_check): Don't check warnings if the
1336         conversion failed.
1338 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1340         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1342 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
1344         PR c++/29928
1345         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1346         type only if is a class type (5.2.8/4).
1348 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1350         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1351         * decl.c (grokdeclarator): Use unsigned_type_for instead of
1352         c_common_unsigned_type.
1354 2007-05-11  Silvius Rus  <rus@google.com>
1356         * cp/typeck.c (build_indirect_ref): Add call to
1357         strict_aliasing_warning.
1358         (build_reinterpret_cast_1): Condition call to
1359         strict_aliasing_warning. 
1361 2007-05-11  Jan Hubicka  <jh@suse.cz>
1363         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1364         * decl2.c (start_objects): ctors and dtors are no longer public.
1365         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1366         
1367 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1369         * typeck.c (build_unary_op): Remove code that used to
1370         handle non lvalue increments/decrements.
1372 2007-05-07  Mike Stump  <mrs@apple.com>
1374         * parser.c (check_empty_body): Add.
1375         (cp_parser_iteration_statement): Add call to check_empty_body.
1377 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
1379         PR 31775
1380         * mangle.c (write_mangled_name): Mangle static variable names.
1381         (write_unqualified_name): Use local-source-name for
1382         namespace-scope static variables.
1384 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1386         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1387         not in effect.
1389 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1391         PR c++/31663
1392         * decl2.c (constrain_class_visibility): 
1393         Use strip_pointer_or_array_types instead of strip_array_types.
1395 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1397         PR C++/30221
1398         * decl.c (reshape_init_r): Don't reshape the first element if it
1399         is a pointer to member function.
1401 2007-04-27  Simon Baldwin  <simonb@google.com>
1403         * decl.c (grokparms): Changed message format from %qD to %qE.
1405 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
1407         * error.c (maybe_warn_variadic_templates): Variadic templates are
1408        now in C++0x, so only warn about them in C++98 mode.
1409         
1410 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1412         PR C++/30016
1413         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1414         integeral types from vectors types.
1416 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
1418         PR c++/31598
1419         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1420         for type dependent OMP_CLAUSE_DECLs.
1422 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
1424         PR c++/31338
1425         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1426         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1427         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1428         * init.c (build_zero_init): Adjust, as
1429         COMPLEX_TYPE is now a SCALAR_TYPE.
1430         * typeck2.c (digest_init): Allow brace-enclosed initializers for
1431         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1433 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
1435         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1436         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1437         (trait_expr_value): Adjust.
1439 2007-04-23  Simon Baldwin  <simonb@google.com>
1441         * decl.c (grokparms): Added new error for duplicate function
1442         parameters names in function prototypes, to match gcc behavior.
1444 2007-04-23  Jan Hubicka  <jh@suse.cz>
1446         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1447         bits dirrectly.
1449 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1451         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1452         instead of checking GIMPLE_STMT_P in chain_next.
1454 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
1456         PR c++/31513
1457         * call.c (convert_for_arg_passing): Convert bitfields to their
1458         declared types.
1460 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
1462         PR c++/31517
1463         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1465 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
1467         PR c++/29365
1468         * cp/decl2.c (constrain_class_visibility):
1469         Do not warn about the use of anonymous namespace in the main input file.
1471 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
1473         * cp-tree.h (current_template_parms): Fix typo in comment.
1475 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
1477         * cp-tree.h, error.c: Fix comment typos.
1479 2007-04-13  Jason Merrill  <jason@redhat.com>
1481         PR c++/31074
1482         * call.c (reference_binding): Add c_cast_p parm.  If true,
1483         add quals to TO as needed to make it reference-compatible.
1485 2007-04-11  Jan Hubicka  <jh@suse.cz>
1487         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1488         that we are not processing template_decl.
1490 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
1492         PR c++/31449
1493         * class.c (build_base_path): Ensure that the converted pointer has
1494         the same cv-qualification as the input.
1496 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
1498         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1500 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
1502         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1503         Do not set it.
1504         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1505         * tree.c (cp_add_pending_fn_decls): Remove.
1506         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1508 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
1510         Revert change removing staticp.
1512 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
1514         * cp-objcp-common.c (cxx_staticp): Remove.
1515         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1516         * cp-tree.h (cxx_staticp):      
1518 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
1520         * class.c (check_for_override): Don't remove dllmport attribute
1521         of virtual methods.
1523 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
1525         PR c++/30847
1526         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1527         type issue error and return early.
1529 2007-03-30  Jason Merrill  <jason@redhat.com>
1531         PR c++/31187
1532         * typeck.c (cp_type_readonly): New fn.
1533         * cp-tree.h: Declare it.
1534         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1535         (cp_finish_decl): Not here.
1537 2007-03-31  Richard Guenther  <rguenther@suse.de>
1539         * optimize.c (maybe_clone_body): Replace splay-tree usage by
1540         pointer-map.
1542 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
1544         PR c++/31138
1545         PR c++/31140
1546         PR c++/31141
1547         * parser.c (declarator_can_be_parameter_pack): New.
1548         (cp_parser_template_parameter): Only parse the `...' if the
1549         declarator can be a parameter pack.
1550         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1551         is NULL.
1552         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1553         types (they could be used as array bounds). 
1554         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1555         (tsubst_pack_expansion): Handle failure to expand parameter
1556         packs.
1557         
1558 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1560         PR c++/26099
1561         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1562         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1563         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1564         (CLASS_TYPE_NON_UNION_P): Add.
1565         (struct lang_type_class): Add has_complex_dflt.
1566         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1567         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1568         * cp-tree.def: Add TRAIT_EXPR.
1569         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1570         * lex.c (struct resword): Add __has_nothrow_assign,
1571         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1572         __has_trivial_constructor, __has_trivial_copy,
1573         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1574         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1575         __is_pod, __is_polymorphic, __is_union.
1576         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1577         (cp_parser_trait_expr): New.
1578         * semantics.c (finish_trait_expr, trait_expr_value
1579         classtype_has_nothrow_copy_or_assign_p): New.
1580         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1581         as static.
1582         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1583         * class.c (check_bases, check_field_decl, check_bases_and_members):
1584         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1585         * pt.c (uses_template_parms, tsubst_copy_and_build,
1586         value_dependent_expression_p, type_dependent_expression_p): Deal with
1587         TRAIT_EXPR.
1588         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1590 2007-03-29  Richard Guenther  <rguenther@suse.de>
1592         * tree.c (cp_walk_subtrees): Do not set input_location.
1594 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1596         PR c++/29077
1597         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1598         destructor.
1600 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1602         * parser.c (struct cp_parser): Update comment for
1603         greater_than_is_operator_p.
1604         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1605         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1606         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1607         !GREATER_THAN_IS_OPERATOR_P.
1608         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1609         `>>' operators that will become two `>' tokens in C++0x.
1610         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1611         mode, allowing it to terminate default arguments.
1612         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1613         `>>' like two consecutive `>' tokens.
1614         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1615         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1616         ends a template argument.
1618 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1620         * decl.c (redeclaration_error_message): Complain when redeclaring
1621         a friend function with default template arguments (C++0x mode only).
1622         * cp-tree.h (check_default_tmpl_args): Declare.
1623         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1624         template arguments in function templates. Add support for checking
1625         the default template arguments of friend templates.
1626         (push_template_decl_real): Fix call to check_default_tmpl_args.
1627         (type_unification_real): If a template parameter has not been
1628         deduced but provides a default template argument, substitute into
1629         that default template argument.
1630         * parser.c (cp_parser_init_declarator): When declaring (but not
1631         defining!) a function template in C++0x mode, check for default
1632         template arguments.
1634 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1636         PR c++/29993
1637         * decl.c (grokdeclarator): Deal with cv-qualified function type
1638         typedefs in the same way for member and non-member functions.
1640 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1642         * parser.c (cp_parser_member_declaration): Pedwarn
1643         about stray semicolons after member declarations.
1645 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1647         PR c++/30500
1648         * pt.c (instantiate_decl): Set in_system_header.
1650 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1652         * cp-tree.h (current_tempalte_parms): Improve documentation.
1653         * pt.c (current_template_args): Likewise.
1655         PR c++/30863
1656         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1657         not consume tokens when failing.
1659 2007-03-22  Jim Wilson  <wilson@specifix.com>
1660             Mark Mitchell  <mark@codesourcery.com>
1662         PR c++/31273
1663         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1664         consistent with FROM.
1666 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1668         * error.c (dump_expr): Handle dependent names that designate types.
1669         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1671 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1673         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1675 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1677         * cvt.c (cp_convert_and_check) : Define.
1678         * cp-tree.h (cp_convert_and_check): Declare.
1679         * call.c (convert_conversion_warnings): Rename to
1680         conversion_null_warnings.  The warning for floating-point to
1681         integer is handled by convert_and_check in convert_like_real.
1682         (convert_like_real): convert_conversion_warnings was renamed as
1683         conversion_null_warnings.
1684         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1685         overflow and changes of value during conversion.
1687 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1689         PR c++/30891
1690         * parser.c (cp_parser_statement): If 'namespace' is found, this
1691         only can be a namespace alias definition, so parse it now.
1692         (cp_parser_namespace_alias_definition): if we find an open brace
1693         instead of '=', then this is actually a misplaced namespace
1694         definition.
1695         
1696 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1698         PR c++/24924
1699         * decl.c (cxx_init_decl_processing): Move command-line options
1700         processing to c-opts.c.
1701         
1702 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1704         * ptree.c (cxx_print_type): Use formatting markup for integers
1705         when printing template parameter index/level/orig level.
1706         (cxx_print_xnode): Ditto.
1707         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1708         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1709         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1710         HOST_WIDE_INTs.
1711         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1712         rather than a HOST_WIDE_INT.
1713         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1714         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1715         better bit-packing.
1716         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1717         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1718         IN_BASE_INITIALIZER bool bitfields.
1719         (struct cp_declarator): Make KIND a 4-bit field. Make
1720         PARAMETER_PACK_P a bool bitfield just after KIND.
1721         * pt.c (uses_parameter_packs): Destroy the pointer set.
1722         (make_pack_expansion): Ditto.
1723         (check_for_bare_parameter_packs): Ditto.
1724         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1725         
1726 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1728         PR c++/31165
1729         * call.c  (convert_default_arg): Instead of copying the node,
1730         unshare it.
1732 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1734         PR c++/30860
1735         * call.c (convert_conversion_warnings): New..
1736         (convert_like_real): .. factored out from here.
1737         (convert_conversion_warnings): Add warning about
1738         false being converted to NULL in argument passing.
1740 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1742         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1743         (finish_do_body): Warn about empty body in do/while statement.
1745 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1747         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1748         
1749 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1751         PR c/21438
1752         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1753         warning.
1754         
1755 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1757         * cp/repo.c (init_repo): Initialize random_seed saved options.
1758         (finish_repo): Adjust.
1760 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1762         PR bootstrap/30899
1763         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1764         which to copy.
1766 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1768         * decl.c (compute_array_index_type): New warning flag warn_vla.
1770 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1772         PR c++/30108
1773         * call.c (convert_default_arg): Copy non-constant arguments.
1775 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1777         PR c++/31038
1778         * parser.c (cp_parser_postfix_expression): Disallow compound
1779         literals in constant expressions.
1781         PR c++/30328
1782         * semantics.c (finish_typeof): Use unlowered_expr_type.
1783         
1784 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
1786         PR c++/30274
1787         * cp-tree.h (unlowered_expr_type): New function.
1788         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1789         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1790         (unlowered_expr_type): New function.
1791         (build_unary_op): Disallow predecrements of bool bitfields.
1792         * call.c (build_conditional_expr): Use unlowered_expr_type.
1793         * pt.c (type_unification_real): Likewise.
1795 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
1797         PR c++/20599
1798         * typeck.c (check_return_expr): Check for bare parameter packs.
1799         (comptypes): Compare template parameter packs and
1800         type pack expansions.
1801         * decl.c (grokdeclarator): Deal with the declaration of function
1802         parameter packs.
1803         (grokparms): Verify that the (optional) function parameter pack is
1804         at the end of the parameter list.
1805         (xref_basetypes): Handle pack expansions in the base class.
1806         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1807         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1808         (NONTYPE_ARGUMENT_PACK): New.
1809         (TYPE_PACK_EXPANSION): New.
1810         (EXPR_PACK_EXPANSION): New.
1811         (ARGUMENT_PACK_SELECT): New.
1812         * cp-objcp-common.c (cp_tree_size): Compute size of
1813         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1814         ARGUMENT_PACK_SELECT.
1815         * error.c (dump_template_argument): Print template argument packs.
1816         (dump_template_argument_list): Ditto.
1817         (dump_template_parameter): Dump `...' for template type parameter
1818         packs.
1819         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1820         (dump_parameters): Print function parameter packs.
1821         (dump_template_parms): Print template argument packs.
1822         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1823         (maybe_warn_variadic_templates): New.
1824         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1825         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1826         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1827         CAST_EXPR. 
1828         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1829         (write_template_arg): Write argument packs as separate arguments.
1830         * cp-tree.h (struct template_parm_index_s): Add flag that
1831         indicates that the template parameter is actually a parameter
1832         pack.
1833         (struct tree_argument_pack_select): New.
1834         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1835         (union lang_tree_node): Add argument_pack_select.
1836         (FUNCTION_PARAMETER_PACK_P): New.
1837         (PACK_EXPANSION_P): New.
1838         (PACK_EXPANSION_PATTERN): New.
1839         (SET_PACK_EXPANSION_PATTERN): New.
1840         (PACK_EXPANSION_PARAMETER_PACKS): New.
1841         (ARGUMENT_PACK_P): New.
1842         (ARGUMENT_PACK_ARGS): New.
1843         (SET_ARGUMENT_PACK_ARGS): New.
1844         (ARGUMENT_PACK_INCOMPLETE_P): New.
1845         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1846         (TEMPLATE_PARM_PARAMETER_PACK): New.
1847         (TEMPLATE_TYPE_PARAMETER_PACK): New.
1848         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1849         (ARGUMENT_PACK_SELECT_INDEX): New.
1850         (ARGUMENT_PACK_SELECT_ARG): New.
1851         (struct cp_declarator): Add parameter_pack_p flag.
1852         (maybe_warn_variadic_templates): Declare.
1853         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1854         indicate a template parameter pack. 
1855         (uses_parameter_packs): Declare.
1856         (template_parameter_pack_p): Declare.
1857         (template_parms_variadic_p): Declare.
1858         (make_pack_expansion): Declare.
1859         (check_for_bare_parameter_packs): Declare.
1860         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1861         sizeof... expressions. 
1862         (pp_cxx_expression): Print pack expansions and non-type argument
1863         packs.
1864         (pp_cxx_exception_specification): Print pack expansions. 
1865         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1866         (pp_cxx_ctor_initializer): Print pack expansions.
1867         (pp_cxx_type_id): Print pack expansions.
1868         (pp_cxx_template_argument_list): Print argument packs.
1869         (pp_cxx_template_parameter): Print ellipsis for template parameter
1870         packs.
1871         * pt.c (comp_template_parms): Compare template parameter packs.
1872         (template_parameter_pack_p): New.
1873         (template_parms_variadic_p): New.
1874         (template_args_variadic_p): New.
1875         (make_ith_pack_parameter_name): New.
1876         (struct find_parameter_pack_data): New.
1877         (find_parameter_packs_r): New.
1878         (uses_parameter_packs): New.
1879         (make_pack_expansion): New.
1880         (check_for_bare_parameter_packs): New.
1881         (expand_template_argument_pack): New.
1882         (reduce_template_parm_level): Propagate parameter pack flag.
1883         (process_template_parm): Add is_parameter_pack parameter to state
1884         when the parameter is actually a parameter pack. Create template
1885         parameter packs when is_parameter_pack is true.
1886         (current_template_args): The argument for a template parameter
1887         pack is an argument pack containing a single pack expansion.
1888         (process_partial_specialization): When checking that non-type
1889         argument expressions do not involve template parameters, loop over
1890         the arguments in argument packs separately.
1891         (push_template_decl_real): Check that the type of the declaration
1892         does not have any bare parameter packs. Check that primary
1893         templates have no more than one parameter pack, and that it comes
1894         at the end of the template parameter list.
1895         (convert_template_argument): Handle coercions for pack expansion
1896         expressions by coercing the pattern then rebuilding the expansion.
1897         (coerce_template_parms): When coercing the arguments for a
1898         variadic template, pack "extra" arguments into an argument pack.
1899         (coerce_template_template_parms): Cannot coerce between parameter
1900         packs and non-pack parameters.
1901         (template_args_equal): Compare PACK_EXPANSION_P expressions.
1902         (comp_template_args): Expand all template arguments packs before
1903         comparing template argument lists.
1904         (mangle_class_name_for_template): Make argument packs as separate
1905         template arguments.
1906         (for_each_template_parm_r): No need to handle BASELINK. 
1907         (instantiate_class_template): Handle pack expansions in the base
1908         class list.
1909         (tsubst_pack_expansion): New.
1910         (tsubst_template_args): Handle substitutions of argument packs and
1911         pack expansion into template argument lists.
1912         (tsubst_decl): Expand function parameter packs into separate
1913         function parameters.
1914         (tsubst_arg_types): Expand a type pack expansion into separate
1915         argument types.
1916         (tsubst_exception_specification): Handle pack expansions in
1917         exception specifiers.
1918         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
1919         replacing a template parameter with its argument. If we encounter
1920         a substitution for an argument pack, just return the parameter
1921         itself. 
1922         (tsubst_copy): sizeof(X...) returns the number of elements in
1923         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
1924         PARM_DECL is a parameter pack.
1925         (tsubst_expr): Expression pack expansions and argument packs
1926         cannot show up here; they will all be handled through function
1927         calls, sizeof, and template argument lists.
1928         (tsubst_copy_and_build): sizeof(X...) returns the number of
1929         elements in parameter pack X.  Handle pack expansions in TREE_LIST
1930         and CONSTRUCTOR nodes.
1931         (fn_type_unification): Handle "incomplete" explicit template
1932         argument lists that specify some of the arguments for a template
1933         parameter pack.
1934         (type_unification_real): Unify arguments against pack expansions.
1935         (template_parm_level_and_index): New, helper function.
1936         (unify_pack_expansion): New.
1937         (unify): Unify argument packs on an argument-by-argument basis,
1938         handling variadic argument packs as well.
1939         (more_specialized_fn): Handle unification of function parameter
1940         packs. All things being equal, prefer non-variadic function
1941         templates to variadic function templates.
1942         (more_specialized_class): Prefer the variadic class template
1943         partial specialization that binds fewer arguments to a parameter
1944         pack.
1945         (regenerate_decl_from_template): Expand function parameter packs
1946         into separate parameters.
1947         (instantiate_decl): Ditto.
1948         (tsubst_initializer_list): Handle pack expansions for base-class
1949         initializers.
1950         (dependent_type_p_r): Determine dependent types in argument packs
1951         and pack expansions.
1952         (value_dependent_expression_p): Determine value-dependence of
1953         non-type argument packs.
1954         (dependent_template_arg_p): Handle argument packs.
1955         * semantics.c (finish_cond): Check for bare parameter packs.
1956         (finish_expr_stmt): Ditto.
1957         (finish_for_expr): Ditto.
1958         (finish_switch_cond): Ditto.
1959         (finish_mem_initializers): Ditto.
1960         * name-lookup.c (arg_assoc_type): Handle pack expansions and
1961         argument packs.
1962         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1963         * parser.c (make_declarator): Declarator is not an expansion.
1964         (make_pointer_declarator): Transfer parameter pack flag to outer
1965         declarator.
1966         (make_reference_declarator): Ditto.
1967         (make_ptrmem_declarator): Ditto.
1968         (make_call_declarator): Ditto.
1969         (make_array_declarator): Ditto.
1970         (cp_parser_postfix_expression): Allow pack expansion expressions
1971         in the argument list for a call expression.
1972         (cp_parser_parenthesized_expression_list): Add new parameter
1973         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1974         into separate arguments."
1975         (cp_parser_new_placement): Allow pack expansion expressions.
1976         (cp_parser_new_initializer): Ditto.
1977         (cp_parser_mem_initializer_list): Allow ellipsis to create a
1978         base-class initializer expansion.
1979         (cp_parser_mem_initializer): Ditto.
1980         (cp_parser_template_parameter_list): Keep track of whether the
1981         template parameter is a template parameter pack.
1982         (cp_parser_template_parameter): Parse the ellipsis to indicate a
1983         template parameter pack.
1984         (cp_parser_type_parameter): Ditto.
1985         (cp_parser_template_argument_list): Parse the ellipsis to indicate
1986         a pack expansion.
1987         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1988         this declarator is a parameter pack.
1989         (cp_parser_parameter_declaration): The ellipsis does not end the
1990         parameter declaration, because it might be a parameter pack. Parse
1991         the ellipsis to indicate a parameter pack.
1992         (cp_parser_initializer): Allow pack expansions.
1993         (cp_parser_initializer_list): Allow ellipsis to create an
1994         initializer expansion.
1995         (cp_parser_base_clause): Allow ellipsis to create a base specifier
1996         expansion.
1997         (cp_parser_type_id_list): Allow ellipsis to create an exception
1998         specifier expansion.
1999         (cp_parser_attribute_list): Don't allow pack expansions.
2000         (cp_parser_functional_cast): Allow pack expansions.
2001         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2002         compute the length of a parameter pack.
2003         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2004         end a template argument.
2005         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2006         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2007         CAST_EXPR. 
2009 2007-03-09  Dirk Mueller  <dmueller@suse.de>
2011         * cp/call.c (build_new_op): Call warn_logical_operator.
2013 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
2015         PR c++/30852
2016         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2018         PR c++/30534
2019         * pt.c (any_template_arguments_need_structural_equality_p):
2020         Robustify.
2022 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
2024         * decl.c (grokdeclarator): Disable warnings for anonymous
2025         bitfields.
2027 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
2029         * typeck2.c (readonly_error): Always emit a hard error.
2030         Remove last argument.
2031         * cp-tree.h (readonly_error): Adjust prototype.
2032         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2033         * typeck.c (build_unary_op): Likewise.
2034         (build_modify_expr): Likewise.
2036 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
2038         PR c++/30895
2039         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2041 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2043         PR c++/15787
2044         * parser.c (struct cp_parser): New IN_IF_STMT.
2045         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2046         returning if parsing the body of an 'if' statement or issuing an
2047         error and continuing.
2048         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2049         body of 'if'.
2050         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2051         
2052 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
2054         PR c++/28253
2055         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2056         for thunks.
2058 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
2060         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2061         Objective-C++.  Don't exit early if -shared-libgcc needs to be
2062         added.
2064 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2066         * typeck.c (common_base_type): Delete unused function.
2067         
2068 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2070         * Make-lang.in: Add dummy lang.install-pdf target.
2072 2007-03-01  Simon Baldwin <simonb@google.com>
2074         PR c++/23689
2075         * decl.c (check_tag_decl): Added new warning for typedef ignored
2076         when it precedes an otherwise valid non-typedef declaration.
2078 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
2080         * typeck.c (build_function_call): Store converted arguments
2081         in a stack-allocated array instead of building a list.
2082         (convert_arguments): Store arguments in the array passed in as an
2083         argument, and return the actual number of arguments.
2084         * call.c (build_call): Delete, and replace with...
2085         (build_call_n, build_call_a): New.
2086         (build_op_delete_call): Rewrite to avoid constructing argument lists.
2087         (build_over_call): Store converted arguments in a stack-allocated
2088         array instead of building a list.
2089         (build_cxx_call): Pass arguments in an array instead of as a list.
2090         (build_java_interface_fn_ref): Rewrite to avoid constructing
2091         argument lists.
2092         * tree.h: Update declarations to reflect above changes.
2093         * method.c (use_thunk): Use a stack-allocated array to hold
2094         the arguments instead of a list.
2095         * rtti.c (throw_bad_cast): Update call to cxx_call.
2096         (throw_bad_typeid): Likewise.
2097         (build_dynamic_cast_1): Likewise.
2098         * init.c (build_builtin_delete_call): Use build_call_n.
2099         * decl.c (expand_static_init): Likewise.
2100         * except.c (cp_protect_cleanup_actions): Likewise.
2101         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2102         (gimplify_must_not_throw_expr): Likewise.
2103         (cxx_omp_apply_fn): Use build_call_a.
2105 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
2107         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2108         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2110 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
2112         * cp-tree.h (static_ctors): Remove.
2113         * cp-tree.h (static_dtors): Likewise.
2114         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2115         refactoring of tree_map hierarchy.
2116         (decl_shadowed_for_var_insert): Likewise.
2117         * semantics.c (expand_body): Use c_expand_body.
2118         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2119         * decl2.c (static_ctors): Remove.
2120         (static_dtors): Likewise.
2121         (generate_ctor_or_dtor_function): Pass NULL_TREE to
2122         objc_generate_static_init_call.  Do not call static_[cd]tors.
2123         (generate_ctor_and_dtor_functions_for_priority): Do not check for
2124         static_[cd]tors.
2125         (cp_write_global_declarations): Likewise.
2127 2007-02-23  Richard Guenther  <rguenther@suse.de>
2129         * class.c (note_name_declared_in_class): Make declaration
2130         changes meaning a pedwarn.
2132 2007-02-22  Michael Matz  <matz@suse.de>
2134         PR c++/29433
2135         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2136         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2137         dump_function_decl): Guard emitting outer scopes by new flag.
2138         * cp-lang.c (cxx_dwarf_name): New function.
2139         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2140         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2141         Remove functions.
2142         (push_template_decl_real, lookup_template_class): Remove calls
2143         to above functions.
2145 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
2147         * call.c (build_new_method_call): Ensure that explicit calls of
2148         destructors have type "void".
2150 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2152         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2153         and -Walways-true with -Waddress.
2154         * cvt.c (convert_to_void): Replace unconditional warning with
2155         -Waddress.
2157 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2159         * decl.c, tree.c: Fix comment typos.
2161 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2163         PR C++/30158
2164         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
2165         statement expression if we had an error mark node.
2167 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2168             Brooks Moses  <brooks.moses@codesourcery.com>
2169             Lee Millward  <lee.millward@codesourcery.com>
2171         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2172         Change class to tcc_vl_exp.
2174         * call.c (build_call): Use build_call_list instead 
2175         of build3. 
2176         (build_over_call): Likewise.
2177         (build_new_method_call): Use build_min_non_dep_call_list 
2178         instead of build_min_non_dep.
2180         * error.c (dump_call_expr_args): New function.
2181         (dump_aggr_init_expr_args): New function.
2182         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
2183         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2185         * cvt.c (convert_to_void): Use build_call_array instead
2186         of build3; use new AGGR_INIT_EXPR accessor macros.
2188         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2189         instead of TREE_CODE_LENGTH.
2191         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2192         AGGR_INIT_EXPR accessor macros.
2194         * cp-gimplify.c (cp_gimplify_init_expr): Use 
2195         AGGR_INIT_EXPR_SLOT to set the slot operand.
2197         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2198         (AGGR_INIT_EXPR_SLOT): New macro.
2199         (AGGR_INIT_EXPR_ARG): New macro.
2200         (aggr_init_expr_nargs): New macro.
2201         (AGGR_INIT_EXPR_ARGP): New macro.
2202         (aggr_init_expr_arg_iterator): New.
2203         (init_aggr_init_expr_arg_iterator): New.
2204         (next_aggr_init_expr_arg): New.
2205         (first_aggr_init_expr_arg): New.
2206         (more_aggr_init_expr_args_p): New.
2207         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2208         (stabilize_aggr_init): New declaration.
2209         (build_min_non_dep_call_list): Likewise.
2211         * tree.c (process_aggr_init_operands): New function.
2212         (build_aggr_init_array) New function.
2213         (build_cplus_new): Update to use new CALL_EXPR and
2214         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2215         build_aggr_init_array.
2216         (build_min_non_dep_call_list) New function.
2217         (build_min_nt): Assert input code parameter is not a variable
2218         length expression class.
2219         (build_min, build_min_non_dep): Likewise.
2220         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2221         to check for equality instead of recursing. Handle tcc_vl_exp
2222         tree code classes.
2223         (stabilize_call): Update to only handle CALL_EXPRs, not 
2224         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2225         (stabilize_aggr_init): New function.
2226         (stabilize_init): Use it.
2228         * cxx-pretty-print.c (pp_cxx_postfix_expression)
2229         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2230         AGGR_INIT_EXPR accessor macros and argument iterators.
2231         
2232         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2233         build_vl_exp. Iterate through the operands, recursively 
2234         processing each one.
2235         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2236         CALL_EXPR accessor macros.
2237         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2238         tree code classes. Use TREE_OPERAND_LENGTH instead of 
2239         TREE_CODE_LENGTH.
2241         * semantics.c (finish_call_expr): Use build_nt_call_list
2242         instead of build_nt.
2243         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
2244         accessor macros. Use build_call_array to construct the 
2245         CALL_EXPR node instead of build3
2246         
2247         * decl2.c (build_offset_ref_call_from_tree): Use 
2248         build_nt_call_list and build_min_non_dep_call_list instead
2249         of build_min_nt and build_min_non_dep.
2251         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2252         Use build_nt_call_list instead of build_min_nt.
2254 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2256         PR c++/28943
2257         * call.c (build_conditional_expr): Improve error message.
2258         
2259 2007-02-13  Dirk Mueller  <dmueller@suse.de>
2261         * friend.c (do_friend): Annotate warning about friend
2262         declarations in templates with OPT_Wnon_template_friend.
2263         Convert informal message from warning() to inform().
2265 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
2266             Mark Mitchell  <mark@codesourcery.com>
2268         PR c++/14622
2269         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2270         instantiations for variables.
2272 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2274         PR middle-end/7651
2275         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2276         Check warn_unused_value just once.
2278 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
2280         PR c++/26988
2281         * pt.c (determine_specialization): Use skip_artificial_parms_for.
2282         (fn_type_unificiation): Likewise.
2283         (get_bindings): Likewise.
2285 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
2287         PR target/29487
2288         * decl.c (finish_function): Use DECL_REPLACEABLE.
2289         * tree.c (cp_cannot_inline_tree_fn): Likewise.
2291 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2293         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2295 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2297         * decl.c (grokvardecl): Don't error if !have_tls.
2298         (grokdeclarator): Likewise.
2299         * parser.c (cp_parser_omp_threadprivate): Likewise.
2301 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
2303         PR c++/30703
2304         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2305         parameters and result decls in omp clauses.
2306         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2307         by reference.
2309 2007-02-05  Dirk Mueller  <dmueller@suse.de>
2311         PR bootstrap/30510
2312         * parser.c (cp_parser_class_specifier): Always initialize bases.
2314 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2316         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2317         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2318         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2319         expressions.
2320         * semantics.c (finish_omp_atomic): Store a whole expression node
2321         in operand 1, and integer_zero_node in operand 0, for dependent
2322         OMP_ATOMIC.  Rewrite to make flow easier to understand.
2324 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2326         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2328 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
2330         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2331         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2333 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
2335        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2336        keyword warning to -Wc++0x-compat.
2337         
2338 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2340         * decl.c (grokdeclarator): Update documentation.
2342 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2344         PR c++/30536
2345         * decl.c (grokdeclarator): If __thread is used together with
2346         a storage class other than extern and static, clear thread_p
2347         after issuing diagnostics and fall through to checking the
2348         storage class.
2350 2007-01-30  Roger Sayle  <roger@eyesopen.com>
2352         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2353         calculating the size of an array (to avoid recursive errors).
2355 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2357         PR c++/24745
2358         * typeck.c (build_binary_op): Fix logic for warning. Move warning
2359         to -Wpointer-arith.
2360         * call.c (convert_like_real): Don't warn when converting to
2361         boolean type.
2362         
2363 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2365         * decl.c (pop_label): Replace warning with call to
2366         warn_for_unused_label.
2368 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
2370         PR C++/28988
2371         * semantics.c (finish_pseudo_destructor_expr): Check the
2372         destrutor name by calling check_dtor_name.
2374 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
2376         * lex.c (D_CPP0X): Rename.
2377         (D_CXX0X): To this.
2378         (reswords): D_CPP0X -> D_CXX0X.
2379         (init_reswords): Ditto.
2380         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2381         of C++0x keywords as identifiers.
2383 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
2385         PR c++/27492
2386         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2387         function decls.
2389 2007-01-23  Ian Lance Taylor  <iant@google.com>
2391         * typeck.c (convert_for_assignment): Only warn about a = b = c
2392         when converting to bool.
2394 2007-01-23  Roger Sayle  <roger@eyesopen.com>
2396         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2397         TREE_OVERFLOW.
2398         * typeck.c (ignore_overflows): Remove the remaining uses of
2399         TREE_CONSTANT_OVERFLOW.
2401 2007-01-20  Jan Hubicka  <jh@suse.cz>
2403         * decl2.c (start_objects, start_static_storage_duration_function):
2404         Do not make the functions uninlinable.
2406 2007-01-17  Ian Lance Taylor  <iant@google.com>
2408         * class.c (add_method): Call VEC_reserve_exact rather than passing
2409         a negative size to VEC_reserve.
2411 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
2413         PR c++/29573
2414         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2416 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
2418         PR c++/28999
2419         * decl.c (make_typename_type): If the qualified name is not a
2420         type, issue an error.
2421         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2422         formatting.
2424 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
2426         * rtti.c: Include target.h.
2427         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2428         don't emit typeinfo for fundamental types as weak.
2429         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2431 2007-01-08  Richard Guenther  <rguenther@suse.de>
2433         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2435 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
2437         * call.c (standard_conversion): Pass flag to
2438         vector_types_convertible_p to disallow emission of note.
2439         * typeck.c (convert_for_assignment): Pass flag to
2440         vector_types_convertible_p to allow emission of note.
2441         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2442         to disallow emission of note.
2444 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2446         PR c++/28986
2447         * typeck.c (build_binary_op): Call overflow_warning if
2448         TREE_OVERFLOW_P is true for the result and not for any of the
2449         operands.
2450         
2451 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
2453        PR c++/19439
2454        * class.c (add_method): Don't wait until template
2455        instantiation time to complain about duplicate methods.
2456         
2457 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2459         PR c/19978
2460         * semantics.c (finish_unary_op_expr): Warn only if result
2461         overflowed and operands did not.
2463 2007-01-05  Ian Lance Taylor  <iant@google.com>
2465         * typeck.c (build_binary_op): Warn about comparing a non-weak
2466         address to NULL.
2468 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
2470         * pt.c (tsubst): Propagate the need for structural equality checks
2471         when reducing the level of template parameters.
2473 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
2475         * pt.c: Fix a comment typo.
2477 2007-01-02  Ian Lance Taylor  <iant@google.com>
2479         * semantics.c (maybe_convert_cond): Optionally warn when using an
2480         assignment as a condition.
2481         * typeck.c (convert_for_assignment): Optionally warn about
2482         assigning the result of an assignment to a bool.
2484 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2486         * pt.c (canonical_template_parms): Correct typo in comment.
2487         
2488 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2490         * typeck.c (structural_comptypes): Renamed from "comptypes".
2491         (comptypes): Use canonical type information to perform fast type
2492         comparison. When VERIFY_CANONICAL_TYPES, verify that the
2493         canonical type comparison returns the same results as we would see
2494         from the current, structural check. Support COMPARE_STRUCTURAL
2495         when we need structural checks.
2496         * decl.c (typename_compare): Fix comment.
2497         (build_typename_type): TYPENAME_TYPE nodes require structural
2498         equality checks, because they resolve different based on the
2499         current class type.
2500         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2501         require structural equality checks (for now).
2502         (build_ptrmemfunc_type): Build the canonical pointer to member
2503         function type.
2504         (compute_array_index_type): Whenever we build a new index type
2505         to represent the size of an array in a template, we need to mark
2506         this index type as requiring structural equality. This goes for
2507         arrays with value-dependent sizes with the current ABI, or all
2508         arrays with ABI-1.
2509         * tree.c (cplus_array_hash): New.
2510         (struct cplus_array_info): New.
2511         (cplus_array_compare): New.
2512         (cplus_array_htab): New.
2513         (build_cplus_array_type_1): Use a hash table to cache the array
2514         types we build. Build the canonical array type for each array
2515         type.
2516         (cp_build_qualified_type_real): When building a cv-qualified array
2517         type, use the hash table of array types and build canonical array
2518         types as necessary.
2519         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2520         use structural equality (for now).
2521         * cp-tree.h (COMPARE_STRUCTURAL): New.
2522         * pt.c (canonical_template_parms): New.
2523         (canonical_type_parameter): New.
2524         (process_template_parm): Find the canonical type parameter.
2525         (lookup_template_class): When we have named the primary template
2526         type, set the canonical type for our template class to the primary
2527         template type. If any of the template arguments need structural
2528         equality checks, the template class needs structural equality
2529         checks.
2530         (tsubst): When reducing the level of a template template
2531         parameter, we require structural equality tests for the resulting
2532         parameter because its template parameters have not had their types
2533         canonicalized. When reducing a template type parameter, find the
2534         canonical reduced type parameter.
2535         (any_template_arguments_need_structural_equality_p): New.