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