PR c++/15097
[official-gcc.git] / gcc / cp / ChangeLog
bloba32ecdb1560497cbd8247d11ccdf78c4bd24a24b
1 2007-09-05  Jason Merrill  <jason@redhat.com>
3         PR c++/15097
4         * init.c (build_delete): Use build_headof to get the address of the
5         complete object if we aren't using the deleting destructor.
6         * rtti.c (build_headof): No longer static.
7         * cp-tree.h: Declare it.
9 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
11         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
12         decl if a prototype for XX is provided with throw().
14         PR c++/33289
15         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
16         on __*_chk non-__builtin_* decls.
18 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
20         PR c++/30302
21         * semantics.c (finish_id_expression): Use context_for_name_lookup
22         insted of DECL_CONTEXT, to see through anonymous structs and unions.
23         * class.c (finish_struct_anon): Deal correctly with anonymous
24         structs (vs unions, as GNU extension) in error messages.
26 2007-09-05  Jan Hubicka  <jh@suse.cz>
28         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
29         call, DECL_EXTERNAL checks and current_function_decl saving.
31 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
33         PR c++/29731 (again)
34         * parser.c (cp_parser_primary_expression): Return error_mark_node
35         when a statement-expression is found in a template-argument list.
37 2007-09-04  Jason Merrill  <jason@redhat.com>
39         * except.c (initialize_handler_parm): Use
40         fold_build_cleanup_point_expr.
42         PR c++/31419
43         * call.c (reference_binding): Don't look for user-defined conversions
44         to the same type.
46         PR c++/31411
47         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
48         the MUST_NOT_THROW_EXPR.
50 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
52         * decl.c (cp_finish_decl): Call determine_visibility before
53         make_rtl_for_nonlocal_decl.
55 2007-09-04  Jason Merrill  <jason@redhat.com>
57         PR c++/14032
58         * pt.c (most_specialized_class): Substitute outer template
59         arguments into the arguments of a member template partial
60         specialization.
61         (strip_innermost_template_args): New fn.
63 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
65         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
67 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
69         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
70         * decl.c (cp_make_fname_decl): Likewise,
71         * parser.c (cp_parser_string_literal): Likewise,
72         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
73         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
74         Likewise,
76 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
78         PR c++/33208
79         * typeck.c (build_unary_op): Fix error message for
80         Boolean expression as operand to operator--.
82 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
84         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
85         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
86         Likewise.
88 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
90         PR c++/32597
91         * init.c (build_default_init): Make extern.
92         * cp-tree.h (build_default_init): Declare here.
93         * pt.c (tsubst_expr): When the instantiation of the initializer of
94         a variable results in an empty list, default-initialize the
95         variable.
96         (tsubst_copy_and_build): When the instantiation of the initializer
97         in a new expression results in an empty initializer list,
98         default-initialize it.
100 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
102         * mangle.c (write_type): Change mangling of rvalue reference from
103         `RR' to `O'. 
105 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
107         * decl.c (duplicate_decls): Remove duplicated line.
109 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
111         PR c++/33210
112         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
113         BOUND_TEMPLATE_TEMPLATE_PARM.
115 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
117         PR c++/32113
118         * search.c (lookup_member): Check the name argument for
119         error_mark_node.
121 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
123         PR c++/33212
124         * parser.c (cp_parser_trait_expr): Check rerurn value of
125         cp_parser_type_id.
127 2007-08-30  Ollie Wild  <aaw@google.com>
129         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
130         convert_ptrmem for pointer to member conversions.
131         (convert_to_pointer_force): Update cp_convert_to_pointer call.
132         (ocp_convert): Update cp_convert_to_pointer call.
133         * typeck.c (convert_ptrmem): Add conditional for null pointers to
134         members.
135         (build_static_cast_1): Check can_convert for conversions in either
136         direction.
137         (get_delta_difference_1): New function.
138         (get_delta_difference): Refactor to call get_delta_difference_1.
140 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
142         * decl.c (start_preparsed_function): Set
143         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
145 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
147         PR c++/33209
148         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
149         BOUND_TEMPLATE_TEMPLATE_PARM.
151 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
153         PR c++/32596
154         PR c++/32400
155         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
156         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
158 2007-08-27  Jason Merrill  <jason@redhat.com>
160         PR c++/29000
161         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
162         Look inside STMT_EXPR.
163         * semantics.c (stmt_expr_value_expr): New fn.
164         * cp-tree.h: Declare it.
166         PR c++/28558
167         * decl.c (groktypename): Ignore attributes applied to class type.
169 2007-08-28  Richard Guenther  <rguenther@suse.de>
171         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
173 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
174         
175         * error.c (dump_expr): Handle COMPLEX_CST.
176         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
177         (pp_cxx_expression): Likewise.
179 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
181         * decl.c (GNU_INLINE_P): New.
182         (duplicate_decls): Handle gnu_inline.  Merge attributes and
183         some flags in overriding definitions.
184         (redeclaration_error_message): Handle gnu_inline.
185         (start_preparsed_function): Likewise.
187 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
189         * call.c (sufficient_parms_p): Constify.
190         * class.c (same_signature_p): Likewise.
191         * cp-gimplify.c (is_invisiref_parm,
192         cxx_omp_privatize_by_reference): Likewise.
193         * cp-objcp-common.c (has_c_linkage): Likewise.
194         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
195         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
196         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
197         num_artificial_parms_for, comp_template_parms,
198         template_parameter_pack_p, any_dependent_template_arguments_p,
199         any_type_dependent_arguments_p, any_value_dependent_elements_p,
200         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
201         zero_init_p, member_p, cp_lvalue_kind,
202         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
203         varargs_function_p, is_dummy_object, special_function_kind,
204         string_conv_p, type_unknown_p, comp_except_specs, compparms,
205         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
206         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
207         cp_has_mutable_p, at_least_as_qualified_p,
208         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
209         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
210         * except.c (nothrow_libfn_p): Likewise.
211         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
212         Likewise.
213         * pt.c (comp_template_parms, template_parameter_pack_p,
214         any_type_dependent_arguments_p, any_value_dependent_elements_p,
215         any_dependent_template_arguments_p): Likewise.
216         * repo.c (repo_export_class_p): Likewise.
217         * semantics.c (anon_aggr_type_p): Likewise.
218         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
219         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
220         varargs_function_p, member_p, is_dummy_object, pod_type_p,
221         zero_init_p, special_function_p): Likewise.
222         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
223         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
224         compparms, invalid_nonstatic_memfn_p,
225         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
226         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
227         cp_has_mutable_p, lvalue_or_else): Likewise.
229 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
231         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
232         * cp-objcp-common.c (cp_tree_size): Ditto.
233         * tree.c (cp_walk_subtrees): Ditto
234         * cp-tree.def (TINST_LEVEL): Go away.
235         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
236         move together with other non-tree structs.
237         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
238         (union lang_tree_node): Eliminate tinst_level field.
239         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
240         (current_instantiation, outermost_tinst_level): Return
241         a "struct tinst_level *".
243         * error.c (print_instantiation_partial_context): Change second
244         parameter to a "struct tinst_level *".  Replace accessor macros
245         with field access.
246         (print_instantiation_full_context): Likewise.
247         * lex.c (in_main_input_context): Likewise.
249         * pt.c (struct pending_templates): New.
250         (pending_templates, last_pending_template): Use it as a type.
251         (current_tinst_level): Change typo to "struct tinst_level *"
252         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
253         (add_pending_template): Construct a "struct pending_template".
254         Replace TINST_LEVEL accessor macros with field access.
255         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
256         (pop_tinst_level): Likewise.
257         (instantiate_pending_templates): Likewise.  Factor common code used
258         when an instantiation has been done.
259         (outermost_tinst_level): Replace tree_last with loop.
260         (current_instantiation): Return a "struct tinst_level *".
262 2007-08-24  Ollie Wild  <aaw@google.com>
264         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
265         * name-lookup.h (cp_binding_level): Remove vtables member.
267 2007-08-24  Richard Guenther  <rguenther@suse.de>
269         * tree.c (cp_cannot_inline_tree_fn): Remove.
270         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
271         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
272         Remove define.
274 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
276         PR c++/32567
277         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
278         error_mark_node right away if build_expr_type_conversion
279         returned it.
281         PR c++/32898
282         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
283         is error_mark_node rather than NULL_TREE.
284         * pt.c (check_explicit_specialization): Likewise.
286         PR c++/31941
287         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
288         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
290 2007-08-22  Jason Merrill  <jason@redhat.com>
292         PR c++/29365
293         * pt.c (outermost_tinst_level): New function.
294         * lex.c (in_main_input_context): New function.
295         * cp-tree.h: Declare it.
296         * decl2.c (constrain_class_visibility): Use it to avoid warning
297         about uses of the anonymous namespace in the main input file.
299 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
301         * init.c (build_new_1): Use get_target_expr instead of save_expr.
303 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
305         PR c++/7302
306         * class.c (finish_struct_1): Warn when a class has virtual
307         functions and accessible non-virtual destructor.
309 2007-08-20  Richard Guenther  <rguenther@suse.de>
311         PR c++/22369
312         PR c++/22451
313         * call.c (build_new_method_call): Convert initializer to
314         the basetype.
315         * init.c (build_aggr_init): Do not fiddle with types.
316         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
317         * except.c (build_throw): Do not drop qualifiers for the
318         pointer type.
319         * typeck.c (get_member_function_from_ptrfunc): Do not
320         fiddle with types, instead convert.
321         (build_ptrmemfunc1): Convert to the target type for
322         initialization.
323         (gfc_trans_allocate): Convert result to target type.
324         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
325         pointer-to-member structures shall have alias set zero as well.
327 2007-08-20  Richard Guenther  <rguenther@suse.de>
329         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
330         Remove.
331         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
332         (nonstatic_local_decl_p): Likewise.
333         * tree.c (cp_auto_var_in_fn_p): Remove.
334         * decl.c (nonstatic_local_decl_p): Remove.
336 2007-08-20  Richard Guenther  <rguenther@suse.de>
338         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
339         Remove define.
340         * tree.h (cp_walk_tree): New define to walk_tree_1 with
341         cp_walk_subtrees lh parameter.
342         (cp_walk_tree_without_duplicates): New define to
343         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
344         * tree.c (count_trees): Call
345         cp_walk_tree_without_duplicates.
346         (verify_stmt_tree): Call cp_walk_tree.
347         (break_out_target_exprs): Likewise.
348         (WALK_SUBTREE): Likewise.
349         * cp-gimplify.c (cp_genericize): Likewise.
350         * cp-pt.c (find_parameter_packs_r): Likewise.
351         (uses_parameter_packs): Likewise.
352         (make_pack_expansion): Likewise.
353         (check_for_bare_parameter_packs): Likewise.
354         (for_each_template_parm): Likewise.
355         * decl.c (check_default_argument): Call
356         cp_walk_tree_without_duplicates.
357         * except.c (build_throw): Likewise.
358         * decl2.c (type_visibility): Likewise.
359         * semantics.c (expand_or_defer_fn): Likewise.
360         (finalize_nrv): Call cp_walk_tree.
362 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
364         PR c++/33025
365         * init.c (build_new_1): Rename placement_var variable to placement_expr.
366         Initialize it with save_expr rather than get_temp_regvar.
368 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
370         PR c++/28989
371         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
372         lvalues.
374 2007-08-17  Ollie Wild  <aaw@google.com>
376         PR c++/31749
377         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
378         declarations into appropriate slots for comparison.  Fix type
379         comparison.
381 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
383         PR c++/32112
384         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
385         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
387 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
389         PR c++/32870
390         * parser.c (cp_parser_class_head): Improve error message.
392 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
394         * pt.c (instantiate_decl): Set input_location
395         for the function end.
397 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
399         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
400         Constify.
401         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
402         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
403         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
404         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
405         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
406         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
407         * typeck.c (cp_type_quals): Likewise.
408         * typeck2.c (cxx_incomplete_type_diagnostic,
409         cxx_incomplete_type_error): Likewise.
411 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
413         PR c++/31132
414         * pt.c (tsubst_friend_function): When check_classfn
415         returns error_mark_node likewise return it.
417 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
419         PR c++/32992
420         * typeck.c (check_return_expr): Don't NRV optimize vars in
421         anonymous unions.
422         * decl.c (finish_function): Comment fix.
424 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
426         PR c++/33035
427         * pt.c (push_template_decl_real): Depending on TYPE_P
428         use either TYPE_CONTEXT or DECL_CONTEXT.
430 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
432         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
433         constructors and destructors return this.
435 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
437         PR c++/27211
438         * decl2.c (check_classfn): Return error_mark_node in case of error;
439         in that case, do not call add_method.
440         * decl.c (start_decl): Deal with check_classfn returning
441         error_mark_node.
442         (grokfndecl): Likewise.
443         * pt.c (tsubst_friend_function): Likewise.
445 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
447         PR c++/30428
448         * typeck.c (build_binary_op): Disallow vector float types with
449         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
451 2007-08-11  Ian Lance Taylor  <iant@google.com>
453         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
454         alias_set_type.
455         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
457 2007-08-10  Ollie Wild  <aaw@google.com>
459         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
460         type lookups.
461         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
462         function parameter.
463         (unqualified_namespace_lookup): Fix ambiguous_decl call.
464         (lookup_using_namespace): Fix ambiguous_decl call.
465         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
467 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
469         * call.c (name_as_c_string): Use CONST_CAST.
470         * decl.c (build_decl): Likewise.
471         * parser.c (cp_parser_string_literal): Likewise.
473 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
475         PR c++/17763
476         * error.c (dump_expr): Consistently use the *_cxx_*
477         variants of the pretty-print functions.
479 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
481         PR c++/22256
482         * decl.c (check_special_function_return_type): Just error
483         on return type specified for conversion operator.
485 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
487         * typeck2.c (readonly_error): Handle general expressions.
488         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
490 2007-08-06  Dan Hipschman  <dsh@google.com>
492         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
493         access function name.
495 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
497         PR pch/13676
498         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
499         * g++spec.c (lang_specific_driver): Check them.
501 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
503         PR c++/19532
504         * pt.c (inline_needs_template_parms): Fix comment; change return type
505         to bool.
507 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
509         Revert:
510         2007-03-26  Dirk Mueller  <dmueller@suse.de>
512         * parser.c (cp_parser_member_declaration): Pedwarn
513         about stray semicolons after member declarations.
515 2007-08-02  Lee Millward  <lee.millward@gmail.com>
517         PR c++/30849
518         PR c++/30850
519         PR c++/30851
520         * parser.c (cp_parser_asm_definition): Detect and discard asm
521         statements with invalid inputs or outputs.
522         (cp_parser_asm_operand_list): Return error mark node if any
523         of the operands are invalid. Adjust documentation.
524         
525 2007-08-02  Nick Clifton  <nickc@redhat.com>
527         * typeck.c: Change copyright header to refer to version 3 of the
528         GNU General Public License and to point readers at the COPYING3
529         file and the FSF's license web page.
530         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
531         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
532         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
533         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
534         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
535         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
536         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
537         name-lookup.h, parser.c: Likewise.
539 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
541         PR middle-end/32668
542         * call.c (magic_varargs_p): Honor the "type generic" attribute.
544 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
546         PR c++/32108
547         * semantics.c (finish_label_stmt): Reject the __label__
548         extension outside function scopes.
550 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
552         * parser.c (eof_token): Un-constify.
553         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
554         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
555         casts.
557 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
559         * pt.c, tree.c, typeck2.c: Fix comment typos.
561 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
562             Mark Mitchell  <mark@codesourcery.com>
564         PR c++/30917
565         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
566         hidden due to friend declarations in local classes.
568 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
570         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
571         * cp-tree.def (DECLTYPE_TYPE): New.
572         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
573         (dump_type_prefix): Ditto.
574         (dump_type_suffix): Ditto.
575         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
576         * mangle.c (write_type): Handle DECLTYPE_TYPE.
577         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
578         types.
579         (DECLTYPE_TYPE_EXPR): New.
580         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
581         (finish_declared_type): Declare.
582         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
583         DECLTYPE_TYPE nodes.
584         (pp_cxx_type_id): Ditto.
585         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
586         (tsubst): Substitute into a DECLTYPE_TYPE node.
587         (tsubst_copy): Ditto.
588         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
589         nodes.
590         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
591         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
592         structural equality (because we can't hash the expressions).
593         (finish_declared_type): New.
594         * lex.c (reswords): Add "decltype" keyword.
595         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
596         (cp_parser_postfix_expression): Add member_access_only_p to
597         restrict postfix expression to member access expressions.
598         (cp_parser_unary_expression): Update call to
599         cp_parser_postfix_expression to reflect new parameter.
600         (cp_parser_declared_type): New.
601         (cp_parser_simple_type_specifier): Parse decltype types.
603 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
605         PR c++/32346
606         * call.c (convert_for_arg_passing): Only widen bitfields to their
607         declared types if necessary.
609 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
611         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
612         Constify.
614 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
616         * decl.c (typename_hash, typename_compare): Constify.
617         * mangle.c (hash_type, compare_type): Likewise.
618         * pt.c (eq_local_specializations, hash_local_specialization):
619         Likewise.
620         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
621         list_hash): Likewise.
622         * typeck2.c (pat_compare): Likewise.
624 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
626         * method.c (implicitly_declare_fn): Increase alignment if member
627         function pointer format requires it.
629 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
631         PR c++/29001
632         * typeck.c (check_return_expr): Do not pass a null argument
633         to null_ptr_cst_p.
635 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
637         PR c++/32561
638         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
639         only on VAR_DECL.
641 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
643         PR c++/32839
644         * typeck.c (convert_arguments): Only use default args if we have
645         a function decl.
647         PR c++/30818
648         * typeck.c (structural_comptypes): No need to check
649         resolve_typename_type return value here.
650         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
651         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
652         original type rather than error_mark_node in case of failure.
653         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
654         resolve_typename_type result check.
655         (cp_parser_direct_declarator, cp_parser_head,
656         cp_parser_constructor_declarator_p): Likewise.
658 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
660         * pt.c (template_parms_variadic_p): Remove.
661         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
663 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
665         PR c++/30854
666         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
667         argument to dump_aggr_init_expr_args instead of false.
669 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
671         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
672         canonical types; otherwise, fall back to structural type
673         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
674         internal compiler error if the canonical types are wrong.
675         
676 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
678         PR c++/32560
679         * parser.c (cp_parser_make_indirect_declarator): When the
680         the code argument is ERROR_MARK return cp_error_declarator.
682 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
684         PR 32617
685         * decl.c (cxx_init_decl_processing): Don't set
686         force_align_functions_log.
687         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
688         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
689         FUNCTION_DECL, return its alignment.
691 2007-07-09  Richard Guenther  <rguenther@suse.de>
693         * decl.c (start_preparsed_function): Do not promote return type.
695 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
697         PR c++/30535
698         * pt.c (unify): Never pass error_mark_node to template_decl_level.
700 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
702         PR c++/32232
703         * pt.c (resolve_overloaded_unification): Robustify.  Return a
704         bool, not an int.
705         (type_unification_real): Adjust accordingly.
707 2007-07-06  Richard Guenther  <rguenther@suse.de>
709         * init.c (build_new_1): Use the correct pointer type.
710         * typeck2.c (build_m_component_ref): Likewise.
712 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
714         PR c++/32245
715         * init.c (build_zero_init): Always build an initializer for
716         non-static storage.
717         * typeck2.c (build_functional_cast): Use build_zero_init.
719         PR c++/32251
720         * init.c (build_new_1): Always pass the allocation function to
721         build_op_delete_call.
722         * call.c (build_op_delete_call): Handle operator delete with a
723         variable-argument list.  Do not issue an error when no matching
724         deallocation function is available for a new operator.
726         PR c++/31992
727         * cp-tree.h (any_value_dependent_elements_p): Declare it.
728         * decl.c (value_dependent_init_p): New function.
729         (cp_finish_decl): Use it.
730         * pt.c (value_dependent_expression_p): Use
731         any_value_dependent_elements_p.
732         * parser.c (cp_parser_primary_expression): Add comment about
733         treating dependent qualified names as integral
734         constant-expressions.
736 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
738         * decl.c (build_ptrmemfunc_type): Always use structural equality
739         tests when comparing pointer-to-member-function types, because the
740         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
741         types.
742         
743 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
745         * init.c (build_new): Tweak comment.
747 2007-06-29  Dave Brolley  <brolley@redhat.com>
749         PR c++/31743
750         * parser.c (cp_parser_new_type_id): Don't reduce a named array
751         type to its base type and number of elements here.
752         * init.c (build_new): Call complete_type_or_else to ensure that the
753         type is complete and to issue a diagnostic if it is not.
754         (build_new_1): Don't call complete_type_or_else here.
756 2007-07-03  Richard Guenther  <rguenther@suse.de>
758         PR c++/32609
759         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
760         after recursing.
762 2007-07-02  Simon Baldwin  <simonb@google.com>
764         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
765         for inner-style nested forward declarations that don't declare
766         anything useful.
768 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
770         PR c++/31748
771         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
772         DECL_P in not a variable and appears more than once error messages.
774 2007-07-01  Ollie Wild  <aaw@google.com>
776         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
777         (select_decl): Remove function.
778         (unqualified_namespace_lookup): Populate binding by calling
779         ambiguous_decl.  Remove select_decl call.
780         (lookup_qualified_name): Remove select_decl call.
781         * decl.c (lookup_and_check_tag): Check for ambiguous references.
782         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
783         generation when name lookup is ambiguous.
785 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
787         PR c++/31724
788         * init.c (build_new_1): Use structural equality on the copy of the
789         array type.
791 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
793         * decl2.c (determine_visibility): Implement
794         flag_visibility_ms_compat effect on type info.
795         * decl.c (cxx_init_decl_processing): Implement
796         global effect of flag_visibility_ms_compat.
798 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
800         * decl2.c (start_objects): Mark constructor-running function
801         as artificial.
803 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
805         PR c++/32111
806         * decl.c (grokdeclarator): Reset friendp for member functions declared
807         friend of their own class.
809 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
811         * decl2.c (determine_visibility): Don't look for dllexport here.
812         (determine_visibility_from_class): Tidy.
814 2007-06-18  Simon Baldwin <simonb@google.com>
816         PR c++/31923
817         * parser.c (cp_parser_single_declaration): Added check for storage
818         class other than sc_none in parsed declaration, and a flag to indicate
819         if the call is part of an explicit template specialization parse.
820         * (cp_parser_explicit_specialization): Specialization check flag added
821         to call to cp_parser_single_declaration(), set true.
822         * (cp_parser_template_declaration_after_export): Specialization check
823         flag added to call to cp_parser_single_declaration(), set false.
824         * pt.c (check_explicit_specialization): Added code to copy visiblity
825         and linkage from the templated function to the explicit specialization.
827 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
829         * typeck.c (build_binary_op): For templates build the
830         expression in pieces to avoid the assert in build2_stat.
831         (get_member_function_from_ptrfunc):
832         Change over to using POINTER_PLUS_EXPR and convert
833         the second operand to sizetype.
834         * typeck2.c (build_m_component_ref):  Likewise.
835         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
836         instead of PLUS_EXPR for pointers.
837         (build_new_1): Likewise.
838         (build_vec_delete_1): Likewise.
839         (build_vec_delete): Likewise.
840         * class.c (build_base_path): Likewise.
841         (build_base_path): Likewise.
842         (convert_to_base_statically): Likewise.
843         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
844         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
845         instead of PLUS_EXPR.
846         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
847         instead of PLUS_EXPR for pointers.
848         * call.c (build_special_member_call): Likewise.
849         * rtti.c (build_headof): Likewise.
850         Use sizetype instead of ptrdiff_type_node.
851         (tinfo_base_init): Create a POINTER_PLUS_EXPR
852         instead of PLUS_EXPR for pointers.
853         * except.c (expand_start_catch_block):  Do a
854         NEGATIVE and then a POINTER_PLUS_EXPR instead
855         of a MINUS_EXPR.
856         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
857         PLUS_EXPR on pointer types over to use
858         POINTER_PLUS_EXPR and remove the conversion
859         to the pointer types.
860         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
861         adding to a pointer type. Use size_int instead of
862         ssize_int. Convert the index to sizetype before
863         adding it to the pointer.
865 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
867         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
868         (DECL_ANON_UNION_VAR_P): New macro.
869         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
870         than DECL_VAR_MARKED_P, to keep track of which variables we have
871         seen.
872         * decl.c (redeclaration_error_message): Complain about redeclaring
873         anonymous union members at namespace scope.
874         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
876 2007-06-14  Geoff Keating  <geoffk@apple.com>
878         * decl2.c (determine_visibility): Ensure that functions with
879         hidden types as parameters are hidden.
881         PR 31093
882         * decl2.c (determine_visibility): Remove duplicate code for
883         handling type info.
885 2007-06-12  Ian Lance Taylor  <iant@google.com>
887         PR libstdc++/29286
888         * init.c (avoid_placement_new_aliasing): New static function.
889         (build_new_1): Call it.
891 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
893         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
894         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
896 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
898         PR c++/32177
899         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
900         on init, the non-decl cond operand and increment value.
902 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
904         PR c++/30759
905         * decl.c (check_initializer): Report an error when a brace enclosed
906         initializer is used for a non-aggregate type in C++98.
907         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
908         cxx_dialect.
909         (grokdeclarator): Likewise.
910         (move_fn_p): Likewise.
911         * typeck.c (check_return_expr): Likewise.
912         * call.c (reference_binding): Likewise.
913         * error.c (cp_cpp_error): Likewise.
914         * pt.c (check_default_tmpl_args): Likewise.
915         (tsubst): Likewise.
916         * lex.c (init_reswords): Likewise.
917         * parser.c (p_parser_primary_expression): Likewise.
918         (TOKEN_PRECEDENCE): Likewise.
919         (cp_parser_init_declarator): Likewise.
920         (cp_parser_ptr_operator): Likewise.
921         (cp_parser_parameter_declaration): Likewise.
922         (cp_parser_enclosed_template_argument_list): Likewise.
923         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
924         (cp_parser_next_token_ends_template_argument_p): Likewise.
926 2007-06-04  Simon Baldwin  <simonb@google.com>
928         * decl.c (grokdeclarator): Readability change.  Moved case labels
929         into direct switch statement scope.
931 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
933         * call.c (convert_like_real): Remove pointless code.
935 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
937         * decl.c (get_atexit_fn_ptr_type): New function.
938         (get_atexit_node): Use it.
939         (start_cleanup_fn): Likewise.
940         (register_dtor_fn): Use the object's destructor, instead of a
941         separate cleanup function, where possible.
942         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
943         (atexit_fn_ptr_type_node): New macro.
944         * decl2.c (build_cleanup): Use build_address.
946 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
948         * typeck.c (build_binary_op): Include types in error.
950 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
952         PR c++/31806
953         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
954         needs runtime initialization.
956 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
958         PR c++/32158
959         * semantics.c (finish_trait_expr): Complete the types.
961 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
962             Douglas Gregor <doug.gregor@gmail.com>
963             Pedro Lamarao <pedro.lamarao@mndfck.org>
964             Howard Hinnant <howard.hinnant@gmail.com>
966         PR c++/7412
967         PR c++/29939
968         * typeck.c (comptypes): Don't consider rvalue and lvalue
969         reference types to be equivalent.
970         (check_return_expr): Move from certain lvalues when returning
971         them.
972         * decl.c (grokdeclarator): Implement reference collapsing.
973         (copy_fn_p): Don't consider constructors taking rvalue references
974         to be copy constructors.
975         (move_fn_p): New.
976         * call.c (conversion): New "rvaluedness_matches_p" member.
977         (convert_class_to_reference): Require reference type as first
978         parameter instead of base type.
979         (reference_binding): Add logic to handle rvalue references.
980         (implicit_conversion): Update inaccurate comment.
981         (convert_like_real): Disable creation of temporaries that are
982         impossible to initialize for types with move constructors.
983         (build_over_call): Elide move constructors when possible.
984         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
985         (maybe_handle_ref_bind): Return conversion instead of type node.
986         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
987         determine preferred conversion sequences.
988         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
989         (LOOKUP_PREFER_RVALUE): New.
990         (DECL_MOVE_CONSTRUCTOR_P): New.
991         (struct cp_declarator): Add "reference" member for reference
992         types, with new "rvalue_ref" flag.
993         (cp_build_reference_type): Declare.
994         (move_fn_p): Declare.
995         * error.c (dump_type_prefix): Format rvalue reference types
996         correctly in error messages.
997         * except.c (build_throw): Move from certain lvalues when
998         throwing.
999         * mangle.c (write_type): Mangle rvalue references differently
1000         than regular references.
1001         * parser.c (make_reference_declarator): Add boolean parameter for
1002         rvalue references.
1003         (cp_parser_make_indirect_declarator): New.
1004         (cp_parser_new_declarator_opt): Call
1005         cp_parser_make_indirect_declarator. 
1006         (cp_parser_conversion_declarator_opt): Ditto.
1007         (cp_parser_declarator): Ditto.
1008         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1009         declarators.
1010         * pt.c (tsubst): Implement reference collapsing.
1011         (maybe_adjust_types_for_deduction): Implement special template
1012         parameter deduction rule for rvalue references.
1013         (type_unification_real): Update calls to
1014         maybe_adjust_types_for_deduction.
1015         (try_one_overload): Ditto.
1016         (unify_pack_expansion): Ditto.
1017         * tree.c (lvalue_p_1): Handle rvalue reference types.
1018         (cp_build_reference_type): New.
1020 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
1022         PR c++/31809
1023         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1024         variables that need runtime initialization.
1026 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
1028         PR c++/31339
1029         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1030         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1031         case POSTDECREMENT_EXPR>): Return the error_mark_node
1032         if either the real or imaginary parts would an
1033         error_mark_node.
1034         
1035 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
1036             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1038         PR c++/31745
1039         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1040         token is a closing brace, false if there are no tokens left.
1041         (cp_parser_namespace_alias_definition): Only consume the next token if
1042         it is a closing brace.
1044         * parser.c (cp_parser_class_specifier): Likewise.
1046 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1048         * semantics.c (finish_member_declaration): Fix a typo in the
1049         last checkin.
1051 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
1053         PR c++/31431
1054         PR c++/31432
1055         PR c++/31434
1056         PR c++/31435
1057         PR c++/31437
1058         PR c++/31438
1059         PR c++/31442
1060         PR c++/31443
1061         PR c++/31444
1062         PR c++/31445
1063         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1064         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1065         * pt.c (check_for_bare_parameter_packs): Return bool indicated
1066         whether everything was okay. Fix indentation.
1067         (push_template_decl_real): Check for bare parameter packs in
1068         function parameters; where errors occur, mark the parameter types
1069         with ERROR_MARK_NODEs to avert ICEs.
1070         (coerce_template_parameter_pack): New.
1071         (coerce_template_parms): Moved parameter pack coercion into
1072         coerce_template_parameter_pack, and permit it anywhere in the
1073         template parameter list (not just at the end). Parameter and
1074         argument indices can vary (somewhat) separately now, so add
1075         PARM_IDX and ARG_IDX.
1076         (fn_type_unification): Don't set an argument pack as incomplete if
1077         no argument pack was deduced.
1078         (type_unification_real): If a type parameter is a parameter pack
1079         and has not otherwise been deduced, it will be deduced to an empty
1080         parameter pack.
1081         (more_specialized_fn): Use the actual lengths of the argument
1082         lists when comparing against expansions.
1083         * semantics.c (finish_member_declaration): If a field's type has
1084         bare parameter packs, error and set its type to ERROR_MARK_NODE.
1086 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
1088         PR target/27067
1089         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1091 2007-05-22  Ollie Wild  <aaw@google.com>
1093         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1094         (unqualified_namespace_lookup): Adds check for hidden types.
1096 2007-05-22  Ollie Wild  <aaw@google.com>
1098         * decl.c (duplicate_decls): Verify namespace names are unique.
1100 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
1102         * decl.c (cxx_maybe_build_cleanup): Handle
1103         __attribute__((cleanup)).
1105 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1107         * cvt.c (cp_convert_and_check): Don't check warnings if the
1108         conversion failed.
1110 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1112         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1114 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
1116         PR c++/29928
1117         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1118         type only if is a class type (5.2.8/4).
1120 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1122         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1123         * decl.c (grokdeclarator): Use unsigned_type_for instead of
1124         c_common_unsigned_type.
1126 2007-05-11  Silvius Rus  <rus@google.com>
1128         * cp/typeck.c (build_indirect_ref): Add call to
1129         strict_aliasing_warning.
1130         (build_reinterpret_cast_1): Condition call to
1131         strict_aliasing_warning. 
1133 2007-05-11  Jan Hubicka  <jh@suse.cz>
1135         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1136         * decl2.c (start_objects): ctors and dtors are no longer public.
1137         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1138         
1139 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1141         * typeck.c (build_unary_op): Remove code that used to
1142         handle non lvalue increments/decrements.
1144 2007-05-07  Mike Stump  <mrs@apple.com>
1146         * parser.c (check_empty_body): Add.
1147         (cp_parser_iteration_statement): Add call to check_empty_body.
1149 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
1151         PR 31775
1152         * mangle.c (write_mangled_name): Mangle static variable names.
1153         (write_unqualified_name): Use local-source-name for
1154         namespace-scope static variables.
1156 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1158         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1159         not in effect.
1161 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1163         PR c++/31663
1164         * decl2.c (constrain_class_visibility): 
1165         Use strip_pointer_or_array_types instead of strip_array_types.
1167 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1169         PR C++/30221
1170         * decl.c (reshape_init_r): Don't reshape the first element if it
1171         is a pointer to member function.
1173 2007-04-27  Simon Baldwin  <simonb@google.com>
1175         * decl.c (grokparms): Changed message format from %qD to %qE.
1177 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
1179         * error.c (maybe_warn_variadic_templates): Variadic templates are
1180        now in C++0x, so only warn about them in C++98 mode.
1181         
1182 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1184         PR C++/30016
1185         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1186         integeral types from vectors types.
1188 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
1190         PR c++/31598
1191         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1192         for type dependent OMP_CLAUSE_DECLs.
1194 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
1196         PR c++/31338
1197         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1198         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1199         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1200         * init.c (build_zero_init): Adjust, as
1201         COMPLEX_TYPE is now a SCALAR_TYPE.
1202         * typeck2.c (digest_init): Allow brace-enclosed initializers for
1203         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1205 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
1207         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1208         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1209         (trait_expr_value): Adjust.
1211 2007-04-23  Simon Baldwin  <simonb@google.com>
1213         * decl.c (grokparms): Added new error for duplicate function
1214         parameters names in function prototypes, to match gcc behavior.
1216 2007-04-23  Jan Hubicka  <jh@suse.cz>
1218         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1219         bits dirrectly.
1221 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1223         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1224         instead of checking GIMPLE_STMT_P in chain_next.
1226 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
1228         PR c++/31513
1229         * call.c (convert_for_arg_passing): Convert bitfields to their
1230         declared types.
1232 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
1234         PR c++/31517
1235         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1237 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
1239         PR c++/29365
1240         * cp/decl2.c (constrain_class_visibility):
1241         Do not warn about the use of anonymous namespace in the main input file.
1243 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
1245         * cp-tree.h (current_template_parms): Fix typo in comment.
1247 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
1249         * cp-tree.h, error.c: Fix comment typos.
1251 2007-04-13  Jason Merrill  <jason@redhat.com>
1253         PR c++/31074
1254         * call.c (reference_binding): Add c_cast_p parm.  If true,
1255         add quals to TO as needed to make it reference-compatible.
1257 2007-04-11  Jan Hubicka  <jh@suse.cz>
1259         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1260         that we are not processing template_decl.
1262 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
1264         PR c++/31449
1265         * class.c (build_base_path): Ensure that the converted pointer has
1266         the same cv-qualification as the input.
1268 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
1270         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1272 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
1274         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1275         Do not set it.
1276         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1277         * tree.c (cp_add_pending_fn_decls): Remove.
1278         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1280 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
1282         Revert change removing staticp.
1284 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
1286         * cp-objcp-common.c (cxx_staticp): Remove.
1287         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1288         * cp-tree.h (cxx_staticp):      
1290 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
1292         * class.c (check_for_override): Don't remove dllmport attribute
1293         of virtual methods.
1295 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
1297         PR c++/30847
1298         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1299         type issue error and return early.
1301 2007-03-30  Jason Merrill  <jason@redhat.com>
1303         PR c++/31187
1304         * typeck.c (cp_type_readonly): New fn.
1305         * cp-tree.h: Declare it.
1306         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1307         (cp_finish_decl): Not here.
1309 2007-03-31  Richard Guenther  <rguenther@suse.de>
1311         * optimize.c (maybe_clone_body): Replace splay-tree usage by
1312         pointer-map.
1314 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
1316         PR c++/31138
1317         PR c++/31140
1318         PR c++/31141
1319         * parser.c (declarator_can_be_parameter_pack): New.
1320         (cp_parser_template_parameter): Only parse the `...' if the
1321         declarator can be a parameter pack.
1322         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1323         is NULL.
1324         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1325         types (they could be used as array bounds). 
1326         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1327         (tsubst_pack_expansion): Handle failure to expand parameter
1328         packs.
1329         
1330 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1332         PR c++/26099
1333         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1334         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1335         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1336         (CLASS_TYPE_NON_UNION_P): Add.
1337         (struct lang_type_class): Add has_complex_dflt.
1338         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1339         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1340         * cp-tree.def: Add TRAIT_EXPR.
1341         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1342         * lex.c (struct resword): Add __has_nothrow_assign,
1343         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1344         __has_trivial_constructor, __has_trivial_copy,
1345         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1346         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1347         __is_pod, __is_polymorphic, __is_union.
1348         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1349         (cp_parser_trait_expr): New.
1350         * semantics.c (finish_trait_expr, trait_expr_value
1351         classtype_has_nothrow_copy_or_assign_p): New.
1352         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1353         as static.
1354         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1355         * class.c (check_bases, check_field_decl, check_bases_and_members):
1356         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1357         * pt.c (uses_template_parms, tsubst_copy_and_build,
1358         value_dependent_expression_p, type_dependent_expression_p): Deal with
1359         TRAIT_EXPR.
1360         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1362 2007-03-29  Richard Guenther  <rguenther@suse.de>
1364         * tree.c (cp_walk_subtrees): Do not set input_location.
1366 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1368         PR c++/29077
1369         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1370         destructor.
1372 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1374         * parser.c (struct cp_parser): Update comment for
1375         greater_than_is_operator_p.
1376         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1377         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1378         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1379         !GREATER_THAN_IS_OPERATOR_P.
1380         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1381         `>>' operators that will become two `>' tokens in C++0x.
1382         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1383         mode, allowing it to terminate default arguments.
1384         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1385         `>>' like two consecutive `>' tokens.
1386         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1387         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1388         ends a template argument.
1390 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1392         * decl.c (redeclaration_error_message): Complain when redeclaring
1393         a friend function with default template arguments (C++0x mode only).
1394         * cp-tree.h (check_default_tmpl_args): Declare.
1395         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1396         template arguments in function templates. Add support for checking
1397         the default template arguments of friend templates.
1398         (push_template_decl_real): Fix call to check_default_tmpl_args.
1399         (type_unification_real): If a template parameter has not been
1400         deduced but provides a default template argument, substitute into
1401         that default template argument.
1402         * parser.c (cp_parser_init_declarator): When declaring (but not
1403         defining!) a function template in C++0x mode, check for default
1404         template arguments.
1406 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1408         PR c++/29993
1409         * decl.c (grokdeclarator): Deal with cv-qualified function type
1410         typedefs in the same way for member and non-member functions.
1412 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1414         * parser.c (cp_parser_member_declaration): Pedwarn
1415         about stray semicolons after member declarations.
1417 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1419         PR c++/30500
1420         * pt.c (instantiate_decl): Set in_system_header.
1422 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1424         * cp-tree.h (current_tempalte_parms): Improve documentation.
1425         * pt.c (current_template_args): Likewise.
1427         PR c++/30863
1428         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1429         not consume tokens when failing.
1431 2007-03-22  Jim Wilson  <wilson@specifix.com>
1432             Mark Mitchell  <mark@codesourcery.com>
1434         PR c++/31273
1435         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1436         consistent with FROM.
1438 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1440         * error.c (dump_expr): Handle dependent names that designate types.
1441         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1443 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1445         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1447 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1449         * cvt.c (cp_convert_and_check) : Define.
1450         * cp-tree.h (cp_convert_and_check): Declare.
1451         * call.c (convert_conversion_warnings): Rename to
1452         conversion_null_warnings.  The warning for floating-point to
1453         integer is handled by convert_and_check in convert_like_real.
1454         (convert_like_real): convert_conversion_warnings was renamed as
1455         conversion_null_warnings.
1456         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1457         overflow and changes of value during conversion.
1459 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1461         PR c++/30891
1462         * parser.c (cp_parser_statement): If 'namespace' is found, this
1463         only can be a namespace alias definition, so parse it now.
1464         (cp_parser_namespace_alias_definition): if we find an open brace
1465         instead of '=', then this is actually a misplaced namespace
1466         definition.
1467         
1468 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1470         PR c++/24924
1471         * decl.c (cxx_init_decl_processing): Move command-line options
1472         processing to c-opts.c.
1473         
1474 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1476         * ptree.c (cxx_print_type): Use formatting markup for integers
1477         when printing template parameter index/level/orig level.
1478         (cxx_print_xnode): Ditto.
1479         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1480         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1481         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1482         HOST_WIDE_INTs.
1483         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1484         rather than a HOST_WIDE_INT.
1485         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1486         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1487         better bit-packing.
1488         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1489         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1490         IN_BASE_INITIALIZER bool bitfields.
1491         (struct cp_declarator): Make KIND a 4-bit field. Make
1492         PARAMETER_PACK_P a bool bitfield just after KIND.
1493         * pt.c (uses_parameter_packs): Destroy the pointer set.
1494         (make_pack_expansion): Ditto.
1495         (check_for_bare_parameter_packs): Ditto.
1496         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1497         
1498 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1500         PR c++/31165
1501         * call.c  (convert_default_arg): Instead of copying the node,
1502         unshare it.
1504 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1506         PR c++/30860
1507         * call.c (convert_conversion_warnings): New..
1508         (convert_like_real): .. factored out from here.
1509         (convert_conversion_warnings): Add warning about
1510         false being converted to NULL in argument passing.
1512 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1514         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1515         (finish_do_body): Warn about empty body in do/while statement.
1517 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1519         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1520         
1521 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1523         PR c/21438
1524         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1525         warning.
1526         
1527 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1529         * cp/repo.c (init_repo): Initialize random_seed saved options.
1530         (finish_repo): Adjust.
1532 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1534         PR bootstrap/30899
1535         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1536         which to copy.
1538 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1540         * decl.c (compute_array_index_type): New warning flag warn_vla.
1542 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1544         PR c++/30108
1545         * call.c (convert_default_arg): Copy non-constant arguments.
1547 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1549         PR c++/31038
1550         * parser.c (cp_parser_postfix_expression): Disallow compound
1551         literals in constant expressions.
1553         PR c++/30328
1554         * semantics.c (finish_typeof): Use unlowered_expr_type.
1555         
1556 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
1558         PR c++/30274
1559         * cp-tree.h (unlowered_expr_type): New function.
1560         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1561         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1562         (unlowered_expr_type): New function.
1563         (build_unary_op): Disallow predecrements of bool bitfields.
1564         * call.c (build_conditional_expr): Use unlowered_expr_type.
1565         * pt.c (type_unification_real): Likewise.
1567 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
1569         PR c++/20599
1570         * typeck.c (check_return_expr): Check for bare parameter packs.
1571         (comptypes): Compare template parameter packs and
1572         type pack expansions.
1573         * decl.c (grokdeclarator): Deal with the declaration of function
1574         parameter packs.
1575         (grokparms): Verify that the (optional) function parameter pack is
1576         at the end of the parameter list.
1577         (xref_basetypes): Handle pack expansions in the base class.
1578         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1579         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1580         (NONTYPE_ARGUMENT_PACK): New.
1581         (TYPE_PACK_EXPANSION): New.
1582         (EXPR_PACK_EXPANSION): New.
1583         (ARGUMENT_PACK_SELECT): New.
1584         * cp-objcp-common.c (cp_tree_size): Compute size of
1585         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1586         ARGUMENT_PACK_SELECT.
1587         * error.c (dump_template_argument): Print template argument packs.
1588         (dump_template_argument_list): Ditto.
1589         (dump_template_parameter): Dump `...' for template type parameter
1590         packs.
1591         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1592         (dump_parameters): Print function parameter packs.
1593         (dump_template_parms): Print template argument packs.
1594         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1595         (maybe_warn_variadic_templates): New.
1596         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1597         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1598         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1599         CAST_EXPR. 
1600         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1601         (write_template_arg): Write argument packs as separate arguments.
1602         * cp-tree.h (struct template_parm_index_s): Add flag that
1603         indicates that the template parameter is actually a parameter
1604         pack.
1605         (struct tree_argument_pack_select): New.
1606         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1607         (union lang_tree_node): Add argument_pack_select.
1608         (FUNCTION_PARAMETER_PACK_P): New.
1609         (PACK_EXPANSION_P): New.
1610         (PACK_EXPANSION_PATTERN): New.
1611         (SET_PACK_EXPANSION_PATTERN): New.
1612         (PACK_EXPANSION_PARAMETER_PACKS): New.
1613         (ARGUMENT_PACK_P): New.
1614         (ARGUMENT_PACK_ARGS): New.
1615         (SET_ARGUMENT_PACK_ARGS): New.
1616         (ARGUMENT_PACK_INCOMPLETE_P): New.
1617         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1618         (TEMPLATE_PARM_PARAMETER_PACK): New.
1619         (TEMPLATE_TYPE_PARAMETER_PACK): New.
1620         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1621         (ARGUMENT_PACK_SELECT_INDEX): New.
1622         (ARGUMENT_PACK_SELECT_ARG): New.
1623         (struct cp_declarator): Add parameter_pack_p flag.
1624         (maybe_warn_variadic_templates): Declare.
1625         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1626         indicate a template parameter pack. 
1627         (uses_parameter_packs): Declare.
1628         (template_parameter_pack_p): Declare.
1629         (template_parms_variadic_p): Declare.
1630         (make_pack_expansion): Declare.
1631         (check_for_bare_parameter_packs): Declare.
1632         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1633         sizeof... expressions. 
1634         (pp_cxx_expression): Print pack expansions and non-type argument
1635         packs.
1636         (pp_cxx_exception_specification): Print pack expansions. 
1637         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1638         (pp_cxx_ctor_initializer): Print pack expansions.
1639         (pp_cxx_type_id): Print pack expansions.
1640         (pp_cxx_template_argument_list): Print argument packs.
1641         (pp_cxx_template_parameter): Print ellipsis for template parameter
1642         packs.
1643         * pt.c (comp_template_parms): Compare template parameter packs.
1644         (template_parameter_pack_p): New.
1645         (template_parms_variadic_p): New.
1646         (template_args_variadic_p): New.
1647         (make_ith_pack_parameter_name): New.
1648         (struct find_parameter_pack_data): New.
1649         (find_parameter_packs_r): New.
1650         (uses_parameter_packs): New.
1651         (make_pack_expansion): New.
1652         (check_for_bare_parameter_packs): New.
1653         (expand_template_argument_pack): New.
1654         (reduce_template_parm_level): Propagate parameter pack flag.
1655         (process_template_parm): Add is_parameter_pack parameter to state
1656         when the parameter is actually a parameter pack. Create template
1657         parameter packs when is_parameter_pack is true.
1658         (current_template_args): The argument for a template parameter
1659         pack is an argument pack containing a single pack expansion.
1660         (process_partial_specialization): When checking that non-type
1661         argument expressions do not involve template parameters, loop over
1662         the arguments in argument packs separately.
1663         (push_template_decl_real): Check that the type of the declaration
1664         does not have any bare parameter packs. Check that primary
1665         templates have no more than one parameter pack, and that it comes
1666         at the end of the template parameter list.
1667         (convert_template_argument): Handle coercions for pack expansion
1668         expressions by coercing the pattern then rebuilding the expansion.
1669         (coerce_template_parms): When coercing the arguments for a
1670         variadic template, pack "extra" arguments into an argument pack.
1671         (coerce_template_template_parms): Cannot coerce between parameter
1672         packs and non-pack parameters.
1673         (template_args_equal): Compare PACK_EXPANSION_P expressions.
1674         (comp_template_args): Expand all template arguments packs before
1675         comparing template argument lists.
1676         (mangle_class_name_for_template): Make argument packs as separate
1677         template arguments.
1678         (for_each_template_parm_r): No need to handle BASELINK. 
1679         (instantiate_class_template): Handle pack expansions in the base
1680         class list.
1681         (tsubst_pack_expansion): New.
1682         (tsubst_template_args): Handle substitutions of argument packs and
1683         pack expansion into template argument lists.
1684         (tsubst_decl): Expand function parameter packs into separate
1685         function parameters.
1686         (tsubst_arg_types): Expand a type pack expansion into separate
1687         argument types.
1688         (tsubst_exception_specification): Handle pack expansions in
1689         exception specifiers.
1690         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
1691         replacing a template parameter with its argument. If we encounter
1692         a substitution for an argument pack, just return the parameter
1693         itself. 
1694         (tsubst_copy): sizeof(X...) returns the number of elements in
1695         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
1696         PARM_DECL is a parameter pack.
1697         (tsubst_expr): Expression pack expansions and argument packs
1698         cannot show up here; they will all be handled through function
1699         calls, sizeof, and template argument lists.
1700         (tsubst_copy_and_build): sizeof(X...) returns the number of
1701         elements in parameter pack X.  Handle pack expansions in TREE_LIST
1702         and CONSTRUCTOR nodes.
1703         (fn_type_unification): Handle "incomplete" explicit template
1704         argument lists that specify some of the arguments for a template
1705         parameter pack.
1706         (type_unification_real): Unify arguments against pack expansions.
1707         (template_parm_level_and_index): New, helper function.
1708         (unify_pack_expansion): New.
1709         (unify): Unify argument packs on an argument-by-argument basis,
1710         handling variadic argument packs as well.
1711         (more_specialized_fn): Handle unification of function parameter
1712         packs. All things being equal, prefer non-variadic function
1713         templates to variadic function templates.
1714         (more_specialized_class): Prefer the variadic class template
1715         partial specialization that binds fewer arguments to a parameter
1716         pack.
1717         (regenerate_decl_from_template): Expand function parameter packs
1718         into separate parameters.
1719         (instantiate_decl): Ditto.
1720         (tsubst_initializer_list): Handle pack expansions for base-class
1721         initializers.
1722         (dependent_type_p_r): Determine dependent types in argument packs
1723         and pack expansions.
1724         (value_dependent_expression_p): Determine value-dependence of
1725         non-type argument packs.
1726         (dependent_template_arg_p): Handle argument packs.
1727         * semantics.c (finish_cond): Check for bare parameter packs.
1728         (finish_expr_stmt): Ditto.
1729         (finish_for_expr): Ditto.
1730         (finish_switch_cond): Ditto.
1731         (finish_mem_initializers): Ditto.
1732         * name-lookup.c (arg_assoc_type): Handle pack expansions and
1733         argument packs.
1734         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1735         * parser.c (make_declarator): Declarator is not an expansion.
1736         (make_pointer_declarator): Transfer parameter pack flag to outer
1737         declarator.
1738         (make_reference_declarator): Ditto.
1739         (make_ptrmem_declarator): Ditto.
1740         (make_call_declarator): Ditto.
1741         (make_array_declarator): Ditto.
1742         (cp_parser_postfix_expression): Allow pack expansion expressions
1743         in the argument list for a call expression.
1744         (cp_parser_parenthesized_expression_list): Add new parameter
1745         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1746         into separate arguments."
1747         (cp_parser_new_placement): Allow pack expansion expressions.
1748         (cp_parser_new_initializer): Ditto.
1749         (cp_parser_mem_initializer_list): Allow ellipsis to create a
1750         base-class initializer expansion.
1751         (cp_parser_mem_initializer): Ditto.
1752         (cp_parser_template_parameter_list): Keep track of whether the
1753         template parameter is a template parameter pack.
1754         (cp_parser_template_parameter): Parse the ellipsis to indicate a
1755         template parameter pack.
1756         (cp_parser_type_parameter): Ditto.
1757         (cp_parser_template_argument_list): Parse the ellipsis to indicate
1758         a pack expansion.
1759         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1760         this declarator is a parameter pack.
1761         (cp_parser_parameter_declaration): The ellipsis does not end the
1762         parameter declaration, because it might be a parameter pack. Parse
1763         the ellipsis to indicate a parameter pack.
1764         (cp_parser_initializer): Allow pack expansions.
1765         (cp_parser_initializer_list): Allow ellipsis to create an
1766         initializer expansion.
1767         (cp_parser_base_clause): Allow ellipsis to create a base specifier
1768         expansion.
1769         (cp_parser_type_id_list): Allow ellipsis to create an exception
1770         specifier expansion.
1771         (cp_parser_attribute_list): Don't allow pack expansions.
1772         (cp_parser_functional_cast): Allow pack expansions.
1773         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1774         compute the length of a parameter pack.
1775         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1776         end a template argument.
1777         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1778         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1779         CAST_EXPR. 
1781 2007-03-09  Dirk Mueller  <dmueller@suse.de>
1783         * cp/call.c (build_new_op): Call warn_logical_operator.
1785 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
1787         PR c++/30852
1788         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1790         PR c++/30534
1791         * pt.c (any_template_arguments_need_structural_equality_p):
1792         Robustify.
1794 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
1796         * decl.c (grokdeclarator): Disable warnings for anonymous
1797         bitfields.
1799 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
1801         * typeck2.c (readonly_error): Always emit a hard error.
1802         Remove last argument.
1803         * cp-tree.h (readonly_error): Adjust prototype.
1804         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1805         * typeck.c (build_unary_op): Likewise.
1806         (build_modify_expr): Likewise.
1808 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
1810         PR c++/30895
1811         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1813 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1815         PR c++/15787
1816         * parser.c (struct cp_parser): New IN_IF_STMT.
1817         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1818         returning if parsing the body of an 'if' statement or issuing an
1819         error and continuing.
1820         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1821         body of 'if'.
1822         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1823         
1824 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
1826         PR c++/28253
1827         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1828         for thunks.
1830 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
1832         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1833         Objective-C++.  Don't exit early if -shared-libgcc needs to be
1834         added.
1836 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1838         * typeck.c (common_base_type): Delete unused function.
1839         
1840 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1842         * Make-lang.in: Add dummy lang.install-pdf target.
1844 2007-03-01  Simon Baldwin <simonb@google.com>
1846         PR c++/23689
1847         * decl.c (check_tag_decl): Added new warning for typedef ignored
1848         when it precedes an otherwise valid non-typedef declaration.
1850 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1852         * typeck.c (build_function_call): Store converted arguments
1853         in a stack-allocated array instead of building a list.
1854         (convert_arguments): Store arguments in the array passed in as an
1855         argument, and return the actual number of arguments.
1856         * call.c (build_call): Delete, and replace with...
1857         (build_call_n, build_call_a): New.
1858         (build_op_delete_call): Rewrite to avoid constructing argument lists.
1859         (build_over_call): Store converted arguments in a stack-allocated
1860         array instead of building a list.
1861         (build_cxx_call): Pass arguments in an array instead of as a list.
1862         (build_java_interface_fn_ref): Rewrite to avoid constructing
1863         argument lists.
1864         * tree.h: Update declarations to reflect above changes.
1865         * method.c (use_thunk): Use a stack-allocated array to hold
1866         the arguments instead of a list.
1867         * rtti.c (throw_bad_cast): Update call to cxx_call.
1868         (throw_bad_typeid): Likewise.
1869         (build_dynamic_cast_1): Likewise.
1870         * init.c (build_builtin_delete_call): Use build_call_n.
1871         * decl.c (expand_static_init): Likewise.
1872         * except.c (cp_protect_cleanup_actions): Likewise.
1873         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1874         (gimplify_must_not_throw_expr): Likewise.
1875         (cxx_omp_apply_fn): Use build_call_a.
1877 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1879         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1880         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1882 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1884         * cp-tree.h (static_ctors): Remove.
1885         * cp-tree.h (static_dtors): Likewise.
1886         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1887         refactoring of tree_map hierarchy.
1888         (decl_shadowed_for_var_insert): Likewise.
1889         * semantics.c (expand_body): Use c_expand_body.
1890         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1891         * decl2.c (static_ctors): Remove.
1892         (static_dtors): Likewise.
1893         (generate_ctor_or_dtor_function): Pass NULL_TREE to
1894         objc_generate_static_init_call.  Do not call static_[cd]tors.
1895         (generate_ctor_and_dtor_functions_for_priority): Do not check for
1896         static_[cd]tors.
1897         (cp_write_global_declarations): Likewise.
1899 2007-02-23  Richard Guenther  <rguenther@suse.de>
1901         * class.c (note_name_declared_in_class): Make declaration
1902         changes meaning a pedwarn.
1904 2007-02-22  Michael Matz  <matz@suse.de>
1906         PR c++/29433
1907         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1908         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1909         dump_function_decl): Guard emitting outer scopes by new flag.
1910         * cp-lang.c (cxx_dwarf_name): New function.
1911         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1912         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1913         Remove functions.
1914         (push_template_decl_real, lookup_template_class): Remove calls
1915         to above functions.
1917 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
1919         * call.c (build_new_method_call): Ensure that explicit calls of
1920         destructors have type "void".
1922 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1924         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1925         and -Walways-true with -Waddress.
1926         * cvt.c (convert_to_void): Replace unconditional warning with
1927         -Waddress.
1929 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1931         * decl.c, tree.c: Fix comment typos.
1933 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1935         PR C++/30158
1936         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
1937         statement expression if we had an error mark node.
1939 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1940             Brooks Moses  <brooks.moses@codesourcery.com>
1941             Lee Millward  <lee.millward@codesourcery.com>
1943         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1944         Change class to tcc_vl_exp.
1946         * call.c (build_call): Use build_call_list instead 
1947         of build3. 
1948         (build_over_call): Likewise.
1949         (build_new_method_call): Use build_min_non_dep_call_list 
1950         instead of build_min_non_dep.
1952         * error.c (dump_call_expr_args): New function.
1953         (dump_aggr_init_expr_args): New function.
1954         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
1955         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1957         * cvt.c (convert_to_void): Use build_call_array instead
1958         of build3; use new AGGR_INIT_EXPR accessor macros.
1960         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1961         instead of TREE_CODE_LENGTH.
1963         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1964         AGGR_INIT_EXPR accessor macros.
1966         * cp-gimplify.c (cp_gimplify_init_expr): Use 
1967         AGGR_INIT_EXPR_SLOT to set the slot operand.
1969         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1970         (AGGR_INIT_EXPR_SLOT): New macro.
1971         (AGGR_INIT_EXPR_ARG): New macro.
1972         (aggr_init_expr_nargs): New macro.
1973         (AGGR_INIT_EXPR_ARGP): New macro.
1974         (aggr_init_expr_arg_iterator): New.
1975         (init_aggr_init_expr_arg_iterator): New.
1976         (next_aggr_init_expr_arg): New.
1977         (first_aggr_init_expr_arg): New.
1978         (more_aggr_init_expr_args_p): New.
1979         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1980         (stabilize_aggr_init): New declaration.
1981         (build_min_non_dep_call_list): Likewise.
1983         * tree.c (process_aggr_init_operands): New function.
1984         (build_aggr_init_array) New function.
1985         (build_cplus_new): Update to use new CALL_EXPR and
1986         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1987         build_aggr_init_array.
1988         (build_min_non_dep_call_list) New function.
1989         (build_min_nt): Assert input code parameter is not a variable
1990         length expression class.
1991         (build_min, build_min_non_dep): Likewise.
1992         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1993         to check for equality instead of recursing. Handle tcc_vl_exp
1994         tree code classes.
1995         (stabilize_call): Update to only handle CALL_EXPRs, not 
1996         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1997         (stabilize_aggr_init): New function.
1998         (stabilize_init): Use it.
2000         * cxx-pretty-print.c (pp_cxx_postfix_expression)
2001         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2002         AGGR_INIT_EXPR accessor macros and argument iterators.
2003         
2004         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2005         build_vl_exp. Iterate through the operands, recursively 
2006         processing each one.
2007         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2008         CALL_EXPR accessor macros.
2009         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2010         tree code classes. Use TREE_OPERAND_LENGTH instead of 
2011         TREE_CODE_LENGTH.
2013         * semantics.c (finish_call_expr): Use build_nt_call_list
2014         instead of build_nt.
2015         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
2016         accessor macros. Use build_call_array to construct the 
2017         CALL_EXPR node instead of build3
2018         
2019         * decl2.c (build_offset_ref_call_from_tree): Use 
2020         build_nt_call_list and build_min_non_dep_call_list instead
2021         of build_min_nt and build_min_non_dep.
2023         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2024         Use build_nt_call_list instead of build_min_nt.
2026 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2028         PR c++/28943
2029         * call.c (build_conditional_expr): Improve error message.
2030         
2031 2007-02-13  Dirk Mueller  <dmueller@suse.de>
2033         * friend.c (do_friend): Annotate warning about friend
2034         declarations in templates with OPT_Wnon_template_friend.
2035         Convert informal message from warning() to inform().
2037 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
2038             Mark Mitchell  <mark@codesourcery.com>
2040         PR c++/14622
2041         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2042         instantiations for variables.
2044 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2046         PR middle-end/7651
2047         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2048         Check warn_unused_value just once.
2050 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
2052         PR c++/26988
2053         * pt.c (determine_specialization): Use skip_artificial_parms_for.
2054         (fn_type_unificiation): Likewise.
2055         (get_bindings): Likewise.
2057 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
2059         PR target/29487
2060         * decl.c (finish_function): Use DECL_REPLACEABLE.
2061         * tree.c (cp_cannot_inline_tree_fn): Likewise.
2063 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2065         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2067 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2069         * decl.c (grokvardecl): Don't error if !have_tls.
2070         (grokdeclarator): Likewise.
2071         * parser.c (cp_parser_omp_threadprivate): Likewise.
2073 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
2075         PR c++/30703
2076         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2077         parameters and result decls in omp clauses.
2078         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2079         by reference.
2081 2007-02-05  Dirk Mueller  <dmueller@suse.de>
2083         PR bootstrap/30510
2084         * parser.c (cp_parser_class_specifier): Always initialize bases.
2086 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2088         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2089         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2090         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2091         expressions.
2092         * semantics.c (finish_omp_atomic): Store a whole expression node
2093         in operand 1, and integer_zero_node in operand 0, for dependent
2094         OMP_ATOMIC.  Rewrite to make flow easier to understand.
2096 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2098         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2100 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
2102         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2103         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2105 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
2107        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2108        keyword warning to -Wc++0x-compat.
2109         
2110 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2112         * decl.c (grokdeclarator): Update documentation.
2114 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2116         PR c++/30536
2117         * decl.c (grokdeclarator): If __thread is used together with
2118         a storage class other than extern and static, clear thread_p
2119         after issuing diagnostics and fall through to checking the
2120         storage class.
2122 2007-01-30  Roger Sayle  <roger@eyesopen.com>
2124         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2125         calculating the size of an array (to avoid recursive errors).
2127 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2129         PR c++/24745
2130         * typeck.c (build_binary_op): Fix logic for warning. Move warning
2131         to -Wpointer-arith.
2132         * call.c (convert_like_real): Don't warn when converting to
2133         boolean type.
2134         
2135 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2137         * decl.c (pop_label): Replace warning with call to
2138         warn_for_unused_label.
2140 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
2142         PR C++/28988
2143         * semantics.c (finish_pseudo_destructor_expr): Check the
2144         destrutor name by calling check_dtor_name.
2146 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
2148         * lex.c (D_CPP0X): Rename.
2149         (D_CXX0X): To this.
2150         (reswords): D_CPP0X -> D_CXX0X.
2151         (init_reswords): Ditto.
2152         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2153         of C++0x keywords as identifiers.
2155 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
2157         PR c++/27492
2158         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2159         function decls.
2161 2007-01-23  Ian Lance Taylor  <iant@google.com>
2163         * typeck.c (convert_for_assignment): Only warn about a = b = c
2164         when converting to bool.
2166 2007-01-23  Roger Sayle  <roger@eyesopen.com>
2168         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2169         TREE_OVERFLOW.
2170         * typeck.c (ignore_overflows): Remove the remaining uses of
2171         TREE_CONSTANT_OVERFLOW.
2173 2007-01-20  Jan Hubicka  <jh@suse.cz>
2175         * decl2.c (start_objects, start_static_storage_duration_function):
2176         Do not make the functions uninlinable.
2178 2007-01-17  Ian Lance Taylor  <iant@google.com>
2180         * class.c (add_method): Call VEC_reserve_exact rather than passing
2181         a negative size to VEC_reserve.
2183 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
2185         PR c++/29573
2186         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2188 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
2190         PR c++/28999
2191         * decl.c (make_typename_type): If the qualified name is not a
2192         type, issue an error.
2193         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2194         formatting.
2196 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
2198         * rtti.c: Include target.h.
2199         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2200         don't emit typeinfo for fundamental types as weak.
2201         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2203 2007-01-08  Richard Guenther  <rguenther@suse.de>
2205         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2207 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
2209         * call.c (standard_conversion): Pass flag to
2210         vector_types_convertible_p to disallow emission of note.
2211         * typeck.c (convert_for_assignment): Pass flag to
2212         vector_types_convertible_p to allow emission of note.
2213         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2214         to disallow emission of note.
2216 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2218         PR c++/28986
2219         * typeck.c (build_binary_op): Call overflow_warning if
2220         TREE_OVERFLOW_P is true for the result and not for any of the
2221         operands.
2222         
2223 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
2225        PR c++/19439
2226        * class.c (add_method): Don't wait until template
2227        instantiation time to complain about duplicate methods.
2228         
2229 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2231         PR c/19978
2232         * semantics.c (finish_unary_op_expr): Warn only if result
2233         overflowed and operands did not.
2235 2007-01-05  Ian Lance Taylor  <iant@google.com>
2237         * typeck.c (build_binary_op): Warn about comparing a non-weak
2238         address to NULL.
2240 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
2242         * pt.c (tsubst): Propagate the need for structural equality checks
2243         when reducing the level of template parameters.
2245 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
2247         * pt.c: Fix a comment typo.
2249 2007-01-02  Ian Lance Taylor  <iant@google.com>
2251         * semantics.c (maybe_convert_cond): Optionally warn when using an
2252         assignment as a condition.
2253         * typeck.c (convert_for_assignment): Optionally warn about
2254         assigning the result of an assignment to a bool.
2256 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2258         * pt.c (canonical_template_parms): Correct typo in comment.
2259         
2260 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2262         * typeck.c (structural_comptypes): Renamed from "comptypes".
2263         (comptypes): Use canonical type information to perform fast type
2264         comparison. When VERIFY_CANONICAL_TYPES, verify that the
2265         canonical type comparison returns the same results as we would see
2266         from the current, structural check. Support COMPARE_STRUCTURAL
2267         when we need structural checks.
2268         * decl.c (typename_compare): Fix comment.
2269         (build_typename_type): TYPENAME_TYPE nodes require structural
2270         equality checks, because they resolve different based on the
2271         current class type.
2272         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2273         require structural equality checks (for now).
2274         (build_ptrmemfunc_type): Build the canonical pointer to member
2275         function type.
2276         (compute_array_index_type): Whenever we build a new index type
2277         to represent the size of an array in a template, we need to mark
2278         this index type as requiring structural equality. This goes for
2279         arrays with value-dependent sizes with the current ABI, or all
2280         arrays with ABI-1.
2281         * tree.c (cplus_array_hash): New.
2282         (struct cplus_array_info): New.
2283         (cplus_array_compare): New.
2284         (cplus_array_htab): New.
2285         (build_cplus_array_type_1): Use a hash table to cache the array
2286         types we build. Build the canonical array type for each array
2287         type.
2288         (cp_build_qualified_type_real): When building a cv-qualified array
2289         type, use the hash table of array types and build canonical array
2290         types as necessary.
2291         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2292         use structural equality (for now).
2293         * cp-tree.h (COMPARE_STRUCTURAL): New.
2294         * pt.c (canonical_template_parms): New.
2295         (canonical_type_parameter): New.
2296         (process_template_parm): Find the canonical type parameter.
2297         (lookup_template_class): When we have named the primary template
2298         type, set the canonical type for our template class to the primary
2299         template type. If any of the template arguments need structural
2300         equality checks, the template class needs structural equality
2301         checks.
2302         (tsubst): When reducing the level of a template template
2303         parameter, we require structural equality tests for the resulting
2304         parameter because its template parameters have not had their types
2305         canonicalized. When reducing a template type parameter, find the
2306         canonical reduced type parameter.
2307         (any_template_arguments_need_structural_equality_p): New.