OSDN Git Service

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