OSDN Git Service

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