OSDN Git Service

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