OSDN Git Service

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