c-common.c (vector_types_convertible_p): Call langhook instead of comptypes.
[official-gcc.git] / gcc / cp / ChangeLog
blobdf3fc96638a58a9995d7907b1cba4f51f589fa42
1 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
3         * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
4         test for equivalence between pointer and references.
6 2008-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
8         PR 24924
9         * class.c (finish_struct_anon): Use permerror instead of pedwarn.
10         (check_field_decls): Likewise.
11         (note_name_declared_in_class): Likewise.
12         * call.c (build_new_op): Likewise.
13         (convert_like_real): Likewise.
14         (build_over_call): Likewise.
15         * lex.c (unqualified_fn_lookup_error): Likewise.
16         * parser.c (cp_parser_template_id): Likewise.
17         * cvt.c (warn_ref_binding): Likewise.
18         (convert_to_reference): Likewise.
19         (ocp_convert): Likewise.
20         (convert_to_void): Use error instead of pedwarn.
21         * error.c (cp_cpp_error): Use pedantic_warning_kind.
22         * decl.c (compute_array_index_type): Use constant_expression_error.
23         
24 2008-03-01  Douglas Gregor  <doug.gregor@gmail.com>
26         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
27         that auto is either a storage class or a simple type specifier,
28         depending on the dialect.
29         (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
30         specifier in C++98 mode, error in C++0x mode (since we don't
31         support auto as a type specifier, yet).
32         (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
33         storage specifier in C++0x mode.
34         (cp_parser_simple_type_specifier): Parse `auto' as a
35         simple-type-specifier, but error because we don't support it yet.
37 2008-02-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
39         * parser.c (cp_parser_nonclass_name): New.
40         (cp_parser_pseudo_destructor_name): Use it instead of
41         cp_parser_type_name.
42         (cp_parser_type_name): Move code to cp_parser_nonclass_name.
44 2008-02-29  Tom Tromey  <tromey@redhat.com>
46         * parser.c (struct cp_token) <input_file_stack_index>: Remove.
47         (cp_lexer_get_preprocessor_token): Update.
48         (cp_lexer_set_source_position_from_token): Don't call
49         restore_input_file_stack.
50         * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
52 2008-02-28  Richard Guenther  <rguenther@suse.de>
54         Revert:
55         2008-02-26  Richard Guenther  <rguenther@suse.de>
57         * decl.c (duplicate_decls): Remove decl from global mapping
58         before ggc_freeing it.
60 2008-02-27  Jakub Jelinek  <jakub@redhat.com>
62         PR c++/35368
63         * rtti.c: Include c-pragma.h.
64         (push_abi_namespace, pop_abi_namespace): New functions.
65         (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
66         create_tinfo_types, emit_support_tinfos): Use them.
67         * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
69 2008-02-26  Jason Merrill  <jason@redhat.com>
71         PR c++/35315
72         * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
73         to name the struct for linkage purposes even if it has attributes.
74         (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
76 2008-02-26  Tom Tromey  <tromey@redhat.com>
78         * parser.c (eof_token): Remove old location code.
79         (check_empty_body): Remove test of USE_MAPPED_LOCATION.
80         * decl2.c (generate_ctor_or_dtor_function): Remove old location
81         code.
82         (cp_write_global_declarations): Likewise.
83         * lex.c (cxx_init): Remove old location code.
84         (handle_pragma_implementation): Remove test of
85         USE_MAPPED_LOCATION.
86         * pt.c (tsubst): Remove old location code.
87         * error.c (cp_print_error_function): Remove test of
88         USE_MAPPED_LOCATION.
89         * decl.c (pop_label): Remove old location code.
90         (finish_function): Likewise.
92 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
94         PR 26264
95         * call.c (magic_varargs_p):  Remove BUILT_IN_STDARG_START.
96         
97 2008-02-26  Richard Guenther  <rguenther@suse.de>
99         * decl.c (duplicate_decls): Remove decl from global mapping
100         before ggc_freeing it.
102 2008-02-26  Paolo Carlini  <pcarlini@suse.de>
104         PR c++/35323
105         * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
107 2008-02-26  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
108         
109         * typeck.c (build_class_member_access_expr): Add appropriate
110         OPT_W* parameter to warning.
111         (build_reinterpret_cast_1): Likewise.
112         * name-lookup.c (push_overloaded_decl): Likewise.
113         
114 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
116         PR c++/35333
117         * error.c (dump_expr): Handle CONJ_EXPR.
119 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
121         PR c++/35338
122         * error.c (dump_type): Handle FIXED_POINT_TYPE.
123         (dump_expr): Handle FIXED_CST.
125 2008-02-24  Jason Merrill  <jason@redhat.com>
127         * parser.c (cp_parser_declaration): Handle "inline namespace".
128         (cp_parser_namespace_definition): Likewise.
130         PR c++/33486
131         * name-lookup.c (arg_assoc_namespace): Look down into inline 
132         namespaces, too.
134 2008-02-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
136         * typeck.c (check_for_casting_away_constness): Use 1 single
137         argument, the type of cast, to decide what diagnostics generate.
138         (build_static_cast_1): Remove unused code. Update call to
139         check_for_casting_away_constness.
140         (build_reinterpret_cast_1): Update call to
141         check_for_casting_away_constness.
142         (build_const_cast_1): Likewise.
143         
144 2008-02-24  Paolo Carlini  <pcarlini@suse.de>
146         * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
147         VEC_NEW_EXPR), forward to pp_expression.
148         * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
150 2008-02-24  Danny Smith  <dannysmith@users.sourceforge.net>
152         PR c++/34749
153         * friend.c (do_friend): Call cplus_decl_attributes earlier.
155 2008-02-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
157         PR C++/34715
158         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
159         template decls' function decl.
161 2008-02-22  Paolo Carlini  <pcarlini@suse.de>
163         PR c++/35282
164         Revert:
165         2008-02-14  Paolo Carlini  <pcarlini@suse.de>
167         PR c++/28743
168         * pt.c (determine_specialization): In case of function templates,
169         when the type of DECL does not match FN there is no match.
171 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
173         PR c/19999
174         * typeck.c (build_binary_op): Warn about floating point
175         comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
177 2008-02-19  Jason Merrill  <jason@redhat.com>
179         PR c++/34950
180         * pt.c (resolve_overloaded_unification): Set processing_template_decl
181         while we look for possible bindings.
183 2008-02-19  Jakub Jelinek  <jakub@redhat.com>
185         PR c++/35028
186         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
188         PR c++/34964
189         PR c++/35244
190         * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
191         vars.  Afterwards ensure v is VAR_DECL.
193         PR c++/35078
194         * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
195         call cp_finish_decl.
196         * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
197         early.
199 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
201         PR c++/35023
202         PR c++/35024
203         PR c++/35026
204         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
205         is error_mark_node, return an error early.
206         (find_parameter_packs_r): Pass the pointer set along to recursive
207         calls of cp_walk_subtrees; don't try to manage the pointer set
208         ourselves.
209         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
210         (make_pack_expansion): Ditto.
211         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
212         a second pass through the tree with find_parameter_packs_r; that
213         second pass no longer does anything.
214         (push_template_decl_real): If we have an erroneous declaration,
215         set its type to error_mark_node before returning an error.
217 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
219         PR c++/34050
220         * pt.c (tsubst_initializer_list): Deal with the use of
221         VOID_TYPE_NODE to indicate value-initialization of the bases.
223 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
224             Jason Merrill  <jason@redhat.com>
226         PR c++/5645
227         PR c++/11159
228         * class.c (type_has_user_nondefault_constructor): New fn.
229         * cp-tree.h: Declare it.
230         * init.c (emit_mem_initializers): Use it for -W warning about
231         missing base initializer.
233 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
235         PR c++/28743
236         * pt.c (determine_specialization): In case of function templates,
237         when the type of DECL does not match FN there is no match.
239 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
240             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
242         PR c++/35138
243         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
244         are not identifier :: ~, return before calling cp_parser_type_name.
246 2008-02-13  Jason Merrill  <jason@redhat.com>
248         PR c++/34962, c++/34937, c++/34939
249         * decl2.c (is_late_template_attribute): Always defer attributes 
250         vector_size and weak.
252         PR c++/34774
253         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
254         of enumerators, too.
256 2008-02-12  Jason Merrill  <jason@redhat.com>
258         PR c++/34824
259         * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
260         if we're doing conversions to call a user-defined conversion function.
262 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
264         PR c++/29048
265         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
266         check here, too.
268 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
270         PR c++/34862
271         * init.c (build_new_1): Don't create placement_expr before
272         constructing alloc_call.  Verify that the pointer is passed by
273         value to operator new.
275 2008-02-11  Jason Merrill  <jason@redhat.com>
277         PR c++/35097
278         * pt.c (tsubst): Don't look up a template typedef in an explicit
279         specialization.
281 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
283        PR c++/35113
284        * tree.c (cp_build_qualified_type_real): When building a
285        cv-qualified array type, build it as a unique type with
286        build_cplus_array_type_1 and then adopt the unqualified type's
287        main variant.
288         
289 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
291         PR c++/35077
292         * decl.c (groktypename): Check grokdeclarator return.
294 2008-02-10  Jason Merrill  <jason@redhat.com>
296         PR c++/34094
297         * decl2.c (cp_write_global_declarations): Don't write out static 
298         data members with DECL_IN_AGGR_P set.
300 2008-02-08  Jason Merrill  <jason@redhat.com>
302         PR c++/35116
303         * tree.c (build_target_expr_with_type): Handle void initializer.
304         (bot_manip): Remap slot before recursing.
306 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
308         PR other/35107
309         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
311 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
313         PR c++/35056
314         * tree.c: Include tree-flow.h.
315         (build_target_expr): Check type compatibility.
316         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
317         * call.c (convert_like_real): Convert bitfield to expected type.
319 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
321         PR c++/35049
322         PR c++/35096
323         * typeck.c (structural_comptypes): Call cp_comptypes.
324         (comptypes): New; called from the C/C++ common bits to perform
325         strict checks.
326         (cp_comptypes): Renamed from comptypes, which is already used,
327         with a different signature, by the C++ front end.
328         (build_reinterpret_cast_1): Call cp_comptypes.
329         (ptr_reasonably_similar): Ditto.
330         * decl.c (decls_match): Ditto.
331         * cvt.c (convert_to_reference): Ditto.
332         * cp-tree.h (same_type_p): Ditto.
333         (same_or_base_type_p): Ditto.
334         (comptypes): Rename to cp_comptypes.
335         * pt.c (canonical_type_parameter): Call cp_comptypes.
337 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
339         PR c++/33553
340         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
341         value dependent expression.
343 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
345         PR c++/35074
346         * decl2.c (save_template_attributes): When we're modifying the
347         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
348         all of the other variants to add those same attributes. Otherwise,
349         the main variant will be inconsistent with those other variants.
350         
351 2008-02-04  Richard Guenther  <rguenther@suse.de>
353         PR java/35035
354         * decl.c (record_builtin_java_type): Make jboolean a
355         integer type again where its mode doesn't match that of bool.
357 2008-02-02  Jason Merrill  <jason@redhat.com>
358             Mark Mitchell  <mark@codesourcery.com>
360         PR c++/33916
361         * init.c (build_value_init_1): New function.
362         (build_value_init): New function.
363         * typeck2.c (build_functional_cast): Call it.
364         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
366         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from 
367         TYPE_HAS_CONSTRUCTOR.
368         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
369         add_implicitly_declared_members): Adjust.
370         (check_field_decls): Adjust. Remove warnings about reference/const
371         in class without constructor.
372         (check_bases_and_members): Adjust.  Give those warnings here instead.
373         * decl.c (fixup_anonymous_aggr): Adjust.
374         (check_initializer): Adjust, clarify logic slightly.
375         (grok_special_member_properties): Adjust, only set if user-provided.
376         * rtti.c (create_tinfo_types): Don't set.
377         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
378         Use same_type_ignoring_top_level_qualifiers_p.
379         * pt.c (check_explicit_specialization): Adjust.
380         (instantiate_class_template): Adjust.
382 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
383            Jakub Jelinek  <jakub@redhat.com>
385        PR c++/34935
386        PR c++/34936
387        * typeck.c (structural_comptypes): Handle comparisons of
388        VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
389        REAL_TYPE nodes.
390        * mangle.c (write_builtin_type): Map down to the canonical type,
391        which will be one of the predefined type nodes.
393 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
395         PR 35004
396         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
397         bits to allow for expansion of the number of middle end tree
398         codes.
400 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
402         PR c++/34055
403         PR c++/34103
404         PR c++/34219
405         PR c++/34606
406         PR c++/34753
407         PR c++/34754
408         PR c++/34755
409         PR c++/34919
410         PR c++/34961
411         * typeck.c (check_return_expr): Tweak call to
412         check_for_bare_parameter_packs.
413         * class.c (add_method): Be careful with error_mark_nodes.
414         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
415         signature.
416         * pt.c (struct find_parameter_pack_data): Remove
417         SET_PACKS_TO_ERROR.
418         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
419         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
420         (make_pack_expansion): Ditto.
421         (check_for_bare_parameter_packs): Parameter is now a tree, not a
422         tree*.
423         (process_template_parm): Tweak call to
424         check_for_bare_parameter_packs.  
425         (push_template_decl_real): Tweak calls to
426         check_for_bare_parameter_packs. If bare parameter packs are found
427         in the list of exceptions, clear out that list after giving an
428         error.
429         * semantics.c (finish_cond): Tweak call to
430         check_for_bare_parameter_packs.
431         (finish_expr_stmt): Ditto.
432         (finish_for_expr): Ditto.
433         (finish_switch_cond): Ditto.
434         (finish_mem_initializers): Ditto.
435         (finish_member_declaration): Ditto.
436         (finish_static_assert): Check for bare parameter packs in the
437         condition.
438         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
439         attributes of a declaration.
440         * parser.c (cp_parser_using_declaration): Tweak call to
441         check_for_bare_parameter_packs.
442         (cp_parser_base_clause): Ditto.
444 2008-01-28  Jason Merrill  <jason@redhat.com>
446         PR c++/35007
447         * class.c (build_base_path): Fix !want_pointer case.
449 2008-01-27  Jason Merrill  <jason@redhat.com>
451         PR c++/27177
452         * class.c (build_base_path): Fix previous change.
454 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
456         PR c++/34965
457         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
458         and TRUTH_XOR_EXPR.
460 2008-01-26  Richard Guenther  <rguenther@suse.de>
462         PR c++/34235
463         * typeck.c (build_binary_op): Remove code to shorten compares.
465 2008-01-25  Richard Guenther  <rguenther@suse.de>
467         PR c++/33887
468         * decl.c (record_builtin_java_type): Make __java_boolean
469         a variant of bool.
470         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
471         after TYPE_MAIN_VARIANT check.
473 2008-01-25  Jason Merrill  <jason@redhat.com>
475         PR c++/27177
476         * class.c (build_base_path): Don't mess with virtual access if
477         skip_evaluation.
478         * call.c (standard_conversion): Don't check whether source type
479         is complete.
481         * decl2.c (is_late_template_attribute): Don't defer attribute
482         visibility just because the type is dependent.
484 2008-01-25  Jason Merrill  <jason@redhat.com>
485             Mark Mitchell  <mark@codesourcery.com>
487         PR c++/31780
488         * call.c (standard_conversion): Allow conversion from integer/real
489         to complex.
490         (compare_ics): Such a conversion is worse than a normal arithmetic
491         conversion.
492         
493 2008-01-25  Richard Guenther  <rguenther@suse.de>
495         PR c++/33887
496         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
497         to true.
499 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
501         PR c++/34603
502         * pt.c (push_template_decl_real): Return error_mark_node in case
503         of template definition of non-template.
505 2008-01-24  Jason Merrill  <jason@redhat.com>
507         PR c++/34913
508         * decl2.c (is_late_template_attribute): Defer any attribute with 
509         dependent args.  Also defer type attributes if the type is dependent.
511 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
512             Alexandre Oliva  <aoliva@redhat.com>
514         PR c++/33984
515         * call.c (reference_binding): For bitfields use the declared bitfield
516         type.
517         (add_builtin_candidates): Likewise.
518         * class.c (layout_class_type): For bitfields copy over the
519         original type quals.
521 2008-01-22  Jason Merrill  <jason@redhat.com>
523         PR c++/28560
524         * decl.c (groktypename): Also ignore attributes on dependent 
525         possibly-class types.
527         PR c++/34912
528         * friend.c (do_friend): Check for prior declaration of a friend 
529         function of a local class.
530         * name-lookup.c (lookup_name_innermost_nonclass_level): 
531         No longer static.
532         * name-lookup.h: Declare it.
534 2008-01-22  Tom Tromey  <tromey@redhat.com>
536         PR c++/34829:
537         * init.c (build_new_1): Only disallow Java aggregates.
539 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
541         PR c++/34607
542         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
543         if decl or init is error_mark_node.
545         PR c++/34918
546         * error.c (dump_expr): Handle VECTOR_CST.
548 2008-01-21  Jason Merrill  <jason@redhat.com>
550         PR c++/33959
551         * pt.c (tsubst_aggr_type): Make sure our context is complete.
553         PR c++/34573
554         * pt.c (retrieve_local_specialization): Robustify.
555         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
557         PR c++/34846
558         * pt.c (tsubst): Only call retrieve_local_specialization if the
559         original typedef was in a function template.
561         PR c++/34196
562         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
564 2008-01-21  Richard Guenther  <rguenther@suse.de>
566         PR c++/34850
567         * error.c (cp_print_error_function): Deal with recursive
568         BLOCK trees.
570 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
572         PR c++/34891
573         * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
575 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
577         PR c++/34776
578         PR c++/34486
579         * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
580         on non-IS_AGGR_TYPE scope.
581         (constructor_name_p): Assert IS_AGGR_TYPE.
583 2008-01-18  Ian Lance Taylor  <iant@google.com>
585         PR c++/33407
586         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
587         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
588         DECL_IS_OPERATOR_NEW flag.
590 2008-01-16  Richard Guenther  <rguenther@suse.de>
592         PR c++/33819
593         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
594         for conversions to type variants.
596 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
598         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
599         declaration and code.  Update copyright year.
601 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
603         PR c++/34399
604         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
605         know we have a class type.
607 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
609         PR c++/34751
610         * pt.c (coerce_template_parameter_pack): When substituting into
611         the type of a non-type template parameter pack. use the
612         deduced/substituted arguments.
613         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
614         can be a parameter pack with the ellipsis following it.  When we
615         have an erroneous declaration, allow it to be a parameter pack.
616         (cp_parser_template_parameter): Complain about default
617         arguments on non-type template parameter packs, and parse them
618         using the new cp_parser_default_argument.
619         (cp_parser_parameter_declaration): Complain about parameter packs
620         with default arguments. Move parsing of default arguments into a
621         new function, cp_parser_default_argument.
622         (cp_parser_default_argument): New; extracted from
623         cp_parser_parameter_declaration.
625 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
627         PR c++/34051
628         PR c++/34055
629         PR c++/34102
630         PR c++/34103
631         * typeck.c (check_return_expr): If there are bare parameter packs
632         in the return value, set it to error_mark_node.
633         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
634         * pt.c (find_parameter_packs_r): Look at the type of
635         IDENTIFIER_NODEs (e.g., for user-defined conversions).
636         (check_for_bare_parameter_packs): Flip the result: now returns
637         TRUE when there were bare parameter packs, FALSE otherwise.
638         (push_template_decl_real): Deal with flipped result of
639         check_for_bare_parameter_packs.
640         * semantics.c (finish_cond): If there are bare parameter packs in
641         the conditional, set it to error_mark_node.
642         (finish_expr_stmt): If there are bare parameter packs in the
643         expression, set it to error_mark_node.
644         (finish_for_expr): Ditto.
645         (finish_switch_cond): If there are bare parameter packs in
646         the conditional, set it to error_mark_node.
647         (finish_mem_initializers): If there are bare parameter packs in
648         the member initializer, set it to error_mark_node.
649         (finish_member_declaration): Check the attributes of the
650         declaration for bare parameter packs, and remove the attributes if
651         any have bare parameter packs.
652         * parser.c (cp_parser_using_declaration): Check the using
653         declaration for bare parameter packs.
654         (cp_parser_base_clause): If there are bare parameter packs in a
655         base specifier, don't add it to the chain.
657 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
659        PR c++/34314
660        * error.c (dump_simple_decl): Display ellipsis for template
661        non-type parameter packs.
662        (dump_decl): Display ellipsis for template type parameter packs.
663        (dump_template_decl): Display ellipsis for template template
664        parameter packs.
665        * pt.c (redeclare_class_template): When redeclaring a class
666        template, check for collisions between template parameters and
667        template parameter packs.
669 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
671        PR c++/33964
672        * pt.c (process_partial_specialization): Don't mark template
673        parameters that occur in non-deduced contexts.
674        (struct pair_fn_data): Add include_nondeduced_p.
675        (for_each_template_parm_r): Only visit non-deduced contexts if
676        include_nondeduced_p is set.
677        (for_each_template_parm): Added parameter include_nondeduced_p,
678        which states whether template parameters found in non-deduced
679        contexts should be visited.
680        (uses_template_parms): Visit all template parameters, even those
681        in non-deduced contexts.
683 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
685        PR c++/34052
686        * pt.c (check_default_tmpl_args): Check for parameter packs that
687        aren't at the end of a primary template.
688        (push_template_decl_real): Remove check for parameter packs that
689        aren't at the end of a primary template; that now happens in
690        check_default_tmpl_args.
691        * semantics.c (finish_template_template_parm): Use
692        check_default_tmpl_args to check for errors in the template
693        parameter list.
694         
695 2008-01-12  Doug Kwan  <dougkwan@google.com>
697         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
698         instead of OPT_Wreturn_type in warning due to ignored return type
699         qualifiers.
700         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
701         instead of OPT_Wreturn_type in warning due to ignored return type
702         qualifiers.
704 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
706         PR c++/33890
707         * semantics.c (finish_omp_for): Don't call
708         fold_build_cleanup_point_expr if processing_template_decl.
710 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
711             Jakub Jelinek  <jakub@redhat.com>
713         PR c++/34611
714         * error.c (dump_template_argument): Deal with TREE_LIST.
716 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
718        * parser.c (cp_parser_check_decl_spec): Don't warn about "long
719        long" in C++0x mode; change the warning to note that "long long"
720        is only unsupported in C++98 mode.
722 2007-12-20  Jason Merrill  <jason@redhat.com>
724         PR c++/34111
725         * call.c (standard_conversion): Derived-to-base is considered a
726         standard conversion.
728 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
730         PR c++/34513
731         * parser.c (cp_parser_omp_parallel): For non-combined parallel
732         call cp_parser_statement rather than
733         cp_parser_already_scoped_statement.
735 2007-12-18  Jason Merrill  <jason@redhat.com>
737         PR c++/34206
738         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't 
739         use template parms.
740         (dependent_type_p_r): Handle the domain of an array.
742 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
743             Jakub Jelinek  <jakub@redhat.com>
744         
745         PR c++/32565
746         PR c++/33943
747         PR c++/33965
748         * pt.c (template_template_parm_bindings_ok_p): New; verifies
749         bindings of template template parameters after all template
750         arguments have been deduced.
751         (coerce_template_parms): Don't complain when COMPLAIN doesn't
752         include tf_error.
753         (fn_type_unification): Use template_template_parm_bindings_ok_p. 
754         (unify): Deal with variadic, bound template template parameters. 
755         (get_class_bindings): Use template_template_parm_bindings_ok_p. 
757 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
759         PR c++/34488
760         * decl.c (grokdeclarator): Reject friend sfk_constructor
761         FUNCTION_TYPE.
763 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
765         PR c/34506
766         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
767         in between clauses.
769 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
771         PR debug/7081
772         * cp-lang.c (cp_classify_record): New.
773         (LANG_HOOKS_CLASSIFY_RECORD): Override.
775 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
777         PR c++/34238
778         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
780         PR c++/34364
781         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
782         dynamic_cast in a template.
784 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
786         PR c++/34059
787         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
788         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
790 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
792         PR c++/34395
793         * error.c (dump_type_prefix, dump_type_suffix): Handle
794         TYPE_PACK_EXPANSION.
796         PR c++/34394
797         * error.c (dump_expr): Handle ABS_EXPR.
799 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
801         PR c++/34178
802         PR c++/34340
803         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
804         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
805         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
806         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
807         flag_use_repository and repo_emit_p returned 2.
809 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
811         PR c++/34336
812         * tree.c (stabilize_call, stabilize_init): Do nothing if
813         processing_template_decl.
815 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
817         PR c++/34271
818         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
819         error instead of assertion failure.
820         * parser.c (cp_parser_decltype): If closing paren is not found,
821         return error_mark_node.
823 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
825        PR c++/34101
826        * name-lookup.c (arg_assoc_template_arg): Recurse on argument
827        packs.
828        (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
829        since arg_assoc_template_arg will deal with them (better).
831 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
833        PR c++/33509
834        * pt.c (tsubst_exception_specification): Handle substitutions into
835        member templates, where tsubst_pack_expansion returns a
836        TYPE_PACK_EXPANSION.
838 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
840        PR c++/33091
841        * pt.c (unify_pack_expansion): If we didn't deduce any actual
842        bindings for the template parameter pack, don't try to keep the
843        empty deduced arguments.
844        (unify): If a parameter is a template-id whose template argument
845        list contains a pack expansion that is not at the end, then we
846        cannot unify against that template-id.
848 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
850         PR c++/34061
851         * pt.c (current_template_args): Use error_operand_p.
853 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
855         PR c++/34273
856         * error.c (dump_decl): Handle TREE_BINFO.
858 2007-12-01  Ollie Wild  <aaw@google.com>
860         PR c++/8171
861         * typeck.c (build_binary_op): Add conversion of pointers to function
862         members appearing as operands to the equality operators.
864 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
866         PR c++/34275
867         * error.c (dump_expr): Handle OBJ_TYPE_REF.
869 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
871         PR c++/34270
872         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
873         in templates.
874         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
875         Likewise.
877         PR c++/34267
878         PR c++/34268
879         * parser.c (cp_parser_decltype): Don't call finish_id_expression
880         on ~type.
881         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
882         and ~type early.
884 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
886         PR tree-optimization/34181
887         * method.c (use_thunk): Don't inline the call in the thunk.
889         PR c++/34213
890         * tree.c (decl_linkage): Static data members and static member
891         functions in anonymous ns classes are lk_external.
893 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
895         PR c++/34081
896         * decl.c (start_preparsed_function): Pass 
897         processing_template_decl for the new allocate_struct_function
898         parameter.
900 2007-11-25  Richard Guenther  <rguenther@suse.de>
902         * decl.c (poplevel): Use BLOCK_CHAIN.
904 2007-11-24  Ollie Wild  <aaw@google.com>
906         * typeck.c (delta_from_ptrmemfunc): New function.
907         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
908         (build_binary_op): Call delta_from_ptrmemfunc.
910 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
912         PR c++/30293
913         PR c++/30294
914         * decl.c (cp_finish_decl): Disallow variable or field
915         definitions if extern "Java" aggregates.
916         (grokparms): Disallow parameters with extern "Java"
917         aggregates.
918         (check_function_type): Disallow function return values
919         with extern "Java" aggregates.
920         * init.c (build_new_1): Disallow placement new with
921         extern "Java" aggregates.
923 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
924             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
925         
926         PR c++/5310
927         * call.c (convert_like_real): Build a zero constant when __null is
928         converted to an integer type.
929         
930 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
932         PR c++/34094
933         * decl2.c (cp_write_global_declarations): Issue error about static
934         data members in anonymous namespace which are declared and used,
935         but not defined.
937 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
939         PR c++/34089
940         * parser.c (cp_parser_class_head): Reject function template ids.
942         PR c++/28879
943         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
944         when processing_template_decl to build_array_type.
946         PR c++/33962
947         * pt.c (more_specialized_fn): Don't segfault if one or
948         both argument list end with ellipsis.
950 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
952         PR c++/30988
953         * semantics.c (finish_call_expr): Set
954         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
955         or OVERLOAD with all noreturn functions.
957 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
959         PR c++/34100
960         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
961         error_mark_node.
963 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
965         PR c++/34054
966         PR c++/34056
967         PR c++/34057
968         PR c++/34058
969         PR c++/34060
970         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
971         set to error_mark_node the outermost POINTER_TYPE to the pack if
972         it is seen in a POINTER_TYPE.
973         (push_template_decl_real): If check_for_bare_parameter_packs
974         fails for function return type, set the return type to
975         integer_type_node.  If check_for_bare_parameter_packs failed
976         for non-function, return error_mark_node.
978         PR c++/29225
979         * call.c (build_new_op): Call resolve_args before calling
980         build_over_call.
982 2007-11-11  Tom Tromey  <tromey@redhat.com>
984         PR c++/17577:
985         * lex.c (handle_pragma_implementation): Use cpp_included_before.
987 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
989         PR c++/8570
990         * pt.c (redeclare_class_template): Update error message. Use a
991         note to show the previous declaration.
992         (tsubst_friend_class): Use the location of the friend template as
993         the input location before calling redeclare_class_template.
995 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
997         PR c++/34068
998         * semantics.c (finish_pseudo_destructor_expr): Handle
999         object == error_mark_node.
1001 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
1003         PR c++/32241
1004         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1005         is not scalar type, let finish_class_member_access_expr handle
1006         diagnostics.  Pass BIT_NOT_EXPR argument to
1007         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
1009 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
1011         PR c++/33510
1012         * decl.c (cp_complete_array_type): If any of the initializer
1013         elements are pack expansions, don't compute the array size yet.
1015 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
1017         PR c++/30297:
1018         * tree.c (decl_linkage): Fields have no linkage.
1020 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
1022         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1024 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
1026         PR c++/33045
1027         PR c++/33837
1028         PR c++/33838
1029         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1030         Be careful with ERROR_MARK_NODEs.
1031         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1032         argument.
1034 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
1036         PR c++/33501
1037         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1038         on incomplete type.
1040 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1042         PR c++/33977
1043         PR c++/33886
1044         * tree.c (c_build_qualified_type): Define bridge to
1045         cp_build_qualified_type.
1047 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
1049         PR c++/31439
1050         PR c++/32114
1051         PR c++/32115
1052         PR c++/32125
1053         PR c++/32126
1054         PR c++/32127
1055         PR c++/32128
1056         PR c++/32253
1057         PR c++/32566
1058         * typeck.c (check_return_expr): Pass address of retval to
1059         check_for_bare_parameter_packs.
1060         * class.c (build_base_field): Tolerate bases that have no layout
1061         due to errors.
1062         (end_of_base): Ditto.
1063         * tree.c (canonical_type_variant): Be careful with
1064         ERROR_MARK_NODE.
1065         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1066         tree*.
1067         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1068         which states whether parameter packs should be replaced with
1069         ERROR_MARK_NODE.
1070         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1071         possible. If set_packs_to_error is set true, replace the parameter
1072         pack with ERROR_MARK_NODE. Manage our own pointer sets.
1073         (uses_parameter_packs): Don't set parameter packs to
1074         ERROR_MARK_NODE.
1075         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1076         which may be modified (if it is a parameter pack). Instructs
1077         find_parameter_packs_r to replace parameter packs with
1078         ERROR_MARK_NODE (so that they won't cause errors later on).
1079         (process_template_parm): Pass pointer to
1080         check_for_bare_parameter_packs.
1081         (process_partial_specialization): Replace pack expansions before
1082         the end of the template argument list with ERROR_MARK_NODE.
1083         (push_template_decl_real): Pass pointer to
1084         check_for_bare_parameter_packs. Replace parameter packs not at the
1085         end of the template parameter list with ERROR_MARK_NODE.
1086         (convert_template_argument): Be more careful about using DECL_NAME
1087         on only declarations.
1088         (unify): Can't unify against ERROR_MARK_NODE.
1089         * semantics.c (finish_cond): Pass pointer to
1090         check_for_bare_parameter_packs.
1091         (finish_expr_stmt): Ditto.
1092         (finish_for_expr): Ditto.
1093         (finish_switch_cond): Pass pointer to
1094         check_for_bare_parameter_packs, and call it before we put the
1095         condition into the statement.
1096         (finish_mem_initializers): Pass pointer to
1097         check_for_bare_parameter_packs.
1098         (finish_member_declaration): Ditto.
1099         * parser.c (cp_parser_base_clause): Ditto.
1100         
1101 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
1103         PR target/33168
1104         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1105         with the final TREE_READONLY flag in place.  processing_template_decl
1106         is known to be 0 in this part of function.
1108         PR c++/33894
1109         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1110         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1111         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1112         * semantics.c (finish_omp_atomic): Revert most of the
1113         2007-02-05 changes, just keep the new representation of
1114         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1116 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
1118         PR c++/33871
1119         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1120         local.
1122 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1124         PR c++/33996
1125         PR c++/33235
1126         PR c++/33930
1127         * typeck.c (merge_types): Don't lose rvalue references when
1128         merging types.
1129         * call.c (build_over_call): Don't elide move constructors just
1130         because the copy constructor is trivial (!).
1131         (compare_ics): If comparing cv-qualifiers fails, we can still order
1132         based on binding lvalues vs. rvalues.
1134 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
1136         PR c++/33939
1137         * pt.c (unify_pack_expansion): bring handling of function call
1138         arguments into line with type_unification_real. 
1140 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1142         * typeck.c (build_binary_op): Use pedwarn instead of error for
1143         consistency.
1145 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
1147         PR c++/33836
1148         * parser.c (cp_parser_unary_expression): For &&label call
1149         cp_parser_non_integral_constant_expression and return error_mark_node
1150         if it returned true.
1152         PR c++/33969
1153         * decl.c (grokdeclarator): Don't call build_memfn_type if type
1154         is neither FUNCTION_TYPE nor METHOD_TYPE.
1156 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
1158         PR c++/33516
1159         * parser.c (cp_parser_nested_name_specifier_opt): Use
1160         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1161         typedef of currently open class.
1163 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
1165         PR c++/33495
1166         * error.c (dump_expr): Deal specially with statements.
1168 2007-11-01  Jason Merrill  <jason@redhat.com>
1170         PR c++/30897
1171         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1172         template parms.
1173         (lookup_template_class): Use it to get the outer template args
1174         for instantiating one.
1176         PR c++/29236
1177         * pt.c (reduce_template_parm_level): tsubst the parameters
1178         of a template template parm.
1180 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
1182         PR c++/33955
1183         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1185 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
1187         PR c++/32384
1188         * parser.c (cp_parser_postfix_dot_deref_expression): If
1189         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1190         first and if that succeeds and type is SCALAR_TYPE_P, create
1191         PSEUDO_DTOR_EXPR.
1193         PR c++/32260
1194         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1195         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1196         as for std::type_info.
1198 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
1200         PR c++/33494
1201         * cxx-pretty-print.c (pp_cxx_typeid_expression,
1202         pp_cxx_delete_expression): Change to static linkage.
1203         * cxx-pretty-print.h: Adjust declarations.
1204         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1205         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1206         MODOP_EXPR): Forward to pp_expression.
1208         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1209         Fix typo.
1211 2007-10-31 Christian Bruel  <christian.bruel@st.com>
1212            Mark Mitchell  <mark@codesourcery.com>
1214         PR c++/19531
1215         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1216         if retval is volatile. 
1217         
1218 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
1220         PR c++/33616
1221         * decl2.c (build_offset_ref_call_from_tree): Call
1222         build_non_dependent_expr on object prior to building ADDR_EXPR from it
1223         if FN is DOTSTAR_EXPR.
1225 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
1227         PR c++/31993
1228         PR c++/32252
1229         * pt.c (find_parameter_packs_r): Fix typo in comment.
1230         (convert_template_argument): Look at the pattern of a pack
1231         expansion to determine what kind of entity we're converting.
1232         (coerce_template_parameter_pack): When we have coerced a non-type
1233         template parameter pack, substitute into the type of that pack.
1234         (tsubst_pack_expansion): When our substitution of a parameter pack
1235         is a "trivial" substitution of itself, just substitute into the
1236         pack expansion rather than actually expanding.
1238 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
1240         PR c++/33841
1241         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1242         for non-integral type bitfields.  Return true if bitfield is correct, false
1243         error has been diagnosed.
1244         (check_field_decls): If check_bitfield_decl returned false, call also
1245         check_field_decl.
1247 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
1248             Mark Mitchell  <mark@codesourcery.com>
1250         PR c++/30659
1251         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1252         class member error out and return.
1254 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1256         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1257         to current_function_decl rather than 0.
1259         PR c++/33844
1260         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1261         ->* rather than .*.
1262         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1264 2007-10-27  Jason Merrill  <jason@redhat.com>
1266         PR c++/5247
1267         * call.c (convert_default_arg): Detect recursion.
1269 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1271         PR c++/33842
1272         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1273         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1274         OFFSETOF_EXPR.
1275         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1276         functions.
1277         * error.c (dump_expr): Handle OFFSETOF_EXPR.
1279 2007-10-26  Jason Merrill  <jason@redhat.com>
1281         PR c++/24791
1282         * pt.c (get_template_info): New fn.
1283         (template_class_depth): Use it.
1284         (push_template_decl_real): Check that the template args of the 
1285         definition match the args of the previous declaration.
1287 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1289         PR c++/31988
1290         * decl2.c (coerce_new_type): Do not allow a default argument for
1291         the first parameter.
1293 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
1295         PR c++/33839
1296         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1297         don't see the leading '('. Only lookup names if we get an
1298         IDENTIFIER_NODE.
1300 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
1302         PR c++/33744
1303         * parser.c (cp_parser_parenthesized_expression_list): Set
1304         greater_than_is_operator_p to true in between the parens.
1306 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1308         PR c++/31747
1309         * decl.c (grokdeclarator): In case of conflicting specifiers
1310         just return error_mark_node.
1312 2007-10-26  Ollie Wild  <aaw@google.com>
1314         * expr.c (cxx_expand_expr): Removed.
1315         * cp-tree.h (exx_expand_expr): Removed.
1316         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1317         with c_expand_expr.
1319 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
1321         PR c++/33843
1322         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1324 2007-10-23  Jason Merrill  <jason@redhat.com>
1326         PR c++/25950 (DR 391)
1327         * call.c (struct conversion): Remove check_copy_constructor_p.
1328         (reference_binding): Always bind a reference directly to a 
1329         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
1330         temporary creation.
1331         (check_constructor_callable): Remove.
1332         (convert_like_real): Don't call it.
1333         (initialize_reference): Don't call check_constructor_callable.
1334         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1335         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
1336         conversions if LOOKUP_NO_TEMP_BIND.
1337         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1338         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1339         second conversion.
1340         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1342 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
1344         PR c++/33372
1345         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1346         before checking if its type is integral.
1348 2007-10-22  Jason Merrill  <jason@redhat.com>
1350         PR c++/33620
1351         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1352         * pt.c (apply_late_template_attributes): Splice out dependent
1353         attributes from DECL_ATTRIBUTES.
1355         * decl.c (cxx_maybe_build_cleanup): Use build_address.
1357 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1359         * typeck.c (build_binary_op) : Use appropriate warning option
1360         instead of unnamed warning.
1362 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
1364         PR c++/31446
1365         * pt.c (current_template_args): Do not change TREE_LIST elements
1366         with a TREE_VALUE of error_mark_node.
1368 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
1370         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1371         * decl.c (start_decl): Tidy.
1372         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1373         the type.
1374         (grokdeclarator): Clarify comment.
1376 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
1378         PR c++/30303
1379         * decl.c (grokfndecl): Return NULL after the "definition of
1380         implicitly-declared" error happened.
1382 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
1384         PR c++/26698
1385         * call.c (build_user_type_conversion_1): Do not consider conversion
1386         functions to convert a (possibly cv-qualified) object to the (possibly
1387         cv-qualified) same object type (or a reference to it), to a (possibly
1388         cv-qualified) base class of that type (or a reference to it).
1390 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
1392         * pt.c (tsubst): Use template_parm_level_and_index.
1394 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
1396         PR c++/32121
1397         * parser.c (cp_parser_compound_statement): Handle label-declarations
1398         at the beginning of the compound statement.
1399         (cp_parser_block_declaration): Issue diagnostics about __label__
1400         not at the beginning of a block.
1402 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
1404         PR c++/33461
1405         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1406         to convert_template_argument.
1407         (coerce_template_parms): Return error_mark_node after fixed-length
1408         error.
1409         (tsubst_decl): Check for error_mark_node the return value of the
1410         first tsubst in 'case VAR_DECL'.
1412 2007-10-08  Ollie Wild  <aaw@google.com>
1414         * typeck2.c (digest_init): Call cplus_expand_constant after
1415         convert_for_initialization.
1416         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1417         * expr.c (cplus_expand_constant): Updated function description.
1419 2007-10-04  Jason Merrill  <jason@redhat.com>
1421         PR c++/20416
1422         * call.c (initialize_reference): Handle local static reference
1423         temps properly.
1425 2007-10-03  Jason Merrill  <jason@redhat.com>
1427         PR c++/32470
1428         * name-lookup.c (push_namespace_with_attrs): Fold back into...
1429         (push_namespace): Here.
1430         (handle_namespace_attrs): New fn for the attr code.
1431         (leave_scope): Don't pop_visibility.
1432         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1433         * parser.c (cp_parser_namespace_definition): Call
1434         handle_namespace_attrs and pop_visibility as appropriate. 
1436         PR c++/11756
1437         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1439 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
1441         * decl.c (duplicate_decls): Preserve linkage flags for mere
1442         redeclarations of gnu_inline definitions.
1444 2007-10-03  Jason Merrill  <jason@redhat.com>
1446         PR c++/15764
1447         * decl.c (wrap_cleanups_r): New fn.
1448         (wrap_temporary_cleanups): New fn.
1449         (initialize_local_var): Call it.
1451 2007-09-29  Jason Merrill  <jason@redhat.com>
1453         PR c++/33094
1454         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
1455         constant to not have DECL_EXTERNAL if it's file-local.
1457 2007-09-28  Ollie Wild  <aaw@google.com>
1459         Revert
1460         2007-09-27  Ollie Wild  <aaw@google.com>
1462         * typeck2.c (digest_init): Call cplus_expand_constant after
1463         convert_for_initialization.
1464         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1465         * expr.c (cplus_expand_constant): Updated function description.
1467 2007-09-28  Jason Merrill  <jason@redhat.com>
1469         PR c++/10179
1470         * class.c (layout_empty_base): Take rli parameter, update
1471         rli->record_align if empty base has user-specified alignment.
1472         (build_base_field): Pass rli to it.
1474 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1476         PR c++/33213
1477         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1479 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1481         PR c++/33118
1482         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1483         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1484         (dump_parameters): Just call dump_type for argument packs too.
1486 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
1488         PR c++/31434
1489         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1490         qualification by creating qualified PACK_EXPANSION_PATTERN and
1491         then calling make_pack_expansion on it.
1493 2007-09-27  Ollie Wild  <aaw@google.com>
1495         * typeck2.c (digest_init): Call cplus_expand_constant after
1496         convert_for_initialization.
1497         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1498         * expr.c (cplus_expand_constant): Updated function description.
1500 2007-09-27  Jason Merrill  <jason@redhat.com>
1502         PR c++/33571
1503         * decl2.c (is_late_template_attribute): Don't crash on unknown
1504         attribute.
1506 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
1508         PR c++/33493
1509         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
1510         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
1511         spaces in the formatting.
1512         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
1514 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1516         * error.c (cxx_print_error_function): Add third argument, pass
1517         it over to lhd_print_error_function.
1518         (cp_print_error_function): If diagnostic->abstract_origin, print
1519         virtual backtrace.
1520         * cp-tree.h (struct diagnostic_info): New forward decl.
1521         (cxx_print_error_function): Add third argument.
1523 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
1525         PR c++/33207
1526         * name-lookup.c (pushtag): Do not create an implicit typedef before
1527         the associated type declaration is known to be valid.
1529 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
1531         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
1532         rather than pointers.
1534 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
1536         PR c++/14688
1537         * search.c (check_final_overrider): Fail if
1538         targetm.comp_type_attributes returns 0.
1540 2007-09-24  Jason Merrill  <jason@redhat.com>
1542         PR c++/33239
1543         * pt.c (resolve_typename_type): Don't look things up in the original
1544         template if it would mean losing template arguments.    
1546 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
1548         PR c++/33506
1549         * cp-tree.h (cxx_type_hash_eq): New prototype.
1550         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
1551         * tree.c (cxx_type_hash_eq): New function.
1553 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
1555         PR c++/33185    
1556         * tree.c (cp_build_qualified_type_real): Build a canonical
1557         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
1558         
1559 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
1561         PR c++/33112
1562         PR c++/33185    
1563         * tree.c (cplus_array_compare): Compare pointers, not types.
1564         (build_cplus_array_type_1): Store new array type into the hash
1565         table before building the canonical type; build the canonical type
1566         correctly.
1567         (cp_build_qualified_type_real): Put all of the array types with
1568         cv-qualified element types into the C++ array hash table, built as 
1569         variants of the unqualified versions.
1570         
1571 2007-09-23  Jason Merrill  <jason@redhat.com>
1573         PR c++/16370
1574         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
1575         for deprecation warnings.
1577 2007-09-22  Jason Merrill  <jason@redhat.com>
1579         PR c++/15269
1580         * call.c (build_over_call): Warn about deprecated virtuals.
1582         PR c++/19407
1583         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
1584         (MAYBE_TAGGED_TYPE_P): Remove.
1585         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
1586         instead of calling is_late_template_attribute again.
1587         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
1588         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
1589         Don't crash on typedefs from non-template classes.
1590         * decl2.c (grokfield): Don't sorry about attrs on template parms.
1591         (is_late_template_attribute): All attributes applied to template
1592         parms or typename types are dependent.  Static.
1593         (splice_template_attributes): Pass decl through.
1594         (save_template_attributes): Likewise.
1596 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
1598         PR c++/33496
1599         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
1600         returned from tsubst_pack_expansion.
1601         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
1602         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
1604 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
1606         PR c++/33460
1607         * semantics.c (finish_id_expression): Use consistently
1608         context_for_name_lookup.
1609         * decl.c (fixup_anonymous_aggr): Fix error message for
1610         anonymous struct (vs union).
1612 2007-09-19  Jason Merrill  <jason@redhat.com>
1614         PR c++/7586
1615         * pt.c (tsubst): Handle typedefs by looking for the specialization.
1616         (retrieve_specialization): Only tagged types use 
1617         DECL_TEMPLATE_INSTANTIATIONS.
1618         (instantiate_class_template): Push nested classes too.
1619         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
1620         tagged types.
1621         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
1622         * init.c (is_aggr_type): Remove redundant tests.
1623         * class.c (push_nested_class): Use CLASS_TYPE_P.
1625 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
1627         PR c++/33459
1628         * init.c (build_zero_init): If, recursively, build_zero_init
1629         returns a NULL_TREE, do not append it to the VEC of constructors.
1631 2007-09-18  Jason Merrill  <jason@redhat.com>
1633         PR c++/17743
1634         * pt.c (apply_late_template_attributes): Set processing_template_decl.
1635         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
1636         ATTR_FLAG_TYPE_IN_PLACE.
1637         (tsubst): Do unqualified lookup to find typedefs from current class.
1638         [ARRAY_TYPE]: Propagate alignment info.
1639         * decl2.c (is_late_template_attribute): Only defer handling of
1640         attribute aligned if the expression is dependent.
1641         (save_template_attributes): If we're deferring any attributes,
1642         make this a naming typedef.
1644 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1646         PR c++/33462 (again)
1647         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
1648         va_arg instead of __builtin_va_arg.
1650 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1652         PR c++/33462
1653         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
1654         (pp_cxx_primary_expression): Use it.
1655         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
1656         * error.c (dump_expr): Use it.
1658 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1660         PR c++/33463
1661         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
1662         out case TYPEID_EXPR to...
1663         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
1664         and pp_cxx_right_paren.
1665         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
1666         * error.c (dump_expr): Use it.
1668 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1670         PR c++/33464
1671         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
1672         (pp_cxx_primary_expression): Use it.
1673         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
1674         * error.c (dump_expr): Use it.
1676 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
1678         PR c++/33124
1679         * init.c (build_new): Remove warning for zero-element
1680         allocations.
1682 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1684         PR c++/32756
1685         * call.c (maybe_handle_implicit_object): Set this_p, clear
1686         rvaluedness_matches_p.
1687         (compare_ics): Do not compare rvaluedness matching when one of the
1688         operands is an implicit object.
1690 2007-09-14  Jason Merrill  <jason@redhat.com>
1692         PR c++/17743, c++/19163
1693         * decl2.c (is_late_template_attribute): New fn.
1694         (splice_template_attributes, save_template_attributes): New fns.
1695         (cplus_decl_attributes): Call save_template_attributes.
1696         * pt.c (apply_late_template_attributes): New fn.
1697         (instantiate_class_template, tsubst_decl): Use it.
1698         * cp-tree.h: Declare is_late_template_attribute.
1700 2007-09-13  Tom Tromey  <tromey@redhat.com>
1702         * parser.c (cp_lexer_new_main): Don't use
1703         c_lex_return_raw_strings.
1704         (cp_lexer_get_preprocessor_token): Update.  Add special case when
1705         lexer is NULL.
1707 2007-09-11  Jan Hubicka <jh@suse.cz>
1709         * method.c (use_thunk): Use tree_rest_of_compilation
1710         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1711         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
1712         * cp-tree.h (expand_body): Kill.
1713         (emit_associated_thunks): Declare.
1714         * semantics.c (emit_associated_thunks): Export.
1715         (expand_body): Kill.
1717 2007-09-09  David Daney  <ddaney@avtrex.com>
1719         PR c++/33324
1720         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
1721         to calculate cookie_ptr.
1723 2007-09-08  Jason Merrill  <jason@redhat.com>
1725         PR c++/33342
1726         * pt.c (most_specialized_class): Set processing_template_decl
1727         while tsubsting partial spec args.
1729 2007-09-06  Jason Merrill  <jason@redhat.com>
1731         * decl2.c (get_guard): Copy visibility from the guarded variable.
1733 2007-09-06  Jan Hubicka  <jh@suse.cz>
1735         * semantics.c (expand_body): Do not mark arguments of clones used.
1737 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
1739         PR c++/32674
1740         * decl.c (cp_finish_decl): When processing_template_decl,
1741         deal correctly with init as TREE_LIST.
1743 2007-09-06  Tom Tromey  <tromey@redhat.com>
1745         * decl.c (finish_function): Put return's location on line zero of
1746         file.
1748 2007-09-05  Jason Merrill  <jason@redhat.com>
1750         PR c++/15745
1751         * except.c (prepare_eh_type): Use type_decays_to.
1753         PR c++/15097
1754         * init.c (build_delete): Use build_headof to get the address of the
1755         complete object if we aren't using the deleting destructor.
1756         * rtti.c (build_headof): No longer static.
1757         * cp-tree.h: Declare it.
1759 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
1761         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1762         decl if a prototype for XX is provided with throw().
1764         PR c++/33289
1765         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1766         on __*_chk non-__builtin_* decls.
1768 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
1770         PR c++/30302
1771         * semantics.c (finish_id_expression): Use context_for_name_lookup
1772         insted of DECL_CONTEXT, to see through anonymous structs and unions.
1773         * class.c (finish_struct_anon): Deal correctly with anonymous
1774         structs (vs unions, as GNU extension) in error messages.
1776 2007-09-05  Jan Hubicka  <jh@suse.cz>
1778         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1779         call, DECL_EXTERNAL checks and current_function_decl saving.
1781 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
1783         PR c++/29731 (again)
1784         * parser.c (cp_parser_primary_expression): Return error_mark_node
1785         when a statement-expression is found in a template-argument list.
1787 2007-09-04  Jason Merrill  <jason@redhat.com>
1789         * except.c (initialize_handler_parm): Use
1790         fold_build_cleanup_point_expr.
1792         PR c++/31419
1793         * call.c (reference_binding): Don't look for user-defined conversions
1794         to the same type.
1796         PR c++/31411
1797         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1798         the MUST_NOT_THROW_EXPR.
1800 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
1802         * decl.c (cp_finish_decl): Call determine_visibility before
1803         make_rtl_for_nonlocal_decl.
1805 2007-09-04  Jason Merrill  <jason@redhat.com>
1807         PR c++/14032
1808         * pt.c (most_specialized_class): Substitute outer template
1809         arguments into the arguments of a member template partial
1810         specialization.
1811         (strip_innermost_template_args): New fn.
1813 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1815         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1817 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1819         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1820         * decl.c (cp_make_fname_decl): Likewise,
1821         * parser.c (cp_parser_string_literal): Likewise,
1822         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1823         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1824         Likewise,
1826 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
1828         PR c++/33208
1829         * typeck.c (build_unary_op): Fix error message for
1830         Boolean expression as operand to operator--.
1832 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1834         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1835         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1836         Likewise.
1838 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1840         PR c++/32597
1841         * init.c (build_default_init): Make extern.
1842         * cp-tree.h (build_default_init): Declare here.
1843         * pt.c (tsubst_expr): When the instantiation of the initializer of
1844         a variable results in an empty list, default-initialize the
1845         variable.
1846         (tsubst_copy_and_build): When the instantiation of the initializer
1847         in a new expression results in an empty initializer list,
1848         default-initialize it.
1850 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
1852         * mangle.c (write_type): Change mangling of rvalue reference from
1853         `RR' to `O'. 
1855 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
1857         * decl.c (duplicate_decls): Remove duplicated line.
1859 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1861         PR c++/33210
1862         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1863         BOUND_TEMPLATE_TEMPLATE_PARM.
1865 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1867         PR c++/32113
1868         * search.c (lookup_member): Check the name argument for
1869         error_mark_node.
1871 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1873         PR c++/33212
1874         * parser.c (cp_parser_trait_expr): Check rerurn value of
1875         cp_parser_type_id.
1877 2007-08-30  Ollie Wild  <aaw@google.com>
1879         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1880         convert_ptrmem for pointer to member conversions.
1881         (convert_to_pointer_force): Update cp_convert_to_pointer call.
1882         (ocp_convert): Update cp_convert_to_pointer call.
1883         * typeck.c (convert_ptrmem): Add conditional for null pointers to
1884         members.
1885         (build_static_cast_1): Check can_convert for conversions in either
1886         direction.
1887         (get_delta_difference_1): New function.
1888         (get_delta_difference): Refactor to call get_delta_difference_1.
1890 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
1892         * decl.c (start_preparsed_function): Set
1893         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1895 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
1897         PR c++/33209
1898         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1899         BOUND_TEMPLATE_TEMPLATE_PARM.
1901 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
1903         PR c++/32596
1904         PR c++/32400
1905         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1906         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1908 2007-08-27  Jason Merrill  <jason@redhat.com>
1910         PR c++/29000
1911         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
1912         Look inside STMT_EXPR.
1913         * semantics.c (stmt_expr_value_expr): New fn.
1914         * cp-tree.h: Declare it.
1916         PR c++/28558
1917         * decl.c (groktypename): Ignore attributes applied to class type.
1919 2007-08-28  Richard Guenther  <rguenther@suse.de>
1921         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1923 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1924         
1925         * error.c (dump_expr): Handle COMPLEX_CST.
1926         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1927         (pp_cxx_expression): Likewise.
1929 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
1931         * decl.c (GNU_INLINE_P): New.
1932         (duplicate_decls): Handle gnu_inline.  Merge attributes and
1933         some flags in overriding definitions.
1934         (redeclaration_error_message): Handle gnu_inline.
1935         (start_preparsed_function): Likewise.
1937 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1939         * call.c (sufficient_parms_p): Constify.
1940         * class.c (same_signature_p): Likewise.
1941         * cp-gimplify.c (is_invisiref_parm,
1942         cxx_omp_privatize_by_reference): Likewise.
1943         * cp-objcp-common.c (has_c_linkage): Likewise.
1944         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1945         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1946         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1947         num_artificial_parms_for, comp_template_parms,
1948         template_parameter_pack_p, any_dependent_template_arguments_p,
1949         any_type_dependent_arguments_p, any_value_dependent_elements_p,
1950         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1951         zero_init_p, member_p, cp_lvalue_kind,
1952         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1953         varargs_function_p, is_dummy_object, special_function_kind,
1954         string_conv_p, type_unknown_p, comp_except_specs, compparms,
1955         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1956         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1957         cp_has_mutable_p, at_least_as_qualified_p,
1958         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1959         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1960         * except.c (nothrow_libfn_p): Likewise.
1961         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1962         Likewise.
1963         * pt.c (comp_template_parms, template_parameter_pack_p,
1964         any_type_dependent_arguments_p, any_value_dependent_elements_p,
1965         any_dependent_template_arguments_p): Likewise.
1966         * repo.c (repo_export_class_p): Likewise.
1967         * semantics.c (anon_aggr_type_p): Likewise.
1968         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1969         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1970         varargs_function_p, member_p, is_dummy_object, pod_type_p,
1971         zero_init_p, special_function_p): Likewise.
1972         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1973         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1974         compparms, invalid_nonstatic_memfn_p,
1975         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1976         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1977         cp_has_mutable_p, lvalue_or_else): Likewise.
1979 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
1981         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1982         * cp-objcp-common.c (cp_tree_size): Ditto.
1983         * tree.c (cp_walk_subtrees): Ditto
1984         * cp-tree.def (TINST_LEVEL): Go away.
1985         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1986         move together with other non-tree structs.
1987         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1988         (union lang_tree_node): Eliminate tinst_level field.
1989         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1990         (current_instantiation, outermost_tinst_level): Return
1991         a "struct tinst_level *".
1993         * error.c (print_instantiation_partial_context): Change second
1994         parameter to a "struct tinst_level *".  Replace accessor macros
1995         with field access.
1996         (print_instantiation_full_context): Likewise.
1997         * lex.c (in_main_input_context): Likewise.
1999         * pt.c (struct pending_templates): New.
2000         (pending_templates, last_pending_template): Use it as a type.
2001         (current_tinst_level): Change typo to "struct tinst_level *"
2002         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2003         (add_pending_template): Construct a "struct pending_template".
2004         Replace TINST_LEVEL accessor macros with field access.
2005         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2006         (pop_tinst_level): Likewise.
2007         (instantiate_pending_templates): Likewise.  Factor common code used
2008         when an instantiation has been done.
2009         (outermost_tinst_level): Replace tree_last with loop.
2010         (current_instantiation): Return a "struct tinst_level *".
2012 2007-08-24  Ollie Wild  <aaw@google.com>
2014         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2015         * name-lookup.h (cp_binding_level): Remove vtables member.
2017 2007-08-24  Richard Guenther  <rguenther@suse.de>
2019         * tree.c (cp_cannot_inline_tree_fn): Remove.
2020         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2021         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2022         Remove define.
2024 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
2026         PR c++/32567
2027         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2028         error_mark_node right away if build_expr_type_conversion
2029         returned it.
2031         PR c++/32898
2032         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2033         is error_mark_node rather than NULL_TREE.
2034         * pt.c (check_explicit_specialization): Likewise.
2036         PR c++/31941
2037         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2038         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2040 2007-08-22  Jason Merrill  <jason@redhat.com>
2042         PR c++/29365
2043         * pt.c (outermost_tinst_level): New function.
2044         * lex.c (in_main_input_context): New function.
2045         * cp-tree.h: Declare it.
2046         * decl2.c (constrain_class_visibility): Use it to avoid warning
2047         about uses of the anonymous namespace in the main input file.
2049 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2051         * init.c (build_new_1): Use get_target_expr instead of save_expr.
2053 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
2055         PR c++/7302
2056         * class.c (finish_struct_1): Warn when a class has virtual
2057         functions and accessible non-virtual destructor.
2059 2007-08-20  Richard Guenther  <rguenther@suse.de>
2061         PR c++/22369
2062         PR c++/22451
2063         * call.c (build_new_method_call): Convert initializer to
2064         the basetype.
2065         * init.c (build_aggr_init): Do not fiddle with types.
2066         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2067         * except.c (build_throw): Do not drop qualifiers for the
2068         pointer type.
2069         * typeck.c (get_member_function_from_ptrfunc): Do not
2070         fiddle with types, instead convert.
2071         (build_ptrmemfunc1): Convert to the target type for
2072         initialization.
2073         (gfc_trans_allocate): Convert result to target type.
2074         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2075         pointer-to-member structures shall have alias set zero as well.
2077 2007-08-20  Richard Guenther  <rguenther@suse.de>
2079         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2080         Remove.
2081         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2082         (nonstatic_local_decl_p): Likewise.
2083         * tree.c (cp_auto_var_in_fn_p): Remove.
2084         * decl.c (nonstatic_local_decl_p): Remove.
2086 2007-08-20  Richard Guenther  <rguenther@suse.de>
2088         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2089         Remove define.
2090         * tree.h (cp_walk_tree): New define to walk_tree_1 with
2091         cp_walk_subtrees lh parameter.
2092         (cp_walk_tree_without_duplicates): New define to
2093         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2094         * tree.c (count_trees): Call
2095         cp_walk_tree_without_duplicates.
2096         (verify_stmt_tree): Call cp_walk_tree.
2097         (break_out_target_exprs): Likewise.
2098         (WALK_SUBTREE): Likewise.
2099         * cp-gimplify.c (cp_genericize): Likewise.
2100         * cp-pt.c (find_parameter_packs_r): Likewise.
2101         (uses_parameter_packs): Likewise.
2102         (make_pack_expansion): Likewise.
2103         (check_for_bare_parameter_packs): Likewise.
2104         (for_each_template_parm): Likewise.
2105         * decl.c (check_default_argument): Call
2106         cp_walk_tree_without_duplicates.
2107         * except.c (build_throw): Likewise.
2108         * decl2.c (type_visibility): Likewise.
2109         * semantics.c (expand_or_defer_fn): Likewise.
2110         (finalize_nrv): Call cp_walk_tree.
2112 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
2114         PR c++/33025
2115         * init.c (build_new_1): Rename placement_var variable to placement_expr.
2116         Initialize it with save_expr rather than get_temp_regvar.
2118 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2120         PR c++/28989
2121         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2122         lvalues.
2124 2007-08-17  Ollie Wild  <aaw@google.com>
2126         PR c++/31749
2127         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2128         declarations into appropriate slots for comparison.  Fix type
2129         comparison.
2131 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2133         PR c++/32112
2134         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2135         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2137 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
2139         PR c++/32870
2140         * parser.c (cp_parser_class_head): Improve error message.
2142 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
2144         * pt.c (instantiate_decl): Set input_location
2145         for the function end.
2147 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2149         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2150         Constify.
2151         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2152         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2153         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2154         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2155         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2156         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2157         * typeck.c (cp_type_quals): Likewise.
2158         * typeck2.c (cxx_incomplete_type_diagnostic,
2159         cxx_incomplete_type_error): Likewise.
2161 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
2163         PR c++/31132
2164         * pt.c (tsubst_friend_function): When check_classfn
2165         returns error_mark_node likewise return it.
2167 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2169         PR c++/32992
2170         * typeck.c (check_return_expr): Don't NRV optimize vars in
2171         anonymous unions.
2172         * decl.c (finish_function): Comment fix.
2174 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
2176         PR c++/33035
2177         * pt.c (push_template_decl_real): Depending on TYPE_P
2178         use either TYPE_CONTEXT or DECL_CONTEXT.
2180 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
2182         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2183         constructors and destructors return this.
2185 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
2187         PR c++/27211
2188         * decl2.c (check_classfn): Return error_mark_node in case of error;
2189         in that case, do not call add_method.
2190         * decl.c (start_decl): Deal with check_classfn returning
2191         error_mark_node.
2192         (grokfndecl): Likewise.
2193         * pt.c (tsubst_friend_function): Likewise.
2195 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
2197         PR c++/30428
2198         * typeck.c (build_binary_op): Disallow vector float types with
2199         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2201 2007-08-11  Ian Lance Taylor  <iant@google.com>
2203         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2204         alias_set_type.
2205         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
2207 2007-08-10  Ollie Wild  <aaw@google.com>
2209         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2210         type lookups.
2211         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
2212         function parameter.
2213         (unqualified_namespace_lookup): Fix ambiguous_decl call.
2214         (lookup_using_namespace): Fix ambiguous_decl call.
2215         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2217 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2219         * call.c (name_as_c_string): Use CONST_CAST.
2220         * decl.c (build_decl): Likewise.
2221         * parser.c (cp_parser_string_literal): Likewise.
2223 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2225         PR c++/17763
2226         * error.c (dump_expr): Consistently use the *_cxx_*
2227         variants of the pretty-print functions.
2229 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2231         PR c++/22256
2232         * decl.c (check_special_function_return_type): Just error
2233         on return type specified for conversion operator.
2235 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
2237         * typeck2.c (readonly_error): Handle general expressions.
2238         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2240 2007-08-06  Dan Hipschman  <dsh@google.com>
2242         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2243         access function name.
2245 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
2247         PR pch/13676
2248         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2249         * g++spec.c (lang_specific_driver): Check them.
2251 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
2253         PR c++/19532
2254         * pt.c (inline_needs_template_parms): Fix comment; change return type
2255         to bool.
2257 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
2259         Revert:
2260         2007-03-26  Dirk Mueller  <dmueller@suse.de>
2262         * parser.c (cp_parser_member_declaration): Pedwarn
2263         about stray semicolons after member declarations.
2265 2007-08-02  Lee Millward  <lee.millward@gmail.com>
2267         PR c++/30849
2268         PR c++/30850
2269         PR c++/30851
2270         * parser.c (cp_parser_asm_definition): Detect and discard asm
2271         statements with invalid inputs or outputs.
2272         (cp_parser_asm_operand_list): Return error mark node if any
2273         of the operands are invalid. Adjust documentation.
2274         
2275 2007-08-02  Nick Clifton  <nickc@redhat.com>
2277         * typeck.c: Change copyright header to refer to version 3 of the
2278         GNU General Public License and to point readers at the COPYING3
2279         file and the FSF's license web page.
2280         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2281         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2282         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2283         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2284         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2285         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2286         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2287         name-lookup.h, parser.c: Likewise.
2289 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2291         PR middle-end/32668
2292         * call.c (magic_varargs_p): Honor the "type generic" attribute.
2294 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
2296         PR c++/32108
2297         * semantics.c (finish_label_stmt): Reject the __label__
2298         extension outside function scopes.
2300 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2302         * parser.c (eof_token): Un-constify.
2303         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2304         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2305         casts.
2307 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
2309         * pt.c, tree.c, typeck2.c: Fix comment typos.
2311 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
2312             Mark Mitchell  <mark@codesourcery.com>
2314         PR c++/30917
2315         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2316         hidden due to friend declarations in local classes.
2318 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
2320         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2321         * cp-tree.def (DECLTYPE_TYPE): New.
2322         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2323         (dump_type_prefix): Ditto.
2324         (dump_type_suffix): Ditto.
2325         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2326         * mangle.c (write_type): Handle DECLTYPE_TYPE.
2327         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2328         types.
2329         (DECLTYPE_TYPE_EXPR): New.
2330         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2331         (finish_declared_type): Declare.
2332         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2333         DECLTYPE_TYPE nodes.
2334         (pp_cxx_type_id): Ditto.
2335         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2336         (tsubst): Substitute into a DECLTYPE_TYPE node.
2337         (tsubst_copy): Ditto.
2338         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2339         nodes.
2340         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2341         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2342         structural equality (because we can't hash the expressions).
2343         (finish_declared_type): New.
2344         * lex.c (reswords): Add "decltype" keyword.
2345         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2346         (cp_parser_postfix_expression): Add member_access_only_p to
2347         restrict postfix expression to member access expressions.
2348         (cp_parser_unary_expression): Update call to
2349         cp_parser_postfix_expression to reflect new parameter.
2350         (cp_parser_declared_type): New.
2351         (cp_parser_simple_type_specifier): Parse decltype types.
2353 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
2355         PR c++/32346
2356         * call.c (convert_for_arg_passing): Only widen bitfields to their
2357         declared types if necessary.
2359 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2361         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2362         Constify.
2364 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2366         * decl.c (typename_hash, typename_compare): Constify.
2367         * mangle.c (hash_type, compare_type): Likewise.
2368         * pt.c (eq_local_specializations, hash_local_specialization):
2369         Likewise.
2370         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2371         list_hash): Likewise.
2372         * typeck2.c (pat_compare): Likewise.
2374 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2376         * method.c (implicitly_declare_fn): Increase alignment if member
2377         function pointer format requires it.
2379 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2381         PR c++/29001
2382         * typeck.c (check_return_expr): Do not pass a null argument
2383         to null_ptr_cst_p.
2385 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2387         PR c++/32561
2388         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2389         only on VAR_DECL.
2391 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2393         PR c++/32839
2394         * typeck.c (convert_arguments): Only use default args if we have
2395         a function decl.
2397         PR c++/30818
2398         * typeck.c (structural_comptypes): No need to check
2399         resolve_typename_type return value here.
2400         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2401         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
2402         original type rather than error_mark_node in case of failure.
2403         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2404         resolve_typename_type result check.
2405         (cp_parser_direct_declarator, cp_parser_head,
2406         cp_parser_constructor_declarator_p): Likewise.
2408 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
2410         * pt.c (template_parms_variadic_p): Remove.
2411         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2413 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
2415         PR c++/30854
2416         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2417         argument to dump_aggr_init_expr_args instead of false.
2419 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
2421         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2422         canonical types; otherwise, fall back to structural type
2423         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2424         internal compiler error if the canonical types are wrong.
2425         
2426 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
2428         PR c++/32560
2429         * parser.c (cp_parser_make_indirect_declarator): When the
2430         the code argument is ERROR_MARK return cp_error_declarator.
2432 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
2434         PR 32617
2435         * decl.c (cxx_init_decl_processing): Don't set
2436         force_align_functions_log.
2437         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2438         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2439         FUNCTION_DECL, return its alignment.
2441 2007-07-09  Richard Guenther  <rguenther@suse.de>
2443         * decl.c (start_preparsed_function): Do not promote return type.
2445 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
2447         PR c++/30535
2448         * pt.c (unify): Never pass error_mark_node to template_decl_level.
2450 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
2452         PR c++/32232
2453         * pt.c (resolve_overloaded_unification): Robustify.  Return a
2454         bool, not an int.
2455         (type_unification_real): Adjust accordingly.
2457 2007-07-06  Richard Guenther  <rguenther@suse.de>
2459         * init.c (build_new_1): Use the correct pointer type.
2460         * typeck2.c (build_m_component_ref): Likewise.
2462 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
2464         PR c++/32245
2465         * init.c (build_zero_init): Always build an initializer for
2466         non-static storage.
2467         * typeck2.c (build_functional_cast): Use build_zero_init.
2469         PR c++/32251
2470         * init.c (build_new_1): Always pass the allocation function to
2471         build_op_delete_call.
2472         * call.c (build_op_delete_call): Handle operator delete with a
2473         variable-argument list.  Do not issue an error when no matching
2474         deallocation function is available for a new operator.
2476         PR c++/31992
2477         * cp-tree.h (any_value_dependent_elements_p): Declare it.
2478         * decl.c (value_dependent_init_p): New function.
2479         (cp_finish_decl): Use it.
2480         * pt.c (value_dependent_expression_p): Use
2481         any_value_dependent_elements_p.
2482         * parser.c (cp_parser_primary_expression): Add comment about
2483         treating dependent qualified names as integral
2484         constant-expressions.
2486 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
2488         * decl.c (build_ptrmemfunc_type): Always use structural equality
2489         tests when comparing pointer-to-member-function types, because the
2490         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2491         types.
2492         
2493 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
2495         * init.c (build_new): Tweak comment.
2497 2007-06-29  Dave Brolley  <brolley@redhat.com>
2499         PR c++/31743
2500         * parser.c (cp_parser_new_type_id): Don't reduce a named array
2501         type to its base type and number of elements here.
2502         * init.c (build_new): Call complete_type_or_else to ensure that the
2503         type is complete and to issue a diagnostic if it is not.
2504         (build_new_1): Don't call complete_type_or_else here.
2506 2007-07-03  Richard Guenther  <rguenther@suse.de>
2508         PR c++/32609
2509         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
2510         after recursing.
2512 2007-07-02  Simon Baldwin  <simonb@google.com>
2514         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
2515         for inner-style nested forward declarations that don't declare
2516         anything useful.
2518 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
2520         PR c++/31748
2521         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2522         DECL_P in not a variable and appears more than once error messages.
2524 2007-07-01  Ollie Wild  <aaw@google.com>
2526         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
2527         (select_decl): Remove function.
2528         (unqualified_namespace_lookup): Populate binding by calling
2529         ambiguous_decl.  Remove select_decl call.
2530         (lookup_qualified_name): Remove select_decl call.
2531         * decl.c (lookup_and_check_tag): Check for ambiguous references.
2532         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
2533         generation when name lookup is ambiguous.
2535 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
2537         PR c++/31724
2538         * init.c (build_new_1): Use structural equality on the copy of the
2539         array type.
2541 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
2543         * decl2.c (determine_visibility): Implement
2544         flag_visibility_ms_compat effect on type info.
2545         * decl.c (cxx_init_decl_processing): Implement
2546         global effect of flag_visibility_ms_compat.
2548 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
2550         * decl2.c (start_objects): Mark constructor-running function
2551         as artificial.
2553 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
2555         PR c++/32111
2556         * decl.c (grokdeclarator): Reset friendp for member functions declared
2557         friend of their own class.
2559 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
2561         * decl2.c (determine_visibility): Don't look for dllexport here.
2562         (determine_visibility_from_class): Tidy.
2564 2007-06-18  Simon Baldwin <simonb@google.com>
2566         PR c++/31923
2567         * parser.c (cp_parser_single_declaration): Added check for storage
2568         class other than sc_none in parsed declaration, and a flag to indicate
2569         if the call is part of an explicit template specialization parse.
2570         * (cp_parser_explicit_specialization): Specialization check flag added
2571         to call to cp_parser_single_declaration(), set true.
2572         * (cp_parser_template_declaration_after_export): Specialization check
2573         flag added to call to cp_parser_single_declaration(), set false.
2574         * pt.c (check_explicit_specialization): Added code to copy visiblity
2575         and linkage from the templated function to the explicit specialization.
2577 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2579         * typeck.c (build_binary_op): For templates build the
2580         expression in pieces to avoid the assert in build2_stat.
2581         (get_member_function_from_ptrfunc):
2582         Change over to using POINTER_PLUS_EXPR and convert
2583         the second operand to sizetype.
2584         * typeck2.c (build_m_component_ref):  Likewise.
2585         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
2586         instead of PLUS_EXPR for pointers.
2587         (build_new_1): Likewise.
2588         (build_vec_delete_1): Likewise.
2589         (build_vec_delete): Likewise.
2590         * class.c (build_base_path): Likewise.
2591         (build_base_path): Likewise.
2592         (convert_to_base_statically): Likewise.
2593         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
2594         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
2595         instead of PLUS_EXPR.
2596         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
2597         instead of PLUS_EXPR for pointers.
2598         * call.c (build_special_member_call): Likewise.
2599         * rtti.c (build_headof): Likewise.
2600         Use sizetype instead of ptrdiff_type_node.
2601         (tinfo_base_init): Create a POINTER_PLUS_EXPR
2602         instead of PLUS_EXPR for pointers.
2603         * except.c (expand_start_catch_block):  Do a
2604         NEGATIVE and then a POINTER_PLUS_EXPR instead
2605         of a MINUS_EXPR.
2606         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
2607         PLUS_EXPR on pointer types over to use
2608         POINTER_PLUS_EXPR and remove the conversion
2609         to the pointer types.
2610         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
2611         adding to a pointer type. Use size_int instead of
2612         ssize_int. Convert the index to sizetype before
2613         adding it to the pointer.
2615 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
2617         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
2618         (DECL_ANON_UNION_VAR_P): New macro.
2619         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
2620         than DECL_VAR_MARKED_P, to keep track of which variables we have
2621         seen.
2622         * decl.c (redeclaration_error_message): Complain about redeclaring
2623         anonymous union members at namespace scope.
2624         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2626 2007-06-14  Geoff Keating  <geoffk@apple.com>
2628         * decl2.c (determine_visibility): Ensure that functions with
2629         hidden types as parameters are hidden.
2631         PR 31093
2632         * decl2.c (determine_visibility): Remove duplicate code for
2633         handling type info.
2635 2007-06-12  Ian Lance Taylor  <iant@google.com>
2637         PR libstdc++/29286
2638         * init.c (avoid_placement_new_aliasing): New static function.
2639         (build_new_1): Call it.
2641 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
2643         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
2644         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2646 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
2648         PR c++/32177
2649         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
2650         on init, the non-decl cond operand and increment value.
2652 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
2654         PR c++/30759
2655         * decl.c (check_initializer): Report an error when a brace enclosed
2656         initializer is used for a non-aggregate type in C++98.
2657         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
2658         cxx_dialect.
2659         (grokdeclarator): Likewise.
2660         (move_fn_p): Likewise.
2661         * typeck.c (check_return_expr): Likewise.
2662         * call.c (reference_binding): Likewise.
2663         * error.c (cp_cpp_error): Likewise.
2664         * pt.c (check_default_tmpl_args): Likewise.
2665         (tsubst): Likewise.
2666         * lex.c (init_reswords): Likewise.
2667         * parser.c (p_parser_primary_expression): Likewise.
2668         (TOKEN_PRECEDENCE): Likewise.
2669         (cp_parser_init_declarator): Likewise.
2670         (cp_parser_ptr_operator): Likewise.
2671         (cp_parser_parameter_declaration): Likewise.
2672         (cp_parser_enclosed_template_argument_list): Likewise.
2673         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
2674         (cp_parser_next_token_ends_template_argument_p): Likewise.
2676 2007-06-04  Simon Baldwin  <simonb@google.com>
2678         * decl.c (grokdeclarator): Readability change.  Moved case labels
2679         into direct switch statement scope.
2681 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
2683         * call.c (convert_like_real): Remove pointless code.
2685 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
2687         * decl.c (get_atexit_fn_ptr_type): New function.
2688         (get_atexit_node): Use it.
2689         (start_cleanup_fn): Likewise.
2690         (register_dtor_fn): Use the object's destructor, instead of a
2691         separate cleanup function, where possible.
2692         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
2693         (atexit_fn_ptr_type_node): New macro.
2694         * decl2.c (build_cleanup): Use build_address.
2696 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
2698         * typeck.c (build_binary_op): Include types in error.
2700 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
2702         PR c++/31806
2703         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
2704         needs runtime initialization.
2706 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
2708         PR c++/32158
2709         * semantics.c (finish_trait_expr): Complete the types.
2711 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
2712             Douglas Gregor <doug.gregor@gmail.com>
2713             Pedro Lamarao <pedro.lamarao@mndfck.org>
2714             Howard Hinnant <howard.hinnant@gmail.com>
2716         PR c++/7412
2717         PR c++/29939
2718         * typeck.c (comptypes): Don't consider rvalue and lvalue
2719         reference types to be equivalent.
2720         (check_return_expr): Move from certain lvalues when returning
2721         them.
2722         * decl.c (grokdeclarator): Implement reference collapsing.
2723         (copy_fn_p): Don't consider constructors taking rvalue references
2724         to be copy constructors.
2725         (move_fn_p): New.
2726         * call.c (conversion): New "rvaluedness_matches_p" member.
2727         (convert_class_to_reference): Require reference type as first
2728         parameter instead of base type.
2729         (reference_binding): Add logic to handle rvalue references.
2730         (implicit_conversion): Update inaccurate comment.
2731         (convert_like_real): Disable creation of temporaries that are
2732         impossible to initialize for types with move constructors.
2733         (build_over_call): Elide move constructors when possible.
2734         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2735         (maybe_handle_ref_bind): Return conversion instead of type node.
2736         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2737         determine preferred conversion sequences.
2738         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2739         (LOOKUP_PREFER_RVALUE): New.
2740         (DECL_MOVE_CONSTRUCTOR_P): New.
2741         (struct cp_declarator): Add "reference" member for reference
2742         types, with new "rvalue_ref" flag.
2743         (cp_build_reference_type): Declare.
2744         (move_fn_p): Declare.
2745         * error.c (dump_type_prefix): Format rvalue reference types
2746         correctly in error messages.
2747         * except.c (build_throw): Move from certain lvalues when
2748         throwing.
2749         * mangle.c (write_type): Mangle rvalue references differently
2750         than regular references.
2751         * parser.c (make_reference_declarator): Add boolean parameter for
2752         rvalue references.
2753         (cp_parser_make_indirect_declarator): New.
2754         (cp_parser_new_declarator_opt): Call
2755         cp_parser_make_indirect_declarator. 
2756         (cp_parser_conversion_declarator_opt): Ditto.
2757         (cp_parser_declarator): Ditto.
2758         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2759         declarators.
2760         * pt.c (tsubst): Implement reference collapsing.
2761         (maybe_adjust_types_for_deduction): Implement special template
2762         parameter deduction rule for rvalue references.
2763         (type_unification_real): Update calls to
2764         maybe_adjust_types_for_deduction.
2765         (try_one_overload): Ditto.
2766         (unify_pack_expansion): Ditto.
2767         * tree.c (lvalue_p_1): Handle rvalue reference types.
2768         (cp_build_reference_type): New.
2770 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
2772         PR c++/31809
2773         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2774         variables that need runtime initialization.
2776 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
2778         PR c++/31339
2779         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2780         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2781         case POSTDECREMENT_EXPR>): Return the error_mark_node
2782         if either the real or imaginary parts would an
2783         error_mark_node.
2784         
2785 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
2786             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2788         PR c++/31745
2789         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2790         token is a closing brace, false if there are no tokens left.
2791         (cp_parser_namespace_alias_definition): Only consume the next token if
2792         it is a closing brace.
2794         * parser.c (cp_parser_class_specifier): Likewise.
2796 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
2798         * semantics.c (finish_member_declaration): Fix a typo in the
2799         last checkin.
2801 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
2803         PR c++/31431
2804         PR c++/31432
2805         PR c++/31434
2806         PR c++/31435
2807         PR c++/31437
2808         PR c++/31438
2809         PR c++/31442
2810         PR c++/31443
2811         PR c++/31444
2812         PR c++/31445
2813         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2814         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2815         * pt.c (check_for_bare_parameter_packs): Return bool indicated
2816         whether everything was okay. Fix indentation.
2817         (push_template_decl_real): Check for bare parameter packs in
2818         function parameters; where errors occur, mark the parameter types
2819         with ERROR_MARK_NODEs to avert ICEs.
2820         (coerce_template_parameter_pack): New.
2821         (coerce_template_parms): Moved parameter pack coercion into
2822         coerce_template_parameter_pack, and permit it anywhere in the
2823         template parameter list (not just at the end). Parameter and
2824         argument indices can vary (somewhat) separately now, so add
2825         PARM_IDX and ARG_IDX.
2826         (fn_type_unification): Don't set an argument pack as incomplete if
2827         no argument pack was deduced.
2828         (type_unification_real): If a type parameter is a parameter pack
2829         and has not otherwise been deduced, it will be deduced to an empty
2830         parameter pack.
2831         (more_specialized_fn): Use the actual lengths of the argument
2832         lists when comparing against expansions.
2833         * semantics.c (finish_member_declaration): If a field's type has
2834         bare parameter packs, error and set its type to ERROR_MARK_NODE.
2836 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
2838         PR target/27067
2839         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2841 2007-05-22  Ollie Wild  <aaw@google.com>
2843         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2844         (unqualified_namespace_lookup): Adds check for hidden types.
2846 2007-05-22  Ollie Wild  <aaw@google.com>
2848         * decl.c (duplicate_decls): Verify namespace names are unique.
2850 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
2852         * decl.c (cxx_maybe_build_cleanup): Handle
2853         __attribute__((cleanup)).
2855 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2857         * cvt.c (cp_convert_and_check): Don't check warnings if the
2858         conversion failed.
2860 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
2862         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2864 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
2866         PR c++/29928
2867         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2868         type only if is a class type (5.2.8/4).
2870 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
2872         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2873         * decl.c (grokdeclarator): Use unsigned_type_for instead of
2874         c_common_unsigned_type.
2876 2007-05-11  Silvius Rus  <rus@google.com>
2878         * cp/typeck.c (build_indirect_ref): Add call to
2879         strict_aliasing_warning.
2880         (build_reinterpret_cast_1): Condition call to
2881         strict_aliasing_warning. 
2883 2007-05-11  Jan Hubicka  <jh@suse.cz>
2885         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2886         * decl2.c (start_objects): ctors and dtors are no longer public.
2887         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2888         
2889 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2891         * typeck.c (build_unary_op): Remove code that used to
2892         handle non lvalue increments/decrements.
2894 2007-05-07  Mike Stump  <mrs@apple.com>
2896         * parser.c (check_empty_body): Add.
2897         (cp_parser_iteration_statement): Add call to check_empty_body.
2899 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
2901         PR 31775
2902         * mangle.c (write_mangled_name): Mangle static variable names.
2903         (write_unqualified_name): Use local-source-name for
2904         namespace-scope static variables.
2906 2007-05-04  Dirk Mueller  <dmueller@suse.de>
2908         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2909         not in effect.
2911 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
2913         PR c++/31663
2914         * decl2.c (constrain_class_visibility): 
2915         Use strip_pointer_or_array_types instead of strip_array_types.
2917 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2919         PR C++/30221
2920         * decl.c (reshape_init_r): Don't reshape the first element if it
2921         is a pointer to member function.
2923 2007-04-27  Simon Baldwin  <simonb@google.com>
2925         * decl.c (grokparms): Changed message format from %qD to %qE.
2927 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
2929         * error.c (maybe_warn_variadic_templates): Variadic templates are
2930        now in C++0x, so only warn about them in C++98 mode.
2931         
2932 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2934         PR C++/30016
2935         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2936         integeral types from vectors types.
2938 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
2940         PR c++/31598
2941         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2942         for type dependent OMP_CLAUSE_DECLs.
2944 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
2946         PR c++/31338
2947         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2948         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2949         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2950         * init.c (build_zero_init): Adjust, as
2951         COMPLEX_TYPE is now a SCALAR_TYPE.
2952         * typeck2.c (digest_init): Allow brace-enclosed initializers for
2953         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2955 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
2957         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2958         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2959         (trait_expr_value): Adjust.
2961 2007-04-23  Simon Baldwin  <simonb@google.com>
2963         * decl.c (grokparms): Added new error for duplicate function
2964         parameters names in function prototypes, to match gcc behavior.
2966 2007-04-23  Jan Hubicka  <jh@suse.cz>
2968         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2969         bits dirrectly.
2971 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2973         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2974         instead of checking GIMPLE_STMT_P in chain_next.
2976 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
2978         PR c++/31513
2979         * call.c (convert_for_arg_passing): Convert bitfields to their
2980         declared types.
2982 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
2984         PR c++/31517
2985         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2987 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
2989         PR c++/29365
2990         * cp/decl2.c (constrain_class_visibility):
2991         Do not warn about the use of anonymous namespace in the main input file.
2993 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
2995         * cp-tree.h (current_template_parms): Fix typo in comment.
2997 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
2999         * cp-tree.h, error.c: Fix comment typos.
3001 2007-04-13  Jason Merrill  <jason@redhat.com>
3003         PR c++/31074
3004         * call.c (reference_binding): Add c_cast_p parm.  If true,
3005         add quals to TO as needed to make it reference-compatible.
3007 2007-04-11  Jan Hubicka  <jh@suse.cz>
3009         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
3010         that we are not processing template_decl.
3012 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
3014         PR c++/31449
3015         * class.c (build_base_path): Ensure that the converted pointer has
3016         the same cv-qualification as the input.
3018 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
3020         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3022 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
3024         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3025         Do not set it.
3026         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3027         * tree.c (cp_add_pending_fn_decls): Remove.
3028         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3030 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
3032         Revert change removing staticp.
3034 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
3036         * cp-objcp-common.c (cxx_staticp): Remove.
3037         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3038         * cp-tree.h (cxx_staticp):      
3040 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
3042         * class.c (check_for_override): Don't remove dllmport attribute
3043         of virtual methods.
3045 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
3047         PR c++/30847
3048         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3049         type issue error and return early.
3051 2007-03-30  Jason Merrill  <jason@redhat.com>
3053         PR c++/31187
3054         * typeck.c (cp_type_readonly): New fn.
3055         * cp-tree.h: Declare it.
3056         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3057         (cp_finish_decl): Not here.
3059 2007-03-31  Richard Guenther  <rguenther@suse.de>
3061         * optimize.c (maybe_clone_body): Replace splay-tree usage by
3062         pointer-map.
3064 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
3066         PR c++/31138
3067         PR c++/31140
3068         PR c++/31141
3069         * parser.c (declarator_can_be_parameter_pack): New.
3070         (cp_parser_template_parameter): Only parse the `...' if the
3071         declarator can be a parameter pack.
3072         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3073         is NULL.
3074         * pt.c (find_parameter_packs_r): Look into the bounds on integer
3075         types (they could be used as array bounds). 
3076         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3077         (tsubst_pack_expansion): Handle failure to expand parameter
3078         packs.
3079         
3080 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
3082         PR c++/26099
3083         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3084         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3085         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3086         (CLASS_TYPE_NON_UNION_P): Add.
3087         (struct lang_type_class): Add has_complex_dflt.
3088         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3089         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3090         * cp-tree.def: Add TRAIT_EXPR.
3091         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3092         * lex.c (struct resword): Add __has_nothrow_assign,
3093         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3094         __has_trivial_constructor, __has_trivial_copy,
3095         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3096         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3097         __is_pod, __is_polymorphic, __is_union.
3098         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3099         (cp_parser_trait_expr): New.
3100         * semantics.c (finish_trait_expr, trait_expr_value
3101         classtype_has_nothrow_copy_or_assign_p): New.
3102         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3103         as static.
3104         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3105         * class.c (check_bases, check_field_decl, check_bases_and_members):
3106         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3107         * pt.c (uses_template_parms, tsubst_copy_and_build,
3108         value_dependent_expression_p, type_dependent_expression_p): Deal with
3109         TRAIT_EXPR.
3110         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3112 2007-03-29  Richard Guenther  <rguenther@suse.de>
3114         * tree.c (cp_walk_subtrees): Do not set input_location.
3116 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
3118         PR c++/29077
3119         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3120         destructor.
3122 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3124         * parser.c (struct cp_parser): Update comment for
3125         greater_than_is_operator_p.
3126         (cp_parser_primary_expression): In C++0x mode, a cast operator can
3127         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3128         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3129         !GREATER_THAN_IS_OPERATOR_P.
3130         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3131         `>>' operators that will become two `>' tokens in C++0x.
3132         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3133         mode, allowing it to terminate default arguments.
3134         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3135         `>>' like two consecutive `>' tokens.
3136         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3137         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3138         ends a template argument.
3140 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
3142         * decl.c (redeclaration_error_message): Complain when redeclaring
3143         a friend function with default template arguments (C++0x mode only).
3144         * cp-tree.h (check_default_tmpl_args): Declare.
3145         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3146         template arguments in function templates. Add support for checking
3147         the default template arguments of friend templates.
3148         (push_template_decl_real): Fix call to check_default_tmpl_args.
3149         (type_unification_real): If a template parameter has not been
3150         deduced but provides a default template argument, substitute into
3151         that default template argument.
3152         * parser.c (cp_parser_init_declarator): When declaring (but not
3153         defining!) a function template in C++0x mode, check for default
3154         template arguments.
3156 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3158         PR c++/29993
3159         * decl.c (grokdeclarator): Deal with cv-qualified function type
3160         typedefs in the same way for member and non-member functions.
3162 2007-03-26  Dirk Mueller  <dmueller@suse.de>
3164         * parser.c (cp_parser_member_declaration): Pedwarn
3165         about stray semicolons after member declarations.
3167 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
3169         PR c++/30500
3170         * pt.c (instantiate_decl): Set in_system_header.
3172 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
3174         * cp-tree.h (current_tempalte_parms): Improve documentation.
3175         * pt.c (current_template_args): Likewise.
3177         PR c++/30863
3178         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3179         not consume tokens when failing.
3181 2007-03-22  Jim Wilson  <wilson@specifix.com>
3182             Mark Mitchell  <mark@codesourcery.com>
3184         PR c++/31273
3185         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
3186         consistent with FROM.
3188 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3190         * error.c (dump_expr): Handle dependent names that designate types.
3191         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3193 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
3195         * cp-tree.def, parser.c, pt.c: Fix comment typos.
3197 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3199         * cvt.c (cp_convert_and_check) : Define.
3200         * cp-tree.h (cp_convert_and_check): Declare.
3201         * call.c (convert_conversion_warnings): Rename to
3202         conversion_null_warnings.  The warning for floating-point to
3203         integer is handled by convert_and_check in convert_like_real.
3204         (convert_like_real): convert_conversion_warnings was renamed as
3205         conversion_null_warnings.
3206         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3207         overflow and changes of value during conversion.
3209 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3211         PR c++/30891
3212         * parser.c (cp_parser_statement): If 'namespace' is found, this
3213         only can be a namespace alias definition, so parse it now.
3214         (cp_parser_namespace_alias_definition): if we find an open brace
3215         instead of '=', then this is actually a misplaced namespace
3216         definition.
3217         
3218 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3220         PR c++/24924
3221         * decl.c (cxx_init_decl_processing): Move command-line options
3222         processing to c-opts.c.
3223         
3224 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
3226         * ptree.c (cxx_print_type): Use formatting markup for integers
3227         when printing template parameter index/level/orig level.
3228         (cxx_print_xnode): Ditto.
3229         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3230         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3231         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3232         HOST_WIDE_INTs.
3233         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3234         rather than a HOST_WIDE_INT.
3235         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3236         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3237         better bit-packing.
3238         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3239         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3240         IN_BASE_INITIALIZER bool bitfields.
3241         (struct cp_declarator): Make KIND a 4-bit field. Make
3242         PARAMETER_PACK_P a bool bitfield just after KIND.
3243         * pt.c (uses_parameter_packs): Destroy the pointer set.
3244         (make_pack_expansion): Ditto.
3245         (check_for_bare_parameter_packs): Ditto.
3246         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3247         
3248 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3250         PR c++/31165
3251         * call.c  (convert_default_arg): Instead of copying the node,
3252         unshare it.
3254 2007-03-15  Dirk Mueller  <dmueller@suse.de>
3256         PR c++/30860
3257         * call.c (convert_conversion_warnings): New..
3258         (convert_like_real): .. factored out from here.
3259         (convert_conversion_warnings): Add warning about
3260         false being converted to NULL in argument passing.
3262 2007-03-14  Dirk Mueller  <dmueller@suse.de>
3264         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3265         (finish_do_body): Warn about empty body in do/while statement.
3267 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3269         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3270         
3271 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3273         PR c/21438
3274         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3275         warning.
3276         
3277 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
3279         * cp/repo.c (init_repo): Initialize random_seed saved options.
3280         (finish_repo): Adjust.
3282 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
3284         PR bootstrap/30899
3285         * Make-lang.in (doc/g++.1): Use $< to specify the location from
3286         which to copy.
3288 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
3290         * decl.c (compute_array_index_type): New warning flag warn_vla.
3292 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
3294         PR c++/30108
3295         * call.c (convert_default_arg): Copy non-constant arguments.
3297 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
3299         PR c++/31038
3300         * parser.c (cp_parser_postfix_expression): Disallow compound
3301         literals in constant expressions.
3303         PR c++/30328
3304         * semantics.c (finish_typeof): Use unlowered_expr_type.
3305         
3306 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
3308         PR c++/30274
3309         * cp-tree.h (unlowered_expr_type): New function.
3310         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3311         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3312         (unlowered_expr_type): New function.
3313         (build_unary_op): Disallow predecrements of bool bitfields.
3314         * call.c (build_conditional_expr): Use unlowered_expr_type.
3315         * pt.c (type_unification_real): Likewise.
3317 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
3319         PR c++/20599
3320         * typeck.c (check_return_expr): Check for bare parameter packs.
3321         (comptypes): Compare template parameter packs and
3322         type pack expansions.
3323         * decl.c (grokdeclarator): Deal with the declaration of function
3324         parameter packs.
3325         (grokparms): Verify that the (optional) function parameter pack is
3326         at the end of the parameter list.
3327         (xref_basetypes): Handle pack expansions in the base class.
3328         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3329         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3330         (NONTYPE_ARGUMENT_PACK): New.
3331         (TYPE_PACK_EXPANSION): New.
3332         (EXPR_PACK_EXPANSION): New.
3333         (ARGUMENT_PACK_SELECT): New.
3334         * cp-objcp-common.c (cp_tree_size): Compute size of
3335         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3336         ARGUMENT_PACK_SELECT.
3337         * error.c (dump_template_argument): Print template argument packs.
3338         (dump_template_argument_list): Ditto.
3339         (dump_template_parameter): Dump `...' for template type parameter
3340         packs.
3341         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3342         (dump_parameters): Print function parameter packs.
3343         (dump_template_parms): Print template argument packs.
3344         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3345         (maybe_warn_variadic_templates): New.
3346         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3347         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3348         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3349         CAST_EXPR. 
3350         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3351         (write_template_arg): Write argument packs as separate arguments.
3352         * cp-tree.h (struct template_parm_index_s): Add flag that
3353         indicates that the template parameter is actually a parameter
3354         pack.
3355         (struct tree_argument_pack_select): New.
3356         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3357         (union lang_tree_node): Add argument_pack_select.
3358         (FUNCTION_PARAMETER_PACK_P): New.
3359         (PACK_EXPANSION_P): New.
3360         (PACK_EXPANSION_PATTERN): New.
3361         (SET_PACK_EXPANSION_PATTERN): New.
3362         (PACK_EXPANSION_PARAMETER_PACKS): New.
3363         (ARGUMENT_PACK_P): New.
3364         (ARGUMENT_PACK_ARGS): New.
3365         (SET_ARGUMENT_PACK_ARGS): New.
3366         (ARGUMENT_PACK_INCOMPLETE_P): New.
3367         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3368         (TEMPLATE_PARM_PARAMETER_PACK): New.
3369         (TEMPLATE_TYPE_PARAMETER_PACK): New.
3370         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3371         (ARGUMENT_PACK_SELECT_INDEX): New.
3372         (ARGUMENT_PACK_SELECT_ARG): New.
3373         (struct cp_declarator): Add parameter_pack_p flag.
3374         (maybe_warn_variadic_templates): Declare.
3375         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3376         indicate a template parameter pack. 
3377         (uses_parameter_packs): Declare.
3378         (template_parameter_pack_p): Declare.
3379         (template_parms_variadic_p): Declare.
3380         (make_pack_expansion): Declare.
3381         (check_for_bare_parameter_packs): Declare.
3382         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3383         sizeof... expressions. 
3384         (pp_cxx_expression): Print pack expansions and non-type argument
3385         packs.
3386         (pp_cxx_exception_specification): Print pack expansions. 
3387         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3388         (pp_cxx_ctor_initializer): Print pack expansions.
3389         (pp_cxx_type_id): Print pack expansions.
3390         (pp_cxx_template_argument_list): Print argument packs.
3391         (pp_cxx_template_parameter): Print ellipsis for template parameter
3392         packs.
3393         * pt.c (comp_template_parms): Compare template parameter packs.
3394         (template_parameter_pack_p): New.
3395         (template_parms_variadic_p): New.
3396         (template_args_variadic_p): New.
3397         (make_ith_pack_parameter_name): New.
3398         (struct find_parameter_pack_data): New.
3399         (find_parameter_packs_r): New.
3400         (uses_parameter_packs): New.
3401         (make_pack_expansion): New.
3402         (check_for_bare_parameter_packs): New.
3403         (expand_template_argument_pack): New.
3404         (reduce_template_parm_level): Propagate parameter pack flag.
3405         (process_template_parm): Add is_parameter_pack parameter to state
3406         when the parameter is actually a parameter pack. Create template
3407         parameter packs when is_parameter_pack is true.
3408         (current_template_args): The argument for a template parameter
3409         pack is an argument pack containing a single pack expansion.
3410         (process_partial_specialization): When checking that non-type
3411         argument expressions do not involve template parameters, loop over
3412         the arguments in argument packs separately.
3413         (push_template_decl_real): Check that the type of the declaration
3414         does not have any bare parameter packs. Check that primary
3415         templates have no more than one parameter pack, and that it comes
3416         at the end of the template parameter list.
3417         (convert_template_argument): Handle coercions for pack expansion
3418         expressions by coercing the pattern then rebuilding the expansion.
3419         (coerce_template_parms): When coercing the arguments for a
3420         variadic template, pack "extra" arguments into an argument pack.
3421         (coerce_template_template_parms): Cannot coerce between parameter
3422         packs and non-pack parameters.
3423         (template_args_equal): Compare PACK_EXPANSION_P expressions.
3424         (comp_template_args): Expand all template arguments packs before
3425         comparing template argument lists.
3426         (mangle_class_name_for_template): Make argument packs as separate
3427         template arguments.
3428         (for_each_template_parm_r): No need to handle BASELINK. 
3429         (instantiate_class_template): Handle pack expansions in the base
3430         class list.
3431         (tsubst_pack_expansion): New.
3432         (tsubst_template_args): Handle substitutions of argument packs and
3433         pack expansion into template argument lists.
3434         (tsubst_decl): Expand function parameter packs into separate
3435         function parameters.
3436         (tsubst_arg_types): Expand a type pack expansion into separate
3437         argument types.
3438         (tsubst_exception_specification): Handle pack expansions in
3439         exception specifiers.
3440         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
3441         replacing a template parameter with its argument. If we encounter
3442         a substitution for an argument pack, just return the parameter
3443         itself. 
3444         (tsubst_copy): sizeof(X...) returns the number of elements in
3445         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
3446         PARM_DECL is a parameter pack.
3447         (tsubst_expr): Expression pack expansions and argument packs
3448         cannot show up here; they will all be handled through function
3449         calls, sizeof, and template argument lists.
3450         (tsubst_copy_and_build): sizeof(X...) returns the number of
3451         elements in parameter pack X.  Handle pack expansions in TREE_LIST
3452         and CONSTRUCTOR nodes.
3453         (fn_type_unification): Handle "incomplete" explicit template
3454         argument lists that specify some of the arguments for a template
3455         parameter pack.
3456         (type_unification_real): Unify arguments against pack expansions.
3457         (template_parm_level_and_index): New, helper function.
3458         (unify_pack_expansion): New.
3459         (unify): Unify argument packs on an argument-by-argument basis,
3460         handling variadic argument packs as well.
3461         (more_specialized_fn): Handle unification of function parameter
3462         packs. All things being equal, prefer non-variadic function
3463         templates to variadic function templates.
3464         (more_specialized_class): Prefer the variadic class template
3465         partial specialization that binds fewer arguments to a parameter
3466         pack.
3467         (regenerate_decl_from_template): Expand function parameter packs
3468         into separate parameters.
3469         (instantiate_decl): Ditto.
3470         (tsubst_initializer_list): Handle pack expansions for base-class
3471         initializers.
3472         (dependent_type_p_r): Determine dependent types in argument packs
3473         and pack expansions.
3474         (value_dependent_expression_p): Determine value-dependence of
3475         non-type argument packs.
3476         (dependent_template_arg_p): Handle argument packs.
3477         * semantics.c (finish_cond): Check for bare parameter packs.
3478         (finish_expr_stmt): Ditto.
3479         (finish_for_expr): Ditto.
3480         (finish_switch_cond): Ditto.
3481         (finish_mem_initializers): Ditto.
3482         * name-lookup.c (arg_assoc_type): Handle pack expansions and
3483         argument packs.
3484         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3485         * parser.c (make_declarator): Declarator is not an expansion.
3486         (make_pointer_declarator): Transfer parameter pack flag to outer
3487         declarator.
3488         (make_reference_declarator): Ditto.
3489         (make_ptrmem_declarator): Ditto.
3490         (make_call_declarator): Ditto.
3491         (make_array_declarator): Ditto.
3492         (cp_parser_postfix_expression): Allow pack expansion expressions
3493         in the argument list for a call expression.
3494         (cp_parser_parenthesized_expression_list): Add new parameter
3495         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3496         into separate arguments."
3497         (cp_parser_new_placement): Allow pack expansion expressions.
3498         (cp_parser_new_initializer): Ditto.
3499         (cp_parser_mem_initializer_list): Allow ellipsis to create a
3500         base-class initializer expansion.
3501         (cp_parser_mem_initializer): Ditto.
3502         (cp_parser_template_parameter_list): Keep track of whether the
3503         template parameter is a template parameter pack.
3504         (cp_parser_template_parameter): Parse the ellipsis to indicate a
3505         template parameter pack.
3506         (cp_parser_type_parameter): Ditto.
3507         (cp_parser_template_argument_list): Parse the ellipsis to indicate
3508         a pack expansion.
3509         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
3510         this declarator is a parameter pack.
3511         (cp_parser_parameter_declaration): The ellipsis does not end the
3512         parameter declaration, because it might be a parameter pack. Parse
3513         the ellipsis to indicate a parameter pack.
3514         (cp_parser_initializer): Allow pack expansions.
3515         (cp_parser_initializer_list): Allow ellipsis to create an
3516         initializer expansion.
3517         (cp_parser_base_clause): Allow ellipsis to create a base specifier
3518         expansion.
3519         (cp_parser_type_id_list): Allow ellipsis to create an exception
3520         specifier expansion.
3521         (cp_parser_attribute_list): Don't allow pack expansions.
3522         (cp_parser_functional_cast): Allow pack expansions.
3523         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
3524         compute the length of a parameter pack.
3525         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
3526         end a template argument.
3527         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3528         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3529         CAST_EXPR. 
3531 2007-03-09  Dirk Mueller  <dmueller@suse.de>
3533         * cp/call.c (build_new_op): Call warn_logical_operator.
3535 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
3537         PR c++/30852
3538         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
3540         PR c++/30534
3541         * pt.c (any_template_arguments_need_structural_equality_p):
3542         Robustify.
3544 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
3546         * decl.c (grokdeclarator): Disable warnings for anonymous
3547         bitfields.
3549 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
3551         * typeck2.c (readonly_error): Always emit a hard error.
3552         Remove last argument.
3553         * cp-tree.h (readonly_error): Adjust prototype.
3554         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
3555         * typeck.c (build_unary_op): Likewise.
3556         (build_modify_expr): Likewise.
3558 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
3560         PR c++/30895
3561         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
3563 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3565         PR c++/15787
3566         * parser.c (struct cp_parser): New IN_IF_STMT.
3567         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
3568         returning if parsing the body of an 'if' statement or issuing an
3569         error and continuing.
3570         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
3571         body of 'if'.
3572         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
3573         
3574 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
3576         PR c++/28253
3577         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
3578         for thunks.
3580 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
3582         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
3583         Objective-C++.  Don't exit early if -shared-libgcc needs to be
3584         added.
3586 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3588         * typeck.c (common_base_type): Delete unused function.
3589         
3590 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3592         * Make-lang.in: Add dummy lang.install-pdf target.
3594 2007-03-01  Simon Baldwin <simonb@google.com>
3596         PR c++/23689
3597         * decl.c (check_tag_decl): Added new warning for typedef ignored
3598         when it precedes an otherwise valid non-typedef declaration.
3600 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
3602         * typeck.c (build_function_call): Store converted arguments
3603         in a stack-allocated array instead of building a list.
3604         (convert_arguments): Store arguments in the array passed in as an
3605         argument, and return the actual number of arguments.
3606         * call.c (build_call): Delete, and replace with...
3607         (build_call_n, build_call_a): New.
3608         (build_op_delete_call): Rewrite to avoid constructing argument lists.
3609         (build_over_call): Store converted arguments in a stack-allocated
3610         array instead of building a list.
3611         (build_cxx_call): Pass arguments in an array instead of as a list.
3612         (build_java_interface_fn_ref): Rewrite to avoid constructing
3613         argument lists.
3614         * tree.h: Update declarations to reflect above changes.
3615         * method.c (use_thunk): Use a stack-allocated array to hold
3616         the arguments instead of a list.
3617         * rtti.c (throw_bad_cast): Update call to cxx_call.
3618         (throw_bad_typeid): Likewise.
3619         (build_dynamic_cast_1): Likewise.
3620         * init.c (build_builtin_delete_call): Use build_call_n.
3621         * decl.c (expand_static_init): Likewise.
3622         * except.c (cp_protect_cleanup_actions): Likewise.
3623         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
3624         (gimplify_must_not_throw_expr): Likewise.
3625         (cxx_omp_apply_fn): Use build_call_a.
3627 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
3629         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
3630         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
3632 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
3634         * cp-tree.h (static_ctors): Remove.
3635         * cp-tree.h (static_dtors): Likewise.
3636         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
3637         refactoring of tree_map hierarchy.
3638         (decl_shadowed_for_var_insert): Likewise.
3639         * semantics.c (expand_body): Use c_expand_body.
3640         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
3641         * decl2.c (static_ctors): Remove.
3642         (static_dtors): Likewise.
3643         (generate_ctor_or_dtor_function): Pass NULL_TREE to
3644         objc_generate_static_init_call.  Do not call static_[cd]tors.
3645         (generate_ctor_and_dtor_functions_for_priority): Do not check for
3646         static_[cd]tors.
3647         (cp_write_global_declarations): Likewise.
3649 2007-02-23  Richard Guenther  <rguenther@suse.de>
3651         * class.c (note_name_declared_in_class): Make declaration
3652         changes meaning a pedwarn.
3654 2007-02-22  Michael Matz  <matz@suse.de>
3656         PR c++/29433
3657         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
3658         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
3659         dump_function_decl): Guard emitting outer scopes by new flag.
3660         * cp-lang.c (cxx_dwarf_name): New function.
3661         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
3662         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
3663         Remove functions.
3664         (push_template_decl_real, lookup_template_class): Remove calls
3665         to above functions.
3667 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
3669         * call.c (build_new_method_call): Ensure that explicit calls of
3670         destructors have type "void".
3672 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3674         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
3675         and -Walways-true with -Waddress.
3676         * cvt.c (convert_to_void): Replace unconditional warning with
3677         -Waddress.
3679 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
3681         * decl.c, tree.c: Fix comment typos.
3683 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3685         PR C++/30158
3686         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
3687         statement expression if we had an error mark node.
3689 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3690             Brooks Moses  <brooks.moses@codesourcery.com>
3691             Lee Millward  <lee.millward@codesourcery.com>
3693         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
3694         Change class to tcc_vl_exp.
3696         * call.c (build_call): Use build_call_list instead 
3697         of build3. 
3698         (build_over_call): Likewise.
3699         (build_new_method_call): Use build_min_non_dep_call_list 
3700         instead of build_min_non_dep.
3702         * error.c (dump_call_expr_args): New function.
3703         (dump_aggr_init_expr_args): New function.
3704         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
3705         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
3707         * cvt.c (convert_to_void): Use build_call_array instead
3708         of build3; use new AGGR_INIT_EXPR accessor macros.
3710         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
3711         instead of TREE_CODE_LENGTH.
3713         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
3714         AGGR_INIT_EXPR accessor macros.
3716         * cp-gimplify.c (cp_gimplify_init_expr): Use 
3717         AGGR_INIT_EXPR_SLOT to set the slot operand.
3719         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
3720         (AGGR_INIT_EXPR_SLOT): New macro.
3721         (AGGR_INIT_EXPR_ARG): New macro.
3722         (aggr_init_expr_nargs): New macro.
3723         (AGGR_INIT_EXPR_ARGP): New macro.
3724         (aggr_init_expr_arg_iterator): New.
3725         (init_aggr_init_expr_arg_iterator): New.
3726         (next_aggr_init_expr_arg): New.
3727         (first_aggr_init_expr_arg): New.
3728         (more_aggr_init_expr_args_p): New.
3729         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3730         (stabilize_aggr_init): New declaration.
3731         (build_min_non_dep_call_list): Likewise.
3733         * tree.c (process_aggr_init_operands): New function.
3734         (build_aggr_init_array) New function.
3735         (build_cplus_new): Update to use new CALL_EXPR and
3736         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3737         build_aggr_init_array.
3738         (build_min_non_dep_call_list) New function.
3739         (build_min_nt): Assert input code parameter is not a variable
3740         length expression class.
3741         (build_min, build_min_non_dep): Likewise.
3742         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3743         to check for equality instead of recursing. Handle tcc_vl_exp
3744         tree code classes.
3745         (stabilize_call): Update to only handle CALL_EXPRs, not 
3746         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3747         (stabilize_aggr_init): New function.
3748         (stabilize_init): Use it.
3750         * cxx-pretty-print.c (pp_cxx_postfix_expression)
3751         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3752         AGGR_INIT_EXPR accessor macros and argument iterators.
3753         
3754         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3755         build_vl_exp. Iterate through the operands, recursively 
3756         processing each one.
3757         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3758         CALL_EXPR accessor macros.
3759         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3760         tree code classes. Use TREE_OPERAND_LENGTH instead of 
3761         TREE_CODE_LENGTH.
3763         * semantics.c (finish_call_expr): Use build_nt_call_list
3764         instead of build_nt.
3765         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
3766         accessor macros. Use build_call_array to construct the 
3767         CALL_EXPR node instead of build3
3768         
3769         * decl2.c (build_offset_ref_call_from_tree): Use 
3770         build_nt_call_list and build_min_non_dep_call_list instead
3771         of build_min_nt and build_min_non_dep.
3773         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3774         Use build_nt_call_list instead of build_min_nt.
3776 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3778         PR c++/28943
3779         * call.c (build_conditional_expr): Improve error message.
3780         
3781 2007-02-13  Dirk Mueller  <dmueller@suse.de>
3783         * friend.c (do_friend): Annotate warning about friend
3784         declarations in templates with OPT_Wnon_template_friend.
3785         Convert informal message from warning() to inform().
3787 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
3788             Mark Mitchell  <mark@codesourcery.com>
3790         PR c++/14622
3791         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3792         instantiations for variables.
3794 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3796         PR middle-end/7651
3797         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3798         Check warn_unused_value just once.
3800 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
3802         PR c++/26988
3803         * pt.c (determine_specialization): Use skip_artificial_parms_for.
3804         (fn_type_unificiation): Likewise.
3805         (get_bindings): Likewise.
3807 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
3809         PR target/29487
3810         * decl.c (finish_function): Use DECL_REPLACEABLE.
3811         * tree.c (cp_cannot_inline_tree_fn): Likewise.
3813 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3815         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3817 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
3819         * decl.c (grokvardecl): Don't error if !have_tls.
3820         (grokdeclarator): Likewise.
3821         * parser.c (cp_parser_omp_threadprivate): Likewise.
3823 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
3825         PR c++/30703
3826         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3827         parameters and result decls in omp clauses.
3828         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3829         by reference.
3831 2007-02-05  Dirk Mueller  <dmueller@suse.de>
3833         PR bootstrap/30510
3834         * parser.c (cp_parser_class_specifier): Always initialize bases.
3836 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3838         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3839         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3840         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3841         expressions.
3842         * semantics.c (finish_omp_atomic): Store a whole expression node
3843         in operand 1, and integer_zero_node in operand 0, for dependent
3844         OMP_ATOMIC.  Rewrite to make flow easier to understand.
3846 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3848         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3850 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
3852         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3853         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3855 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
3857        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3858        keyword warning to -Wc++0x-compat.
3859         
3860 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3862         * decl.c (grokdeclarator): Update documentation.
3864 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
3866         PR c++/30536
3867         * decl.c (grokdeclarator): If __thread is used together with
3868         a storage class other than extern and static, clear thread_p
3869         after issuing diagnostics and fall through to checking the
3870         storage class.
3872 2007-01-30  Roger Sayle  <roger@eyesopen.com>
3874         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3875         calculating the size of an array (to avoid recursive errors).
3877 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3879         PR c++/24745
3880         * typeck.c (build_binary_op): Fix logic for warning. Move warning
3881         to -Wpointer-arith.
3882         * call.c (convert_like_real): Don't warn when converting to
3883         boolean type.
3884         
3885 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3887         * decl.c (pop_label): Replace warning with call to
3888         warn_for_unused_label.
3890 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
3892         PR C++/28988
3893         * semantics.c (finish_pseudo_destructor_expr): Check the
3894         destrutor name by calling check_dtor_name.
3896 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
3898         * lex.c (D_CPP0X): Rename.
3899         (D_CXX0X): To this.
3900         (reswords): D_CPP0X -> D_CXX0X.
3901         (init_reswords): Ditto.
3902         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3903         of C++0x keywords as identifiers.
3905 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
3907         PR c++/27492
3908         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3909         function decls.
3911 2007-01-23  Ian Lance Taylor  <iant@google.com>
3913         * typeck.c (convert_for_assignment): Only warn about a = b = c
3914         when converting to bool.
3916 2007-01-23  Roger Sayle  <roger@eyesopen.com>
3918         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3919         TREE_OVERFLOW.
3920         * typeck.c (ignore_overflows): Remove the remaining uses of
3921         TREE_CONSTANT_OVERFLOW.
3923 2007-01-20  Jan Hubicka  <jh@suse.cz>
3925         * decl2.c (start_objects, start_static_storage_duration_function):
3926         Do not make the functions uninlinable.
3928 2007-01-17  Ian Lance Taylor  <iant@google.com>
3930         * class.c (add_method): Call VEC_reserve_exact rather than passing
3931         a negative size to VEC_reserve.
3933 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
3935         PR c++/29573
3936         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3938 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
3940         PR c++/28999
3941         * decl.c (make_typename_type): If the qualified name is not a
3942         type, issue an error.
3943         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3944         formatting.
3946 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
3948         * rtti.c: Include target.h.
3949         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3950         don't emit typeinfo for fundamental types as weak.
3951         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3953 2007-01-08  Richard Guenther  <rguenther@suse.de>
3955         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3957 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
3959         * call.c (standard_conversion): Pass flag to
3960         vector_types_convertible_p to disallow emission of note.
3961         * typeck.c (convert_for_assignment): Pass flag to
3962         vector_types_convertible_p to allow emission of note.
3963         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3964         to disallow emission of note.
3966 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3968         PR c++/28986
3969         * typeck.c (build_binary_op): Call overflow_warning if
3970         TREE_OVERFLOW_P is true for the result and not for any of the
3971         operands.
3972         
3973 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
3975        PR c++/19439
3976        * class.c (add_method): Don't wait until template
3977        instantiation time to complain about duplicate methods.
3978         
3979 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3981         PR c/19978
3982         * semantics.c (finish_unary_op_expr): Warn only if result
3983         overflowed and operands did not.
3985 2007-01-05  Ian Lance Taylor  <iant@google.com>
3987         * typeck.c (build_binary_op): Warn about comparing a non-weak
3988         address to NULL.
3990 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
3992         * pt.c (tsubst): Propagate the need for structural equality checks
3993         when reducing the level of template parameters.
3995 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
3997         * pt.c: Fix a comment typo.
3999 2007-01-02  Ian Lance Taylor  <iant@google.com>
4001         * semantics.c (maybe_convert_cond): Optionally warn when using an
4002         assignment as a condition.
4003         * typeck.c (convert_for_assignment): Optionally warn about
4004         assigning the result of an assignment to a bool.
4006 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4008         * pt.c (canonical_template_parms): Correct typo in comment.
4009         
4010 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
4012         * typeck.c (structural_comptypes): Renamed from "comptypes".
4013         (comptypes): Use canonical type information to perform fast type
4014         comparison. When VERIFY_CANONICAL_TYPES, verify that the
4015         canonical type comparison returns the same results as we would see
4016         from the current, structural check. Support COMPARE_STRUCTURAL
4017         when we need structural checks.
4018         * decl.c (typename_compare): Fix comment.
4019         (build_typename_type): TYPENAME_TYPE nodes require structural
4020         equality checks, because they resolve different based on the
4021         current class type.
4022         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4023         require structural equality checks (for now).
4024         (build_ptrmemfunc_type): Build the canonical pointer to member
4025         function type.
4026         (compute_array_index_type): Whenever we build a new index type
4027         to represent the size of an array in a template, we need to mark
4028         this index type as requiring structural equality. This goes for
4029         arrays with value-dependent sizes with the current ABI, or all
4030         arrays with ABI-1.
4031         * tree.c (cplus_array_hash): New.
4032         (struct cplus_array_info): New.
4033         (cplus_array_compare): New.
4034         (cplus_array_htab): New.
4035         (build_cplus_array_type_1): Use a hash table to cache the array
4036         types we build. Build the canonical array type for each array
4037         type.
4038         (cp_build_qualified_type_real): When building a cv-qualified array
4039         type, use the hash table of array types and build canonical array
4040         types as necessary.
4041         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4042         use structural equality (for now).
4043         * cp-tree.h (COMPARE_STRUCTURAL): New.
4044         * pt.c (canonical_template_parms): New.
4045         (canonical_type_parameter): New.
4046         (process_template_parm): Find the canonical type parameter.
4047         (lookup_template_class): When we have named the primary template
4048         type, set the canonical type for our template class to the primary
4049         template type. If any of the template arguments need structural
4050         equality checks, the template class needs structural equality
4051         checks.
4052         (tsubst): When reducing the level of a template template
4053         parameter, we require structural equality tests for the resulting
4054         parameter because its template parameters have not had their types
4055         canonicalized. When reducing a template type parameter, find the
4056         canonical reduced type parameter.
4057         (any_template_arguments_need_structural_equality_p): New.