OSDN Git Service

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