OSDN Git Service

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