OSDN Git Service

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