OSDN Git Service

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