OSDN Git Service

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